[evolution] I#576 - Can't copy text from location field in read-only calendar



commit 757161af1fbebe670b9f5c9b9650687c6bdceb1a
Author: Milan Crha <mcrha redhat com>
Date:   Fri Aug 16 14:30:05 2019 +0200

    I#576 - Can't copy text from location field in read-only calendar
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/576

 src/calendar/gui/e-comp-editor-page-attachments.c | 10 ++--------
 src/calendar/gui/e-comp-editor-page.c             |  8 ++++++--
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/src/calendar/gui/e-comp-editor-page-attachments.c 
b/src/calendar/gui/e-comp-editor-page-attachments.c
index e5a79938cd..a0dffaaf66 100644
--- a/src/calendar/gui/e-comp-editor-page-attachments.c
+++ b/src/calendar/gui/e-comp-editor-page-attachments.c
@@ -219,7 +219,6 @@ static void
 ecep_attachments_sensitize_widgets (ECompEditorPage *page,
                                    gboolean force_insensitive)
 {
-       ECompEditorPageAttachments *page_attachments;
        ECompEditor *comp_editor;
        GtkAction *action;
        guint32 flags;
@@ -234,11 +233,6 @@ ecep_attachments_sensitize_widgets (ECompEditorPage *page,
 
        is_organizer = (flags & (E_COMP_EDITOR_FLAG_IS_NEW | E_COMP_EDITOR_FLAG_ORGANIZER_IS_USER)) != 0;
 
-       page_attachments = E_COMP_EDITOR_PAGE_ATTACHMENTS (page);
-
-       gtk_widget_set_sensitive (page_attachments->priv->controls_container, !force_insensitive);
-       gtk_widget_set_sensitive (page_attachments->priv->notebook, !force_insensitive);
-
        action = e_comp_editor_get_action (comp_editor, "attachments-attach");
        gtk_action_set_sensitive (action, !force_insensitive && is_organizer);
 
@@ -859,12 +853,12 @@ ecep_attachments_constructed (GObject *object)
 
        e_binding_bind_property (
                action, "sensitive",
-               e_attachment_view_get_action (E_ATTACHMENT_VIEW (page_attachments->priv->icon_view), "add"), 
"sensitive",
+               page_attachments->priv->icon_view, "editable",
                G_BINDING_SYNC_CREATE);
 
        e_binding_bind_property (
                action, "sensitive",
-               e_attachment_view_get_action (E_ATTACHMENT_VIEW (page_attachments->priv->tree_view), "add"), 
"sensitive",
+               page_attachments->priv->tree_view, "editable",
                G_BINDING_SYNC_CREATE);
 
        g_clear_object (&comp_editor);
diff --git a/src/calendar/gui/e-comp-editor-page.c b/src/calendar/gui/e-comp-editor-page.c
index c82c9d8721..d41de8c458 100644
--- a/src/calendar/gui/e-comp-editor-page.c
+++ b/src/calendar/gui/e-comp-editor-page.c
@@ -82,8 +82,12 @@ ecep_sensitize_widgets (ECompEditorPage *page,
                        gtk_widget_set_sensitive (widget, !force_insensitive);
 
                widget = e_comp_editor_property_part_get_edit_widget (ppd->part);
-               if (widget)
-                       gtk_widget_set_sensitive (widget, !force_insensitive);
+               if (widget) {
+                       if (GTK_IS_ENTRY (widget))
+                               g_object_set (G_OBJECT (widget), "editable", !force_insensitive, NULL);
+                       else
+                               gtk_widget_set_sensitive (widget, !force_insensitive);
+               }
        }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]