Skip to content

Commit

Permalink
v0.36c, dont show systray until menu items added, fix a Gnome bug
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbannon committed May 1, 2023
1 parent cc3d0ca commit 4fd87c2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.36b
0.36c
2 changes: 1 addition & 1 deletion source/mainunit.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object MainForm: TMainForm
OnKeyDown = FormKeyDown
OnResize = FormResize
OnShow = FormShow
LCLVersion = '2.2.0.2'
LCLVersion = '2.3.0.0'
object ImageNotesDirTick: TImage
AnchorSideTop.Control = LabelNotesFound
Left = 24
Expand Down
3 changes: 2 additions & 1 deletion source/mainunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
2022/10/20 To Avoid calling IndexNotes() from Import, now function, IndexNewNote()
2022/11/14 ShowNotifications() now cross platform.
2023/03/17 Provide better support for dark theme, particularly for Qt5 in qt5ct mode
2023/04/30 Another Gnome (for 44.0) fix, apparently it does not like an empty menu in the trayicon at show.
CommandLine Switches
Expand Down Expand Up @@ -320,7 +321,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
if UseTrayMenu then begin
PopupMenuTray := TPopupMenu.Create(Self);
TrayIcon.PopUpMenu := PopupMenuTray; // SearchForm will populate it when ready
TrayIcon.Show;
// TrayIcon.Show; // Gnome does not like showing it before menu is populated, so, call from SearchForm.create
end;
LabelBadNoteAdvice.Caption := '';
end;
Expand Down
2 changes: 2 additions & 0 deletions source/searchunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,8 @@ procedure TSearchForm.FormCreate(Sender: TObject);
EditSearch.SelStart := 1;
EditSearch.SelLength := length(EditSearch.Text);
RefreshMenus(mkAllMenu); // IndexNotes->UseList has already called RefreshMenus(mkRecentMenu) and Qt5 does not like it.
if Mainform.UseTrayMenu then
MainForm.TrayIcon.Show; // Gnome does not like showing it before menu is populated
MenuItemCaseSensitive.checked := Sett.SearchCaseSensitive;
MenuItemSWYT.checked := Sett.AutoSearchUpdate;
MenuItemImportNote.Hint := rsHelpImportFile; // ToDo : OK, where is ShowHint ?
Expand Down
5 changes: 3 additions & 2 deletions source/uqt_colors.pas
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
History :
2023-03-13 Initial release.
2023-05-01 Handle the possiblity of no qt5ct conf file.
}
{$mode ObjFPC}{$H+}

Expand Down Expand Up @@ -74,8 +75,8 @@ function TQt_Colors.GetActiveColors: string;
finally
ConfigFile.free;
end;
end;
if Result = '' then exit;
end else Result := '';
if Result = '' then exit; // either no qt5ct.conf file or no color_scheme file found.
if FileExists(Result) then begin
ConfigFile := TINIFile.Create(Result);
try
Expand Down
2 changes: 2 additions & 0 deletions whatsnew
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Remove dangling anchors believed to cause a rare layout bug.
Faster note loading for large notes.
Qt5 can handle a request to use an unconfigured qt5ct.
Dont show SysTray until menu items added.

0 comments on commit 4fd87c2

Please sign in to comment.