[Xfce4-commits] [apps/xfce4-taskmanager] 01/01: Improvements to --start-hidden (bug 14343)

noreply at xfce.org noreply at xfce.org
Mon May 28 22:35:32 CEST 2018


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-taskmanager.

commit 397bb63e2384709a0a9e39e0c81ce5cc5ab3f352
Author: Ben Burrill <bburrill98 at gmail.com>
Date:   Mon May 28 13:18:39 2018 -0700

    Improvements to --start-hidden (bug 14343)
    
    * Prints an explanatory warning message when both the window and the
      status icon can't be shown (because --start-hidden is used and "Hide
      into the notification area" is disabled) rather than just exiting.
    * Fixes a bug where when the task manager is already running,
      --start-hidden would erroneously activate it.
    * Use return instead of exit.  I adopted exit from the gnome docs, but I
      think return makes more sense here.
---
 src/main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 664e784..945cb3a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -199,7 +199,7 @@ int main (int argc, char *argv[])
 	if (!g_option_context_parse (opt_context, &argc, &argv, &error))
 	{
 		g_print ("Unable to parse arguments: %s\n", error->message);
-		exit (1);
+		return 1;
 	}
 
 	app = g_application_new ("xfce.taskmanager", 0);
@@ -213,7 +213,8 @@ int main (int argc, char *argv[])
 
 	if (g_application_get_is_remote (G_APPLICATION (app)))
 	{
-		g_application_activate (G_APPLICATION (app));
+		if (!start_hidden)
+			g_application_activate (G_APPLICATION (app));
 		g_object_unref (app);
 		return 0;
 	}
@@ -250,6 +251,8 @@ int main (int argc, char *argv[])
 
 	if (gtk_widget_get_visible (window) || gtk_status_icon_get_visible (status_icon))
 		gtk_main ();
+	else
+		g_warning ("Nothing to do: activate hiding to the notification area when using --start-hidden");
 
 	if (timeout > 0)
 		g_source_remove (timeout);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list