diff options
author | Chris Toshok <toshok@ximian.com> | 2004-04-13 10:39:18 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-04-13 10:39:18 +0800 |
commit | 30a33e8aab94f5cde1a79faf700c0c2313410a18 (patch) | |
tree | 6c94acb0bcba53cdac875d31ac152aa1d97b5816 /addressbook | |
parent | 6bb123fef9b59492e4635825d3761fcd529b6344 (diff) | |
download | gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.tar gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.tar.gz gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.tar.bz2 gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.tar.lz gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.tar.xz gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.tar.zst gsoc2013-evolution-30a33e8aab94f5cde1a79faf700c0c2313410a18.zip |
[ should fix #56537 ]
2004-04-12 Chris Toshok <toshok@ximian.com>
[ 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
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 14 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup-control.c | 44 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup-control.h | 3 |
3 files changed, 29 insertions, 32 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index f3f3ef7e6a..8f7b3f1084 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,17 @@ +2004-04-12 Chris Toshok <toshok@ximian.com> + + [ 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. + 2004-04-10 Chris Toshok <toshok@ximian.com> * gui/widgets/eab-gui-util.h: add prototypes for 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 <string.h> #include "addressbook.h" #include "eab-popup-control.h" +#include <gtk/gtkbutton.h> +#include <gtk/gtkcellrenderertext.h> +#include <gtk/gtkframe.h> +#include <gtk/gtkhbbox.h> +#include <gtk/gtkhseparator.h> +#include <gtk/gtklabel.h> +#include <gtk/gtkoptionmenu.h> +#include <gtk/gtkstock.h> +#include <gtk/gtktable.h> +#include <gtk/gtktreeselection.h> +#include <gtk/gtktreeview.h> #include <bonobo/bonobo-control.h> #include <bonobo/bonobo-property-bag.h> #include <bonobo/bonobo-generic-factory.h> @@ -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 <bonobo/bonobo-event-source.h> -#include <gtk/gtk.h> #include <libebook/e-book-async.h> #include <libebook/e-contact.h> +#include <gtk/gtkeventbox.h> + G_BEGIN_DECLS #define EAB_TYPE_POPUP_CONTROL (eab_popup_control_get_type ()) |