aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-timezone-entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-timezone-entry.c')
-rw-r--r--calendar/gui/e-timezone-entry.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index c4e2af01a7..6f6a965f7a 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -68,6 +68,8 @@ static void e_timezone_entry_class_init (ETimezoneEntryClass *class);
static void e_timezone_entry_init (ETimezoneEntry *tentry);
static void e_timezone_entry_destroy (GtkObject *object);
+static gboolean e_timezone_entry_mnemonic_activate (GtkWidget *widget,
+ gboolean group_cycling);
static void on_entry_changed (GtkEntry *entry,
ETimezoneEntry *tentry);
static void on_button_clicked (GtkWidget *widget,
@@ -86,11 +88,13 @@ static void
e_timezone_entry_class_init (ETimezoneEntryClass *class)
{
GtkObjectClass *object_class = (GtkObjectClass *) class;
-
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class) ;
+
object_class = (GtkObjectClass*) class;
parent_class = g_type_class_peek_parent (class);
+ widget_class->mnemonic_activate = e_timezone_entry_mnemonic_activate;
timezone_entry_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_LAST,
@@ -157,6 +161,8 @@ e_timezone_entry_new (void)
tentry = g_object_new (e_timezone_entry_get_type (), NULL);
+ GTK_WIDGET_SET_FLAGS (GTK_WIDGET(tentry), GTK_CAN_FOCUS);
+
return GTK_WIDGET (tentry);
}
@@ -296,3 +302,19 @@ e_timezone_entry_set_entry (ETimezoneEntry *tentry)
g_free (name_buffer);
}
+
+static gboolean
+e_timezone_entry_mnemonic_activate (GtkWidget *widget,
+ gboolean group_cycling)
+{
+ GtkButton *button = NULL;
+
+ if (GTK_WIDGET_CAN_FOCUS (widget)) {
+ button=((ETimezoneEntryPrivate*) ((ETimezoneEntry*) widget)->priv)->button;
+ if (button != NULL)
+ gtk_widget_grab_focus (button);
+ }
+
+ return TRUE;
+}
+