diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-06-05 14:27:23 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-06-05 14:27:23 +0800 |
commit | 64f2944a027279c9554c229319b38a6c07ac96e4 (patch) | |
tree | cfd17e709fcdc565170cb26c6a13f93a021378b5 /calendar | |
parent | 7a44506f3da3cd543825a35850026c4bdf38ec55 (diff) | |
download | gsoc2013-evolution-64f2944a027279c9554c229319b38a6c07ac96e4.tar.gz gsoc2013-evolution-64f2944a027279c9554c229319b38a6c07ac96e4.tar.zst gsoc2013-evolution-64f2944a027279c9554c229319b38a6c07ac96e4.zip |
Fixed bug 268884
svn path=/trunk/; revision=32077
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 20 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 1 |
3 files changed, 27 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 954804cb90..c83af061d5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2006-06-05 Srinivasa Ragavan <sragavan@novell.com> + + ** Fixed bug #268884 + + * gui/e-calendar-table.c: (on_new_task): Added a new popup entry. + * gui/e-tasks.c: (setup_widgets): Added a reference to table + 2006-06-01 Harish Krishnaswamy <kharish@novell.com> * gui/dialogs/Makefile.am, gui/dialogs/event-editor.c, diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 955ee0fb58..1da490ebb5 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -58,6 +58,7 @@ #include "print.h" #include <e-util/e-icon-factory.h> #include "e-cal-popup.h" +#include "e-tasks.h" #include "misc.h" extern ECompEditorRegistry *comp_editor_registry; @@ -1228,6 +1229,20 @@ open_url_cb (EPopup *ep, EPopupItem *pitem, void *data) gnome_url_show (icalproperty_get_url (prop), NULL); } +/* Opens a new task editor */ +static void +on_new_task (EPopup *ep, EPopupItem *pitem, void *data) +{ + ECalendarTable *cal_table = data; + ETasks *tasks = g_object_get_data (cal_table, "tasks"); + + if (!tasks) + return; + + e_tasks_new_task (tasks); + +} + /* Callback for the "delete tasks" menu item */ static void delete_cb (EPopup *ep, EPopupItem *pitem, void *data) @@ -1238,7 +1253,10 @@ delete_cb (EPopup *ep, EPopupItem *pitem, void *data) } static EPopupItem tasks_popup_items [] = { - { E_POPUP_ITEM, "00.open", N_("_Open"), e_calendar_table_on_open_task, NULL, GTK_STOCK_OPEN, E_CAL_POPUP_SELECT_ONE }, + { E_POPUP_ITEM, "00.newtask", N_("New _Task"), on_new_task, NULL, "stock_task", 0, 0}, + { E_POPUP_BAR, "01.bar" }, + + { E_POPUP_ITEM, "03.open", N_("_Open"), e_calendar_table_on_open_task, NULL, GTK_STOCK_OPEN, E_CAL_POPUP_SELECT_ONE }, { E_POPUP_ITEM, "05.openweb", N_("Open _Web Page"), open_url_cb, NULL, NULL, E_CAL_POPUP_SELECT_ONE, E_CAL_POPUP_SELECT_HASURL }, { E_POPUP_ITEM, "10.saveas", N_("_Save As..."), e_calendar_table_on_save_as, NULL, GTK_STOCK_SAVE_AS, E_CAL_POPUP_SELECT_ONE }, { E_POPUP_ITEM, "20.print", N_("_Print..."), e_calendar_table_on_print_task, NULL, GTK_STOCK_PRINT, E_CAL_POPUP_SELECT_ONE }, diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 77056b7860..5d9a7d6bf6 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -559,6 +559,7 @@ setup_widgets (ETasks *tasks) /* create the task list */ priv->tasks_view = e_calendar_table_new (); + g_object_set_data (priv->tasks_view, "tasks", tasks); priv->tasks_view_config = e_calendar_table_config_new (E_CALENDAR_TABLE (priv->tasks_view)); g_signal_connect (priv->tasks_view, "user_created", G_CALLBACK (user_created_cb), tasks); |