diff options
author | Not Zed <NotZed@Ximian.com> | 2004-10-18 12:08:47 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-18 12:08:47 +0800 |
commit | 48988a8a72a5869621e628a03011879508a8432b (patch) | |
tree | adbf33e097109cf2a008d6892dd4859dcda196e9 /calendar/gui/gnome-cal.c | |
parent | 835302d0021f020cb9776a417b3e5e49a676e4c2 (diff) | |
download | gsoc2013-evolution-48988a8a72a5869621e628a03011879508a8432b.tar.gz gsoc2013-evolution-48988a8a72a5869621e628a03011879508a8432b.tar.zst gsoc2013-evolution-48988a8a72a5869621e628a03011879508a8432b.zip |
dont access a NULL client.
2004-10-14 Not Zed <NotZed@Ximian.com>
* gui/e-cal-menu.c (e_cal_menu_target_new_select): dont access a
NULL client.
* gui/gnome-cal.c (gnome_calendar_get_taskpad_menu)
(gnome_calendar_get_calendar_menu): accessors to get the menu
managers.
(gnome_calendar_init): setup menu managers.
2004-10-13 Not Zed <NotZed@Ximian.com>
* gui/calendar-commands.c (calendar_control_activate)
(calendar_control_deactivate): activate and deactivate the
calendar and taskpad menu handlers.
(sensitize_items): helper to sensitise items based on target
masks.
(calendar_control_sensitize_calendar_commands): update the
calendar menu manager target appropriately.
(sensitize_taskpad_commands): same for the taskpad.
* gui/e-cal-menu.[ch]: Targets for main menu management.
* gui/e-cal-popup.c (e_cal_popup_target_new_select): fix cast.
Also include the tasks stuff in the hook metadata.
svn path=/trunk/; revision=27607
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index dcabbf9181..79cdda1ca3 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -79,6 +79,7 @@ #include "ea-calendar.h" #include "common/authentication.h" #include "e-cal-popup.h" +#include "e-cal-menu.h" /* FIXME glib 2.4 and above has this */ #ifndef G_MAXINT32 @@ -127,7 +128,11 @@ struct _GnomeCalendarPrivate { /* Activity */ EActivityHandler *activity_handler; - + + /* plugin menu managers */ + ECalMenu *calendar_menu; + ECalMenu *taskpad_menu; + /* Calendar query for the date navigator */ GList *dn_queries; /* list of CalQueries */ char *sexp; @@ -1361,6 +1366,9 @@ gnome_calendar_init (GnomeCalendar *gcal) setup_config (gcal); setup_widgets (gcal); + priv->calendar_menu = e_cal_menu_new("com.novell.evolution.calendar.view"); + priv->taskpad_menu = e_cal_menu_new("com.novell.evolution.calendar.taskpad"); + priv->dn_queries = NULL; priv->sexp = g_strdup ("#t"); /* Match all */ priv->todo_sexp = g_strdup ("#t"); @@ -1486,6 +1494,16 @@ gnome_calendar_destroy (GtkObject *object) priv->view_menus = NULL; } + if (priv->calendar_menu) { + g_object_unref (priv->calendar_menu); + priv->calendar_menu = NULL; + } + + if (priv->taskpad_menu) { + g_object_unref (priv->taskpad_menu); + priv->taskpad_menu = NULL; + } + g_free (priv); gcal->priv = NULL; } @@ -3332,3 +3350,17 @@ gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal) return GTK_WIDGET(gcal->priv->notebook); } + +ECalMenu *gnome_calendar_get_taskpad_menu (GnomeCalendar *gcal) +{ + g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL); + + return gcal->priv->taskpad_menu; +} + +ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal) +{ + g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL); + + return gcal->priv->calendar_menu; +} |