diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-10-19 10:31:18 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-10-19 10:31:18 +0800 |
commit | 948024d1120cb2d008fc71b1e0faf565e021ae6d (patch) | |
tree | adf01980e06c0f60cd49c95f8a7e8fe3735e1bc6 /widgets | |
parent | b459ed2a59cc6d08b7fed88ac09ac79724d4f576 (diff) | |
download | gsoc2013-evolution-948024d1120cb2d008fc71b1e0faf565e021ae6d.tar.gz gsoc2013-evolution-948024d1120cb2d008fc71b1e0faf565e021ae6d.tar.zst gsoc2013-evolution-948024d1120cb2d008fc71b1e0faf565e021ae6d.zip |
Made EEntry accept focus properly.
2000-10-18 Christopher James Lahey <clahey@helixcode.com>
* gal/e-text/e-entry.c: Made EEntry accept focus properly.
svn path=/trunk/; revision=6015
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/text/e-entry.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c index 3beebfcdfa..4fac4ee219 100644 --- a/widgets/text/e-entry.c +++ b/widgets/text/e-entry.c @@ -93,6 +93,15 @@ canvas_size_request (GtkWidget *widget, GtkRequisition *requisition, (widget->style->klass->ythickness + INNER_BORDER) * 2); } +static gint +canvas_focus_in_event (GtkWidget *widget, GdkEventFocus *focus, EEntry *e_entry) +{ + if (e_entry->canvas->focused_item != GNOME_CANVAS_ITEM(e_entry->item)) { + gnome_canvas_item_grab_focus(GNOME_CANVAS_ITEM(e_entry->item)); + } + return 0; +} + static void e_entry_init (GtkObject *object) { @@ -104,6 +113,8 @@ e_entry_init (GtkObject *object) GTK_SIGNAL_FUNC(canvas_size_allocate), e_entry); gtk_signal_connect(GTK_OBJECT(e_entry->canvas), "size_request", GTK_SIGNAL_FUNC(canvas_size_request), e_entry); + gtk_signal_connect(GTK_OBJECT(e_entry->canvas), "focus_in_event", + GTK_SIGNAL_FUNC(canvas_focus_in_event), e_entry); e_entry->item = E_TEXT(gnome_canvas_item_new(gnome_canvas_root(e_entry->canvas), e_text_get_type(), "clip", TRUE, |