diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-02-17 21:38:02 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-02-17 21:38:02 +0800 |
commit | 933ba0f066f65a7c8a91205540e41c46b0a7a45e (patch) | |
tree | e076b9527d1458d7ebb7898a1100301f2dff60d2 /widgets | |
parent | 1101e9345997efc4cf97b99d15029d1ceb80c8e9 (diff) | |
download | gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.tar gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.tar.gz gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.tar.bz2 gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.tar.lz gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.tar.xz gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.tar.zst gsoc2013-evolution-933ba0f066f65a7c8a91205540e41c46b0a7a45e.zip |
Bug 670280 - Remove "Recent Documents" attachment feature
GTK's file chooser dialog provides one-click access to recently used
documents now, so we can remove the redundancy from Evolution's mail
composer main menu and calendar component editor main menu and leave
it at "Insert -> Attachment".
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-attachment-view.c | 54 | ||||
-rw-r--r-- | widgets/misc/e-attachment-view.h | 4 |
2 files changed, 0 insertions, 58 deletions
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c index b066d29fa0..e8f9af8fdb 100644 --- a/widgets/misc/e-attachment-view.c +++ b/widgets/misc/e-attachment-view.c @@ -244,31 +244,6 @@ action_properties_cb (GtkAction *action, } static void -action_recent_cb (GtkAction *action, - EAttachmentView *view) -{ - GtkRecentChooser *chooser; - EAttachmentStore *store; - EAttachment *attachment; - gpointer parent; - gchar *uri; - - chooser = GTK_RECENT_CHOOSER (action); - store = e_attachment_view_get_store (view); - - parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); - parent = gtk_widget_is_toplevel (parent) ? parent : NULL; - - uri = gtk_recent_chooser_get_current_uri (chooser); - attachment = e_attachment_new_for_uri (uri); - e_attachment_store_add_attachment (store, attachment); - e_attachment_load_async ( - attachment, (GAsyncReadyCallback) - e_attachment_load_handle_error, parent); - g_free (uri); -} - -static void action_remove_cb (GtkAction *action, EAttachmentView *view) { @@ -1899,35 +1874,6 @@ e_attachment_view_get_ui_manager (EAttachmentView *view) return priv->ui_manager; } -GtkAction * -e_attachment_view_recent_action_new (EAttachmentView *view, - const gchar *action_name, - const gchar *action_label) -{ - GtkAction *action; - GtkRecentChooser *chooser; - - g_return_val_if_fail (E_IS_ATTACHMENT_VIEW (view), NULL); - g_return_val_if_fail (action_name != NULL, NULL); - - action = gtk_recent_action_new ( - action_name, action_label, NULL, NULL); - gtk_recent_action_set_show_numbers (GTK_RECENT_ACTION (action), TRUE); - - chooser = GTK_RECENT_CHOOSER (action); - gtk_recent_chooser_set_show_icons (chooser, TRUE); - gtk_recent_chooser_set_show_not_found (chooser, FALSE); - gtk_recent_chooser_set_show_private (chooser, FALSE); - gtk_recent_chooser_set_show_tips (chooser, TRUE); - gtk_recent_chooser_set_sort_type (chooser, GTK_RECENT_SORT_MRU); - - g_signal_connect ( - action, "item-activated", - G_CALLBACK (action_recent_cb), view); - - return action; -} - void e_attachment_view_show_popup_menu (EAttachmentView *view, GdkEventButton *event, diff --git a/widgets/misc/e-attachment-view.h b/widgets/misc/e-attachment-view.h index 0f5bcf1c0c..87274d0c63 100644 --- a/widgets/misc/e-attachment-view.h +++ b/widgets/misc/e-attachment-view.h @@ -227,10 +227,6 @@ GtkWidget * e_attachment_view_get_popup_menu (EAttachmentView *view); GtkUIManager * e_attachment_view_get_ui_manager (EAttachmentView *view); -GtkAction * e_attachment_view_recent_action_new - (EAttachmentView *view, - const gchar *action_name, - const gchar *action_label); void e_attachment_view_show_popup_menu (EAttachmentView *view, GdkEventButton *event, |