2005-01-01 [colin] 0.9.13cvs24.2
authorColin Leroy <colin@colino.net>
Sat, 1 Jan 2005 14:14:08 +0000 (14:14 +0000)
committerColin Leroy <colin@colino.net>
Sat, 1 Jan 2005 14:14:08 +0000 (14:14 +0000)
* src/prefs_actions.c
Fix over-zealous assertion. Patch by Alfons

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/prefs_actions.c

index 5bd84c3e9e71ed938dba685f2b71d0f956482d40..0563575e9dd3ca16fc6b2dec0979295d8ab1ff8f 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-01 [colin]     0.9.13cvs24.2
+
+       * src/prefs_actions.c
+               Fix over-zealous assertion. Patch by Alfons
+
 2005-01-01 [colin]     0.9.13cvs24.1
 
        * src/procmime.c
 2005-01-01 [colin]     0.9.13cvs24.1
 
        * src/procmime.c
index 60fa08f789ca757525659ca646c3192092e117a7..53aa129cb4f81be9d043ce3576d02841b867ebef 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.654.2.330 -r 1.654.2.331 configure.ac; cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/gtk/pluginwindow.c; ) > 0.9.13cvs23.1.patchset
 ( cvs diff -u -r 1.204.2.26 -r 1.204.2.27 src/prefs_common.c; ) > 0.9.13cvs23.2.patchset
 ( cvs diff -u -r 1.49.2.28 -r 1.49.2.29 src/procmime.c; ) > 0.9.13cvs24.1.patchset
 ( cvs diff -u -r 1.654.2.330 -r 1.654.2.331 configure.ac; cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/gtk/pluginwindow.c; ) > 0.9.13cvs23.1.patchset
 ( cvs diff -u -r 1.204.2.26 -r 1.204.2.27 src/prefs_common.c; ) > 0.9.13cvs23.2.patchset
 ( cvs diff -u -r 1.49.2.28 -r 1.49.2.29 src/procmime.c; ) > 0.9.13cvs24.1.patchset
+( cvs diff -u -r 1.60.2.7 -r 1.60.2.8 src/prefs_actions.c; ) > 0.9.13cvs24.2.patchset
index b8704fd8e73b8a9fb991ae8e6b7d840ab920a009..32c5f30affa5fb8bfe074478f973fb18b454d4c9 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=24
 EXTRA_RELEASE=
 BINARY_AGE=0
 EXTRA_VERSION=24
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index f0fb6ecd0f963989dd2f458ba02a99b50206526a..43987fc825b71f68063729608097290d6a030cef 100644 (file)
@@ -534,14 +534,26 @@ static void prefs_actions_register_cb(GtkWidget *w, gpointer data)
 
 static void prefs_actions_substitute_cb(GtkWidget *w, gpointer data)
 {
 
 static void prefs_actions_substitute_cb(GtkWidget *w, gpointer data)
 {
-       GtkTreeIter sel;
+       GtkTreeIter isel, inew;
+       GtkTreePath *path_sel, *path_new;
+       GtkTreeSelection *selection = gtk_tree_view_get_selection
+                                       (GTK_TREE_VIEW(actions.actions_list_view));
+       GtkTreeModel *model;                                    
 
 
-       if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection
-                               (GTK_TREE_VIEW(actions.actions_list_view)),
-                               NULL, &sel))
+       if (!gtk_tree_selection_get_selected(selection, &model, &isel))
+               return;
+       if (!gtk_tree_model_get_iter_first(model, &inew))
                return;
 
                return;
 
-       prefs_actions_clist_set_row(&sel);
+       path_sel = gtk_tree_model_get_path(model, &isel);
+       path_new = gtk_tree_model_get_path(model, &inew);
+
+       if (path_sel && path_new 
+       &&  gtk_tree_path_compare(path_sel, path_new) != 0)
+               prefs_actions_clist_set_row(&isel);
+
+       gtk_tree_path_free(path_sel);
+       gtk_tree_path_free(path_new);
 }
 
 static void prefs_actions_delete_cb(GtkWidget *w, gpointer data)
 }
 
 static void prefs_actions_delete_cb(GtkWidget *w, gpointer data)
@@ -776,10 +788,6 @@ static void prefs_actions_list_view_insert_action(GtkWidget *list_view,
                                   PREFS_ACTIONS_DATA, &old_action,
                                   -1);
                
                                   PREFS_ACTIONS_DATA, &old_action,
                                   -1);
                
-               /* NOTE: we assume we never change the first entry,
-                * which is "(New)" */
-               g_assert(strcmp(_("New"), old_action) != 0);
-               
                g_free(old_action);                             
                gtk_list_store_set(list_store, row_iter,
                                   PREFS_ACTIONS_STRING, action,
                g_free(old_action);                             
                gtk_list_store_set(list_store, row_iter,
                                   PREFS_ACTIONS_STRING, action,