[Xfce4-commits] [xfce/xfce4-settings] 14/67: display: Make sure the profile save/delete buttons are in/sensitive

noreply at xfce.org noreply at xfce.org
Sat Sep 22 11:23:05 CEST 2018


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 d4be62c666f6f2551475b52bde71b11eed1a42d7
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Tue Aug 14 00:51:04 2018 +0200

    display: Make sure the profile save/delete buttons are in/sensitive
---
 dialogs/display-settings/main.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 0dc3ddc..0de08cc 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1463,11 +1463,18 @@ static void
 display_settings_profile_apply (GtkWidget *widget, GtkBuilder *builder)
 {
     GtkWidget *entry = gtk_bin_get_child ((GtkBin*) gtk_builder_get_object (builder, "randr-profile"));
-    g_warning ("applying changes, loading profile.");
+
     if (gtk_entry_get_text_length (GTK_ENTRY (entry)))
     {
+        gtk_widget_set_sensitive (profile_save_button, TRUE);
+        gtk_widget_set_sensitive (profile_delete_button, TRUE);
         xfce_randr_apply (xfce_randr, gtk_entry_get_text (GTK_ENTRY (entry)), display_channel);
     }
+    else
+    {
+        gtk_widget_set_sensitive (profile_save_button, FALSE);
+        gtk_widget_set_sensitive (profile_delete_button, FALSE);
+    }
 }
 
 static void
@@ -1563,9 +1570,11 @@ display_settings_dialog_new (GtkBuilder *builder)
     gtk_widget_set_sensitive(apply_button, FALSE);
 
     profile_save_button = GTK_WIDGET(gtk_builder_get_object (builder, "button-profile-save"));
+    gtk_widget_set_sensitive (profile_save_button, FALSE);
     g_signal_connect (G_OBJECT (profile_save_button), "clicked", G_CALLBACK (display_settings_profile_save), builder);
 
     profile_delete_button = GTK_WIDGET(gtk_builder_get_object (builder, "button-profile-delete"));
+    gtk_widget_set_sensitive (profile_delete_button, FALSE);
     g_signal_connect (G_OBJECT (profile_delete_button), "clicked", G_CALLBACK (display_settings_profile_delete), builder);
 
 

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


More information about the Xfce4-commits mailing list