[gnote/gnome-3-22] Fix --background option



commit 2a43e8b37b612a0418516ddf3cb3f4dd589f1d30
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sat Mar 11 22:34:06 2017 +0200

    Fix --background option

 src/gnote.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 93c0834..e193a52 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -118,6 +118,8 @@ namespace gnote {
     GnoteCommandLine passed_cmd_line;
     GnoteCommandLine &cmdline = m_manager ? passed_cmd_line : cmd_line;
     cmdline.parse(argc, argv);
+    m_is_background = cmdline.background();
+    m_is_shell_search = cmd_line.shell_search();
     if(!m_manager) {
       common_init();
       register_object();
@@ -125,7 +127,7 @@ namespace gnote {
     else if(cmdline.needs_execute()) {
       cmdline.execute();
     }
-    else if(!cmdline.background() && !cmdline.shell_search()) {
+    else if(!(cmdline.background() || cmdline.shell_search())) {
       new_main_window().present();
     }
 
@@ -152,7 +154,6 @@ namespace gnote {
 
   void Gnote::end_main(bool bus_acquired, bool name_acquired)
   {
-    m_is_shell_search = cmd_line.shell_search();
     if(cmd_line.needs_execute()) {
       cmd_line.execute();
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]