[Xfce4-commits] [xfce/xfce4-settings] 22/37: color: Move the import button to the profile add dialog

noreply at xfce.org noreply at xfce.org
Fri Feb 15 00:27:51 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       o   c   h   o   s   i   /   c   o   l   o   r   d   
   in repository xfce/xfce4-settings.

commit a80c4c5d0d2112a29e27ce5f2b6d00599ee3161b
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Wed Feb 13 00:20:40 2019 +0100

    color: Move the import button to the profile add dialog
---
 dialogs/color-settings/main.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/dialogs/color-settings/main.c b/dialogs/color-settings/main.c
index 55eb2e5..540b32b 100644
--- a/dialogs/color-settings/main.c
+++ b/dialogs/color-settings/main.c
@@ -77,7 +77,6 @@ struct _ColorSettings
     GObject       *label_no_profiles;
     GObject       *box_profiles;
     GObject       *profiles_add;
-    GObject       *profiles_import;
     GObject       *profiles_remove;
     GObject       *frame_profiles;
     GtkListBox    *profiles_list_box;
@@ -87,6 +86,7 @@ struct _ColorSettings
     GtkSizeGroup  *profiles_list_box_size;
     GObject       *treeview_assign;
     GObject       *liststore_assign;
+    GObject       *button_assign_import;
     GObject       *button_assign_ok;
     GObject       *button_assign_cancel;
 } ColorSettings;
@@ -530,17 +530,7 @@ color_settings_profile_import_cb (GtkWidget *widget,
     }
 #endif
 
-    /* just add it, the list store will get ::changed */
-    ret = cd_device_add_profile_sync (settings->current_device,
-                                      CD_DEVICE_RELATION_HARD,
-                                      profile,
-                                      settings->cancellable,
-                                      &error);
-    if (!ret)
-    {
-        g_warning ("failed to add: %s", error->message);
-        return;
-    }
+    color_settings_profile_add_cb (NULL, settings);
 }
 
 
@@ -1020,8 +1010,6 @@ color_settings_dialog_init (GtkBuilder *builder)
     /* Profiles ListBox */
     settings->profiles_add = gtk_builder_get_object (builder, "profiles-add");
     g_signal_connect (settings->profiles_add, "clicked", G_CALLBACK (color_settings_profile_add_cb), settings);
-    settings->profiles_import = gtk_builder_get_object (builder, "profiles-import");
-    g_signal_connect (settings->profiles_import, "clicked", G_CALLBACK (color_settings_profile_import_cb), settings);
     settings->profiles_remove = gtk_builder_get_object (builder, "profiles-remove");
     g_signal_connect (settings->profiles_remove, "clicked", G_CALLBACK (color_settings_profile_remove_cb), settings);
 
@@ -1060,6 +1048,8 @@ color_settings_dialog_init (GtkBuilder *builder)
     g_signal_connect (GTK_TREE_VIEW (settings->treeview_assign), "row-activated",
                       G_CALLBACK (color_settings_profiles_row_activated_cb),
                       settings); */
+    settings->button_assign_import = gtk_builder_get_object (builder, "assign-import");
+    g_signal_connect (settings->button_assign_import, "clicked", G_CALLBACK (color_settings_profile_import_cb), settings);
     settings->button_assign_ok = gtk_builder_get_object (builder, "assign-ok");
     g_signal_connect (settings->button_assign_ok, "clicked",
                   G_CALLBACK (color_settings_button_assign_ok_cb), settings);

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


More information about the Xfce4-commits mailing list