From 0b61248ed66f1993e22441371930f635d254d14c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 26 Mar 2010 10:10:06 +0000 Subject: Add conditionally enabled expanders for 'Other' address and 'Misc' personal items, to fit on a 600 pixel high screen. --- addressbook/gui/contact-editor/contact-editor.ui | 11 ++++------ addressbook/gui/contact-editor/e-contact-editor.c | 25 ++++++++++++++++++----- 2 files changed, 24 insertions(+), 12 deletions(-) (limited to 'addressbook/gui/contact-editor') diff --git a/addressbook/gui/contact-editor/contact-editor.ui b/addressbook/gui/contact-editor/contact-editor.ui index fe53b703a4..e753e70267 100644 --- a/addressbook/gui/contact-editor/contact-editor.ui +++ b/addressbook/gui/contact-editor/contact-editor.ui @@ -1930,10 +1930,9 @@ - + True - 0 - 0.5 + True GTK_SHADOW_NONE @@ -2960,12 +2959,10 @@ - + 6 True - 0 - 0.5 - GTK_SHADOW_NONE + True 6 diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 61302854a8..a1c14c2ab2 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1793,6 +1793,15 @@ sensitize_im (EContactEditor *editor) } } +static void +init_personal (EContactEditor *editor) +{ + gtk_expander_set_expanded ( + GTK_EXPANDER (e_builder_get_widget (editor->builder, + "expander-personal-misc")), + !editor->compress_ui); +} + static void init_address_textview (EContactEditor *editor, gint record) { @@ -1840,6 +1849,11 @@ init_address (EContactEditor *editor) for (i = 0; i < ADDRESS_SLOTS; i++) init_address_record (editor, i); + + gtk_expander_set_expanded ( + GTK_EXPANDER (e_builder_get_widget (editor->builder, + "expander-address-other")), + !editor->compress_ui); } static void @@ -2641,11 +2655,12 @@ sensitize_all (EContactEditor *editor) static void init_all (EContactEditor *editor) { - init_simple (editor); - init_email (editor); - init_phone (editor); - init_im (editor); - init_address (editor); + init_simple (editor); + init_email (editor); + init_phone (editor); + init_im (editor); + init_personal (editor); + init_address (editor); } static void -- cgit v1.2.3