[gnome-packagekit] Actually exit the GTK tools when the user closes the window



commit b2175e952d66431ef9f07bb0464c66aaca0121a3
Author: Richard Hughes <richard hughsie com>
Date:   Thu Dec 15 15:58:22 2011 +0000

    Actually exit the GTK tools when the user closes the window

 src/gpk-application.c   |   14 --------------
 src/gpk-log.c           |   14 --------------
 src/gpk-prefs.c         |   13 -------------
 src/gpk-service-pack.c  |   14 --------------
 src/gpk-update-viewer.c |   11 -----------
 5 files changed, 0 insertions(+), 66 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 25b634c..30e1530 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -1806,16 +1806,6 @@ gpk_application_quit (GtkApplication *application)
 }
 
 /**
- * gpk_application_delete_event_cb:
- * @event: The event type, unused.
- **/
-static gboolean
-gpk_application_delete_event_cb (GtkWidget *widget, GdkEvent *event, GtkApplication *application)
-{
-	return !gpk_application_quit (application);
-}
-
-/**
  * gpk_application_menu_quit_cb:
  **/
 static void
@@ -3749,10 +3739,6 @@ gpk_application_startup_cb (GtkApplication *application, gpointer user_data)
 	gtk_window_set_icon_name (GTK_WINDOW (main_window), GPK_ICON_SOFTWARE_INSTALLER);
 	gtk_window_set_default_icon_name (GPK_ICON_SOFTWARE_INSTALLER);
 
-	/* Get the main window quit */
-	g_signal_connect (main_window, "delete_event",
-			  G_CALLBACK (gpk_application_delete_event_cb), application);
-
 	/* clear */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_clear"));
 	g_signal_connect (widget, "clicked",
diff --git a/src/gpk-log.c b/src/gpk-log.c
index 6033da0..9c9e37f 100644
--- a/src/gpk-log.c
+++ b/src/gpk-log.c
@@ -655,16 +655,6 @@ gpk_log_entry_filter_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_da
 }
 
 /**
- * gpk_log_delete_event_cb:
- **/
-static gboolean
-gpk_log_delete_event_cb (GtkWidget *widget, GdkEvent *event, GtkApplication *application)
-{
-	g_application_release (G_APPLICATION (application));
-	return FALSE;
-}
-
-/**
  * gpk_log_button_close_cb:
  **/
 static void
@@ -720,10 +710,6 @@ gpk_log_startup_cb (GtkApplication *application, gpointer user_data)
 	/* set a size, as the screen allows */
 	gpk_window_set_size_request (window, 1200, 1200);
 
-	/* Get the main window quit */
-	g_signal_connect (window, "delete-event",
-			  G_CALLBACK (gpk_log_delete_event_cb), application);
-
 	/* if command line arguments are set, then setup UI */
 	if (filter != NULL) {
 		widget = GTK_WIDGET (gtk_builder_get_object (builder, "entry_package"));
diff --git a/src/gpk-prefs.c b/src/gpk-prefs.c
index b6defd1..0241996 100644
--- a/src/gpk-prefs.c
+++ b/src/gpk-prefs.c
@@ -819,17 +819,6 @@ gpk_prefs_close_cb (GtkWidget *widget, gpointer data)
 }
 
 /**
- * gpk_prefs_delete_event_cb:
- **/
-static gboolean
-gpk_prefs_delete_event_cb (GtkWidget *widget, GdkEvent *event, GpkPrefsPrivate *priv)
-{
-	gpk_prefs_close_cb (widget, priv);
-	return FALSE;
-}
-
-
-/**
  * gpk_pack_startup_cb:
  **/
 static void
@@ -904,8 +893,6 @@ gpk_pack_startup_cb (GtkApplication *application, GpkPrefsPrivate *priv)
 	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (widget));
 
 	main_window = GTK_WIDGET (gtk_builder_get_object (priv->builder, "dialog_prefs"));
-	g_signal_connect (main_window, "delete_event",
-			  G_CALLBACK (gpk_prefs_delete_event_cb), priv);
 	gtk_application_add_window (application, GTK_WINDOW (main_window));
 
 	gtk_widget_show (main_window);
diff --git a/src/gpk-service-pack.c b/src/gpk-service-pack.c
index b087741..698b76d 100644
--- a/src/gpk-service-pack.c
+++ b/src/gpk-service-pack.c
@@ -673,16 +673,6 @@ gpk_pack_radio_copy_cb (GtkWidget *widget2, gpointer data)
 }
 
 /**
- * gpk_pack_delete_event_cb:
- **/
-static gboolean
-gpk_pack_delete_event_cb (GtkWidget *widget, GdkEvent *event, GtkApplication *application)
-{
-	g_application_release (G_APPLICATION (application));
-	return FALSE;
-}
-
-/**
  * gpk_pack_button_close_cb:
  **/
 static void
@@ -736,10 +726,6 @@ gpk_pack_startup_cb (GtkApplication *application, gpointer user_data)
 	gtk_widget_hide (main_window);
 	gtk_window_set_icon_name (GTK_WINDOW (main_window), GPK_ICON_SERVICE_PACK);
 
-	/* Get the main window quit */
-	g_signal_connect (main_window, "delete-event",
-			  G_CALLBACK (gpk_pack_delete_event_cb), application);
-
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "filechooserbutton_exclude"));
 	filter = gtk_file_filter_new ();
 	/* TRANSLATORS: file search type, lists of packages */
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index b33ea54..67caffd 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1244,16 +1244,6 @@ gpk_update_viewer_button_upgrade_cb (GtkWidget *widget, gpointer user_data)
 }
 
 /**
- * gpk_update_viewer_button_delete_event_cb:
- **/
-static gboolean
-gpk_update_viewer_button_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
-	gpk_update_viewer_quit ();
-	return TRUE;
-}
-
-/**
  * gpk_update_viewer_check_mobile_broadband:
  **/
 static void
@@ -3195,7 +3185,6 @@ gpk_update_viewer_application_startup_cb (GtkApplication *_application, gpointer
 	}
 
 	main_window = GTK_WIDGET(gtk_builder_get_object (builder, "dialog_updates"));
-	g_signal_connect (main_window, "delete_event", G_CALLBACK (gpk_update_viewer_button_delete_event_cb), NULL);
 	gtk_window_set_icon_name (GTK_WINDOW(main_window), GPK_ICON_SOFTWARE_UPDATE);
 	gtk_application_add_window (application, GTK_WINDOW(main_window));
 



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