diff options
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r-- | addressbook/gui/contact-editor/contact-editor.ui | 28 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-fullname.c | 47 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 63 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-quick-add.c | 34 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/eab-editor.c | 4 |
5 files changed, 94 insertions, 82 deletions
diff --git a/addressbook/gui/contact-editor/contact-editor.ui b/addressbook/gui/contact-editor/contact-editor.ui index 51fc9c9e29..3701557062 100644 --- a/addressbook/gui/contact-editor/contact-editor.ui +++ b/addressbook/gui/contact-editor/contact-editor.ui @@ -448,7 +448,7 @@ <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> - <object class="GtkEntry" id="entry-email-2"> + <object class="GtkEntry" id="entry-email-3"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -486,7 +486,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-email-3"> + <object class="GtkEntry" id="entry-email-2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -567,7 +567,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-email-2"> + <object class="GtkComboBox" id="combobox-email-3"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -589,7 +589,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-email-3"> + <object class="GtkComboBox" id="combobox-email-2"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -752,7 +752,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-phone-2"> + <object class="GtkEntry" id="entry-phone-3"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -790,7 +790,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-phone-3"> + <object class="GtkEntry" id="entry-phone-2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -824,7 +824,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-phone-2"> + <object class="GtkComboBox" id="combobox-phone-3"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -839,7 +839,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-phone-3"> + <object class="GtkComboBox" id="combobox-phone-2"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -902,7 +902,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-phone-6"> + <object class="GtkEntry" id="entry-phone-7"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -921,7 +921,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="entry-phone-7"> + <object class="GtkEntry" id="entry-phone-6"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -974,7 +974,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-phone-6"> + <object class="GtkComboBox" id="combobox-phone-7"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -989,7 +989,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="combobox-phone-7"> + <object class="GtkComboBox" id="combobox-phone-6"> <property name="visible">True</property> <property name="add_tearoffs">False</property> <property name="focus_on_click">True</property> @@ -1540,7 +1540,7 @@ <child> <object class="GtkLabel" id="label-weblog"> <property name="visible">True</property> - <property name="label" translatable="yes">_Web Log:</property> + <property name="label" translatable="yes">_Blog:</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -1570,7 +1570,7 @@ <property name="visible">True</property> <child internal-child="accessible"> <object class="AtkObject" id="a11y-entry-weblog"> - <property name="AtkObject::accessible_name" translatable="yes">Web Log:</property> + <property name="AtkObject::accessible_name" translatable="yes" comments="Translators: an accessibility name">Blog:</property> </object> </child> </object> diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 79d665e6c7..a872afb7d9 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -85,14 +85,14 @@ e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass) g_object_class_install_property (object_class, PROP_NAME, g_param_spec_pointer ("name", - _("Name"), - /*_( */"XXX blurb" /*)*/, + "Name", + NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", - _("Editable"), - /*_( */"XXX blurb" /*)*/, + "Editable", + NULL, FALSE, G_PARAM_READWRITE)); } @@ -101,20 +101,28 @@ static void e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullname) { GtkBuilder *builder; + GtkDialog *dialog; + GtkWidget *parent; GtkWidget *widget; + GtkWidget *action_area; + GtkWidget *content_area; + const gchar *title; + + dialog = GTK_DIALOG (e_contact_editor_fullname); + action_area = gtk_dialog_get_action_area (dialog); + content_area = gtk_dialog_get_content_area (dialog); gtk_widget_realize (GTK_WIDGET (e_contact_editor_fullname)); - gtk_dialog_set_has_separator (GTK_DIALOG (e_contact_editor_fullname), - FALSE); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (e_contact_editor_fullname)->vbox), 0); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (e_contact_editor_fullname)->action_area), 12); + gtk_dialog_set_has_separator (dialog, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (action_area), 12); + gtk_container_set_border_width (GTK_CONTAINER (content_area), 0); - gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_fullname), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); + gtk_dialog_add_buttons ( + dialog, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_fullname), TRUE); + gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); e_contact_editor_fullname->name = NULL; @@ -124,14 +132,15 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam e_contact_editor_fullname->builder = builder; widget = e_builder_get_widget(builder, "dialog-checkfullname"); - gtk_window_set_title (GTK_WINDOW (e_contact_editor_fullname), - GTK_WINDOW (widget)->title); + title = gtk_window_get_title (GTK_WINDOW (widget)); + gtk_window_set_title (GTK_WINDOW (e_contact_editor_fullname), title); widget = e_builder_get_widget(builder, "table-checkfullname"); - g_object_ref(widget); - gtk_container_remove(GTK_CONTAINER(widget->parent), widget); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0); - g_object_unref(widget); + parent = gtk_widget_get_parent (widget); + g_object_ref (widget); + gtk_container_remove (GTK_CONTAINER (parent), widget); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); + g_object_unref (widget); gtk_window_set_icon_name ( GTK_WINDOW (e_contact_editor_fullname), "contact-new"); diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 0f8eb07b15..2f885e4721 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -293,57 +293,57 @@ e_contact_editor_class_init (EContactEditorClass *klass) g_object_class_install_property (object_class, PROP_SOURCE_BOOK, g_param_spec_object ("source_book", - _("Source Book"), - /*_( */"XXX blurb" /*)*/, + "Source Book", + NULL, E_TYPE_BOOK, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_TARGET_BOOK, g_param_spec_object ("target_book", - _("Target Book"), - /*_( */"XXX blurb" /*)*/, + "Target Book", + NULL, E_TYPE_BOOK, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CONTACT, g_param_spec_object ("contact", - _("Contact"), - /*_( */"XXX blurb" /*)*/, + "Contact", + NULL, E_TYPE_CONTACT, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_IS_NEW_CONTACT, g_param_spec_boolean ("is_new_contact", - _("Is New Contact"), - /*_( */"XXX blurb" /*)*/, + "Is New Contact", + NULL, FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS, g_param_spec_object ("writable_fields", - _("Writable Fields"), - /*_( */"XXX blurb" /*)*/, + "Writable Fields", + NULL, E_TYPE_LIST, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_REQUIRED_FIELDS, g_param_spec_object ("required_fields", - _("Required Fields"), - /*_( */"XXX blurb" /*)*/, + "Required Fields", + NULL, E_TYPE_LIST, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", - _("Editable"), - /*_( */"XXX blurb" /*)*/, + "Editable", + NULL, FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CHANGED, g_param_spec_boolean ("changed", - _("Changed"), - /*_( */"XXX blurb" /*)*/, + "Changed", + NULL, FALSE, G_PARAM_READWRITE)); } @@ -1202,13 +1202,16 @@ expand_mail (EContactEditor *editor, gboolean expanded) check = e_builder_get_widget (editor->builder, "checkbutton-htmlmail"); table = GTK_TABLE (e_builder_get_widget (editor->builder, "email-table")); if (check != NULL && table != NULL) { - g_object_ref (G_OBJECT (check)); - gtk_container_remove (GTK_CONTAINER (check->parent), check); + GtkWidget *parent; + + g_object_ref (check); + parent = gtk_widget_get_parent (check); + gtk_container_remove (GTK_CONTAINER (parent), check); if (expanded) gtk_table_attach_defaults (table, check, 0, 4, 2, 3); else gtk_table_attach_defaults (table, check, 2, 4, 0, 1); - g_object_unref (G_OBJECT (check)); + g_object_unref (check); } } @@ -3484,11 +3487,7 @@ expand_phone_toggle (EContactEditor *ce) GtkWidget *phone_ext_table; phone_ext_table = e_builder_get_widget (ce->builder, "table-phone-extended"); -#if GTK_CHECK_VERSION(2,19,7) expand_phone (ce, !gtk_widget_get_visible (phone_ext_table)); -#else - expand_phone (ce, !GTK_WIDGET_VISIBLE (phone_ext_table)); -#endif } static void @@ -3497,11 +3496,7 @@ expand_mail_toggle (EContactEditor *ce) GtkWidget *mail; mail = e_builder_get_widget (ce->builder, "entry-email-4"); -#if GTK_CHECK_VERSION(2,19,7) expand_mail (ce, !gtk_widget_get_visible (mail)); -#else - expand_mail (ce, !GTK_WIDGET_VISIBLE (mail)); -#endif } static void @@ -3509,6 +3504,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor) { GtkBuilder *builder; EShell *shell; + GtkWidget *container; GtkWidget *widget, *label; GtkEntryCompletion *completion; @@ -3539,8 +3535,10 @@ e_contact_editor_init (EContactEditor *e_contact_editor) gtk_widget_ensure_style (widget); gtk_window_set_type_hint (GTK_WINDOW (widget), GDK_WINDOW_TYPE_HINT_NORMAL); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (widget)->vbox), 0); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (widget)->action_area), 12); + container = gtk_dialog_get_action_area (GTK_DIALOG (widget)); + gtk_container_set_border_width (GTK_CONTAINER (container), 12); + container = gtk_dialog_get_content_area (GTK_DIALOG (widget)); + gtk_container_set_border_width (GTK_CONTAINER (container), 0); init_all (e_contact_editor); @@ -3938,9 +3936,12 @@ static void e_contact_editor_raise (EABEditor *editor) { EContactEditor *ce = E_CONTACT_EDITOR (editor); + GdkWindow *window; + + window = gtk_widget_get_window (ce->app); - if (GTK_WIDGET (ce->app)->window) - gdk_window_raise (GTK_WIDGET (ce->app)->window); + if (window != NULL) + gdk_window_raise (window); } /** diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index 6a8a5fd19d..0feced4ca0 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -342,6 +342,7 @@ build_quick_add_dialog (QuickAdd *qa) { ESourceList *source_list; GConfClient *gconf_client; + GtkWidget *container; GtkWidget *dialog; GtkWidget *label; GtkTable *table; @@ -350,19 +351,21 @@ build_quick_add_dialog (QuickAdd *qa) g_return_val_if_fail (qa != NULL, NULL); - dialog = gtk_dialog_new_with_buttons (_("Contact Quick-Add"), - e_shell_get_active_window (NULL), - GTK_DIALOG_NO_SEPARATOR, - _("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); + dialog = gtk_dialog_new_with_buttons ( + _("Contact Quick-Add"), + e_shell_get_active_window (NULL), + GTK_DIALOG_NO_SEPARATOR, + _("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, + NULL); gtk_widget_ensure_style (dialog); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), - 0); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), - 12); + + container = gtk_dialog_get_action_area (GTK_DIALOG (dialog)); + gtk_container_set_border_width (GTK_CONTAINER (container), 12); + container = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); + gtk_container_set_border_width (GTK_CONTAINER (container), 0); g_signal_connect (dialog, "response", G_CALLBACK (clicked_cb), qa); @@ -460,11 +463,10 @@ build_quick_add_dialog (QuickAdd *qa) 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, xpad, ypad); - gtk_container_set_border_width (GTK_CONTAINER (table), - 12); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - GTK_WIDGET (table), - FALSE, FALSE, 0); + gtk_container_set_border_width (GTK_CONTAINER (table), 12); + container = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); + gtk_box_pack_start ( + GTK_BOX (container), GTK_WIDGET (table), FALSE, FALSE, 0); gtk_widget_show_all (GTK_WIDGET (table)); return dialog; diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c index d6946e8341..17ac1c391c 100644 --- a/addressbook/gui/contact-editor/eab-editor.c +++ b/addressbook/gui/contact-editor/eab-editor.c @@ -164,8 +164,8 @@ eab_editor_class_init (EABEditorClass *class) PROP_SHELL, g_param_spec_object ( "shell", - _("Shell"), - _("The EShell singleton"), + "Shell", + "The EShell singleton", E_TYPE_SHELL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); |