diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2006-01-27 23:41:52 +0800 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2006-01-27 23:41:52 +0800 |
commit | 6a557ef8fd8fb37af345b0f092f8419572bee1dd (patch) | |
tree | 943eaac179865e9b8c9981b4a4edde1afb2a74b9 /addressbook/gui/contact-editor | |
parent | fe9e00b0447e4f1fc70c9d66dfc935bdf25d86a0 (diff) | |
download | gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.tar gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.tar.gz gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.tar.bz2 gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.tar.lz gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.tar.xz gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.tar.zst gsoc2013-evolution-6a557ef8fd8fb37af345b0f092f8419572bee1dd.zip |
reviewed by: Harish Krishnaswamy <kharish@novell.com>
2006-01-27 Kjartan Maraas <kmaraas@gnome.org>
reviewed by: Harish Krishnaswamy <kharish@novell.com>
* gui/component/addressbook-component.c: (impl_requestCreateItem):
Remove unused bits.
* gui/component/addressbook-config.c: (eabc_general_type),
(eabc_general_offline): Same here.
* gui/component/addressbook-migrate.c: Remove unused static function.
* gui/component/addressbook-view.c: (selector_tree_drag_motion):
Remove unused static function and init uninitialized var.
* gui/contact-editor/e-contact-editor-address.c:
(fill_in_countries): Return early if setlocale() fails.
* gui/contact-editor/e-contact-editor.c: (file_as_get_style),
(extract_email), (extract_phone), (sensitize_phone_types),
(extract_im), (sensitize_im_types), (init_simple):
Mark some arrays static, remove unused variables, fix gcc warnings
* gui/contact-list-editor/e-contact-list-editor.c: (fill_in_info):
Remove unused var.
* gui/merging/eab-contact-compare.c: (eab_contact_compare_name):
Remove unused static function and unused vars.
* gui/search/e-addressbook-search-dialog.c:
(eab_search_dialog_dispose): Remove unused vars.
* gui/widgets/e-addressbook-model.c: (get_view): Add comment.
* gui/widgets/e-addressbook-view.c: (eab_view_class_init),
(eab_view_delete_selection): Remove unused var
* gui/widgets/e-addressbook-view.h: Remove extra semi-colon.
* gui/widgets/e-minicard-label.c: (e_minicard_label_unrealize):
Remove unused var.
* gui/widgets/e-minicard.c: (e_minicard_unrealize),
(e_minicard_event), (add_field), (remodel), (e_minicard_reflow):
Remove unused vars. s/if/ifdef in some places, use passed in parameter
instead of redeclaring the thing locally.
* gui/widgets/eab-contact-display.c: (accum_address),
(eab_contact_display_render_compact): s/if/ifdef.
* gui/widgets/eab-gui-util.c: (eab_select_source): Comment out unused var.
* gui/widgets/eab-popup-control.c: (eab_popup_control_cleanup): s/if/ifdef
* printing/e-contact-print-style-editor.c:
(e_contact_print_style_editor_class_init),
(e_contact_print_style_editor_set_arg),
(e_contact_print_style_editor_get_arg): Remove unused vars.
* util/eab-book-util.c: s/if/ifdef
svn path=/trunk/; revision=31327
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-address.c | 19 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 28 |
2 files changed, 23 insertions, 24 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c index 79c578ef17..a039c49a6b 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-address.c +++ b/addressbook/gui/contact-editor/e-contact-editor-address.c @@ -397,20 +397,21 @@ fill_in_countries (GladeXML *gui) static GList *country_list; if (!sorted) { int i; - char *locale; for (i = 0; countries[i]; i++) { countries[i] = _(countries[i]); } - locale = setlocale (LC_COLLATE, NULL); - qsort (countries + 1, i - 1, sizeof (countries[0]), compare_func); - country_list = NULL; - for (i = 0; countries[i]; i++) { - country_list = g_list_prepend (country_list, countries[i]); - } - country_list = g_list_reverse (country_list); - sorted = TRUE; + if (setlocale (LC_COLLATE, NULL) != NULL) { + qsort (countries + 1, i - 1, sizeof (countries[0]), compare_func); + country_list = NULL; + for (i = 0; countries[i]; i++) { + country_list = g_list_prepend (country_list, countries[i]); + } + country_list = g_list_reverse (country_list); + sorted = TRUE; + } else + return; } gtk_combo_set_popdown_strings (combo, country_list); } diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 2ff60c9652..359eb37608 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -157,7 +157,7 @@ phones [] = { }; /* Defaults from the table above */ -gint phones_default [] = { 1, 6, 9, 2, 7, 12, 10, 10 }; +static const gint phones_default [] = { 1, 6, 9, 2, 7, 12, 10, 10 }; static EContactField addresses [] = { E_CONTACT_ADDRESS_WORK, @@ -171,7 +171,7 @@ static EContactField address_labels [] = { E_CONTACT_ADDRESS_LABEL_OTHER }; -static gchar *address_name [] = { +static const gchar *address_name [] = { "work", "home", "other" @@ -192,7 +192,7 @@ im_service [] = }; /* Defaults from the table above */ -gint im_service_default [] = { 0, 2, 4, 5 }; +static const gint im_service_default [] = { 0, 2, 4, 5 }; static struct { gchar *name; @@ -206,7 +206,7 @@ common_location [] = }; /* Default from the table above */ -gint email_default [] = { 0, 1, 2, 2 }; +static const gint email_default [] = { 0, 1, 2, 2 }; #define STRING_IS_EMPTY(x) (!(x) || !(*(x))) #define STRING_MAKE_NON_NULL(x) ((x) ? (x) : "") @@ -466,7 +466,6 @@ file_as_get_style (EContactEditor *editor) EContactName *name = editor->name; const gchar *company; int i; - int style; if (!(file_as && GTK_IS_ENTRY(file_as))) return -1; @@ -999,7 +998,7 @@ extract_email (EContactEditor *editor) l_next = g_list_next (l); e_vcard_attribute_free (l->data); - g_list_delete_link (l, l); + l = g_list_delete_link (l, l); } old_attr_list = l; @@ -1232,7 +1231,7 @@ extract_phone (EContactEditor *editor) l_next = g_list_next (l); e_vcard_attribute_free (l->data); - g_list_delete_link (l, l); + l = g_list_delete_link (l, l); } old_attr_list = l; @@ -1299,11 +1298,11 @@ static void sensitize_phone_types (EContactEditor *editor, GtkWidget *option_menu) { GtkWidget *menu; - GList *item_list, *l; + GList *l; gint i; menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); - l = item_list = gtk_container_get_children (GTK_CONTAINER (menu)); + l = gtk_container_get_children (GTK_CONTAINER (menu)); for (i = 0; i < G_N_ELEMENTS (phones); i++) { GtkWidget *widget; @@ -1591,7 +1590,7 @@ extract_im (EContactEditor *editor) l_next = g_list_next (l); e_vcard_attribute_free (l->data); - g_list_delete_link (l, l); + l = g_list_delete_link (l, l); } old_service_attr_list = l; @@ -1609,11 +1608,11 @@ static void sensitize_im_types (EContactEditor *editor, GtkWidget *option_menu) { GtkWidget *menu; - GList *item_list, *l; + GList *l; gint i; menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); - l = item_list = gtk_container_get_children (GTK_CONTAINER (menu)); + l = gtk_container_get_children (GTK_CONTAINER (menu)); for (i = 0; i < G_N_ELEMENTS (im_service); i++) { GtkWidget *widget; @@ -2337,8 +2336,6 @@ init_simple (EContactEditor *editor) gint i; for (i = 0; i < G_N_ELEMENTS (simple_field_map); i++) { - GtkWidget *widget; - widget = glade_xml_get_widget (editor->gui, simple_field_map [i].widget_name); if (!widget) continue; @@ -2972,7 +2969,7 @@ e_contact_editor_close (EABEditor *editor) } } -EContactField non_string_fields [] = { +static const EContactField non_string_fields [] = { E_CONTACT_FULL_NAME, E_CONTACT_ADDRESS, E_CONTACT_ADDRESS_HOME, @@ -3647,6 +3644,7 @@ e_contact_editor_show (EABEditor *editor) gtk_widget_show (ce->app); } +/* Is this declaration here so that libglade can reach this? */ GtkWidget * e_contact_editor_create_date(gchar *name, gchar *string1, gchar *string2, |