* src/modest-ui-actions.c:
[modest] / src / modest-ui-actions.c
index cee2bdb..2f12ad9 100644 (file)
@@ -1809,7 +1809,8 @@ modest_ui_actions_on_item_not_found (ModestHeaderView *header_view,ModestItemTyp
 
                gtk_window_set_default_size (GTK_WINDOW(dialog), 300, 300);
                if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
-//                     modest_platform_connect_and_wait ();
+                       /* TODO: Comment about why is this commented out: */
+                       /* modest_platform_connect_and_wait (); */
                }
        }
        gtk_widget_destroy (dialog);
@@ -2642,18 +2643,21 @@ modest_ui_actions_on_cut (GtkAction *action,
                          ModestWindow *window)
 {
        GtkWidget *focused_widget;
+       GtkClipboard *clipboard;
 
+       clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
        focused_widget = gtk_window_get_focus (GTK_WINDOW (window));
        if (GTK_IS_EDITABLE (focused_widget)) {
                gtk_editable_cut_clipboard (GTK_EDITABLE(focused_widget));
+               gtk_clipboard_set_can_store (clipboard, NULL, 0);
+               gtk_clipboard_store (clipboard);
        } else if (GTK_IS_TEXT_VIEW (focused_widget)) {
                GtkTextBuffer *buffer;
-               GtkClipboard *clipboard;
 
-               clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
                buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (focused_widget));
                gtk_text_buffer_cut_clipboard (buffer, clipboard, TRUE);
                gtk_clipboard_set_can_store (clipboard, NULL, 0);
+               gtk_clipboard_store (clipboard);
        } else if (MODEST_IS_HEADER_VIEW (focused_widget)) {
                modest_header_view_cut_selection (MODEST_HEADER_VIEW (focused_widget));
        } else if (MODEST_IS_FOLDER_VIEW (focused_widget)) {
@@ -2673,15 +2677,22 @@ modest_ui_actions_on_copy (GtkAction *action,
 
        if (GTK_IS_LABEL (focused_widget)) {
                gtk_clipboard_set_text (clipboard, gtk_label_get_text (GTK_LABEL (focused_widget)), -1);
+               gtk_clipboard_set_can_store (clipboard, NULL, 0);
+               gtk_clipboard_store (clipboard);
        } else if (GTK_IS_EDITABLE (focused_widget)) {
                gtk_editable_copy_clipboard (GTK_EDITABLE(focused_widget));
+               gtk_clipboard_set_can_store (clipboard, NULL, 0);
+               gtk_clipboard_store (clipboard);
        } else if (GTK_IS_HTML (focused_widget)) {
                gtk_html_copy (GTK_HTML (focused_widget));
+               gtk_clipboard_set_can_store (clipboard, NULL, 0);
+               gtk_clipboard_store (clipboard);
        } else if (GTK_IS_TEXT_VIEW (focused_widget)) {
                GtkTextBuffer *buffer;
                buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (focused_widget));
                gtk_text_buffer_copy_clipboard (buffer, clipboard);
                gtk_clipboard_set_can_store (clipboard, NULL, 0);
+               gtk_clipboard_store (clipboard);
        } else if (MODEST_IS_HEADER_VIEW (focused_widget)) {
                TnyList *header_list = modest_header_view_get_selected_headers (MODEST_HEADER_VIEW (focused_widget));
                TnyIterator *iter = tny_list_create_iterator (header_list);