diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-18 07:46:45 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-18 07:46:45 +0800 |
commit | 8e546420df08f5fe243aa4227be44915fd79b86b (patch) | |
tree | 9475c4be3cf2eedceaa0122f5071a6f2914f3dd4 | |
parent | c22126d54f0cf0637e3d5ddd5d78b3ff5d111582 (diff) | |
download | gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.tar gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.tar.gz gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.tar.bz2 gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.tar.lz gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.tar.xz gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.tar.zst gsoc2013-evolution-8e546420df08f5fe243aa4227be44915fd79b86b.zip |
Fix a runtime warning.
svn path=/branches/kill-bonobo/; revision=37094
-rw-r--r-- | mail/e-mail-reader.c | 7 | ||||
-rw-r--r-- | mail/e-mail-shell-view-private.c | 12 | ||||
-rw-r--r-- | mail/e-mail-shell-view.c | 18 | ||||
-rw-r--r-- | mail/em-folder-view.c | 2 | ||||
-rw-r--r-- | shell/e-shell-window-private.c | 1 | ||||
-rw-r--r-- | shell/main.c | 1 |
6 files changed, 22 insertions, 19 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 7260dcd47e..697142aa6d 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -1941,9 +1941,10 @@ mail_reader_set_folder (EMailReader *reader, html_display = e_mail_reader_get_html_display (reader); message_list = e_mail_reader_get_message_list (reader); - outgoing = em_utils_folder_is_drafts (folder, folder_uri) || + outgoing = folder != NULL && folder_uri != NULL && ( + em_utils_folder_is_drafts (folder, folder_uri) || em_utils_folder_is_outbox (folder, folder_uri) || - em_utils_folder_is_sent (folder, folder_uri); + em_utils_folder_is_sent (folder, folder_uri)); if (message_list->folder != NULL) mail_sync_folder (message_list->folder, NULL, NULL); @@ -2232,8 +2233,6 @@ e_mail_reader_set_folder (EMailReader *reader, EMailReaderIface *iface; g_return_if_fail (E_IS_MAIL_READER (reader)); - g_return_if_fail (CAMEL_IS_FOLDER (folder)); - g_return_if_fail (folder_uri != NULL); iface = E_MAIL_READER_GET_IFACE (reader); g_return_if_fail (iface->set_folder != NULL); diff --git a/mail/e-mail-shell-view-private.c b/mail/e-mail-shell-view-private.c index c175e1ad4d..82a97352d9 100644 --- a/mail/e-mail-shell-view-private.c +++ b/mail/e-mail-shell-view-private.c @@ -31,12 +31,15 @@ mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view, EMFolderTree *folder_tree) { EMailReader *reader; + gboolean folder_selected; reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content); - if ((flags & CAMEL_FOLDER_NOSELECT) || uri == NULL) - e_mail_reader_set_folder (reader, NULL, NULL); - else { + folder_selected = + !(flags & CAMEL_FOLDER_NOSELECT) && + full_name != NULL; + + if (folder_selected) { EMFolderTreeModel *model; model = em_folder_tree_get_model (folder_tree); @@ -44,7 +47,8 @@ mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view, em_folder_tree_model_save_state (model); e_mail_reader_set_folder_uri (reader, uri); - } + } else + e_mail_reader_set_folder (reader, NULL, NULL); e_shell_view_update_actions (E_SHELL_VIEW (mail_shell_view)); } diff --git a/mail/e-mail-shell-view.c b/mail/e-mail-shell-view.c index 74fa2e2291..f93e72c043 100644 --- a/mail/e-mail-shell-view.c +++ b/mail/e-mail-shell-view.c @@ -91,9 +91,8 @@ mail_shell_view_update_actions (EShellView *shell_view) EShellSidebar *shell_sidebar; EShellWindow *shell_window; EMFolderTree *folder_tree; - EAccount *account; + EAccount *account = NULL; GtkAction *action; - CamelURL *camel_url; const gchar *label; gchar *uri; gboolean sensitive; @@ -133,15 +132,16 @@ mail_shell_view_update_actions (EShellView *shell_view) (state & E_MAIL_SHELL_SIDEBAR_FOLDER_IS_TRASH); uri = em_folder_tree_get_selected_uri (folder_tree); - account = mail_config_get_account_by_source_url (uri); - camel_url = camel_url_new (uri, NULL); + if (uri != NULL) { + account = mail_config_get_account_by_source_url (uri); - /* FIXME This belongs in a GroupWise plugin. */ - account_is_groupwise = - (g_strrstr (uri, "groupwise://") != NULL) && - account != NULL && account->parent_uid != NULL; + /* FIXME This belongs in a GroupWise plugin. */ + account_is_groupwise = + (g_strrstr (uri, "groupwise://") != NULL) && + account != NULL && account->parent_uid != NULL; - g_free (uri); + g_free (uri); + } action = ACTION (MAIL_ACCOUNT_DISABLE); visible = (account != NULL) && folder_is_store; diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 30309df598..51846a2bcb 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -279,7 +279,7 @@ emfv_init(GObject *o) // struct _EMFolderViewPrivate *p = emfv->priv; // // g_slist_foreach (emfv->ui_files, free_one_ui_file, NULL); -/ g_slist_free(emfv->ui_files); +// g_slist_free(emfv->ui_files); /// g_slist_free(emfv->enable_map); // // g_free(p); diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 6fcdc2b6fc..f16a8a68f5 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -264,6 +264,7 @@ e_shell_window_private_init (EShellWindow *shell_window) gtk_widget_show (widget); widget = gtk_hbox_new (FALSE, 2); + gtk_container_set_border_width (GTK_CONTAINER (widget), 1); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); priv->status_area = g_object_ref (widget); gtk_widget_show (widget); diff --git a/shell/main.c b/shell/main.c index 6dac5f062b..0cf8c77d8c 100644 --- a/shell/main.c +++ b/shell/main.c @@ -187,7 +187,6 @@ categories_icon_theme_hack (void) /* Extract the directory components. */ dirname = g_path_get_dirname (filename); - g_debug ("Category Icon Path: %s", dirname); /* Add it to the icon theme's search path. This relies on * GtkIconTheme's legacy feature of using image files found |