2011-11-20 [pawel] 3.7.10cvs95
authorPaweł Pękala <c0rn@gazeta.pl>
Sun, 20 Nov 2011 18:47:09 +0000 (18:47 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Sun, 20 Nov 2011 18:47:09 +0000 (18:47 +0000)
* 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

ChangeLog
PATCHSETS
configure.ac
src/prefs_actions.c
src/prefs_filtering.c
src/prefs_template.c

index b1d8516..b619ae6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
+
 2011-11-19 [pawel]     3.7.10cvs94
 
        * src/mimeview.c
index 08d7146..8d7d381 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.58 -r 1.1.2.59 manual/advanced.xml;  cvs diff -u -r 1.1.2.19 -r 1.1.2.20 manual/es/advanced.xml;  ) > 3.7.10cvs92.patchset
 ( cvs diff -u -r 1.1.2.59 -r 1.1.2.60 manual/advanced.xml;  ) > 3.7.10cvs93.patchset
 ( cvs diff -u -r 1.83.2.182 -r 1.83.2.183 src/mimeview.c;  ) > 3.7.10cvs94.patchset
+( cvs diff -u -r 1.60.2.75 -r 1.60.2.76 src/prefs_actions.c;  cvs diff -u -r 1.59.2.84 -r 1.59.2.85 src/prefs_filtering.c;  cvs diff -u -r 1.12.2.79 -r 1.12.2.80 src/prefs_template.c;  ) > 3.7.10cvs95.patchset
index 9b9f68c..974ee05 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=94
+EXTRA_VERSION=95
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9513a84..e942d08 100644 (file)
@@ -424,6 +424,7 @@ static void prefs_actions_reset_dialog(void)
 {
        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 @@ static void prefs_actions_set_dialog(void)
                                (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 @@ static GtkActionEntry prefs_actions_popup_entries[] =
        {"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 @@ static GtkWidget *prefs_actions_list_view_create(void)
 
        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 25daf17..cb0f70d 100644 (file)
@@ -114,6 +114,8 @@ static void prefs_filtering_bottom  (gpointer action, gpointer data);
 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 @@ static void prefs_filtering_substitute_cb(gpointer action, gpointer data)
 
        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 @@ static GtkActionEntry prefs_filtering_popup_entries[] =
 #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 @@ static GtkWidget *prefs_filtering_list_view_create(void)
        
        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 2d9f98e..a3e5383 100644 (file)
@@ -1102,6 +1102,21 @@ static GtkActionEntry prefs_template_popup_entries[] =
        {"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 @@ static GtkWidget *prefs_template_list_view_create(void)
 
        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));