aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-11-08 06:04:53 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-08 06:04:53 +0800
commitd6445f8abfa78c0a9c8680a3ba7422d331391f8f (patch)
tree8d462e7747bccdc2108837401fd295dfa160943d /mail
parent6140798719beb44abaa4de89043f6d911c977621 (diff)
downloadgsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.tar
gsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.tar.gz
gsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.tar.bz2
gsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.tar.lz
gsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.tar.xz
gsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.tar.zst
gsoc2013-evolution-d6445f8abfa78c0a9c8680a3ba7422d331391f8f.zip
Merge revisions 36685:36729 from trunk.
svn path=/branches/kill-bonobo/; revision=36763
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog38
-rw-r--r--mail/em-folder-tree.c4
-rw-r--r--mail/em-format-html.c2
-rw-r--r--mail/em-utils.c10
-rw-r--r--mail/mail-component.c250
-rw-r--r--mail/mail-config.glade2
6 files changed, 56 insertions, 250 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a5a277b527..76ed190ad0 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,33 @@
+2008-11-02 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #559042
+
+ * mail-config.glade:
+ Remove extra space in translated string.
+
+2008-11-02 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #557613
+
+ * em-utils.c (try_open_e_book):
+ Wait for try_open_e_book_cb() to run before freeing the EFlag.
+ It will run regardless of whether the EBook operation completes.
+
+2008-10-31 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #558726 (patch by Frederic van Starbmann)
+
+ * em-format-html.c (emfh_multipart_related_check):
+ Fix a potential format string crash.
+
+2008-10-31 Sankar P <psankar@novell.com>
+
+ ** Patch by Bharath Acharya <abharath@novell.com>
+
+ * em-folder-tree.c (emft_popup):
+ Disable delete and rename on
+ right click menu for the system folders
+
2008-10-22 Matthew Barnes <mbarnes@redhat.com>
* mail-send-recv.c:
@@ -321,6 +351,14 @@ License Changes
* em-format-html-display.c: (efhd_image): Do not try to access widget
of the pury when the operation has been cancelled.
+2008-11-03 Ashish Shrivastava <shashish@novell.com>
+
+ ** Support for Non-intrusive error in calendar.
+
+ * mail-component.c: Remove common code between
+ mailer and calendar and moved to
+ e-util/e-non-intrusive-error-dialog.c
+
2008-09-08 Milan Crha <mcrha@redhat.com>
** Fix for bug #328216
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index b2d95cd71b..ac0455c13d 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2243,6 +2243,10 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
info_flags |= CAMEL_FOLDER_VIRTUAL | CAMEL_FOLDER_NOINFERIORS;
selfolder = em_folder_tree_get_selected_folder (emft);
+
+ if (folder_type_flags & CAMEL_FOLDER_SYSTEM)
+ flags &= ~EM_POPUP_FOLDER_DELETE;
+
if (em_utils_folder_is_outbox (selfolder, NULL))
info_flags |= CAMEL_FOLDER_TYPE_OUTBOX;
}
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 12e2b5975c..3ad759bfef 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1056,7 +1056,7 @@ emfh_multipart_related_check(struct _EMFormatHTMLJob *job, int cancelled)
if (puri->use_count == 0) {
d(printf("part '%s' '%s' used '%d'\n", puri->uri?puri->uri:"", puri->cid, puri->use_count));
if (puri->func == emfh_write_related) {
- g_string_printf(((EMFormat *)job->format)->part_id, puri->part_id);
+ g_string_printf(((EMFormat *)job->format)->part_id, "%s", puri->part_id);
em_format_part((EMFormat *)job->format, (CamelStream *)job->stream, puri->part);
}
/* else it was probably added by a previous format this loop */
diff --git a/mail/em-utils.c b/mail/em-utils.c
index b5c629ad1f..5f93e39361 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -2101,14 +2101,14 @@ try_open_e_book (EBook *book, gboolean only_if_exists, GError **error)
e_flag_timed_wait (flag, &wait);
}
- e_flag_free (flag);
-
if (canceled) {
g_set_error (error, E_BOOK_ERROR, E_BOOK_ERROR_CANCELLED, "Operation has been canceled.");
e_book_cancel_async_op (book, NULL);
- return FALSE;
}
+ e_flag_wait (flag);
+ e_flag_free (flag);
+
return data.result;
}
@@ -2203,7 +2203,7 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
stop = err && err->domain == E_BOOK_ERROR && err->code == E_BOOK_ERROR_CANCELLED;
mail_cancel_hook_remove(hook);
g_object_unref(book);
- d(g_warning("Can't get contacts: %s", err->message));
+ g_warning("Can't get contacts: %s", err->message);
g_clear_error(&err);
continue;
}
@@ -2287,7 +2287,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
|| !e_book_get_contacts(book, query, &contacts, &err)) {
stop = err && err->domain == E_BOOK_ERROR && err->code == E_BOOK_ERROR_CANCELLED;
g_object_unref(book);
- d(g_warning("Can't get contacts: %s", err->message));
+ g_warning("Can't get contacts: %s", err->message);
g_clear_error(&err);
continue;
}
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 45bafd3719..e210a2613a 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -90,6 +90,11 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-widget.h>
+#include "e-util/e-non-intrusive-error-dialog.h"
+
+#define MAILER_ERROR_LEVEL_KEY "/apps/evolution/mail/display/error_level"
+#define MAILER_ERROR_TIME_OUT_KEY "/apps/evolution/mail/display/error_timeout"
+
#define d(x)
static void create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data);
@@ -1586,254 +1591,13 @@ mail_component_stores_foreach (MailComponent *component, GHFunc func, void *user
// e_component_view_set_button_icon (mc->priv->component_view, icon);
//}
-struct _log_data {
- int level;
- char *key;
- char *text;
- char *stock_id;
- GdkPixbuf *pbuf;
-} ldata [] = {
- { E_LOG_ERROR, N_("Error"), N_("Errors"), GTK_STOCK_DIALOG_ERROR },
- { E_LOG_WARNINGS, N_("Warning"), N_("Warnings and Errors"), GTK_STOCK_DIALOG_WARNING },
- { E_LOG_DEBUG, N_("Debug"), N_("Error, Warnings and Debug messages"), GTK_STOCK_DIALOG_INFO }
-};
-
-enum
-{
- COL_LEVEL = 0,
- COL_TIME,
- COL_DATA
-};
-
-static gboolean
-query_tooltip_cb (GtkTreeView *view,
- gint x,
- gint y,
- gboolean keyboard_mode,
- GtkTooltip *tooltip)
-{
- GtkTreeViewColumn *column;
- GtkTreeModel *model;
- GtkTreePath *path;
- GtkTreeIter iter;
- gint level;
-
- if (!gtk_tree_view_get_tooltip_context (
- view, &x, &y, keyboard_mode, NULL, &path, &iter))
- return FALSE;
-
- /* Figure out which column we're pointing at. */
- if (keyboard_mode)
- gtk_tree_view_get_cursor (view, NULL, &column);
- else
- gtk_tree_view_get_path_at_pos (
- view, x, y, NULL, &column, NULL, NULL);
-
- /* Restrict the tip area to a single cell. */
- gtk_tree_view_set_tooltip_cell (view, tooltip, path, column, NULL);
-
- /* This only works if the tree view is NOT reorderable. */
- if (column != gtk_tree_view_get_column (view, 0))
- return FALSE;
-
- model = gtk_tree_view_get_model (view);
- gtk_tree_model_get (model, &iter, COL_LEVEL, &level, -1);
- gtk_tooltip_set_text (tooltip, ldata[level].key);
-
- return TRUE;
-}
-
-static void
-render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
-{
- gint level;
-
- gtk_tree_model_get (model, iter, COL_LEVEL, &level, -1);
- g_object_set (
- renderer, "stock-id", ldata[level].stock_id,
- "stock-size", GTK_ICON_SIZE_MENU, NULL);
-}
-
-static void
-render_date (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
-{
- time_t t;
- char sdt[100]; /* Should be sufficient? */
-
- gtk_tree_model_get (model, iter, COL_TIME, &t, -1);
- strftime (sdt, 100, "%x %X", localtime (&t));
- g_object_set (renderer, "text", sdt, NULL);
-}
-
-
-
-static void
-append_logs (const char *txt, GtkListStore *store)
-{
- char **str;
-
- str = g_strsplit (txt, ":", 3);
- if (str[0] && str[1] && str[2]) {
- GtkTreeIter iter;
-
- gtk_list_store_append (store, &iter);
- gtk_list_store_set (
- store, &iter,
- COL_LEVEL, atoi (str[0]),
- COL_TIME, atol (str[1]),
- COL_DATA, g_strstrip (str[2]),
- -1);
- } else
- g_printerr ("Unable to decode error log: %s\n", txt);
-
- g_strfreev (str);
-}
-
-static void
-spin_value_changed (GtkSpinButton *b, gpointer data)
-{
- int value = gtk_spin_button_get_value_as_int (b);
- GConfClient *client = mail_config_get_gconf_client ();
-
- gconf_client_set_int (client, "/apps/evolution/mail/display/error_timeout", value, NULL);
-}
-
void
mail_component_show_logger (gpointer top)
{
MailComponent *mc = mail_component_peek ();
- GConfBridge *bridge;
- GtkWidget *container;
- GtkWidget *label;
- GtkWidget *toplevel;
- GtkWidget *vbox;
- GtkWidget *widget;
- GtkWidget *window;
ELogger *logger = mc->priv->logger;
- int i;
- GtkListStore *store;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
-
- bridge = gconf_bridge_get ();
- toplevel = gtk_widget_get_toplevel (top);
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size (GTK_WINDOW (window), 500, 400);
- gtk_window_set_title (GTK_WINDOW (window), _("Debug Logs"));
- gtk_window_set_transient_for (
- GTK_WINDOW (window), GTK_WINDOW (toplevel));
- gtk_container_set_border_width (GTK_CONTAINER (window), 12);
-
- vbox = gtk_vbox_new (FALSE, 12);
- gtk_container_add (GTK_CONTAINER (window), vbox);
-
- container = gtk_hbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
-
- /* Translators: This is the first part of the sentence
- * "Show _errors in the status bar for" - XXX - "second(s)." */
- widget = gtk_label_new_with_mnemonic (
- _("Show _errors in the status bar for"));
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- label = widget;
-
- widget = gtk_spin_button_new_with_range (1.0, 60.0, 1.0);
- gtk_spin_button_set_value (
- GTK_SPIN_BUTTON (widget),
- (gdouble) mail_config_get_error_timeout ());
- g_signal_connect (
- widget, "value-changed",
- G_CALLBACK (spin_value_changed), NULL);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
- /* Translators: This is the second part of the sentence
- * "Show _errors in the status bar for" - XXX - "second(s)." */
- widget = gtk_label_new_with_mnemonic (_("second(s)."));
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
- container = gtk_hbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
-
- widget = gtk_label_new_with_mnemonic (_("Log Messages:"));
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- label = widget;
-
- widget = gtk_combo_box_new_text ();
- for (i = E_LOG_ERROR; i <= E_LOG_DEBUG; i++)
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (widget), ldata[i].text);
- gconf_bridge_bind_property (
- bridge, "/apps/evolution/mail/display/error_level",
- G_OBJECT (widget), "active");
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
- store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_LONG, G_TYPE_STRING);
- e_logger_get_logs (logger, (ELogFunction) append_logs, store);
- gtk_tree_sortable_set_sort_column_id (
- GTK_TREE_SORTABLE (store), COL_TIME, GTK_SORT_DESCENDING);
-
- container = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (
- GTK_SCROLLED_WINDOW (container),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (
- GTK_SCROLLED_WINDOW (container), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (vbox), container, TRUE, TRUE, 0);
-
- widget = gtk_tree_view_new();
- gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (widget), TRUE);
- gtk_tree_view_set_reorderable (GTK_TREE_VIEW (widget), FALSE);
- gtk_tree_view_set_model (GTK_TREE_VIEW (widget), GTK_TREE_MODEL (store));
- gtk_tree_view_set_search_column (GTK_TREE_VIEW (widget), COL_DATA);
- gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (widget), TRUE);
- gtk_widget_set_has_tooltip (widget, TRUE);
- gtk_container_add (GTK_CONTAINER (container), widget);
-
- g_signal_connect (
- widget, "query-tooltip",
- G_CALLBACK (query_tooltip_cb), NULL);
-
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title (column, _("Log Level"));
- gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column);
-
- renderer = gtk_cell_renderer_pixbuf_new ();
- gtk_tree_view_column_pack_start (column, renderer, TRUE);
- gtk_tree_view_column_set_cell_data_func (
- column, renderer, render_pixbuf, NULL, NULL);
-
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title (column, _("Time"));
- gtk_tree_view_append_column (GTK_TREE_VIEW (widget), column);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_cell_data_func (
- column, renderer, render_date, NULL, NULL);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(
- GTK_TREE_VIEW (widget), -1, _("Messages"),
- renderer, "markup", COL_DATA, NULL);
-
- container = gtk_hbutton_box_new ();
- gtk_button_box_set_layout (
- GTK_BUTTON_BOX (container), GTK_BUTTONBOX_END);
- gtk_box_pack_start (GTK_BOX (vbox), container, FALSE, FALSE, 0);
-
- widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
- gtk_widget_set_tooltip_text (widget, _("Close this window"));
- g_signal_connect_swapped (
- widget, "clicked",
- G_CALLBACK (gtk_widget_destroy), window);
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-
- gtk_widget_show_all (window);
+
+ eni_show_logger(logger, top, MAILER_ERROR_TIME_OUT_KEY, MAILER_ERROR_LEVEL_KEY);
}
BONOBO_TYPE_FUNC_FULL (MailComponent, GNOME_Evolution_MailComponent, PARENT_TYPE, mail_component)
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 445f0bb175..69a9016535 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -5108,7 +5108,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<widget class="GtkCheckButton" id="magic_spacebar_checkbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">Enable Magic S_pacebar </property>
+ <property name="label" translatable="yes">Enable Magic S_pacebar</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>