From 92fd12e03fce0aa2569212fa5fb47ca39ec3c6df Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 15 Apr 2010 15:40:22 +0100 Subject: Compress the contact viewer even more so it still fits. --- addressbook/gui/contact-editor/contact-editor.ui | 42 ++++++++++++++++++++++- addressbook/gui/contact-editor/e-contact-editor.c | 29 ++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/gui/contact-editor/contact-editor.ui b/addressbook/gui/contact-editor/contact-editor.ui index c56f96f35a..51fc9c9e29 100644 --- a/addressbook/gui/contact-editor/contact-editor.ui +++ b/addressbook/gui/contact-editor/contact-editor.ui @@ -1586,6 +1586,13 @@ + + True + False + 4 + + + True Web Addresses @@ -1605,7 +1612,40 @@ - + + + + 20 + 20 + True + True + GTK_RELIEF_NONE + True + + + True + GTK_ARROW_RIGHT + GTK_SHADOW_NONE + 0.5 + 0.5 + 0 + 0 + + + + + Web addresses + + + + + 0 + True + True + + + + 0 diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index b251552b35..f8cae86762 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1160,6 +1160,18 @@ expand_widget_list (EContactEditor *editor, expanded); } +static void +expand_web (EContactEditor *editor, gboolean expanded) +{ + const char *names[] = { + "label-videourl", "label-fburl", + "entry-videourl", "entry-fburl", + NULL + }; + set_arrow_image (editor, "arrow-phone-expand", expanded); + expand_widget_list (editor, names, expanded); +} + static void expand_phone (EContactEditor *editor, gboolean expanded) { @@ -1800,6 +1812,8 @@ init_personal (EContactEditor *editor) GTK_EXPANDER (e_builder_get_widget (editor->builder, "expander-personal-misc")), !editor->compress_ui); + + expand_web (editor, !editor->compress_ui); } static void @@ -3451,6 +3465,19 @@ setup_tab_order(GtkBuilder *builder) g_list_free (list); } +static void +expand_web_toggle (EContactEditor *ce) +{ + GtkWidget *widget; + + widget = e_builder_get_widget (ce->builder, "label-videourl"); +#if GTK_CHECK_VERSION(2,19,7) + expand_web (ce, !gtk_widget_get_visible (widget)); +#else + expand_web (ce, !GTK_WIDGET_VISIBLE (widget)); +#endif +} + static void expand_phone_toggle (EContactEditor *ce) { @@ -3535,6 +3562,8 @@ e_contact_editor_init (EContactEditor *e_contact_editor) g_signal_connect (widget, "clicked", G_CALLBACK (file_cancel_cb), e_contact_editor); widget = e_builder_get_widget (e_contact_editor->builder, "button-help"); g_signal_connect (widget, "clicked", G_CALLBACK (show_help_cb), e_contact_editor); + widget = e_builder_get_widget (e_contact_editor->builder, "button-web-expand"); + g_signal_connect_swapped (widget, "clicked", G_CALLBACK (expand_web_toggle), e_contact_editor); widget = e_builder_get_widget (e_contact_editor->builder, "button-phone-expand"); g_signal_connect_swapped (widget, "clicked", G_CALLBACK (expand_phone_toggle), e_contact_editor); widget = e_builder_get_widget (e_contact_editor->builder, "button-mail-expand"); -- cgit