diff options
author | Michael Meeks <michael.meeks@novell.com> | 2010-03-18 05:49:15 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-04-07 18:47:48 +0800 |
commit | ced5bef58a54e80ea522ca05d50a7831c7baff12 (patch) | |
tree | f692903d8913645218c4c2468c7e141fac55aebf /addressbook | |
parent | 2fde37ef3068e9b3f77774c29b1f391b9efbbe3a (diff) | |
download | gsoc2013-evolution-ced5bef58a54e80ea522ca05d50a7831c7baff12.tar.gz gsoc2013-evolution-ced5bef58a54e80ea522ca05d50a7831c7baff12.tar.zst gsoc2013-evolution-ced5bef58a54e80ea522ca05d50a7831c7baff12.zip |
Compress new contact dialog (first page) a little; more to come.
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/gui/contact-editor/contact-editor.ui | 10 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 23 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.h | 3 |
3 files changed, 31 insertions, 5 deletions
diff --git a/addressbook/gui/contact-editor/contact-editor.ui b/addressbook/gui/contact-editor/contact-editor.ui index 964ce434c2..a603c13cc7 100644 --- a/addressbook/gui/contact-editor/contact-editor.ui +++ b/addressbook/gui/contact-editor/contact-editor.ui @@ -424,7 +424,7 @@ <property name="label_yalign">0.5</property> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <object class="GtkTable" id="table85"> + <object class="GtkTable" id="email-table"> <property name="border_width">12</property> <property name="visible">True</property> <property name="n_rows">3</property> @@ -1080,7 +1080,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-im-name-2"> + <object class="GtkEntry" id="entry-im-name-3"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1099,7 +1099,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-im-name-3"> + <object class="GtkEntry" id="entry-im-name-2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1152,7 +1152,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-im-service-2"> + <object class="GtkComboBox" id="combobox-im-service-3"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -1167,7 +1167,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-im-service-3"> + <object class="GtkComboBox" id="combobox-im-service-2"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 2807b9e149..7019e91dcd 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -748,6 +748,23 @@ init_email (EContactEditor *editor) for (i = 1; i <= EMAIL_SLOTS; i++) init_email_record_location (editor, i); + + if (editor->compress_ui) { + GtkTable *table; + GtkWidget *check; + + gtk_widget_hide (e_builder_get_widget (editor->builder, "entry-email-4")); + gtk_widget_hide (e_builder_get_widget (editor->builder, "combobox-email-4")); + + table = GTK_TABLE (e_builder_get_widget (editor->builder, "email-table")); + check = e_builder_get_widget (editor->builder, "checkbutton-htmlmail"); + if (check != NULL && table != NULL) { + g_object_ref (G_OBJECT (check)); + gtk_container_remove (GTK_CONTAINER (check->parent), check); + gtk_table_attach_defaults (table, check, 2, 4, 1, 2); + g_object_unref (G_OBJECT (check)); + } + } } static void @@ -1458,6 +1475,11 @@ init_im_record_service (EContactEditor *editor, gint record) service_combo_box = e_builder_get_widget (editor->builder, widget_name); g_free (widget_name); + if (editor->compress_ui && record > 2) { + gtk_widget_hide (name_entry); + gtk_widget_hide (service_combo_box); + } + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (service_combo_box)); store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (service_combo_box))); @@ -3402,6 +3424,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor) e_contact_editor->target_editable = TRUE; e_contact_editor->fullname_dialog = NULL; e_contact_editor->categories_dialog = NULL; + e_contact_editor->compress_ui = e_shell_get_express_mode (e_shell_get_default ()); e_contact_editor->load_source_id = 0; e_contact_editor->load_book = NULL; diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h index 5079f1a0ee..b41324c270 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.h +++ b/addressbook/gui/contact-editor/e-contact-editor.h @@ -84,6 +84,9 @@ struct _EContactEditor /* Whether an image is changed */ guint image_changed : 1; + /* Whether to try to reduce space used */ + guint compress_ui : 1; + EList *writable_fields; EList *required_fields; |