[gimp] app: fix GimpDataEditor name entry set_editable() logic



commit 262f25b3192b677eaa2cf6ff90275a0092202723
Author: Ell <ell_se yahoo com>
Date:   Mon Oct 30 17:25:52 2017 -0400

    app: fix GimpDataEditor name entry set_editable() logic
    
    Small fix to last commit: make the name entry editable when the
    data is renamable, even if it's not otherwise writable (completely
    hypothetical for now.)

 app/widgets/gimpdataeditor.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpdataeditor.c b/app/widgets/gimpdataeditor.c
index cd5edaf..32008ce 100644
--- a/app/widgets/gimpdataeditor.c
+++ b/app/widgets/gimpdataeditor.c
@@ -448,6 +448,11 @@ gimp_data_editor_real_set_data (GimpDataEditor *editor,
       gtk_entry_set_text (GTK_ENTRY (editor->name_entry), "");
     }
 
+  gtk_editable_set_editable (
+    GTK_EDITABLE (editor->name_entry),
+    editor->data &&
+    gimp_viewable_is_name_editable (GIMP_VIEWABLE (editor->data)));
+
   editable = (editor->data && gimp_data_is_writable (editor->data));
 
   if (editor->data_editable != editable)
@@ -456,11 +461,6 @@ gimp_data_editor_real_set_data (GimpDataEditor *editor,
 
       gimp_docked_title_changed (GIMP_DOCKED (editor));
     }
-
-  gtk_editable_set_editable (
-    GTK_EDITABLE (editor->name_entry),
-    editable &&
-    gimp_viewable_is_name_editable (GIMP_VIEWABLE (editor->data)));
 }
 
 void


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