aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-popup.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2005-07-05 12:38:51 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2005-07-05 12:38:51 +0800
commit342d3c32efc78ba037046d32b137321b915bac6d (patch)
tree3d6124cd1437c75f5a13a71861343e824ecc57b3 /calendar/gui/e-cal-popup.c
parentd6634fe53c1b9ddb09b538f181b356865b3aeaf2 (diff)
downloadgsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.tar
gsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.tar.gz
gsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.tar.bz2
gsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.tar.lz
gsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.tar.xz
gsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.tar.zst
gsoc2013-evolution-342d3c32efc78ba037046d32b137321b915bac6d.zip
Created new target type Added #define for the new target type Poped e-cal
2005-07-05 Srinivasa Ragavan <sragavan@novell.com> * gui/e-cal-popup.c: Created new target type * gui/e-cal-popup.h: Added #define for the new target type * gui/dialogs/cal-attachment-bar.c: (cab_popup) Poped e-cal instead of em_*. Removed mailer code from calendar * gui/dialogs/comp-editor.c: (drag_data_received) Poped e-cal instead of em_*. Removed mailer code from calendar. svn path=/trunk/; revision=29630
Diffstat (limited to 'calendar/gui/e-cal-popup.c')
-rw-r--r--calendar/gui/e-cal-popup.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index 3ecddd0bb4..441bad505c 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -309,6 +309,33 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
return t;
}
+/**
+ * e_cal_popup_target_new_attachments:
+ * @ecp:
+ * @attachments: A list of CalAttachment objects, reffed for
+ * the list. Will be unreff'd once finished with.
+ *
+ * Owns the list @attachments and their items after they're passed in.
+ *
+ * Return value:
+ **/
+ECalPopupTargetAttachments *
+e_cal_popup_target_new_attachments(ECalPopup *ecp, GSList *attachments)
+{
+ ECalPopupTargetAttachments *t = e_popup_target_new(&ecp->popup, E_CAL_POPUP_TARGET_ATTACHMENTS, sizeof(*t));
+ guint32 mask = ~0;
+ int len = g_slist_length(attachments);
+
+ t->attachments = attachments;
+ if (len > 0)
+ mask &= ~ E_CAL_POPUP_ATTACHMENTS_MANY;
+ if (len == 1)
+ mask &= ~ E_CAL_POPUP_ATTACHMENTS_ONE;
+ t->target.mask = mask;
+
+ return t;
+}
+
/* ********************************************************************** */
/* Popup menu plugin handler */
@@ -365,9 +392,16 @@ static const EPopupHookTargetMask ecalph_source_masks[] = {
{ 0 }
};
+static const EPopupHookTargetMask ecalph_attachments_masks[] = {
+ { "one", E_CAL_POPUP_ATTACHMENTS_ONE },
+ { "many", E_CAL_POPUP_ATTACHMENTS_MANY },
+ { 0 }
+};
+
static const EPopupHookTargetMap ecalph_targets[] = {
{ "select", E_CAL_POPUP_TARGET_SELECT, ecalph_select_masks },
{ "source", E_CAL_POPUP_TARGET_SOURCE, ecalph_source_masks },
+ { "attachments", E_CAL_POPUP_TARGET_ATTACHMENTS, ecalph_attachments_masks },
{ 0 }
};