[Xfce4-commits] [xfce/xfce4-settings] 01/01: color: Fix crash in add-profiles dialog (Bug #15876)

noreply at xfce.org noreply at xfce.org
Fri Aug 23 17:55:18 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-settings.

commit ef0715288c36181bbb7061ebcee815fd14ed8708
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Fri Aug 23 17:54:42 2019 +0200

    color: Fix crash in add-profiles dialog (Bug #15876)
---
 dialogs/color-settings/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dialogs/color-settings/main.c b/dialogs/color-settings/main.c
index 505984c..71fb674 100644
--- a/dialogs/color-settings/main.c
+++ b/dialogs/color-settings/main.c
@@ -499,6 +499,7 @@ color_settings_profile_add_cb (GtkButton *button, ColorSettings *settings)
 {
     g_autoptr(GPtrArray) profiles = NULL;
     gchar *window_title;
+    int response;
 
     /* add profiles of the right kind */
     profiles = cd_device_get_profiles (settings->current_device);
@@ -514,7 +515,10 @@ color_settings_profile_add_cb (GtkButton *button, ColorSettings *settings)
     gtk_window_set_title (GTK_WINDOW (settings->dialog_assign), window_title);
     xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (settings->dialog_assign), color_device_get_title (settings->current_device));
     g_free (window_title);
-    gtk_widget_show (GTK_WIDGET (settings->dialog_assign));
+
+    response = gtk_dialog_run (GTK_DIALOG (settings->dialog_assign));
+    if (response == GTK_RESPONSE_DELETE_EVENT)
+        gtk_widget_hide (GTK_WIDGET (settings->dialog_assign));
 }
 
 
@@ -917,6 +921,7 @@ color_settings_profiles_list_box_row_activated_cb (GtkListBox *list_box,
 static void
 color_settings_dialog_destroy (ColorSettings *settings)
 {
+    gtk_widget_destroy (GTK_WIDGET (settings->dialog_assign));
     g_clear_object (&settings->cancellable);
     g_clear_object (&settings->client);
     g_clear_object (&settings->current_device);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list