* src/widgets/modest-attachments-view.c:
authorJose Dapena Paz <jdapena@igalia.com>
Thu, 31 Jul 2008 17:14:29 +0000 (17:14 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Thu, 31 Jul 2008 17:14:29 +0000 (17:14 +0000)
  Removed teh clipboard_clear handler, as it was wiping the selection
  on clipboard external changes.
* src/modest-ui-dimming-rules.c:
  Avoid in add to contacts dimming rules calling to clibpoard when
  focus was in attachments view (prevents some locks).

pmo-trunk-r5235

src/modest-ui-dimming-rules.c
src/widgets/modest-attachments-view.c

index f3ba9d9..76bf399 100644 (file)
@@ -1867,7 +1867,10 @@ modest_ui_dimming_rules_on_add_to_contacts (ModestWindow *win, gpointer user_dat
                                int len = -1;
                                sel = gtk_html_get_selection_html (GTK_HTML (focused), &len);
                                do_check = !((sel == NULL) || (sel[0] == '\0'));
+                       } else if (MODEST_IS_ATTACHMENTS_VIEW (focused)) {
+                               do_check = FALSE;
                        }
+                       g_warning ("FOCUSED %s", focused?G_OBJECT_TYPE_NAME (focused):"NULL");
                        if (do_check) {
                                clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY);
                                selection = gtk_clipboard_wait_for_text (clipboard);
index 51a0408..69c0d16 100644 (file)
@@ -790,13 +790,6 @@ static void clipboard_get (GtkClipboard *clipboard, GtkSelectionData *selection_
        }
 }
 
-static void clipboard_clear (GtkClipboard *clipboard, gpointer userdata)
-{
-       ModestAttachmentsView *atts_view = (ModestAttachmentsView *) userdata;
-
-       unselect_all (atts_view);
-}
-
 TnyList *
 modest_attachments_view_get_selection (ModestAttachmentsView *atts_view)
 {
@@ -934,7 +927,7 @@ own_clipboard (ModestAttachmentsView *atts_view)
 
        gtk_clipboard_set_with_owner (gtk_widget_get_clipboard (GTK_WIDGET (atts_view), GDK_SELECTION_PRIMARY),
                                      targets, G_N_ELEMENTS (targets),
-                                     clipboard_get, clipboard_clear, G_OBJECT(atts_view));
+                                     clipboard_get, NULL, G_OBJECT(atts_view));
                              
 }