[Xfce4-commits] [xfce/xfce4-settings] 34/57: color: Drop unnecessary code

noreply at xfce.org noreply at xfce.org
Thu Mar 21 22:14:22 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 2f150d8aa15149b8aa9c7dd1baa1c066cdba2a78
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu Feb 14 23:09:43 2019 +0100

    color: Drop unnecessary code
---
 dialogs/color-settings/main.c | 34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)

diff --git a/dialogs/color-settings/main.c b/dialogs/color-settings/main.c
index a0ee39f..5006055 100644
--- a/dialogs/color-settings/main.c
+++ b/dialogs/color-settings/main.c
@@ -103,7 +103,11 @@ enum {
 
 
 
-static void color_settings_make_profile_default_cb (GObject *object, GAsyncResult *res, ColorSettings *settings);
+static void color_settings_make_profile_default_cb (GObject       *object,
+                                                    GAsyncResult  *res,
+                                                    ColorSettings *settings);
+static void color_settings_device_changed_cb       (CdDevice      *device,
+                                                    ColorSettings *settings);
 
 
 
@@ -648,31 +652,6 @@ color_settings_add_device_profile (ColorSettings *settings,
 
 
 static void
-color_settings_add_device_profiles (ColorSettings *settings, CdDevice *device)
-{
-    GtkCallback func = listbox_remove_all;
-    CdProfile *profile_tmp;
-    g_autoptr(GPtrArray) profiles = NULL;
-    guint i;
-
-    /* remove all profiles from the list */
-    gtk_container_foreach (GTK_CONTAINER (settings->profiles_list_box), func, settings->profiles_list_box);
-    /* add profiles */
-    profiles = cd_device_get_profiles (device);
-    if (profiles == NULL)
-        return;
-    for (i = 0; i < profiles->len; i++)
-    {
-        profile_tmp = g_ptr_array_index (profiles, i);
-        color_settings_add_device_profile (settings, device, profile_tmp, i == 0);
-    }
-
-    gtk_widget_show (GTK_WIDGET (settings->profiles_list_box));
-}
-
-
-
-static void
 color_settings_update_device_list_extra_entry (ColorSettings *settings)
 {
     g_autoptr(GList) device_widgets = NULL;
@@ -710,9 +689,8 @@ color_settings_list_box_row_activated_cb (GtkListBox *list_box,
     g_object_get (row, "device", &settings->current_device, NULL);
     if (cd_device_get_enabled (settings->current_device))
     {
-        color_settings_add_device_profiles (settings, settings->current_device);
+        color_settings_device_changed_cb (settings->current_device, settings);
         gtk_widget_set_sensitive (GTK_WIDGET (settings->profiles_add), TRUE);
-        color_settings_update_profile_list_extra_entry (settings);
     }
     else
     {

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


More information about the Xfce4-commits mailing list