summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-16 12:22:33 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-16 12:22:33 +0000
commit9eb1979d6c4f9cfc0b07223bbd02c1558c2742c3 (patch)
tree428a5a3e9a88e07cee40da87d3479c1f326d5d90
parent1c1d8117fd45beee2b5cb4c5964e4e9d17b5242e (diff)
downloadfpGUI-9eb1979d6c4f9cfc0b07223bbd02c1558c2742c3.tar.xz
* Fixed a bug in File Save Dialog where you can not save a new file anymore.
* Fixed the ComboBox dropdown flicker issue under Linux. I still need to test if it exists under Windows to. * Fixed the Popup Menu bug under Linux where it keeps closing before you can use the menu.
-rw-r--r--extras/code_templates/lazarus.dci2
-rw-r--r--src/corelib/gfx_popupwindow.pas5
-rw-r--r--src/corelib/x11/gfx_x11.pas21
-rw-r--r--src/gui/gui_dialogs.pas13
4 files changed, 26 insertions, 15 deletions
diff --git a/extras/code_templates/lazarus.dci b/extras/code_templates/lazarus.dci
index c551de04..d3dd368c 100644
--- a/extras/code_templates/lazarus.dci
+++ b/extras/code_templates/lazarus.dci
@@ -44,7 +44,7 @@ end.
{
fpGUI - Free Pascal GUI Library
- Copyright (C) 2006 - 2007 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2008 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
diff --git a/src/corelib/gfx_popupwindow.pas b/src/corelib/gfx_popupwindow.pas
index cf75b5da..def8e47c 100644
--- a/src/corelib/gfx_popupwindow.pas
+++ b/src/corelib/gfx_popupwindow.pas
@@ -64,7 +64,7 @@ implementation
type
- // Popup window linked list. Maybe we can implemnt it via a TList as well.
+ // Popup window linked list. Maybe we can implement it via a TList as well.
PPopupListRec = ^PopupListRec;
PopupListRec = record
Widget: TfpgPopupWindow;
@@ -83,6 +83,9 @@ procedure ClosePopups;
begin
while uFirstPopup <> nil do
begin
+ {$IFDEF DEBUG}
+ writeln('...closing ', uFirstPopup^.Widget.Name);
+ {$ENDIF}
TfpgPopupWindow(uFirstPopup^.Widget).Close;
end;
end;
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas
index ed9e93c5..60bba3d1 100644
--- a/src/corelib/x11/gfx_x11.pas
+++ b/src/corelib/x11/gfx_x11.pas
@@ -935,17 +935,20 @@ begin
}
{ This closes popup windows when you click the mouse elsewhere }
- if (Popup <> nil) then
+ if ev._type = X.ButtonPress then
begin
- ew := w;
- while (w <> nil) and (w.Parent <> nil) do
- w := TfpgWindowImpl(w.Parent);
-
- if (w <> nil) and (PopupListFind(w.WinHandle) = nil) and
- (not PopupDontCloseWidget(TfpgWidget(ew))) then
+ if (Popup <> nil) then
begin
- ClosePopups;
- fpgPostMessage(nil, ew, FPGM_POPUPCLOSE);
+ ew := w;
+ while (w <> nil) and (w.Parent <> nil) do
+ w := TfpgWindowImpl(w.Parent);
+
+ if (w <> nil) and (PopupListFind(w.WinHandle) = nil) and
+ (not PopupDontCloseWidget(TfpgWidget(ew))) then
+ begin
+ ClosePopups;
+// fpgPostMessage(nil, ew, FPGM_POPUPCLOSE);
+ end;
end;
end;
diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas
index 1a606d28..9d8836cc 100644
--- a/src/gui/gui_dialogs.pas
+++ b/src/gui/gui_dialogs.pas
@@ -1085,11 +1085,14 @@ procedure TfpgFileDialog.btnOKClick(Sender: TObject);
var
e: TFileEntry;
begin
- e := grid.CurrentEntry;
- if e.EntryType = etDir then
+ if FOpenMode then
begin
- SetCurrentDirectory(e.Name);
- Exit; //==>
+ e := grid.CurrentEntry;
+ if e.EntryType = etDir then
+ begin
+ SetCurrentDirectory(e.Name);
+ Exit; //==>
+ end;
end;
if not FOpenMode or fpgFileExists(edFileName.Text) then
@@ -1288,8 +1291,10 @@ begin
sdir := ExtractFileDir(FileName);
if sdir = '' then
sdir := '.';
+
SetCurrentDirectory(sdir);
fname := ExtractFileName(FileName);
+
if not SelectFile(fname) then
edFilename.Text := fname;