aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-10-26 17:48:19 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-10-26 17:48:19 +0800
commitc38f4954e131417f113a239831518d14ab5709fc (patch)
tree1a7909f1ad751ffa357c57cbc5729770503474c0 /addressbook
parentbd2ebd7d6faa84a750a7ce0937a438347b979b3e (diff)
downloadgsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.tar
gsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.tar.gz
gsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.tar.bz2
gsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.tar.lz
gsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.tar.xz
gsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.tar.zst
gsoc2013-evolution-c38f4954e131417f113a239831518d14ab5709fc.zip
Setting the focus to the corresponding entry field after changing dropdown
menus for phone, email and im in contact editor. Fixes #229972. svn path=/trunk/; revision=30566
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c41
2 files changed, 36 insertions, 11 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index acb633b238..acffbf3d6d 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-26 Devashish Sharma <sdevashish@novell.com>
+
+ * gui/contact-editor/e-contact-editor.c: Sets the focus to the
+ corresponding ntry field after changing dropdown menus for phone, im
+ and e-mail fields in contact editor. Fixes #229972.
+
2005-10-22 Sushma Rai <rsushma@novell.com>
* gui/widgets/eab-gui-util.c (eab_send_contact_list_as_attachment):
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 2993e4c403..535285ba6c 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -642,6 +642,12 @@ set_option_menu_history (EContactEditor *editor, GtkOptionMenu *option_menu, gin
}
static void
+email_menu_changed(GtkWidget *widget, GtkWidget *next)
+{
+ gtk_widget_grab_focus(next);
+}
+
+static void
init_email_record_location (EContactEditor *editor, gint record)
{
GtkWidget *location_option_menu;
@@ -671,6 +677,7 @@ init_email_record_location (EContactEditor *editor, gint record)
gtk_option_menu_set_menu (GTK_OPTION_MENU (location_option_menu), location_menu);
g_signal_connect (location_option_menu, "changed", G_CALLBACK (object_changed), editor);
+ g_signal_connect (location_option_menu, "changed", G_CALLBACK (email_menu_changed), email_entry);
g_signal_connect (email_entry, "changed", G_CALLBACK (object_changed), editor);
g_signal_connect_swapped (email_entry, "activate", G_CALLBACK (entry_activated), editor);
}
@@ -1209,6 +1216,12 @@ extract_phone (EContactEditor *editor)
}
static void
+phone_menu_changed(GtkWidget *widget, GtkWidget *next)
+{
+ gtk_widget_grab_focus(next);
+}
+
+static void
init_phone_record_type (EContactEditor *editor, gint record)
{
GtkWidget *phone_type_option_menu;
@@ -1238,6 +1251,7 @@ init_phone_record_type (EContactEditor *editor, gint record)
gtk_option_menu_set_menu (GTK_OPTION_MENU (phone_type_option_menu), phone_type_menu);
g_signal_connect (phone_type_option_menu, "changed", G_CALLBACK (object_changed), editor);
+ g_signal_connect (phone_type_option_menu, "changed", G_CALLBACK (phone_menu_changed), phone_entry);
g_signal_connect (phone_entry, "changed", G_CALLBACK (object_changed), editor);
g_signal_connect_swapped (phone_entry, "activate", G_CALLBACK (entry_activated), editor);
}
@@ -1317,19 +1331,13 @@ sensitize_phone (EContactEditor *editor)
static void
init_im_record_location (EContactEditor *editor, gint record)
{
+
#ifdef ENABLE_IM_LOCATION
GtkWidget *location_option_menu;
GtkWidget *location_menu;
gint i;
-#endif
- GtkWidget *name_entry;
- gchar *widget_name;
-
- widget_name = g_strdup_printf ("entry-im-name-%d", record);
- name_entry = glade_xml_get_widget (editor->gui, widget_name);
- g_free (widget_name);
-
-#ifdef ENABLE_IM_LOCATION
+ gchar *widget_name;
+
widget_name = g_strdup_printf ("optionmenu-im-location-%d", record);
location_option_menu = glade_xml_get_widget (editor->gui, widget_name);
g_free (widget_name);
@@ -1348,9 +1356,12 @@ init_im_record_location (EContactEditor *editor, gint record)
g_signal_connect (location_option_menu, "changed", G_CALLBACK (object_changed), editor);
#endif
+}
- g_signal_connect (name_entry, "changed", G_CALLBACK (object_changed), editor);
- g_signal_connect_swapped (name_entry, "activate", G_CALLBACK (entry_activated), editor);
+static void
+im_menu_changed(GtkWidget *widget, GtkWidget *next)
+{
+ gtk_widget_grab_focus(next);
}
static void
@@ -1358,9 +1369,14 @@ init_im_record_service (EContactEditor *editor, gint record)
{
GtkWidget *service_option_menu;
GtkWidget *service_menu;
+ GtkWidget *name_entry;
gchar *widget_name;
gint i;
+ widget_name = g_strdup_printf ("entry-im-name-%d", record);
+ name_entry = glade_xml_get_widget (editor->gui, widget_name);
+ g_free (widget_name);
+
widget_name = g_strdup_printf ("optionmenu-im-service-%d", record);
service_option_menu = glade_xml_get_widget (editor->gui, widget_name);
g_free (widget_name);
@@ -1378,6 +1394,9 @@ init_im_record_service (EContactEditor *editor, gint record)
gtk_option_menu_set_menu (GTK_OPTION_MENU (service_option_menu), service_menu);
g_signal_connect (service_option_menu, "changed", G_CALLBACK (object_changed), editor);
+ g_signal_connect (service_option_menu, "changed", G_CALLBACK (im_menu_changed), name_entry);
+ g_signal_connect (name_entry, "changed", G_CALLBACK (object_changed), editor);
+ g_signal_connect_swapped (name_entry, "activate", G_CALLBACK (entry_activated), editor);
}
static void