GNOME Bugzilla – Bug 653447
Add a parameter like empathy's "-h"
Last modified: 2011-11-13 16:09:43 UTC
Empathy has a commandline parameter "-h" which hides all windows and messageboxes on start. This parameter is ideal if you want empathy to be autmaticly started on gnome-shell login. Gnote is missing such a parameter and so if you let gnote automaticly started on gnome-shell login the "search all notes" windows is show everytime.
We are actually moving away from status icon and making Search All Notes a main application window. Status icon is available via setting. I'll see regarding this issue.
*** Bug 656106 has been marked as a duplicate of this bug. ***
Created attachment 198992 [details] [review] patch to add --background option Attached is a first shot at implementing this. I think the patch is fairly self explanatory. I am not tied in any way to the choice of argument name or the associated description. This patch does change the dbus service file to use this option by default when starting Gnote as a result of dbus activation.
This feature is particularly useful for the gnote search provider for the gnome-shell which needs gnote to be running to respond to dbus queries. While the extension can launch gnote via dbus activation, this now causes the search all notes window to be displayed with version 0.8. I hope to post an updated version of the search provider extension to github soon (support for gnome-shell 3.2 and activating gnote via dbus).
Thanks for the patch. It looks OK. Since it adds new translatable string and we are currently in string freeze for 0.8.1, it will have to wait for 0.8.2.
Hold off on applying this one. Closing the search window still causes gnote to exit. I'm guessing I didn't realize this was happening because my gnome-shell-extension was causing dbus to activate it again.
Created attachment 199665 [details] [review] Add --background option for running background Updated patch which prevents closing gnote when search all notes window is closed.
I'm planing to start GtkApplication usage in Gnote soon. One of the reasons is that I think it's not completely right to kill Gnote on closing Search All Notes as this dialog is reachable from any note (we have a button for that). I think Gnote should remain present when at least one window is open. I'll write GtkApplication support having this issue in mind.
Agreed. GtkApplication is also a prerequisite for the request in comment #2 of bug 640430.
Review of attachment 199665 [details] [review]: I have pushed Gnote integration with GtkApplication, which requires this patch to be updated. I think the background check should go to windowed() method of Gnote class. I'm not sure regarding refusing to exit in background mode. I think we should exit, if user requested that.
I adapted the patch to current code base. The 2 second timeout for status icon was removed like in Tomboy. If Gnote is configured to use status icon, no window will be open during start up. This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.