2005-10-10 [colin] 1.9.15cvs28
[claws.git] / src / prefs_matcher.c
index 241b6ba0c4c418636f134d7e3e134aadc1de1b1d..495dddd7a542f4453e1d92e7e1f1cc38a4e44399 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -587,7 +587,7 @@ static void prefs_matcher_create(void)
                         G_CALLBACK(prefs_matcher_substitute_cb),
                         NULL);
 
-       del_btn = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
+       del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
        gtk_widget_show(del_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
@@ -1288,16 +1288,17 @@ static void prefs_matcher_up(void)
 {
        GtkTreePath *prev, *sel, *try;
        GtkTreeIter isel;
-       GtkListStore *store;
+       GtkListStore *store = NULL;
+       GtkTreeModel *model = NULL;
        GtkTreeIter iprev;
        
        if (!gtk_tree_selection_get_selected
                (gtk_tree_view_get_selection
                        (GTK_TREE_VIEW(matcher.cond_list_view)),
-                (GtkTreeModel **) &store,      
+                &model,        
                 &isel))
                return;
-
+       store = (GtkListStore *)model;
        sel = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &isel);
        if (!sel)
                return;
@@ -1329,17 +1330,18 @@ static void prefs_matcher_up(void)
  */
 static void prefs_matcher_down(void)
 {
-       GtkListStore *store;
+       GtkListStore *store = NULL;
+       GtkTreeModel *model = NULL;
        GtkTreeIter next, sel;
        GtkTreePath *try;
        
        if (!gtk_tree_selection_get_selected
                (gtk_tree_view_get_selection
                        (GTK_TREE_VIEW(matcher.cond_list_view)),
-                (GtkTreeModel **) &store,
+                &model,
                 &sel))
                return;
-
+       store = (GtkListStore *)model;
        try = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &sel);
        if (!try) 
                return;
@@ -1394,7 +1396,10 @@ static void prefs_matcher_criteria_select(GtkList *list,
        old_value = matcher.selected_criteria;
        matcher.selected_criteria = value = get_sel_from_list
                (GTK_LIST(matcher.criteria_list));
-       
+
+       if (old_value == matcher.selected_criteria)
+               return;
+
        /* CLAWS: the value widget is currently either the color label combo box,
         * or a GtkEntry, so kiss for now */
        if (matcher.selected_criteria == CRITERIA_COLORLABEL) { 
@@ -1602,7 +1607,7 @@ static void prefs_matcher_ok(void)
                                if (!matcher_str || strcmp(matcher_str, str) != 0) {
                                        val = alertpanel(_("Entry not saved"),
                                                         _("The entry was not saved\nHave you really finished?"),
-                                                        _("Yes"), _("No"), NULL);
+                                                        GTK_STOCK_YES, GTK_STOCK_NO, NULL);
                                        if (G_ALERTDEFAULT != val) {
                                                g_free(matcher_str);                                             
                                                g_free(str);
@@ -1664,6 +1669,7 @@ static gchar *test_desc_strings[] = {
 };
 
 static DescriptionWindow test_desc_win = { 
+       NULL,
         NULL, 
         2,
         N_("Match Type: 'Test'"),