[Xfce4-commits] <xfce4-appfinder:master> Drop signal handlers.

Nick Schermer noreply at xfce.org
Fri Jan 18 20:32:01 CET 2013


Updating branch refs/heads/master
         to 0b0a8972094595d45dfc8ac59e7fb1f02ef223c4 (commit)
       from 2bf821e5fa33578d78baa617f33dca889e97c05b (commit)

commit 0b0a8972094595d45dfc8ac59e7fb1f02ef223c4
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Jan 7 17:43:24 2013 +0100

    Drop signal handlers.

 src/main.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/src/main.c b/src/main.c
index d50f6bf..4815b21 100644
--- a/src/main.c
+++ b/src/main.c
@@ -193,23 +193,6 @@ appfinder_window_new (const gchar *startup_id,
 
 
 
-static void
-appfinder_signal_handler (gint signum)
-{
-  static gboolean was_triggered = FALSE;
-
-  /* avoid recursing this handler */
-  if (was_triggered)
-    return;
-  was_triggered = TRUE;
-
-  APPFINDER_DEBUG ("received signal %s", g_strsignal (signum));
-
-  gtk_main_quit ();
-}
-
-
-
 gint
 main (gint argc, gchar **argv)
 {
@@ -217,8 +200,6 @@ main (gint argc, gchar **argv)
   const gchar *desktop;
   const gchar *startup_id;
   GSList      *windows_destroy;
-  const gint   signums[] = { SIGINT, SIGQUIT, SIGTERM, SIGABRT };
-  guint        i;
 
   /* set translation domain */
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
@@ -263,10 +244,6 @@ main (gint argc, gchar **argv)
       return appfinder_gdbus_quit (NULL) ? EXIT_SUCCESS : EXIT_FAILURE;
     }
 
-  /* setup signal handlers to properly quit the main loop */
-  for (i = 0; i < G_N_ELEMENTS (signums); i++)
-    signal (signums[i], appfinder_signal_handler);
-
   /* if started with the xfrun4 executable, start in collapsed mode */
   if (!opt_collapsed && strcmp (*argv, "xfrun4") == 0)
     opt_collapsed = TRUE;


More information about the Xfce4-commits mailing list