aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-04-20 06:16:41 +0800
committerChris Toshok <toshok@src.gnome.org>2003-04-20 06:16:41 +0800
commita17a25e3496d7ce1bbd57a763076c446b78bdb70 (patch)
treeb5799d8457520882f61f3ebded5a1731efe4b4d9 /addressbook
parent5cf9db22084a646cec7d655926db67b8650f65a4 (diff)
downloadgsoc2013-evolution-a17a25e3496d7ce1bbd57a763076c446b78bdb70.tar.gz
gsoc2013-evolution-a17a25e3496d7ce1bbd57a763076c446b78bdb70.tar.zst
gsoc2013-evolution-a17a25e3496d7ce1bbd57a763076c446b78bdb70.zip
[ fixes #40694 ] just grab focus if @activate == TRUE. we'll do all
2003-04-16 Chris Toshok <toshok@ximian.com> [ fixes #40694 ] * gui/component/select-names/e-select-names-bonobo.c (control_activate_cb): just grab focus if @activate == TRUE. we'll do all merging/unmerging in the focus handler. (widget_focus_cb): handle the merging here. (e_bonobo_control_automerge_ui): store off the widget (so we can grab focus on it) and connect to "activate". svn path=/trunk/; revision=20897
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c24
2 files changed, 25 insertions, 9 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index fda34513c9..8743cd24a9 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,13 @@
+2003-04-16 Chris Toshok <toshok@ximian.com>
+
+ [ fixes #40694 ]
+ * gui/component/select-names/e-select-names-bonobo.c
+ (control_activate_cb): just grab focus if @activate == TRUE.
+ we'll do all merging/unmerging in the focus handler.
+ (widget_focus_cb): handle the merging here.
+ (e_bonobo_control_automerge_ui): store off the widget (so we can
+ grab focus on it) and connect to "activate".
+
2003-04-18 Rodney Dawes <dobey@ximian.com>
* gui/component/select-names/Makefile.am: Add missing -DPREFIX
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
index b722baec6f..10fc9caee7 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -346,6 +346,7 @@ static BonoboUIVerb verbs [] = {
};
typedef struct {
+ GtkWidget *widget;
BonoboControl *control;
Bonobo_UIContainer remote_ui_container;
char *ui_xml_path;
@@ -404,21 +405,23 @@ control_activate_cb (BonoboControl *control,
gboolean activate,
ControlUIClosure *closure)
{
+ if (activate)
+ gtk_widget_grab_focus (closure->widget); /* the ECanvas */
+}
+
+static gboolean
+widget_focus_cb (GtkWidget *w, GdkEventFocus *focus, ControlUIClosure *closure)
+{
BonoboUIComponent *uic;
- uic = bonobo_control_get_ui_component (control);
+ uic = bonobo_control_get_ui_component (closure->control);
- if (activate) {
- merge_menu_items (control, uic, closure);
+ if (GTK_WIDGET_HAS_FOCUS (w)) {
+ merge_menu_items (closure->control, uic, closure);
} else {
- unmerge_menu_items (control, uic, closure);
+ unmerge_menu_items (closure->control, uic, closure);
}
-}
-static gboolean
-widget_focus_cb (GtkWidget *w, GdkEventFocus *focus, ControlUIClosure *closure)
-{
- control_activate_cb (closure->control, GTK_WIDGET_HAS_FOCUS (w), closure);
return FALSE;
}
@@ -440,6 +443,7 @@ e_bonobo_control_automerge_ui (GtkWidget *w,
closure = g_new (ControlUIClosure, 1);
+ closure->widget = w;
closure->control = control;
closure->ui_xml_path = g_strdup (ui_xml_path);
closure->app_name = g_strdup (app_name);
@@ -450,6 +454,8 @@ e_bonobo_control_automerge_ui (GtkWidget *w,
G_CALLBACK (widget_focus_cb), closure);
g_signal_connect (w, "focus_out_event",
G_CALLBACK (widget_focus_cb), closure);
+ g_signal_connect (control, "activate",
+ G_CALLBACK (control_activate_cb), closure);
g_signal_connect (control, "set_frame",
G_CALLBACK (control_set_frame_cb), closure);
i2002-11-154-12/+42 * (save_settings_for_views): Removed.Ettore Perazzoli2002-11-152-30/+6 * (impl_dispose): NULL priv->ui_componentEttore Perazzoli2002-11-152-1/+8 * Avoid freeing the servant for now, it looks like something is messed upEttore Perazzoli2002-11-157-11/+25 * Removed. (no_views_left_cb): Use g_object_add_weak_pointer() instad ofEttore Perazzoli2002-11-1514-131/+197 * Change type of member etd inEttore Perazzoli2002-11-142-2/+8 * Connect finish_func to the "next" signal for now, since GnomeDruid seemsEttore Perazzoli2002-11-144-5/+17 * remove GTK_OBJECT cast and other GTK stuff.Not Zed2002-11-133-16/+23 * need to assign priv here, fixes a crash.Chris Toshok2002-11-122-0/+7 * (impl_dispose): Do unref the config_listener here [IEttore Perazzoli2002-11-122-1/+6 * (impl_finalize): Protect againstEttore Perazzoli2002-11-122-2/+9 * Make separate dispose/finalize overrides of just overriding destroy.Ettore Perazzoli2002-11-1229-254/+538 * use correctly IDL flags.Rodrigo Moya2002-11-082-1/+5 * guard against multiple calls. fixes a crash whenever a task finishes (theChris Toshok2002-11-08