diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-16 06:47:47 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-16 06:47:47 +0800 |
commit | 3b21f3119c844eb59c2c54183b77bf71bf61f224 (patch) | |
tree | 215ba0bfacc22f0832e6e4f267d376853e08a126 /widgets/misc/e-canvas.c | |
parent | e1fc4b4362dfb3596b68c3e7510263058338ce84 (diff) | |
download | gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar.gz gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar.zst gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.zip |
Make this take an extra argument saying whether or not to grab the
* gal/widgets/e-canvas.c (e_canvas_item_grab_focus): Make this
take an extra argument saying whether or not to grab the
widget-level focus.
* gal/e-text/e-text.c (e_text_event): Update arguments to
e_canvas_item_grab_focus.
svn path=/trunk/; revision=8745
Diffstat (limited to 'widgets/misc/e-canvas.c')
-rw-r--r-- | widgets/misc/e-canvas.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index ffc3a333f8..f5f6ed77a9 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -288,13 +288,14 @@ e_canvas_key (GtkWidget *widget, GdkEventKey *event) /** * e_canvas_item_grab_focus: * @item: A canvas item. + * @widget_too: Whether or not to grab the widget-level focus too * - * Makes the specified item take the keyboard focus, so all keyboard events will - * be sent to it. If the canvas widget itself did not have the focus, it grabs - * it as well. + * Makes the specified item take the keyboard focus, so all keyboard + * events will be sent to it. If the canvas widget itself did not have + * the focus and @widget_too is %TRUE, it grabs that focus as well. **/ void -e_canvas_item_grab_focus (GnomeCanvasItem *item) +e_canvas_item_grab_focus (GnomeCanvasItem *item, gboolean widget_too) { GnomeCanvasItem *focused_item; GdkEvent ev; @@ -316,7 +317,7 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item) item->canvas->focused_item = item; - if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET(item->canvas))) { + if (widget_too && !GTK_WIDGET_HAS_FOCUS (GTK_WIDGET(item->canvas))) { gtk_widget_grab_focus (GTK_WIDGET (item->canvas)); } |