diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2004-04-21 13:17:26 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2004-04-21 13:17:26 +0800 |
commit | 8a01ae27024dc0020b0c01a95cc08b4b3baa1e10 (patch) | |
tree | 7991b9790513fbb25216d6e50ac3320af632753d | |
parent | 726379c6241852b543b670850a6be741fce93ac1 (diff) | |
download | gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.tar gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.tar.gz gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.tar.bz2 gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.tar.lz gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.tar.xz gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.tar.zst gsoc2013-evolution-8a01ae27024dc0020b0c01a95cc08b4b3baa1e10.zip |
Remove unused fields.
2004-04-21 Hans Petter Jansson <hpj@ximian.com>
* gui/contact-editor/e-contact-editor.h (EContactEditor): Remove
unused fields.
* gui/contact-editor/e-contact-editor.c (emails): Remove.
(e_contact_editor_init): Don't init unused fields.
(e_contact_editor_dispose): Don't free/clear unused fields.
(enable_writable_fields): Don't use email_choice anymore. Enable
checkbutton-htmlmail only once.
svn path=/trunk/; revision=25550
-rw-r--r-- | addressbook/ChangeLog | 11 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 74 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.h | 16 |
3 files changed, 13 insertions, 88 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index e9c6deb499..1d4322a017 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,16 @@ 2004-04-21 Hans Petter Jansson <hpj@ximian.com> + * gui/contact-editor/e-contact-editor.h (EContactEditor): Remove + unused fields. + + * gui/contact-editor/e-contact-editor.c (emails): Remove. + (e_contact_editor_init): Don't init unused fields. + (e_contact_editor_dispose): Don't free/clear unused fields. + (enable_writable_fields): Don't use email_choice anymore. Enable + checkbutton-htmlmail only once. + +2004-04-21 Hans Petter Jansson <hpj@ximian.com> + * gui/contact-editor/contact-editor.glade: Make the phone type selectors be option menus. diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index b06269877a..d35577912b 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -147,12 +147,6 @@ phones [] = { { E_CONTACT_PHONE_TTYTDD, EVC_X_TTYTDD, NULL } }; -static EContactField emails[] = { - E_CONTACT_EMAIL_1, - E_CONTACT_EMAIL_2, - E_CONTACT_EMAIL_3 -}; - static EContactField addresses[] = { E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_HOME, @@ -1716,26 +1710,9 @@ e_contact_editor_init (EContactEditor *e_contact_editor) GtkWidget *wants_html; char *icon_path; - e_contact_editor->email_info = NULL; - e_contact_editor->phone_info = NULL; - e_contact_editor->address_info = NULL; - e_contact_editor->email_popup = NULL; - e_contact_editor->phone_popup = NULL; - e_contact_editor->address_popup = NULL; - e_contact_editor->email_list = NULL; - e_contact_editor->phone_list = NULL; - e_contact_editor->address_list = NULL; e_contact_editor->name = e_contact_name_new(); e_contact_editor->company = g_strdup(""); - e_contact_editor->email_choice = 0; - e_contact_editor->phone_choice[0] = 1; /* E_CONTACT_PHONE_BUSINESS */ - e_contact_editor->phone_choice[1] = 7; /* E_CONTACT_PHONE_HOME */ - e_contact_editor->phone_choice[2] = 3; /* E_CONTACT_PHONE_BUSINESS_FAX */ - e_contact_editor->phone_choice[3] = 11; /* E_CONTACT_PHONE_MOBILE */ - e_contact_editor->address_choice = 0; - e_contact_editor->address_mailing = -1; - e_contact_editor->contact = NULL; e_contact_editor->changed = FALSE; e_contact_editor->image_set = FALSE; @@ -1809,47 +1786,6 @@ e_contact_editor_dispose (GObject *object) g_object_unref(e_contact_editor->writable_fields); e_contact_editor->writable_fields = NULL; } - if (e_contact_editor->email_list) { - g_list_foreach(e_contact_editor->email_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->email_list); - e_contact_editor->email_list = NULL; - } - if (e_contact_editor->email_info) { - g_free(e_contact_editor->email_info); - e_contact_editor->email_info = NULL; - } - if (e_contact_editor->email_popup) { - g_object_unref(e_contact_editor->email_popup); - e_contact_editor->email_popup = NULL; - } - - if (e_contact_editor->phone_list) { - g_list_foreach(e_contact_editor->phone_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->phone_list); - e_contact_editor->phone_list = NULL; - } - if (e_contact_editor->phone_info) { - g_free(e_contact_editor->phone_info); - e_contact_editor->phone_info = NULL; - } - if (e_contact_editor->phone_popup) { - g_object_unref(e_contact_editor->phone_popup); - e_contact_editor->phone_popup = NULL; - } - - if (e_contact_editor->address_list) { - g_list_foreach(e_contact_editor->address_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->address_list); - e_contact_editor->address_list = NULL; - } - if (e_contact_editor->address_info) { - g_free(e_contact_editor->address_info); - e_contact_editor->address_info = NULL; - } - if (e_contact_editor->address_popup) { - g_object_unref(e_contact_editor->address_popup); - e_contact_editor->address_popup = NULL; - } if (e_contact_editor->contact) { g_object_unref(e_contact_editor->contact); @@ -2324,16 +2260,10 @@ enable_writable_fields(EContactEditor *editor) editor->address_editable [i] = TRUE; } } - - /* ugh - this is needed to make sure we don't have a - disabled label next to a drop down when the item in - the menu (the one reflected in the label) is - enabled. */ - if (!strcmp (field, e_contact_field_name (emails[editor->email_choice]))) { - enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), editor->target_editable); - } } + enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), editor->target_editable); + /* handle the label next to the dropdown widgets */ for (i = 0; i < num_widget_field_mappings; i ++) { diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h index 10d2567cba..a34c19e031 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.h +++ b/addressbook/gui/contact-editor/e-contact-editor.h @@ -68,26 +68,10 @@ struct _EContactEditor GladeXML *gui; GtkWidget *app; - GnomeUIInfo *email_info; - GnomeUIInfo *phone_info; - GnomeUIInfo *address_info; - GtkWidget *email_popup; - GtkWidget *phone_popup; - GtkWidget *address_popup; - GList *email_list; - GList *phone_list; - GList *address_list; EContactName *name; char *company; - GtkListStore *im_model; - - EContactField email_choice; - EContactField phone_choice[4]; - EContactField address_choice; - EContactField address_mailing; - /* Whether we are editing a new contact or an existing one */ guint is_new_contact : 1; |