marlin r1328 - in trunk/src: . dialogs



Author: iain
Date: Thu Oct 23 01:02:42 2008
New Revision: 1328
URL: http://svn.gnome.org/viewvc/marlin?rev=1328&view=rev

Log:
Make the undo history dialog a utility window


Modified:
   trunk/src/ChangeLog
   trunk/src/dialogs/marlin-undo-history-dialog.c

Modified: trunk/src/dialogs/marlin-undo-history-dialog.c
==============================================================================
--- trunk/src/dialogs/marlin-undo-history-dialog.c	(original)
+++ trunk/src/dialogs/marlin-undo-history-dialog.c	Thu Oct 23 01:02:42 2008
@@ -58,11 +58,11 @@
 };
 
 static void
-undo_history_response (GtkDialog *dialog,
+undo_history_response (GtkDialog                 *dialog,
 		       struct _undo_history_data *uhd)
 {
 	if (uhd->changed_id > 0) {
-		g_signal_handler_disconnect (uhd->undo_manager, 
+		g_signal_handler_disconnect (uhd->undo_manager,
 					     uhd->changed_id);
 	}
 	g_free (uhd);
@@ -133,6 +133,8 @@
 	marlin_undo_manager_free_history_list (history);
 
 	if (current) {
+		/* Block the signals so that selecting the path does not
+		   trigger selection_changed */
 		g_signal_handlers_block_matched (uhd->selection,
 						 G_SIGNAL_MATCH_FUNC,
 						 0, 0, NULL,
@@ -145,6 +147,7 @@
 	}
 }
 
+/* When the Undo manager's undo list changes, update the list */
 static void
 undo_changed (MarlinUndoManager *undo,
 	      struct _undo_history_data *uhd)
@@ -154,6 +157,8 @@
 	gtk_widget_set_sensitive (uhd->redo_button,
 				  marlin_undo_manager_can_redo (uhd->undo_manager));
 
+	/* Block signals so clearing the list does not trigger
+	   a selection change */
 	g_signal_handlers_block_matched (uhd->selection,
 					 G_SIGNAL_MATCH_FUNC,
 					 0, 0, NULL,
@@ -202,6 +207,7 @@
 		      "name", &name,
 		      NULL);
 
+	/* Listen for the undo list changing */
 	uhd->changed_id = g_signal_connect (uhd->undo_manager, "changed",
 					    G_CALLBACK (undo_changed), uhd);
 
@@ -212,6 +218,8 @@
 	gtk_window_set_transient_for (GTK_WINDOW (uhd->dialog), window);
 	gtk_window_set_title (GTK_WINDOW (uhd->dialog), title);
 	gtk_window_set_default_size (GTK_WINDOW (uhd->dialog), 245, 245);
+	gtk_window_set_type_hint (GTK_WINDOW (uhd->dialog),
+				  GDK_WINDOW_TYPE_HINT_UTILITY);
 	g_free (title);
 
 	vbox = gtk_vbox_new (FALSE, 12);



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