From 979203663083ef89f678dc1e95bc0c9b24f55a9e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 18 Sep 2008 03:31:42 +0000 Subject: Progress update: - Kill EABMenu. - Centralize marshallers to eliminate duplication. svn path=/branches/kill-bonobo/; revision=36368 --- .../gui/component/e-book-shell-view-private.h | 3 - addressbook/gui/contact-editor/Makefile.am | 8 +- .../contact-editor/e-contact-editor-marshal.list | 1 - addressbook/gui/contact-editor/e-contact-editor.c | 1 - addressbook/gui/contact-editor/eab-editor.c | 8 +- addressbook/gui/contact-list-editor/Makefile.am | 2 - addressbook/gui/widgets/Makefile.am | 12 +- addressbook/gui/widgets/e-addressbook-model.c | 4 +- .../gui/widgets/e-addressbook-reflow-adapter.c | 4 +- addressbook/gui/widgets/e-addressbook-view.c | 2 - addressbook/gui/widgets/e-addressbook-view.h | 3 - addressbook/gui/widgets/e-minicard-label.c | 1 - addressbook/gui/widgets/e-minicard-view-widget.c | 4 +- addressbook/gui/widgets/e-minicard-view.c | 4 +- addressbook/gui/widgets/e-minicard.c | 5 +- addressbook/gui/widgets/eab-marshal.list | 2 - addressbook/gui/widgets/eab-menu.c | 258 --------------------- addressbook/gui/widgets/eab-menu.h | 110 --------- 18 files changed, 17 insertions(+), 415 deletions(-) delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-marshal.list delete mode 100644 addressbook/gui/widgets/eab-marshal.list delete mode 100644 addressbook/gui/widgets/eab-menu.c delete mode 100644 addressbook/gui/widgets/eab-menu.h (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h index 6eda9a08e8..bdfc362ee3 100644 --- a/addressbook/gui/component/e-book-shell-view-private.h +++ b/addressbook/gui/component/e-book-shell-view-private.h @@ -36,7 +36,6 @@ #include #include -#include #include #include #include @@ -103,8 +102,6 @@ struct _EBookShellViewPrivate { EBook *book; guint activity_id; gchar *password; - - EABMenu *menu; }; void e_book_shell_view_private_init diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am index e8692bb7f2..bed73df00b 100644 --- a/addressbook/gui/contact-editor/Makefile.am +++ b/addressbook/gui/contact-editor/Makefile.am @@ -18,7 +18,6 @@ privsolib_LTLIBRARIES = \ libecontacteditor.la libecontacteditor_la_SOURCES = \ - $(MARSHAL_GENERATED) \ eab-editor.c \ eab-editor.h \ e-contact-editor-im.c \ @@ -40,17 +39,12 @@ libecontacteditor_la_LIBADD = \ $(top_builddir)/e-util/libeutil.la \ $(EVOLUTION_ADDRESSBOOK_LIBS) -MARSHAL_GENERATED = e-contact-editor-marshal.c e-contact-editor-marshal.h -@EVO_MARSHAL_RULE@ - glade_DATA = \ im.glade \ contact-editor.glade \ fulladdr.glade \ fullname.glade -BUILT_SOURCES = $(MARSHAL_GENERATED) CLEANFILES = $(BUILT_SOURCES) -EXTRA_DIST= $(glade_DATA) \ - e-contact-editor-marshal.list +EXTRA_DIST= $(glade_DATA) diff --git a/addressbook/gui/contact-editor/e-contact-editor-marshal.list b/addressbook/gui/contact-editor/e-contact-editor-marshal.list deleted file mode 100644 index f871960b0d..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-marshal.list +++ /dev/null @@ -1 +0,0 @@ -NONE:INT,OBJECT diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index e629877eb0..7e85394f02 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -56,7 +56,6 @@ #include "e-contact-editor-address.h" #include "e-contact-editor-im.h" #include "e-contact-editor-fullname.h" -#include "e-contact-editor-marshal.h" #define EMAIL_SLOTS 4 #define PHONE_SLOTS 8 diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c index 90005ac0f9..4b3b8f4395 100644 --- a/addressbook/gui/contact-editor/eab-editor.c +++ b/addressbook/gui/contact-editor/eab-editor.c @@ -26,8 +26,8 @@ #include #include "eab-editor.h" +#include "e-util/e-util.h" #include "addressbook/gui/widgets/eab-gui-util.h" -#include "e-contact-editor-marshal.h" static void eab_editor_default_show (EABEditor *editor); static void eab_editor_default_raise (EABEditor *editor); @@ -140,7 +140,7 @@ eab_editor_class_init (EABEditorClass *klass) G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EABEditorClass, contact_added), NULL, NULL, - e_contact_editor_marshal_NONE__INT_OBJECT, + e_marshal_NONE__INT_OBJECT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_OBJECT); @@ -150,7 +150,7 @@ eab_editor_class_init (EABEditorClass *klass) G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EABEditorClass, contact_modified), NULL, NULL, - e_contact_editor_marshal_NONE__INT_OBJECT, + e_marshal_NONE__INT_OBJECT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_OBJECT); @@ -160,7 +160,7 @@ eab_editor_class_init (EABEditorClass *klass) G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EABEditorClass, contact_deleted), NULL, NULL, - e_contact_editor_marshal_NONE__INT_OBJECT, + e_marshal_NONE__INT_OBJECT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_OBJECT); diff --git a/addressbook/gui/contact-list-editor/Makefile.am b/addressbook/gui/contact-list-editor/Makefile.am index 76122c2421..5b75f92861 100644 --- a/addressbook/gui/contact-list-editor/Makefile.am +++ b/addressbook/gui/contact-list-editor/Makefile.am @@ -17,7 +17,6 @@ privsolib_LTLIBRARIES = \ libecontactlisteditor.la libecontactlisteditor_la_SOURCES = \ - $(MARSHAL_GENERATED) \ e-contact-list-editor.c \ e-contact-list-editor.h \ e-contact-list-model.c \ @@ -36,7 +35,6 @@ libecontactlisteditor_la_LIBADD = \ glade_DATA = contact-list-editor.glade -BUILT_SOURCES = $(MARSHAL_GENERATED) CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = $(glade_DATA) diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am index 827757c4f1..6ffa03204d 100644 --- a/addressbook/gui/widgets/Makefile.am +++ b/addressbook/gui/widgets/Makefile.am @@ -24,17 +24,14 @@ noinst_LTLIBRARIES = \ eabincludedir = $(privincludedir)/addressbook/gui/widgets eabinclude_HEADERS = \ - eab-config.h \ - eab-menu.h + eab-config.h libeabwidgets_la_SOURCES = \ - $(MARSHAL_GENERATED) \ eab-config.c \ eab-contact-display.c \ eab-contact-display.h \ eab-gui-util.c \ eab-gui-util.h \ - eab-menu.c \ eab-vcard-control.c \ eab-vcard-control.h \ e-minicard.c \ @@ -63,10 +60,6 @@ libeabwidgets_la_SOURCES = \ libeabwidgets_la_LIBADD = \ $(top_builddir)/widgets/misc/libemiscwidgets.la -MARSHAL_GENERATED = eab-marshal.c eab-marshal.h -@EVO_MARSHAL_RULE@ - -BUILT_SOURCES = $(MARSHAL_GENERATED) CLEANFILES = $(BUILT_SOURCES) dist-hook: @@ -76,5 +69,4 @@ etspec_DATA= e-addressbook-view.etspec EXTRA_DIST = \ $(etspec_DATA) \ - $(rule_DATA) \ - eab-marshal.list + $(rule_DATA) diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index b26c68e755..b129051228 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -10,8 +10,8 @@ #include #include #include -#include "eab-marshal.h" #include "e-addressbook-model.h" +#include #include #include "eab-gui-util.h" @@ -576,7 +576,7 @@ addressbook_model_class_init (EAddressbookModelClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EAddressbookModelClass, contact_added), NULL, NULL, - eab_marshal_NONE__INT_INT, + e_marshal_NONE__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); signals[CONTACTS_REMOVED] = diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index a099c40ae7..d344641c8f 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -20,12 +20,12 @@ #include #include -#include "eab-marshal.h" #include "e-addressbook-reflow-adapter.h" #include "e-addressbook-model.h" #include "eab-gui-util.h" #include "e-minicard.h" +#include #include #include "addressbook/printing/e-contact-print.h" @@ -433,7 +433,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EAddressbookReflowAdapterClass, drag_begin), NULL, NULL, - eab_marshal_INT__POINTER, + e_marshal_INT__POINTER, G_TYPE_INT, 1, G_TYPE_POINTER); model_class->set_width = addressbook_set_width; diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 6ba56ae7a4..ca25548c56 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -32,7 +32,6 @@ #include #include "addressbook/printing/e-contact-print.h" -#include "addressbook/gui/widgets/eab-menu.h" #include "a11y/addressbook/ea-addressbook.h" #include "e-util/e-print.h" @@ -43,7 +42,6 @@ #include "gal-view-minicard.h" #include "gal-view-factory-minicard.h" -#include "eab-marshal.h" #include "e-addressbook-view.h" #include "e-addressbook-model.h" #include "eab-gui-util.h" diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 283b5d6cd0..93d67a2a22 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -51,9 +51,6 @@ G_BEGIN_DECLS -struct _EABMenu; -struct _EABMenuTargetSelect; - typedef enum { E_ADDRESSBOOK_VIEW_NONE, /* initialized to this */ E_ADDRESSBOOK_VIEW_MINICARD, diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index c820ded1a5..8e4c9c8966 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -22,7 +22,6 @@ #include #include "e-minicard-label.h" -#include "eab-marshal.h" #include #include diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 2796bfe433..2d43aca39e 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -27,7 +27,7 @@ #include #include -#include "eab-marshal.h" +#include "e-util/e-util.h" #include "e-minicard-view-widget.h" static void e_minicard_view_widget_init (EMinicardViewWidget *widget); @@ -164,7 +164,7 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EMinicardViewWidgetClass, right_click), NULL, NULL, - eab_marshal_INT__POINTER, + e_marshal_INT__POINTER, G_TYPE_INT, 1, G_TYPE_POINTER); } diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 5ef464973a..37ffc8844d 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -25,7 +25,6 @@ #include "e-minicard-view.h" #include "eab-gui-util.h" -#include "eab-marshal.h" #include "util/eab-book-util.h" #include @@ -33,6 +32,7 @@ #include #include #include +#include "e-util/e-util.h" #include "a11y/addressbook/ea-addressbook.h" static void e_minicard_view_drag_data_get(GtkWidget *widget, @@ -553,7 +553,7 @@ e_minicard_view_class_init (EMinicardViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EMinicardViewClass, right_click), NULL, NULL, - eab_marshal_INT__POINTER, + e_marshal_INT__POINTER, G_TYPE_INT, 1, G_TYPE_POINTER); item_class->event = e_minicard_view_event; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index a4bda1ac4a..8d50b6ee5b 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -30,7 +30,6 @@ #include #include #include -#include "eab-marshal.h" #include "eab-gui-util.h" #include "e-minicard.h" #include "e-minicard-label.h" @@ -206,7 +205,7 @@ e_minicard_class_init (EMinicardClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EMinicardClass, selected), NULL, NULL, - eab_marshal_INT__POINTER, + e_marshal_INT__POINTER, G_TYPE_INT, 1, G_TYPE_POINTER); e_minicard_signals [DRAG_BEGIN] = @@ -215,7 +214,7 @@ e_minicard_class_init (EMinicardClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EMinicardClass, drag_begin), NULL, NULL, - eab_marshal_INT__POINTER, + e_marshal_INT__POINTER, G_TYPE_INT, 1, G_TYPE_POINTER); e_minicard_signals [STYLE_SET] = diff --git a/addressbook/gui/widgets/eab-marshal.list b/addressbook/gui/widgets/eab-marshal.list deleted file mode 100644 index 867355e96e..0000000000 --- a/addressbook/gui/widgets/eab-marshal.list +++ /dev/null @@ -1,2 +0,0 @@ -INT:POINTER -NONE:INT,INT diff --git a/addressbook/gui/widgets/eab-menu.c b/addressbook/gui/widgets/eab-menu.c deleted file mode 100644 index 603e93893c..0000000000 --- a/addressbook/gui/widgets/eab-menu.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Michael Zucchi - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include - -#include - -#include "eab-menu.h" - -static void eabm_standard_menu_factory(EMenu *emp, void *data); - -static GObjectClass *eabm_parent; - -static void -eabm_init(GObject *o) -{ - /*EABMenu *emp = (EABMenu *)o; */ -} - -static void -eabm_finalise(GObject *o) -{ - ((GObjectClass *)eabm_parent)->finalize(o); -} - -static void -eabm_target_free(EMenu *ep, EMenuTarget *t) -{ - switch (t->type) { - case EAB_MENU_TARGET_SELECT: { - EABMenuTargetSelect *s = (EABMenuTargetSelect *)t; - int i; - - for (i=0;icards->len;i++) - g_object_unref(s->cards->pdata[i]); - g_ptr_array_free(s->cards, TRUE); - if (s->book) - g_object_unref(s->book); - break; } - } - - ((EMenuClass *)eabm_parent)->target_free(ep, t); -} - -static void -eabm_class_init(GObjectClass *klass) -{ - klass->finalize = eabm_finalise; - ((EMenuClass *)klass)->target_free = eabm_target_free; - - e_menu_class_add_factory((EMenuClass *)klass, NULL, (EMenuFactoryFunc)eabm_standard_menu_factory, NULL); -} - -GType -eab_menu_get_type(void) -{ - static GType type = 0; - - if (type == 0) { - static const GTypeInfo info = { - sizeof(EABMenuClass), - NULL, NULL, - (GClassInitFunc)eabm_class_init, - NULL, NULL, - sizeof(EABMenu), 0, - (GInstanceInitFunc)eabm_init - }; - eabm_parent = g_type_class_ref(e_menu_get_type()); - type = g_type_register_static(e_menu_get_type(), "EABMenu", &info, 0); - } - - return type; -} - -EABMenu *eab_menu_new(const char *menuid) -{ - EABMenu *emp = g_object_new(eab_menu_get_type(), NULL); - - e_menu_construct(&emp->menu, menuid); - - return emp; -} - -/** - * eab_menu_target_new_select - create a menu target of the current selection. - * @eabp: Address book menu. - * @book: Book the cards belong to. May be NULL in which case cards must be an empty GPtrArray. - * @readonly: Book is read-only mode. FIXME: Why can't we just get this off the book? - * @cards: Cards selected. This will be freed on completion and the array indices unreferenced. - * - * Create a new selection menu target. - * - * Return value: - **/ -EABMenuTargetSelect * -eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards) -{ - EABMenuTargetSelect *t = e_menu_target_new(&eabp->menu, EAB_MENU_TARGET_SELECT, sizeof(*t)); - guint32 mask = ~0; - int has_email = FALSE, i; - - /* FIXME: duplicated in eab-popup.c */ - - t->book = book; - if (book) - g_object_ref(book); - t->cards = cards; - - for (i=0;ilen && !has_email;i++) { - EContact *contact = cards->pdata[i]; - GList *email; - - email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL); - if (email) { - has_email = TRUE; - - g_list_foreach(email, (GFunc)g_free, NULL); - g_list_free(email); - } - } - - if (has_email) - mask &= ~EAB_MENU_SELECT_EMAIL; - - if (!readonly) - mask &= ~EAB_MENU_SELECT_EDITABLE; - - if (cards->len == 1) - mask &= ~EAB_MENU_SELECT_ONE; - - if (cards->len > 1) - mask &= ~EAB_MENU_SELECT_MANY; - - if (cards->len >= 1) - mask &= ~EAB_MENU_SELECT_ANY; - - t->target.mask = mask; - - return t; -} - -static void -eabm_standard_menu_factory(EMenu *emp, void *data) -{ - /* noop */ -} - -/* ********************************************************************** */ - -/* menu plugin handler */ - -/* - - - - - - - -*/ - -static void *eabmph_parent_class; -#define eabmph ((EABMenuHook *)eph) - -static const EMenuHookTargetMask eabmph_select_masks[] = { - { "one", EAB_MENU_SELECT_ONE }, - { "many", EAB_MENU_SELECT_MANY }, - { "any", EAB_MENU_SELECT_ANY }, - { "editable", EAB_MENU_SELECT_EDITABLE }, - { "email", EAB_MENU_SELECT_EMAIL }, - { NULL } -}; - -static const EMenuHookTargetMap eabmph_targets[] = { - { "select", EAB_MENU_TARGET_SELECT, eabmph_select_masks }, - { NULL } -}; - -static void -eabmph_finalise(GObject *o) -{ - /*EPluginHook *eph = (EPluginHook *)o;*/ - - ((GObjectClass *)eabmph_parent_class)->finalize(o); -} - -static void -eabmph_class_init(EPluginHookClass *klass) -{ - int i; - - ((GObjectClass *)klass)->finalize = eabmph_finalise; - ((EPluginHookClass *)klass)->id = "org.gnome.evolution.addressbook.bonobomenu:1.0"; - - for (i=0;eabmph_targets[i].type;i++) - e_menu_hook_class_add_target_map((EMenuHookClass *)klass, &eabmph_targets[i]); - - /* FIXME: leaks parent set class? */ - ((EMenuHookClass *)klass)->menu_class = g_type_class_ref(eab_menu_get_type()); -} - -GType -eab_menu_hook_get_type(void) -{ - static GType type = 0; - - if (!type) { - static const GTypeInfo info = { - sizeof(EABMenuHookClass), NULL, NULL, (GClassInitFunc) eabmph_class_init, NULL, NULL, - sizeof(EABMenuHook), 0, (GInstanceInitFunc) NULL, - }; - - eabmph_parent_class = g_type_class_ref(e_menu_hook_get_type()); - type = g_type_register_static(e_menu_hook_get_type(), "EABMenuHook", &info, 0); - } - - return type; -} diff --git a/addressbook/gui/widgets/eab-menu.h b/addressbook/gui/widgets/eab-menu.h deleted file mode 100644 index 7da05c133b..0000000000 --- a/addressbook/gui/widgets/eab-menu.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Michel Zucchi - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __EAB_MENU_H__ -#define __EAB_MENU_H__ - -#include - -#include "e-util/e-menu.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -struct _EBook; - -typedef struct _EABMenu EABMenu; -typedef struct _EABMenuClass EABMenuClass; - -/* Current target description */ -enum _eab_menu_target_t { - EAB_MENU_TARGET_SELECT, -}; - -/** - * enum _eab_menu_target_select_t - EABMenuTargetSelect qualifiers. - * - * @EAB_MENU_SELECT_ONE: Only one item is selected. - * @EAB_MENU_SELECT_MANY: More than one item selected. - * @EAB_MENU_SELECT_ANY: One or more items selected. - * @EAB_MENU_SELECT_EDITABLE: Editable addressbook. - * @EAB_MENU_SELECT_EMAIL: Has an email address. - **/ -enum _eab_menu_target_select_t { - EAB_MENU_SELECT_ONE = 1<<0, - EAB_MENU_SELECT_MANY = 1<<1, - EAB_MENU_SELECT_ANY = 1<<2, - EAB_MENU_SELECT_EDITABLE = 1<<3, - EAB_MENU_SELECT_EMAIL = 1<<4, -}; - -typedef struct _EABMenuTargetSelect EABMenuTargetSelect; - -struct _EABMenuTargetSelect { - EMenuTarget target; - - struct _EBook *book; - GPtrArray *cards; -}; - -typedef struct _EMenuItem EABMenuItem; - -/* The object */ -struct _EABMenu { - EMenu menu; - - struct _EABMenuPrivate *priv; -}; - -struct _EABMenuClass { - EMenuClass menu_class; -}; - -GType eab_menu_get_type(void); - -EABMenu *eab_menu_new(const char *menuid); - -EABMenuTargetSelect *eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards); - -/* ********************************************************************** */ - -typedef struct _EABMenuHook EABMenuHook; -typedef struct _EABMenuHookClass EABMenuHookClass; - -struct _EABMenuHook { - EMenuHook hook; -}; - -struct _EABMenuHookClass { - EMenuHookClass hook_class; -}; - -GType eab_menu_hook_get_type(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __EAB_MENU_H__ */ -- cgit v1.2.3