aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorCarl Sun <carl.sun@sun.com>2003-12-08 22:16:13 +0800
committerYuedong Du <york@src.gnome.org>2003-12-08 22:16:13 +0800
commitf774fa56ce82703a489a966886d7297054927105 (patch)
tree1e50f24e7a2ee77b609b221b0515567f896f168c /calendar/gui
parente3e2bafd795437a5ad7139d9427b1aefa1e59822 (diff)
downloadgsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar
gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar.gz
gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar.bz2
gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar.lz
gsoc2013-evolution-f774fa56ce82703a489a966886d7297054927105.tar.xz
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')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade2
-rw-r--r--calendar/gui/e-timezone-entry.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade
index ff79e2cb2b..d566368611 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ b/calendar/gui/dialogs/cal-prefs-dialog.glade
@@ -116,6 +116,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="mnemonic_widget">timezone</property>
</widget>
<packing>
<property name="left_attach">0</property>
@@ -217,6 +218,7 @@
<child>
<widget class="Custom" id="timezone">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
<property name="creation_function">make_timezone_entry</property>
<property name="int1">0</property>
<property name="int2">0</property>
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;
+}
+