[evolution-patches] composer/addressbook fix for initial focus in To: field (bug #40694)
- From: Chris Toshok <toshok ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] composer/addressbook fix for initial focus in To: field (bug #40694)
- Date: 16 Apr 2003 15:05:26 -0700
bonobo is love. feel the love.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1383
diff -u -r1.1383 ChangeLog
--- ChangeLog 15 Apr 2003 18:51:05 -0000 1.1383
+++ ChangeLog 16 Apr 2003 20:51:58 -0000
@@ -1,3 +1,14 @@
+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-15 Chris Toshok <toshok ximian com>
[ fixes #41252 ]
Index: gui/component/select-names/e-select-names-bonobo.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/select-names/e-select-names-bonobo.c,v
retrieving revision 1.42
diff -u -r1.42 e-select-names-bonobo.c
--- gui/component/select-names/e-select-names-bonobo.c 7 Apr 2003 23:17:58 -0000 1.42
+++ gui/component/select-names/e-select-names-bonobo.c 16 Apr 2003 20:51:58 -0000
@@ -346,6 +346,7 @@
};
typedef struct {
+ GtkWidget *widget;
BonoboControl *control;
Bonobo_UIContainer remote_ui_container;
char *ui_xml_path;
@@ -404,21 +405,23 @@
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 @@
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 @@
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);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.526
diff -u -r1.526 ChangeLog
--- ChangeLog 11 Apr 2003 20:48:46 -0000 1.526
+++ ChangeLog 16 Apr 2003 21:23:45 -0000
@@ -1,3 +1,13 @@
+2003-04-15 Chris Toshok <toshok ximian com>
+
+ [ fixes #40694 ]
+ * e-msg-composer-hdrs.c (create_addressbook_entry): this can't
+ hurt - set the frame to autoactivate so if by some chance the
+ widget is focused the control will end up being activated.
+
+ * e-msg-composer.c (map_default_cb): activate the To: control
+ instead of focusing the widget.
+
2003-04-11 Jeffrey Stedfast <fejj ximian com>
* e-msg-composer-attachment.glade: Updated to comply with the
Index: e-msg-composer-hdrs.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-hdrs.c,v
retrieving revision 1.110
diff -u -r1.110 e-msg-composer-hdrs.c
--- e-msg-composer-hdrs.c 8 Apr 2003 04:56:10 -0000 1.110
+++ e-msg-composer-hdrs.c 16 Apr 2003 21:23:45 -0000
@@ -451,6 +451,8 @@
cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (control_widget));
pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
+ bonobo_control_frame_set_autoactivate (cf, TRUE);
+
bonobo_event_source_client_add_listener (
pb, addressbook_entry_changed,
"Bonobo/Property:change:entry_changed",
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.385
diff -u -r1.385 e-msg-composer.c
--- e-msg-composer.c 9 Apr 2003 22:51:47 -0000 1.385
+++ e-msg-composer.c 16 Apr 2003 21:23:46 -0000
@@ -2774,7 +2774,9 @@
if (!text || text[0] == '\0') {
printf ("grabbing focus in the To entry...\n");
- gtk_widget_grab_focus (widget);
+
+ bonobo_control_frame_control_activate (cf);
+
g_free (text);
return;
}
@@ -2997,8 +2999,7 @@
setup_cut_copy_paste (composer);
- /*g_signal_connect (composer, "map", (GCallback) map_default_cb, NULL);*/
- map_default_cb (composer, NULL);
+ g_signal_connect (composer, "map", (GCallback) map_default_cb, NULL);
if (am == NULL)
am = autosave_manager_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]