aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-03-18 05:49:15 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-03-18 05:49:15 +0800
commit098f74dc564443ca659479717cf2f9d16c192bdf (patch)
tree86c567289e6f096a41364713b9b1ad99810e064f
parentcfb0956997a0ee323b8c1a61f3900cb25e6143d5 (diff)
downloadgsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.tar
gsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.tar.gz
gsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.tar.bz2
gsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.tar.lz
gsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.tar.xz
gsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.tar.zst
gsoc2013-evolution-098f74dc564443ca659479717cf2f9d16c192bdf.zip
Compress new contact dialog (first page) a little; more to come.
-rw-r--r--addressbook/gui/contact-editor/contact-editor.ui10
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c23
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h3
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;