[Xfce4-commits] [xfce/xfce4-settings] 48/67: display: Make the save profile button the default in the popover

noreply at xfce.org noreply at xfce.org
Sat Sep 22 11:23:39 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 5bcc109994aa399e4a2fa612e0d1721762bd1f81
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Sep 1 02:28:20 2018 +0200

    display: Make the save profile button the default in the popover
---
 dialogs/display-settings/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 2506924..f021868 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1635,7 +1635,9 @@ display_settings_profile_create (GtkWidget *widget, GtkBuilder *builder)
 
     label = gtk_label_new (_("Profile Name:"));
     profile_create_entry = gtk_entry_new ();
+    gtk_entry_set_activates_default (GTK_ENTRY (profile_create_entry), TRUE);
     button = gtk_button_new_with_label ("Save");
+    gtk_widget_set_can_default (button, TRUE);
 
     box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
     gtk_widget_set_margin_start (box, 12);
@@ -1645,9 +1647,9 @@ display_settings_profile_create (GtkWidget *widget, GtkBuilder *builder)
     gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
     gtk_box_pack_start (GTK_BOX (box), profile_create_entry, FALSE, TRUE, 0);
     gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
-
     gtk_container_add (GTK_CONTAINER (popover), box);
     gtk_widget_show_all (popover);
+    gtk_widget_grab_default (button);
 
     g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (display_settings_profile_create_cb), builder);
 }

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


More information about the Xfce4-commits mailing list