diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 08:16:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 08:16:47 +0000 |
commit | 839c46e19ac4aa00b619a185ad48ee977162ef2c (patch) | |
tree | 01f1e79a4e164244941361adb0cf062098537f12 /app/actions/data-commands.c | |
parent | Adding debian version 2.10.36-3. (diff) | |
download | gimp-839c46e19ac4aa00b619a185ad48ee977162ef2c.tar.xz gimp-839c46e19ac4aa00b619a185ad48ee977162ef2c.zip |
Merging upstream version 2.10.38.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'app/actions/data-commands.c')
-rw-r--r-- | app/actions/data-commands.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/app/actions/data-commands.c b/app/actions/data-commands.c index 9d71bda..d93a6b1 100644 --- a/app/actions/data-commands.c +++ b/app/actions/data-commands.c @@ -117,11 +117,15 @@ data_new_cmd_callback (GimpAction *action, if (data) { + GtkWidget *edit_button; + gimp_context_set_by_type (context, gimp_data_factory_view_get_children_type (view), GIMP_OBJECT (data)); - gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view))); + edit_button = gimp_data_factory_view_get_edit_button (view); + if (edit_button && gtk_widget_get_visible (edit_button)) + gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view))); } } } @@ -149,11 +153,15 @@ data_duplicate_cmd_callback (GimpAction *action, if (new_data) { + GtkWidget *edit_button; + gimp_context_set_by_type (context, gimp_data_factory_view_get_children_type (view), GIMP_OBJECT (new_data)); - gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view))); + edit_button = gimp_data_factory_view_get_edit_button (view); + if (edit_button && gtk_widget_get_visible (edit_button)) + gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view))); } } } @@ -288,6 +296,7 @@ data_edit_cmd_callback (GimpAction *action, GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view)); gint monitor = gimp_widget_get_monitor (GTK_WIDGET (view)); GtkWidget *dockable; + GtkWidget *editor = NULL; dockable = gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)), @@ -298,7 +307,10 @@ data_edit_cmd_callback (GimpAction *action, g_variant_get_string (value, NULL)); - gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))), - data); + if (dockable) + editor = gtk_bin_get_child (GTK_BIN (dockable)); + + if (editor && GIMP_IS_DATA_EDITOR (editor)) + gimp_data_editor_set_data (GIMP_DATA_EDITOR (editor), data); } } |