[Commits] prefs_actions.c 1.60.2.75 1.60.2.76 prefs_filtering.c 1.59.2.84 1.59.2.85 prefs_template.c 1.12.2.79 1.12.2.80

pawel at claws-mail.org pawel at claws-mail.org
Sun Nov 20 19:47:10 CET 2011


Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv30584/src

Modified Files:
      Tag: gtk2
	prefs_actions.c prefs_filtering.c prefs_template.c 
Log Message:
2011-11-20 [pawel]	3.7.10cvs95

	* src/prefs_actions.c
	* src/prefs_filtering.c
	* src/prefs_template.c
		Fix bug #1870 'arrow scrolling in filters'
		Allow arrow scrolling in dialogs with list view widgets
		plus couple fixes of issues I found along the way

Index: prefs_actions.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_actions.c,v
retrieving revision 1.60.2.75
retrieving revision 1.60.2.76
diff -u -d -r1.60.2.75 -r1.60.2.76
--- prefs_actions.c	22 Oct 2011 17:09:03 -0000	1.60.2.75
+++ prefs_actions.c	20 Nov 2011 18:47:07 -0000	1.60.2.76
@@ -424,6 +424,7 @@
 {
 	gtk_entry_set_text(GTK_ENTRY(actions.name_entry), "");
 	gtk_entry_set_text(GTK_ENTRY(actions.cmd_entry), "");
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(actions.shell_radiobtn), TRUE);
 }
 
 void prefs_actions_read_config(void)
@@ -537,6 +538,7 @@
 				(GTK_TREE_VIEW(actions.actions_list_view)));
 
 	prefs_actions_clear_list(store);	
+	prefs_actions_reset_dialog();
 
 	for (cur = prefs_common.actions_list; cur != NULL; cur = cur->next) {
 		gchar *action = (gchar *) cur->data;
@@ -1078,6 +1080,20 @@
 	{"PrefsActionsPopup/Duplicate",	NULL, N_("D_uplicate"), NULL, NULL, G_CALLBACK(prefs_actions_duplicate_cb) },
 };
 
+static void prefs_actions_row_selected(GtkTreeSelection *selection, GtkTreeView *list_view)
+{
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	
+	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+	
+	path = gtk_tree_model_get_path(model, &iter);
+	prefs_actions_select_row(list_view, path);
+	gtk_tree_path_free(path);
+}
+
 static gint prefs_actions_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
 				   GtkTreeView *list_view)
 {
@@ -1172,6 +1188,8 @@
 
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
+	g_signal_connect(G_OBJECT(selector), "changed",
+			 G_CALLBACK(prefs_actions_row_selected), list_view);
 
 	/* create the columns */
 	prefs_actions_create_list_view_columns(GTK_WIDGET(list_view));

Index: prefs_filtering.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_filtering.c,v
retrieving revision 1.59.2.84
retrieving revision 1.59.2.85
diff -u -d -r1.59.2.84 -r1.59.2.85
--- prefs_filtering.c	22 Oct 2011 17:09:03 -0000	1.59.2.84
+++ prefs_filtering.c	20 Nov 2011 18:47:07 -0000	1.59.2.85
@@ -114,6 +114,8 @@
 static gint prefs_filtering_deleted	(GtkWidget	*widget,
 					 GdkEventAny	*event,
 					 gpointer	 data);
+static void prefs_filtering_row_selected(GtkTreeSelection *selection,
+					 GtkTreeView *list_view);
 static gboolean prefs_filtering_key_pressed(GtkWidget	*widget,
 					 GdkEventKey	*event,
 					 gpointer	 data);
@@ -1261,7 +1263,9 @@
 
 	filteringprop_free(prop);
 
-	prefs_filtering_reset_dialog();
+	prefs_filtering_row_selected(gtk_tree_view_get_selection(
+				GTK_TREE_VIEW(filtering.cond_list_view)),
+				GTK_TREE_VIEW(filtering.cond_list_view));
 	modified = TRUE;
 }
 
@@ -1777,6 +1781,21 @@
 #endif
 };
 
+static void prefs_filtering_row_selected(GtkTreeSelection *selection,
+					 GtkTreeView *list_view)
+{
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	
+	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+	
+	path = gtk_tree_model_get_path(model, &iter);
+	prefs_filtering_select_row(list_view, path);
+	gtk_tree_path_free(path);
+}
+
 static gint prefs_filtering_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
 				    GtkTreeView *list_view)
 {
@@ -1880,6 +1899,8 @@
 	
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
+	g_signal_connect(G_OBJECT(selector), "changed",
+			 G_CALLBACK(prefs_filtering_row_selected), list_view);
 
 	/* create the columns */
 	prefs_filtering_create_list_view_columns(GTK_WIDGET(list_view));

Index: prefs_template.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_template.c,v
retrieving revision 1.12.2.79
retrieving revision 1.12.2.80
diff -u -d -r1.12.2.79 -r1.12.2.80
--- prefs_template.c	31 Oct 2011 07:17:46 -0000	1.12.2.79
+++ prefs_template.c	20 Nov 2011 18:47:07 -0000	1.12.2.80
@@ -1102,6 +1102,21 @@
 	{"PrefsTemplatePopup/Duplicate",	NULL, N_("D_uplicate"), NULL, NULL, G_CALLBACK(prefs_template_duplicate_cb) },
 };
 
+static void prefs_template_row_selected(GtkTreeSelection *selection,
+					GtkTreeView *list_view)
+{
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	
+	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+	
+	path = gtk_tree_model_get_path(model, &iter);
+	prefs_template_select_row(list_view, path);
+	gtk_tree_path_free(path);
+}
+
 static gint prefs_template_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
 				   GtkTreeView *list_view)
 {
@@ -1195,6 +1210,8 @@
 
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
+	g_signal_connect(G_OBJECT(selector), "changed",
+			 G_CALLBACK(prefs_template_row_selected), list_view);
 
 	/* create the columns */
 	prefs_template_create_list_view_columns(GTK_WIDGET(list_view));



More information about the Commits mailing list