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 | |
parent | e1fc4b4362dfb3596b68c3e7510263058338ce84 (diff) | |
download | gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar.gz gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar.bz2 gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar.lz gsoc2013-evolution-3b21f3119c844eb59c2c54183b77bf71bf61f224.tar.xz 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')
-rw-r--r-- | widgets/misc/e-canvas.c | 11 | ||||
-rw-r--r-- | widgets/misc/e-canvas.h | 2 |
2 files changed, 7 insertions, 6 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)); } diff --git a/widgets/misc/e-canvas.h b/widgets/misc/e-canvas.h index b13a9dd2ab..c143d74fe2 100644 --- a/widgets/misc/e-canvas.h +++ b/widgets/misc/e-canvas.h @@ -97,7 +97,7 @@ GtkWidget *e_canvas_new (void); /* Used to send all of the keystroke events to a specific item as well as * GDK_FOCUS_CHANGE events. */ -void e_canvas_item_grab_focus (GnomeCanvasItem *item); +void e_canvas_item_grab_focus (GnomeCanvasItem *item, gboolean widget_too); void e_canvas_item_request_reflow (GnomeCanvasItem *item); void e_canvas_item_request_parent_reflow (GnomeCanvasItem *item); |