From 0890fdffb517edf80f1e56c14bb45f86046a00f4 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Tue, 12 Aug 2008 15:14:24 +0000 Subject: [PATCH] * Fixes NB#87366, do not hang on save attachments dialog pmo-diablo-r5290 --- src/modest-ui-dimming-rules.c | 3 +++ src/widgets/modest-attachments-view.c | 10 +--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/modest-ui-dimming-rules.c b/src/modest-ui-dimming-rules.c index 447b57b..f7218b1 100644 --- a/src/modest-ui-dimming-rules.c +++ b/src/modest-ui-dimming-rules.c @@ -1833,7 +1833,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); diff --git a/src/widgets/modest-attachments-view.c b/src/widgets/modest-attachments-view.c index 51a0408..90eb51e 100644 --- a/src/widgets/modest-attachments-view.c +++ b/src/widgets/modest-attachments-view.c @@ -76,7 +76,6 @@ static void set_selected (ModestAttachmentsView *atts_view, ModestAttachmentView static void select_range (ModestAttachmentsView *atts_view, ModestAttachmentView *att1, ModestAttachmentView *att2); static void clipboard_get (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer userdata); -static void clipboard_clear (GtkClipboard *clipboard, gpointer userdata); static void own_clipboard (ModestAttachmentsView *atts_view); static guint signals[LAST_SIGNAL] = {0}; @@ -790,13 +789,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 +926,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)); } -- 1.7.9.5