diff options
author | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-10-13 18:55:34 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-10-13 18:55:34 +0800 |
commit | cb3e037f8f55f95892104326807d9988be87fbe4 (patch) | |
tree | acac7b63e7a8b1ea4f37273363cb423dbff491ed /mail | |
parent | b77871e4fd7a4464e3a2e4e458f0d10e71805a02 (diff) | |
parent | ee5ca188d56abc91ca9fce034322466d5b0f4b9f (diff) | |
download | gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.tar gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.tar.gz gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.tar.bz2 gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.tar.lz gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.tar.xz gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.tar.zst gsoc2013-evolution-cb3e037f8f55f95892104326807d9988be87fbe4.zip |
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-store.c | 4 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 38 | ||||
-rw-r--r-- | mail/mail-config.ui | 2 |
3 files changed, 41 insertions, 3 deletions
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c index e59e7b2abd..4785eb5177 100644 --- a/mail/e-mail-store.c +++ b/mail/e-mail-store.c @@ -383,7 +383,7 @@ handle_transport: camel_url_free (url); } - if (!skip && (provider->flags & CAMEL_PROVIDER_IS_STORAGE)) + if (!skip && (provider->flags & CAMEL_PROVIDER_IS_STORAGE) != 0 && store_table != NULL) e_mail_store_add (backend, CAMEL_STORE (service)); return CAMEL_STORE (service); @@ -457,7 +457,7 @@ e_mail_store_remove_by_account (EMailBackend *backend, provider = camel_service_get_provider (service); g_return_if_fail (provider != NULL); - if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE)) + if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE) || store_table == NULL) return; e_mail_store_remove (backend, CAMEL_STORE (service)); diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 1d831cc4e4..973051324f 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -612,6 +612,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree, gchar *old_name = NULL; gchar *old_full_name = NULL; gchar *new_full_name = NULL; + gchar *folder_uri; gchar **strv; gpointer parent; guint index; @@ -681,7 +682,11 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree, goto exit; } -exit: + folder_uri = e_mail_folder_uri_build (store, new_full_name); + em_folder_tree_set_selected (folder_tree, folder_uri, FALSE); + g_free (folder_uri); + + exit: g_free (old_name); g_free (old_full_name); @@ -2004,9 +2009,11 @@ struct _DragDataReceivedAsync { /* Only selection->data and selection->length are valid */ GtkSelectionData *selection; + EMFolderTree *folder_tree; EMailSession *session; CamelStore *store; gchar *full_name; + gchar *dest_folder_uri; guint32 action; guint info; @@ -2021,6 +2028,7 @@ folder_tree_drop_folder (struct _DragDataReceivedAsync *m) CamelFolder *folder; CamelStore *parent_store; GCancellable *cancellable; + const gchar *folder_name; const gchar *full_name; const guchar *data; @@ -2043,6 +2051,22 @@ folder_tree_drop_folder (struct _DragDataReceivedAsync *m) parent_store, full_name, m->store, m->full_name ? m->full_name : "", m->move); + folder_name = strrchr (full_name, '/'); + if (folder_name) + folder_name++; + else + folder_name = full_name; + + if (m->full_name) { + gchar *dest_root_name; + + dest_root_name = g_strconcat (m->full_name, "/", folder_name, NULL); + m->dest_folder_uri = e_mail_folder_uri_build (m->store, dest_root_name); + g_free (dest_root_name); + } else { + m->dest_folder_uri = e_mail_folder_uri_build (m->store, folder_name); + } + g_object_unref (folder); } @@ -2127,10 +2151,20 @@ folder_tree_drop_async__exec (struct _DragDataReceivedAsync *m, static void folder_tree_drop_async__free (struct _DragDataReceivedAsync *m) { + if (m->move && m->dest_folder_uri) { + GList *selected_list; + + selected_list = g_list_append (NULL, m->dest_folder_uri); + em_folder_tree_set_selected_list (m->folder_tree, selected_list, FALSE); + g_list_free (selected_list); + } + + g_object_unref (m->folder_tree); g_object_unref (m->session); g_object_unref (m->context); g_object_unref (m->store); g_free (m->full_name); + g_free (m->dest_folder_uri); gtk_selection_data_free (m->selection); } @@ -2213,10 +2247,12 @@ tree_drag_data_received (GtkWidget *widget, } m = mail_msg_new (&folder_tree_drop_async_info); + m->folder_tree = g_object_ref (folder_tree); m->session = g_object_ref (session); m->context = g_object_ref (context); m->store = g_object_ref (store); m->full_name = full_name; + m->dest_folder_uri = NULL; m->action = gdk_drag_context_get_selected_action (context); m->info = info; diff --git a/mail/mail-config.ui b/mail/mail-config.ui index 8c788b69ad..616d4eab15 100644 --- a/mail/mail-config.ui +++ b/mail/mail-config.ui @@ -605,6 +605,7 @@ for display purposes only. </property> <property name="xalign">1</property> <property name="label" translatable="yes">_Reply style:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">comboboxReplyStyle</property> </object> <packing> <property name="x_options">GTK_FILL</property> @@ -618,6 +619,7 @@ for display purposes only. </property> <property name="xalign">1</property> <property name="label" translatable="yes">_Forward style:</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">comboboxForwardStyle</property> </object> <packing> <property name="top_attach">1</property> |