diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-10-29 02:45:49 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-10-29 02:45:49 +0800 |
commit | 6f42e1922604ce384de19f6fe71dc73b184892e1 (patch) | |
tree | 797fd004dc5eaa2dffeae3be8002f0b34c964c35 /calendar | |
parent | c6fb640109eadb091cb867ad6930811ce9c501e6 (diff) | |
download | gsoc2013-evolution-6f42e1922604ce384de19f6fe71dc73b184892e1.tar.gz gsoc2013-evolution-6f42e1922604ce384de19f6fe71dc73b184892e1.tar.zst gsoc2013-evolution-6f42e1922604ce384de19f6fe71dc73b184892e1.zip |
connect to "fill_popup_menu" on the ESourceSelector.
2003-10-28 Rodrigo Moya <rodrigo@ximian.com>
* gui/calendar-component.c (impl_createControls): connect to
"fill_popup_menu" on the ESourceSelector.
(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.
svn path=/trunk/; revision=23108
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 1 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 9 |
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 |