Fixes bug #126179:
2004-02-01 Richard Hult <richard@imendio.com> Fixes bug #126179: * drw-break-window.c (drw_break_window_init): Add mnemonic to postpone button. * drwright.c (maybe_change_state): Grab keyboard so the mnemonic actually works.
This commit is contained in:
parent
5480b86231
commit
bc8fe29fe9
3 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,13 @@
|
|||
2004-02-01 Richard Hult <richard@imendio.com>
|
||||
|
||||
Fixes bug #126179:
|
||||
|
||||
* drw-break-window.c (drw_break_window_init): Add mnemonic to
|
||||
postpone button.
|
||||
|
||||
* drwright.c (maybe_change_state): Grab keyboard so the mnemonic
|
||||
actually works.
|
||||
|
||||
2004-01-14 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* Release 2.5.2
|
||||
|
|
|
@ -186,7 +186,7 @@ drw_break_window_init (DrwBreakWindow *window)
|
|||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (button_box), 12);
|
||||
|
||||
priv->postpone_button = gtk_button_new_with_label (_("Postpone break"));
|
||||
priv->postpone_button = gtk_button_new_with_mnemonic (_("_Postpone break"));
|
||||
gtk_widget_show (priv->postpone_button);
|
||||
|
||||
g_signal_connect (priv->postpone_button,
|
||||
|
|
|
@ -290,6 +290,20 @@ stop_blinking (DrWright *dr)
|
|||
/*gtk_widget_hide (GTK_WIDGET (dr->icon));*/
|
||||
}
|
||||
|
||||
static gboolean
|
||||
grab_keyboard_on_window (GdkWindow *window,
|
||||
guint32 activate_time)
|
||||
{
|
||||
GdkGrabStatus status;
|
||||
|
||||
status = gdk_keyboard_grab (window, TRUE, activate_time);
|
||||
if (status == GDK_GRAB_SUCCESS) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
maybe_change_state (DrWright *dr)
|
||||
{
|
||||
|
@ -401,6 +415,8 @@ maybe_change_state (DrWright *dr)
|
|||
|
||||
gtk_widget_show (dr->break_window);
|
||||
|
||||
grab_keyboard_on_window (dr->break_window->window, gtk_get_current_event_time ());
|
||||
|
||||
dr->state = STATE_BREAK;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue