aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog57
-rw-r--r--mail/em-filter-i18n.h17
-rw-r--r--mail/em-folder-properties.c1
-rw-r--r--mail/em-folder-tree-model.c2
-rw-r--r--mail/em-folder-tree.c3
-rw-r--r--mail/filtertypes.xml8
-rw-r--r--mail/mail-component.c2
-rw-r--r--mail/mail-config.c99
-rw-r--r--mail/mail-config.glade12
-rw-r--r--mail/message-list.c2
-rw-r--r--mail/searchtypes.xml4
-rw-r--r--mail/vfoldertypes.xml4
12 files changed, 135 insertions, 76 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2f615c2a1c..98aeccdef7 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,60 @@
+2008-12-10 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #563870
+
+ * vfoldertypes.xml:
+ * filtertypes.xml:
+ * searchtypes.xml: Use dynamic filter option.
+ * message-list.c: Drop unused header include.
+
+2008-12-09 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #552583
+
+ * mail-config.c: (mail_config_get_account_by_source_url),
+ (mail_config_get_account_by_transport_url): Extending Sankar's fix
+ of account checking logic a bit, to be more consistent.
+
+2008-12-09 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #563369
+
+ * em-folder-properties.c: (emfp_dialog_got_folder_quota):
+ * em-folder-tree-model.c: (em_folder_tree_model_set_folder_info):
+ * mail-component.c: (view_changed): Translate "Templates" folder name.
+
+2008-12-09 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #563669
+
+ * mail-config.glade:
+ Use zero GtkSpinButton's PageSize, as Gtk+ requires.
+
+2008-12-08 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #337082
+
+ * em-folder-tree.c: (emft_tree_row_expanded): Do not set we finished
+ with loading until we are really done with it. The previous behavior
+ can cause duplicate nodes in tree for subscribed folders.
+
+2008-12-08 Sankar P <psankar@novell.com>
+
+ ** Fixes bug #552583
+
+ * mail/mail-config.c: (mail_config_get_account_by_source_url)
+ (mail_config_get_account_by_transport_url):
+ Fix the errors in the account checking logic.
+
+2008-12-04 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #552583
+
+ * mail-config.c (mail_config_get_account_by_source_url),
+ (mail_config_get_account_by_transport_url):
+ For the purpose of matching a URL to an EAccount, only compare
+ the protocol, user, host and port and disregard the rest.
+
2008-11-23 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #552850
diff --git a/mail/em-filter-i18n.h b/mail/em-filter-i18n.h
index 6805e595d9..8b8d0c3323 100644
--- a/mail/em-filter-i18n.h
+++ b/mail/em-filter-i18n.h
@@ -1,19 +1,3 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- */
/* Automatically generated. Do not edit. */
char *s = N_("Adjust Score");
char *s = N_("Assign Color");
@@ -75,6 +59,7 @@ char *s = N_("returns less than");
char *s = N_("Run Program");
char *s = N_("Score");
char *s = N_("Sender");
+char *s = N_("Sender or Recipients");
char *s = N_("Set Label");
char *s = N_("Set Status");
char *s = N_("Size (kB)");
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index a1ad47dbdd..d25e624bd3 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -353,6 +353,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder,
if (store == local_store
&& (!strcmp(prop_data->name, "Drafts")
+ || !strcmp(prop_data->name, "Templates")
|| !strcmp(prop_data->name, "Inbox")
|| !strcmp(prop_data->name, "Outbox")
|| !strcmp(prop_data->name, "Sent"))) {
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index ecefc4bc5b..39c46fdbb0 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -628,6 +628,8 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
if (si->store == e_mail_shell_module_get_local_store (shell_module)) {
if (!strcmp(fi->full_name, "Drafts")) {
name = _("Drafts");
+ } else if (!strcmp(fi->full_name, "Templates")) {
+ name = _("Templates");
} else if (!strcmp(fi->full_name, "Inbox")) {
flags = (flags & ~CAMEL_FOLDER_TYPE_MASK) | CAMEL_FOLDER_TYPE_INBOX;
name = _("Inbox");
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index ac0455c13d..8d450e35d3 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1950,7 +1950,8 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t
return;
}
- gtk_tree_store_set((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1);
+ /* do not set LOAD_SUBDIRS to FALSE until we are really done with loading */
+ /* gtk_tree_store_set ((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1); */
m = mail_msg_new (&get_folder_info_info);
m->root = gtk_tree_row_reference_new (model, tree_path);
diff --git a/mail/filtertypes.xml b/mail/filtertypes.xml
index 60702f2b08..69c1ddbaae 100644
--- a/mail/filtertypes.xml
+++ b/mail/filtertypes.xml
@@ -635,7 +635,9 @@
</code>
</option>
</input>
- <input type="label" name="versus"/>
+ <input type="optionlist" name="versus">
+ <dynamic func="e_util_labels_get_filter_options"/>
+ </input>
</part>
<part name="score">
@@ -920,7 +922,9 @@
<part name="label">
<title>Set Label</title>
<code>(set-label ${label})</code>
- <input type="label" name="label"/>
+ <input type="optionlist" name="label">
+ <dynamic func="e_util_labels_get_filter_options"/>
+ </input>
</part>
<part name="colour">
<title>Assign Color</title>
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 56a6a6ebd2..e9c7de3173 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -579,7 +579,7 @@ view_changed(EMFolderView *emfv, EComponentView *component_view)
if (emfv->folder->parent_store == mail_component_peek_local_store(NULL)
&& (!strcmp (name, "Drafts") || !strcmp (name, "Inbox")
- || !strcmp (name, "Outbox") || !strcmp (name, "Sent")))
+ || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates")))
use_name = _(name);
else if (!strcmp (name, "INBOX"))
use_name = _("Inbox");
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 8993e3b915..8333b02e09 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -801,53 +801,66 @@ mail_config_get_account_by_uid (const char *uid)
return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid);
}
+static gboolean
+mail_config_account_url_equal (const CamelURL *u1,
+ const CamelURL *u2)
+{
+ /* For the purpose of matching a URL to an EAccount, only compare
+ * the protocol, user, host and port and disregard the rest. */
+
+ if (g_strcmp0 (u1->protocol, u2->protocol) != 0)
+ return FALSE;
+
+ if (g_strcmp0 (u1->user, u2->user) != 0)
+ return FALSE;
+
+ if (g_strcmp0 (u1->host, u2->host) != 0)
+ return FALSE;
+
+ return (u1->port == u2->port);
+}
+
EAccount *
mail_config_get_account_by_source_url (const char *source_url)
{
EAccount *account = NULL;
EIterator *iter;
+ CamelURL *url;
g_return_val_if_fail (source_url != NULL, NULL);
+ url = camel_url_new (source_url, NULL);
+ g_return_val_if_fail (url != NULL, NULL);
+
iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- CamelURL *url;
- gchar *string;
+ while (account == NULL && e_iterator_is_valid (iter)) {
+ CamelURL *account_url;
account = (EAccount *) e_iterator_get (iter);
e_iterator_next (iter);
- if (account->source == NULL)
- continue;
-
- else if (account->source->url == NULL)
- continue;
-
- else if (*account->source->url == '\0')
+ if ( !account || (account->source == NULL) ||
+ (account->source->url == NULL) || (*account->source->url == '\0')) {
+ account = NULL;
continue;
+ }
- url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
+ account_url = camel_url_new (account->source->url, NULL);
+ if (account_url == NULL) {
+ account = NULL;
continue;
+ }
- /* Simplify the account URL for comparison. */
- string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- if (string == NULL || strcmp (string, source_url) != 0)
+ if (!mail_config_account_url_equal (url, account_url))
account = NULL; /* not a match */
- camel_url_free (url);
- g_free (string);
-
- if (account != NULL) {
- g_object_unref (iter);
- return account;
- }
+ camel_url_free (account_url);
}
g_object_unref (iter);
- return NULL;
+ return account;
}
EAccount *
@@ -855,48 +868,42 @@ mail_config_get_account_by_transport_url (const char *transport_url)
{
EAccount *account = NULL;
EIterator *iter;
+ CamelURL *url;
g_return_val_if_fail (transport_url != NULL, NULL);
+ url = camel_url_new (transport_url, NULL);
+ g_return_val_if_fail (url != NULL, NULL);
+
iter = e_list_get_iterator ((EList *) config->accounts);
- while (e_iterator_is_valid (iter)) {
- CamelURL *url;
- gchar *string;
+ while (account == NULL && e_iterator_is_valid (iter)) {
+ CamelURL *account_url;
account = (EAccount *) e_iterator_get (iter);
e_iterator_next (iter);
- if (account->transport == NULL)
- continue;
-
- else if (account->transport->url == NULL)
- continue;
-
- else if (*account->transport->url == '\0')
- continue;
+ if ( !account || (account->transport == NULL) ||
+ (account->transport->url == NULL) || (*account->transport->url == '\0')) {
+ account = NULL;
+ continue;
+ }
- url = camel_url_new (account->transport->url, NULL);
- if (url == NULL)
+ account_url = camel_url_new (account->transport->url, NULL);
+ if (account_url == NULL) {
+ account = NULL;
continue;
+ }
- /* Simplify the account URL for comparison. */
- string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- if (string == NULL || strcmp (string, transport_url) != 0)
+ if (!mail_config_account_url_equal (url, account_url))
account = NULL; /* not a match */
camel_url_free (url);
- g_free (string);
-
- if (account != NULL) {
- g_object_unref (iter);
- return account;
- }
}
g_object_unref (iter);
- return NULL;
+ return account;
}
int
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 6c3dc7937a..759088e82b 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -4911,7 +4911,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">1.5 0 10 1 1 1</property>
+ <property name="adjustment">1.5 0 10 1 1 0</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -4987,7 +4987,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">0 0 30000 1 10 10</property>
+ <property name="adjustment">0 0 30000 1 10 0</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -5063,7 +5063,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">5 1 100 1 10 10</property>
+ <property name="adjustment">5 1 100 1 10 0</property>
</widget>
<packing>
<property name="padding">2</property>
@@ -9544,7 +9544,7 @@ for display purposes only. </property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
+ <property name="adjustment">0 0 65535 1 10 0</property>
</widget>
<packing>
<property name="left_attach">3</property>
@@ -9565,7 +9565,7 @@ for display purposes only. </property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
+ <property name="adjustment">0 0 65535 1 10 0</property>
</widget>
<packing>
<property name="left_attach">3</property>
@@ -9586,7 +9586,7 @@ for display purposes only. </property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
+ <property name="adjustment">0 0 65535 1 10 0</property>
</widget>
<packing>
<property name="left_attach">3</property>
diff --git a/mail/message-list.c b/mail/message-list.c
index 5b3a1b646b..993c387cd7 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -65,8 +65,6 @@
#include "table/e-cell-vbox.h"
#include "table/e-cell-hbox.h"
-#include "filter/filter-label.h"
-
#include "em-popup.h"
#include "em-utils.h"
#include "mail-config.h"
diff --git a/mail/searchtypes.xml b/mail/searchtypes.xml
index d48fc251af..ded2e2eabd 100644
--- a/mail/searchtypes.xml
+++ b/mail/searchtypes.xml
@@ -270,7 +270,9 @@
</code>
</option>
</input>
- <input type="label" name="versus"/>
+ <input type="optionlist" name="versus">
+ <dynamic func="e_util_labels_get_filter_options"/>
+ </input>
</part>
<part name="score">
diff --git a/mail/vfoldertypes.xml b/mail/vfoldertypes.xml
index f7b4b7d8cd..b87af3280a 100644
--- a/mail/vfoldertypes.xml
+++ b/mail/vfoldertypes.xml
@@ -353,7 +353,9 @@
</code>
</option>
</input>
- <input type="label" name="versus"/>
+ <input type="optionlist" name="versus">
+ <dynamic func="e_util_labels_get_filter_options"/>
+ </input>
</part>
<part name="score">