[Xfce4-commits] [apps/xfce4-screenshooter] 33/38: Set focus to the selected radio button

noreply at xfce.org noreply at xfce.org
Fri Apr 28 03:07:29 CEST 2017


This is an automated email from the git hooks/post-receive script.

andre pushed a commit to branch master
in repository apps/xfce4-screenshooter.

commit 1d4ed8bf94e4c21cd0a6b8eb5ba8dc1c04d1a276
Author: Andre Miranda <andre42m at gmail.com>
Date:   Tue Apr 4 23:03:44 2017 -0300

    Set focus to the selected radio button
---
 lib/screenshooter-dialogs.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lib/screenshooter-dialogs.c b/lib/screenshooter-dialogs.c
index a93b9d0..a309719 100644
--- a/lib/screenshooter-dialogs.c
+++ b/lib/screenshooter-dialogs.c
@@ -890,6 +890,22 @@ GtkWidget *screenshooter_region_dialog_new (ScreenshotData *sd, gboolean plugin)
 
   gtk_widget_show_all (gtk_dialog_get_content_area (GTK_DIALOG (dlg)));
 
+  /* Set focus to the selected radio button */
+  switch (sd->region)
+    {
+      case FULLSCREEN:
+        gtk_widget_grab_focus (fullscreen_button);
+        break;
+      case ACTIVE_WINDOW:
+        gtk_widget_grab_focus (active_window_button);
+        break;
+      case SELECT:
+        gtk_widget_grab_focus (rectangle_button);
+        break;
+      default:
+        break;
+    }
+
   return dlg;
 }
 

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


More information about the Xfce4-commits mailing list