diff options
author | Carl Sun <carl.sun@sun.com> | 2003-12-08 22:16:13 +0800 |
---|---|---|
committer | Yuedong Du <york@src.gnome.org> | 2003-12-08 22:16:13 +0800 |
commit | f774fa56ce82703a489a966886d7297054927105 (patch) | |
tree | 1e50f24e7a2ee77b609b221b0515567f896f168c /calendar/gui/e-timezone-entry.c | |
parent | e3e2bafd795437a5ad7139d9427b1aefa1e59822 (diff) | |
download | gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar.gz gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar.zst gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.zip |
Fixes #46351
2003-12-08 Carl Sun <carl.sun@sun.com>
Fixes #46351
* gui/e-timezone-entry.c (e_timezone_entry_mnemonic_activate):
new function. override the member function of GtkWidget to handle
nemonic_activate signal of custom class ETimezoneEntry.
svn path=/trunk/; revision=23673
Diffstat (limited to 'calendar/gui/e-timezone-entry.c')
-rw-r--r-- | calendar/gui/e-timezone-entry.c | 24 |
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; +} + |