Skip to content

Commit 4fd87c2

Browse files
committed
v0.36c, dont show systray until menu items added, fix a Gnome bug
1 parent cc3d0ca commit 4fd87c2

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

package/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.36b
1+
0.36c

source/mainunit.lfm

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ object MainForm: TMainForm
1313
OnKeyDown = FormKeyDown
1414
OnResize = FormResize
1515
OnShow = FormShow
16-
LCLVersion = '2.2.0.2'
16+
LCLVersion = '2.3.0.0'
1717
object ImageNotesDirTick: TImage
1818
AnchorSideTop.Control = LabelNotesFound
1919
Left = 24

source/mainunit.pas

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
2022/10/20 To Avoid calling IndexNotes() from Import, now function, IndexNewNote()
8080
2022/11/14 ShowNotifications() now cross platform.
8181
2023/03/17 Provide better support for dark theme, particularly for Qt5 in qt5ct mode
82+
2023/04/30 Another Gnome (for 44.0) fix, apparently it does not like an empty menu in the trayicon at show.
8283
8384
CommandLine Switches
8485
@@ -320,7 +321,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
320321
if UseTrayMenu then begin
321322
PopupMenuTray := TPopupMenu.Create(Self);
322323
TrayIcon.PopUpMenu := PopupMenuTray; // SearchForm will populate it when ready
323-
TrayIcon.Show;
324+
// TrayIcon.Show; // Gnome does not like showing it before menu is populated, so, call from SearchForm.create
324325
end;
325326
LabelBadNoteAdvice.Caption := '';
326327
end;

source/searchunit.pas

+2
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,8 @@ procedure TSearchForm.FormCreate(Sender: TObject);
12671267
EditSearch.SelStart := 1;
12681268
EditSearch.SelLength := length(EditSearch.Text);
12691269
RefreshMenus(mkAllMenu); // IndexNotes->UseList has already called RefreshMenus(mkRecentMenu) and Qt5 does not like it.
1270+
if Mainform.UseTrayMenu then
1271+
MainForm.TrayIcon.Show; // Gnome does not like showing it before menu is populated
12701272
MenuItemCaseSensitive.checked := Sett.SearchCaseSensitive;
12711273
MenuItemSWYT.checked := Sett.AutoSearchUpdate;
12721274
MenuItemImportNote.Hint := rsHelpImportFile; // ToDo : OK, where is ShowHint ?

source/uqt_colors.pas

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
History :
2222
2023-03-13 Initial release.
23+
2023-05-01 Handle the possiblity of no qt5ct conf file.
2324
}
2425
{$mode ObjFPC}{$H+}
2526

@@ -74,8 +75,8 @@ function TQt_Colors.GetActiveColors: string;
7475
finally
7576
ConfigFile.free;
7677
end;
77-
end;
78-
if Result = '' then exit;
78+
end else Result := '';
79+
if Result = '' then exit; // either no qt5ct.conf file or no color_scheme file found.
7980
if FileExists(Result) then begin
8081
ConfigFile := TINIFile.Create(Result);
8182
try

whatsnew

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
Remove dangling anchors believed to cause a rare layout bug.
22
Faster note loading for large notes.
3+
Qt5 can handle a request to use an unconfigured qt5ct.
4+
Dont show SysTray until menu items added.

0 commit comments

Comments
 (0)