( 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
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;
- 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)
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,