2006-09-04 [wwp] 2.4.0cvs140
authorTristan Chabredier <wwp@claws-mail.org>
Mon, 4 Sep 2006 15:43:33 +0000 (15:43 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Mon, 4 Sep 2006 15:43:33 +0000 (15:43 +0000)
* src/prefs_filtering.c
fix new line's account name in filtering prefs:
was "All", is now "(New)".

ChangeLog
PATCHSETS
configure.ac
src/prefs_filtering.c

index b0049e6bc99dc257285819a7babe585c9ec8b626..dc116bd90e1044c96bebdd52d6088d5b18d80c21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-04 [wwp]       2.4.0cvs140
+
+       * src/prefs_filtering.c
+               fix new line's account name in filtering prefs:
+               was "All", is now "(New)".
+
 2006-09-04 [paul]      2.4.0cvs139
 
        * tools/make.themes.project
index bf2a8c39a034860973bad14bde5d9cf47eee4a87..ffa6693cdab6ef956f623c365539b67df2b6c81c 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.305 -r 1.382.2.306 src/compose.c;  ) > 2.4.0cvs137.patchset
 ( cvs diff -u -r 1.207.2.118 -r 1.207.2.119 src/folderview.c;  ) > 2.4.0cvs138.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 tools/make.themes.project;  ) > 2.4.0cvs139.patchset
+( cvs diff -u -r 1.59.2.41 -r 1.59.2.42 src/prefs_filtering.c;  ) > 2.4.0cvs140.patchset
index 7cf73c39b6fb9b7c27f503e484f8cfc8fc566732..abad4b9b5a5b50d710e657755c020b1eaded5251 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=139
+EXTRA_VERSION=140
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 710d01d1c44290b2147add76fbf0fcf551be8f11..de09d3b790cf1f8e5467c4b4ccbce7cfa6cc987d 100644 (file)
@@ -128,8 +128,9 @@ static GtkListStore* prefs_filtering_create_data_store      (void);
 static gint prefs_filtering_list_view_insert_rule      (GtkListStore *list_store,
                                                         gint row,
                                                         gboolean enabled,
-                                                        const gchar *name, 
+                                                        const gchar *name,
                                                         gint account_id,
+                                                        const gchar *account_name,
                                                         const gchar *rule, 
                                                         gboolean prop);
 static gchar *prefs_filtering_list_view_get_rule       (GtkWidget *list, 
@@ -760,12 +761,20 @@ static void prefs_filtering_set_dialog(const gchar *header, const gchar *key)
                                              _("(New)"),
                                                  0,
                                              _("(New)"),
+                                             _("(New)"),
                                              FALSE);
 
         prefs_filtering = *p_processing_list;
 
        for(cur = prefs_filtering ; cur != NULL ; cur = g_slist_next(cur)) {
                FilteringProp * prop = (FilteringProp *) cur->data;
+               gchar *account_name;
+
+               if (prop->account_id > 0) {
+                       account_name = account_find_from_id(prop->account_id)->account_name;
+               } else {
+                       account_name = (gchar *)Q_("Filtering Account Menu|All");
+               }
 
                cond_str = filteringprop_to_string(prop);
                subst_char(cond_str, '\t', ':');
@@ -774,6 +783,7 @@ static void prefs_filtering_set_dialog(const gchar *header, const gchar *key)
                                                      prop->enabled,
                                                      prop->name,
                                                          prop->account_id,
+                                                         account_name,
                                                      cond_str, TRUE);
                
                g_free(cond_str);
@@ -855,6 +865,7 @@ static gint prefs_filtering_list_view_set_row(gint row, FilteringProp * prop)
        GtkListStore *list_store;
        gchar *name = NULL;
        gint account_id = 0;
+       gchar *account_name = (gchar *)Q_("Filtering Account Menu|All");
        gboolean enabled = TRUE;
 
        str = filteringprop_to_string(prop);
@@ -865,6 +876,11 @@ static gint prefs_filtering_list_view_set_row(gint row, FilteringProp * prop)
                if (prop->name)
                        name = prop->name;
                account_id = prop->account_id;
+               if (account_id > 0) {
+                       account_name = account_find_from_id(account_id)->account_name;
+               } else {
+                       account_name = (gchar *)Q_("Filtering Account Menu|All");
+               }
                enabled = prop->enabled;
        }
 
@@ -874,6 +890,7 @@ static gint prefs_filtering_list_view_set_row(gint row, FilteringProp * prop)
                                                    enabled,
                                                    name,
                                                    account_id,
+                                                       account_name,
                                                    str,
                                                    prop != NULL);
 
@@ -1290,6 +1307,7 @@ static GtkListStore* prefs_filtering_create_data_store(void)
  *\param       enabled TRUE if rule is enabled
  *\param       name The Name of rule
  *\param       account_id The account ID
+ *\param       account_name The account name or All or (New)
  *\param       rule String representation of rule
  *\param       prop TRUE if valid filtering rule; if FALSE it's the first
  *             entry in the store ("(New)").
@@ -1301,11 +1319,11 @@ static gint prefs_filtering_list_view_insert_rule(GtkListStore *list_store,
                                                  gboolean enabled,
                                                  const gchar *name,
                                                  gint account_id,
+                                                 const gchar *account_name,
                                                  const gchar *rule,
                                                  gboolean prop) 
 {
        GtkTreeIter iter;
-       gchar *account_name;
 
        /* check if valid row at all */
        if (row >= 0) {
@@ -1314,12 +1332,6 @@ static gint prefs_filtering_list_view_insert_rule(GtkListStore *list_store,
                        row = -1;                                                  
        }
 
-       if (account_id > 0) {
-               account_name = account_find_from_id(account_id)->account_name;
-       } else {
-               account_name = (gchar *)Q_("Filtering Account Menu|All");
-       }
-
        if (row < 0) {
                /* append new */
                gtk_list_store_append(list_store, &iter);