From 30a33e8aab94f5cde1a79faf700c0c2313410a18 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 13 Apr 2004 02:39:18 +0000 Subject: [ should fix #56537 ] 2004-04-12 Chris Toshok [ should fix #56537 ] * gui/widgets/eab-popup-control.c (EMPTY_ENTRY): use _(), not N_() here. (email_menu_add_options_from_contact): and g_strdup it here, so that the g_list_foreach (... g_free ..) doesn't cause things to blow up. (email_menu_unset_options): nuke ifdefed function. * gui/widgets/eab-popup-control.h: don't include gtk.h, include just what we need. svn path=/trunk/; revision=25422 --- addressbook/gui/widgets/eab-popup-control.c | 44 +++++++++-------------------- addressbook/gui/widgets/eab-popup-control.h | 3 +- 2 files changed, 15 insertions(+), 32 deletions(-) (limited to 'addressbook/gui/widgets') diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index 943803ef47..857034e840 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -33,6 +33,17 @@ #include #include "addressbook.h" #include "eab-popup-control.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -185,7 +196,7 @@ mini_wizard_new (void) * contact. */ -#define EMPTY_ENTRY N_("(none)") +#define EMPTY_ENTRY _("(none)") typedef struct _EMailMenu EMailMenu; struct _EMailMenu { @@ -261,7 +272,7 @@ email_menu_add_options_from_contact (EMailMenu *menu, EContact *contact, const g email_menu_add_option (menu, e_contact_get (contact, E_CONTACT_EMAIL_2)); email_menu_add_option (menu, e_contact_get (contact, E_CONTACT_EMAIL_3)); email_menu_add_option (menu, g_strdup (extra_addr)); - email_menu_add_option (menu, EMPTY_ENTRY); + email_menu_add_option (menu, g_strdup (EMPTY_ENTRY)); } static void @@ -289,35 +300,6 @@ email_menu_set_option (EMailMenu *menu, const gchar *addr) } } -#ifdef UNDEFINED_FUNCTIONS_SHOULD_PLEASE_BE_INCLUDED -static void -email_menu_unset_option (EMailMenu *menu, const gchar *addr) -{ - GList *iter; - - g_return_if_fail (menu != NULL); - g_return_if_fail (addr != NULL); - - if (menu->current_selection == NULL || strcmp (addr, menu->current_selection)) - return; - - iter = menu->options; - while (iter && strcmp (addr, (gchar *) iter->data)) { - iter = g_list_next (iter); - } - if (iter) { - iter = g_list_next (iter); - if (iter) { - email_menu_set_option (menu, (gchar *) iter->data); - } else { - email_menu_set_option (menu, EMPTY_ENTRY); - } - } -} -#endif - - - typedef struct _EMailTable EMailTable; struct _EMailTable { GtkWidget *table; diff --git a/addressbook/gui/widgets/eab-popup-control.h b/addressbook/gui/widgets/eab-popup-control.h index 2feb3ac7d0..491f63f68e 100644 --- a/addressbook/gui/widgets/eab-popup-control.h +++ b/addressbook/gui/widgets/eab-popup-control.h @@ -29,10 +29,11 @@ #define __EAB_POPUP_CONTROL_H__ #include -#include #include #include +#include + G_BEGIN_DECLS #define EAB_TYPE_POPUP_CONTROL (eab_popup_control_get_type ()) -- cgit