diff options
author | Not Zed <NotZed@Ximian.com> | 2004-10-15 15:36:53 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-15 15:36:53 +0800 |
commit | 084a2d2e3d39e7b25a6101f125a37bb05b9caf81 (patch) | |
tree | 7dfaec2c9b2feccc605d7704b0ee1b9dd93fa62b /addressbook/gui/widgets/eab-popup.c | |
parent | 3c9bfa7f65ee62000f5eef7376e4de7a88163f55 (diff) | |
download | gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.tar gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.tar.gz gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.tar.bz2 gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.tar.lz gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.tar.xz gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.tar.zst gsoc2013-evolution-084a2d2e3d39e7b25a6101f125a37bb05b9caf81.zip |
added an any select mask and updated the hook maps.
2004-10-15 Not Zed <NotZed@Ximian.com>
* gui/widgets/eab-popup.c: added an any select mask and updated
the hook maps.
* gui/component/addressbook-component.c
(addressbook_component_init): register the addressbook hooks.
* gui/component/addressbook-view.c (addressbook_view_init): setup
the menu manager.
(control_activate_cb): activate the menu manager.
(update_command_state): and update the menu manager.
* gui/widgets/eab-menu.[ch]: Added menu manager class.
svn path=/trunk/; revision=27589
Diffstat (limited to 'addressbook/gui/widgets/eab-popup.c')
-rw-r--r-- | addressbook/gui/widgets/eab-popup.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c index 79e9c2a57a..2a9a7e654b 100644 --- a/addressbook/gui/widgets/eab-popup.c +++ b/addressbook/gui/widgets/eab-popup.c @@ -130,6 +130,8 @@ eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, G guint32 mask = ~0; int has_email = FALSE, i; + /* FIXME: duplicated in eab-menu.c */ + t->book = book; g_object_ref(book); t->cards = cards; @@ -156,9 +158,12 @@ eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, G if (cards->len == 1) mask &= ~EAB_POPUP_SELECT_ONE; - if (cards->len >= 1) + if (cards->len > 1) mask &= ~EAB_POPUP_SELECT_MANY; + if (cards->len >= 1) + mask &= ~EAB_POPUP_SELECT_ANY; + t->target.mask = mask; return t; @@ -199,6 +204,9 @@ eab_popup_target_new_select_names(EABPopup *eabp, struct _ESelectNamesModel *mod { EABPopupTargetSelectNames *t = e_popup_target_new(&eabp->popup, EAB_POPUP_TARGET_SELECT_NAMES, sizeof(*t)); + /* TODO: this is sort of not very useful, maybe the popup which uses it doesn't + need to be pluggable */ + t->model = model; g_object_ref(model); t->row = row; @@ -239,6 +247,9 @@ static void *eabph_parent_class; static const EPopupHookTargetMask eabph_select_masks[] = { { "one", EAB_POPUP_SELECT_ONE }, { "many", EAB_POPUP_SELECT_MANY }, + { "any", EAB_POPUP_SELECT_ANY }, + { "editable", EAB_POPUP_SELECT_EDITABLE }, + { "email", EAB_POPUP_SELECT_EMAIL }, { 0 } }; |