aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog1
-rw-r--r--calendar/gui/calendar-component.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 75873a6d39..9ba69e517f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -5,6 +5,7 @@
(fill_popup_menu_callback): add popup menu items here.
(add_popup_menu_item): new function to add items to the
popup menu.
+ (new_calendar_cb): callbacks for the popup menu items.
2003-10-28 Rodrigo Moya <rodrigo@ximian.com>
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 82332073ad..a64d0bc339 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -30,6 +30,7 @@
#include "calendar-commands.h"
#include "gnome-cal.h"
#include "migration.h"
+#include "dialogs/new-calendar.h"
#include "widgets/misc/e-source-selector.h"
@@ -146,9 +147,15 @@ add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
}
static void
+new_calendar_cb (GtkWidget *widget, ESourceSelector *selector)
+{
+ new_calendar_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)));
+}
+
+static void
fill_popup_menu_callback (ESourceSelector *selector, GtkMenu *menu, CalendarComponent *comp)
{
- add_popup_menu_item (menu, _("_New Calendar"), NULL, NULL, selector);
+ add_popup_menu_item (menu, _("_New Calendar"), NULL, G_CALLBACK (new_calendar_cb), selector);
}
static void