[drwright] Don't focus the Postpone button initially



commit f38b275a6fb4645532e79d2fb62459b3cbd3bec1
Author: Christian Persch <chpe gnome org>
Date:   Thu Feb 17 13:27:43 2011 +0100

    Don't focus the Postpone button initially
    
    Re-enable the timeout to sensitise the Postpone button, with a small
    timout value. This way, the button is insensitive when the window is shown,
    so the focus doesn't go to it.
    
    Bug #642525.

 src/drw-break-window.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/drw-break-window.c b/src/drw-break-window.c
index b1c6af6..749e506 100644
--- a/src/drw-break-window.c
+++ b/src/drw-break-window.c
@@ -56,7 +56,7 @@ struct _DrwBreakWindowPrivate {
 
 #define DRW_BREAK_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DRW_TYPE_BREAK_WINDOW, DrwBreakWindowPrivate))
 
-#define POSTPONE_DELAY (0 /* ms */)
+#define POSTPONE_DELAY (10 /* ms */)
 
 #define POSTPONE_CANCEL 30
 
@@ -182,6 +182,7 @@ drw_break_window_init (DrwBreakWindow *window)
 		gtk_container_set_border_width (GTK_CONTAINER (button_box), 12);
 
 		priv->postpone_button = gtk_button_new_with_mnemonic (_("_Postpone Break"));
+                gtk_button_set_focus_on_click (GTK_BUTTON (priv->postpone_button), FALSE);
 		gtk_widget_show (priv->postpone_button);
 
                 if (priv->postpone_delay > 0) {
@@ -239,6 +240,8 @@ drw_break_window_init (DrwBreakWindow *window)
 
 	gtk_window_stick (GTK_WINDOW (window));
 
+        gtk_window_set_focus (GTK_WINDOW (window), NULL);
+
 	priv->timer = drw_timer_new ();
 
 	/* Make sure we have a valid time label from the start. */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]