aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-commands.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-07-03 11:48:53 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-07-03 11:48:53 +0800
commitd1d0712ae20f07a59d7c2270ae5b7c5e3f37969a (patch)
tree2dd037774e2a3c348ae9f346d7a6e2b06fb93f0e /calendar/gui/calendar-commands.c
parente981cabe35d8fde0254eb32ea9091b0dd62db830 (diff)
downloadgsoc2013-evolution-d1d0712ae20f07a59d7c2270ae5b7c5e3f37969a.tar.gz
gsoc2013-evolution-d1d0712ae20f07a59d7c2270ae5b7c5e3f37969a.tar.zst
gsoc2013-evolution-d1d0712ae20f07a59d7c2270ae5b7c5e3f37969a.zip
publish free/busy information for the currently viewed time range
2001-07-02 JP Rosevear <jpr@ximian.com> * gui/calendar-commands.c (publish_freebusy_cmd): publish free/busy information for the currently viewed time range svn path=/trunk/; revision=10723
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r--calendar/gui/calendar-commands.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 44036d727b..055fdf211b 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -53,6 +53,7 @@
#include "goto.h"
#include "print.h"
#include "dialogs/cal-prefs-dialog.h"
+#include "itip-utils.h"
#include "evolution-shell-component-utils.h"
/* A list of all of the calendars started */
@@ -259,6 +260,7 @@ show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path
}
+
static void
new_calendar_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
{
@@ -400,6 +402,24 @@ paste_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
set_normal_cursor (gcal);
}
+static void
+publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
+{
+ GnomeCalendar *gcal;
+ CalClient *client;
+ CalClientGetStatus status;
+ CalComponent *comp;
+ time_t start, end;
+
+ gcal = GNOME_CALENDAR (data);
+ gnome_calendar_get_current_time_range (gcal, &start, &end);
+
+ client = gnome_calendar_get_cal_client (gcal);
+ status = cal_client_get_free_busy (client, start, end, &comp);
+ if (status == CAL_CLIENT_GET_SUCCESS)
+ itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp);
+}
+
static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("CalendarNew", new_calendar_cmd),
@@ -415,6 +435,8 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("CopyEvent", copy_event_cmd),
BONOBO_UI_VERB ("PasteEvent", paste_event_cmd),
+ BONOBO_UI_VERB ("PublishFreeBusy", publish_freebusy_cmd),
+
BONOBO_UI_VERB ("CalendarPrev", previous_clicked),
BONOBO_UI_VERB ("CalendarToday", today_clicked),
BONOBO_UI_VERB ("CalendarNext", next_clicked),