[Xfce4-commits] [xfce/xfce4-settings] 33/57: color: Ensure to only show profiles for current device

noreply at xfce.org noreply at xfce.org
Thu Mar 21 22:14:21 CET 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 6acb949d8e588f49d60c1467dbceebab61884f30
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu Feb 14 22:53:19 2019 +0100

    color: Ensure to only show profiles for current device
---
 dialogs/color-settings/main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dialogs/color-settings/main.c b/dialogs/color-settings/main.c
index 8735655..a0ee39f 100644
--- a/dialogs/color-settings/main.c
+++ b/dialogs/color-settings/main.c
@@ -846,11 +846,15 @@ color_settings_device_changed_cb (CdDevice *device,
         if (!SETTINGS_IS_COLOR_PROFILE (l->data))
             continue;
 
-        /* correct device ? */
+        /* remove profiles from other devices from the list */
         device_tmp = color_profile_get_device (SETTINGS_COLOR_PROFILE (l->data));
         if (g_strcmp0 (cd_device_get_id (device),
-                       cd_device_get_id (device_tmp)) != 0)
+                       cd_device_get_id (device_tmp)) != 0) {
+            gtk_widget_destroy (GTK_WIDGET (l->data));
+            /* Don't look at the destroyed widget below */
+            l->data = NULL;
             continue;
+        }
 
         /* if profile is not in Device.Profiles then remove */
         profile_tmp = color_profile_get_profile (SETTINGS_COLOR_PROFILE (l->data));

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


More information about the Xfce4-commits mailing list