Skip to content

Conversation

wl2776
Copy link
Contributor

@wl2776 wl2776 commented Dec 24, 2024

Implements #805

To enable

  1. Open SourceGit's data storage directory from main menu
    image
  2. Close SourceGit
  3. Open file preference.json in any text editor
  4. Add new field "SystemTrayIcon": true
    image

Details

When this feature is enabled, SourceGit does not exit after click on window closing button.
Instead it stays in background, hiding in the system tray, without occupation of a space in the task bar.

image

Main window can be restored with the left click on the system tray icon.

Right click on the icon opens the menu with the Quit item.

To disable

  1. Open SourceGit's data storage directory from main menu
  2. Close SourceGit with the Quit menu from the system tray icon
  3. Open file preference.json in any text editor
  4. Remove field "SystemTrayIcon" completely or set its value to false

Show main window
Open preferences
diff --git a/src/App.axaml b/src/App.axaml
index b12f5fa..55aacb8 100644
--- a/src/App.axaml
+++ b/src/App.axaml
@@ -41,5 +41,4 @@
       <NativeMenuItem Header="{DynamicResource Text.Quit}" Command="{x:Static s:App.QuitCommand}" Gesture="⌘+Q"/>
     </NativeMenu>
   </NativeMenu.Menu>
-
 </Application>
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index 495ad40..c3f68c8 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -421,7 +421,7 @@
   <x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
   <x:String x:Key="Text.NotConfigured" xml:space="preserve">Git has NOT been configured. Please to go [Preference] and configure it first.</x:String>
   <x:String x:Key="Text.Open" xml:space="preserve">Open SourceGit</x:String>
-  <x:String x:Key="Text.OpenAppDataDir" xml:space="preserve">Open Storage Directory</x:String>
+  <x:String x:Key="Text.OpenAppDataDir" xml:space="preserve">Open Data Storage Directory</x:String>
   <x:String x:Key="Text.OpenWith" xml:space="preserve">Open with...</x:String>
   <x:String x:Key="Text.Optional" xml:space="preserve">Optional.</x:String>
   <x:String x:Key="Text.PageTabBar.New" xml:space="preserve">Create New Page</x:String>
@wl2776 wl2776 force-pushed the feature/system-tray-icon branch from 8517140 to 613cb6f Compare December 24, 2024 21:51
@love-linger
Copy link
Collaborator

I do NOT like this feature at all.

@wl2776
Copy link
Contributor Author

wl2776 commented Dec 25, 2024

OK, no problem.

Thank you very much for your work and for opening sources!
I will keep this feature in my fork.

@wl2776 wl2776 closed this Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants