Check properly the contents of the clipboard before
authorAlberto Garcia <agarcia@igalia.com>
Wed, 17 Oct 2007 11:38:46 +0000 (11:38 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Wed, 17 Oct 2007 11:38:46 +0000 (11:38 +0000)
deciding whether to dim the "Paste" menu option
Fixes NB#73404

pmo-trunk-r3523

src/modest-ui-dimming-rules.c

index f990644..42d1384 100644 (file)
@@ -1474,7 +1474,8 @@ modest_ui_dimming_rules_on_editor_paste (ModestWindow *win, gpointer user_data)
        if (!dimmed) {
                ModestEmailClipboard *e_clipboard = modest_runtime_get_email_clipboard ();
                dimmed = modest_email_clipboard_cleared (e_clipboard) && 
-                       (modest_msg_edit_window_get_clipboard_text(MODEST_MSG_EDIT_WINDOW (win)) == NULL);
+                       (modest_msg_edit_window_get_clipboard_text(MODEST_MSG_EDIT_WINDOW (win)) == NULL) &&
+                        !gtk_clipboard_wait_is_text_available(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
        }
        
        return dimmed;