aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2003-07-14 03:29:03 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2003-07-14 03:29:03 +0800
commit9cafe346c61294495cc42a8124257469e28c6879 (patch)
tree131f92a566f3ddadaeeb7d7623df10184680458e
parent5d0da70cf2093c2d5381e6b5e9f9cb50d664fcde (diff)
downloadgsoc2013-evolution-9cafe346c61294495cc42a8124257469e28c6879.tar.gz
gsoc2013-evolution-9cafe346c61294495cc42a8124257469e28c6879.tar.zst
gsoc2013-evolution-9cafe346c61294495cc42a8124257469e28c6879.zip
Added a handler for GtkWidget::mnemonic_activate().
2003-07-11 Federico Mena Quintero <federico@ximian.com> * e-dateedit.c (e_date_edit_mnemonic_activate): Added a handler for GtkWidget::mnemonic_activate(). * e-url-entry.c (mnemonic_activate): Likewise. svn path=/trunk/; revision=21804
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-dateedit.c11
-rw-r--r--widgets/misc/e-url-entry.c19
3 files changed, 37 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 9daa40f58c..52396e7c15 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2003-07-11 Federico Mena Quintero <federico@ximian.com>
+
+ * e-dateedit.c (e_date_edit_mnemonic_activate): Added a handler
+ for GtkWidget::mnemonic_activate().
+
+ * e-url-entry.c (mnemonic_activate): Likewise.
+
2003-07-09 Federico Mena Quintero <federico@ximian.com>
* e-url-entry.c (destroy): Chain to the parent handler. Fixes #45236.
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index e519981e07..33a3e0bc33 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -138,6 +138,8 @@ static void e_date_edit_class_init (EDateEditClass *class);
static void e_date_edit_init (EDateEdit *dedit);
static void create_children (EDateEdit *dedit);
static void e_date_edit_dispose (GObject *object);
+static gboolean e_date_edit_mnemonic_activate (GtkWidget *widget,
+ gboolean group_cycling);
static void e_date_edit_grab_focus (GtkWidget *widget);
static gint on_date_entry_key_press (GtkWidget *widget,
@@ -252,6 +254,7 @@ e_date_edit_class_init (EDateEditClass *class)
object_class->dispose = e_date_edit_dispose;
+ widget_class->mnemonic_activate = e_date_edit_mnemonic_activate;
widget_class->grab_focus = e_date_edit_grab_focus;
class->changed = NULL;
@@ -470,6 +473,14 @@ e_date_edit_dispose (GObject *object)
}
+/* GtkWidget::mnemonic_activate() handler for the EDateEdit */
+static gboolean
+e_date_edit_mnemonic_activate (GtkWidget *widget, gboolean group_cycling)
+{
+ e_date_edit_grab_focus (widget);
+ return TRUE;
+}
+
/* Grab_focus handler for the EDateEdit. If the date field is being shown, we
grab the focus to that, otherwise we grab it to the time field. */
static void
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index dd8c132173..c95e92803d 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -40,6 +40,8 @@ static void destroy (GtkObject *obj);
static void button_clicked_cb (GtkWidget *widget, gpointer data);
+static gboolean mnemonic_activate (GtkWidget *widget, gboolean group_cycling);
+
static GtkHBoxClass *parent_class = NULL;
@@ -72,12 +74,16 @@ static void
class_init (EUrlEntryClass *klass)
{
GtkObjectClass *object_class;
+ GtkWidgetClass *widget_class;
object_class = GTK_OBJECT_CLASS (klass);
+ widget_class = GTK_WIDGET_CLASS (klass);
parent_class = g_type_class_ref(gtk_hbox_get_type ());
object_class->destroy = destroy;
+
+ widget_class->mnemonic_activate = mnemonic_activate;
}
@@ -119,6 +125,19 @@ destroy (GtkObject *obj)
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
+/* GtkWidget::mnemonic_activate() handler for the EUrlEntry */
+static gboolean
+mnemonic_activate (GtkWidget *widget, gboolean group_cycling)
+{
+ EUrlEntry *url_entry;
+ EUrlEntryPrivate *priv;
+
+ url_entry = E_URL_ENTRY (widget);
+ priv = url_entry->priv;
+
+ return gtk_widget_mnemonic_activate (priv->entry, group_cycling);
+}
+
GtkWidget *