[evolution-patches] gal fix for



This fixes

http://bugzilla.ximian.com/show_bug.cgi?id=36564

--Larry
? docs/gal-api.html
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/ChangeLog,v
retrieving revision 1.878
diff -u -p -r1.878 ChangeLog
--- ChangeLog	26 Jun 2004 17:52:53 -0000	1.878
+++ ChangeLog	16 Jul 2004 21:32:53 -0000
@@ -1,3 +1,8 @@
+2004-07-16  Larry Ewing  <lewing ximian com>
+
+	* gal/widgets/e-categories-master-list-dialog.c (dialog_response):
+	remove all the selected rows.
+
 2004-06-25  JP Rosevear  <jpr novell com>
 
 	* configure.in: Bump version
Index: gal/widgets/e-categories-master-list-dialog.c
===================================================================
RCS file: /cvs/gnome/gal/gal/widgets/e-categories-master-list-dialog.c,v
retrieving revision 1.16
diff -u -p -r1.16 e-categories-master-list-dialog.c
--- gal/widgets/e-categories-master-list-dialog.c	10 Jun 2004 17:01:14 -0000	1.16
+++ gal/widgets/e-categories-master-list-dialog.c	16 Jul 2004 21:32:53 -0000
@@ -156,23 +156,36 @@ dialog_destroyed (gpointer data, GObject
 }
 
 static void
+build_list_callback (int row, gpointer data) {
+	GList **listp = data;
+
+	*listp = g_list_prepend (*listp, GINT_TO_POINTER (row));
+}
+
+static void
 dialog_response (GtkObject *dialog, int id, ECategoriesMasterListDialog *ecmld)
 {
 	GtkWidget *scrolled;
+	
 	switch (id) {
 	case 0:    /* Remove */
 		scrolled = glade_xml_get_widget (ecmld->priv->gui, "custom-etable");
 		if (scrolled && E_IS_TABLE_SCROLLED (scrolled)) {
 			ETable *table;
-			int row;
-
+			GList *list = NULL;
+			GList *l;
+	
 			table = e_table_scrolled_get_table (E_TABLE_SCROLLED(scrolled));
 
-			row = e_table_get_cursor_row(table);
-			if (row != -1) {
+			e_table_selected_row_foreach (table, build_list_callback, &list);
+			for (l = list; l != NULL; l = g_list_next (l)) {
+				int row = GPOINTER_TO_INT (l->data);
+
 				e_categories_master_list_delete (ecmld->priv->ecml, row);
-				e_categories_master_list_commit (ecmld->priv->ecml);
 			}
+			g_list_free (list);
+			
+			e_categories_master_list_commit (ecmld->priv->ecml);
 		}
 		break;
 	case GTK_RESPONSE_CLOSE:
@@ -181,6 +194,8 @@ dialog_response (GtkObject *dialog, int 
 	}
 }
 
+
+
 #if 0
 static void
 connect_button (ECategoriesMasterListDialog *ecmld, GladeXML *gui, const char *widget_name, void *cback)


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