aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-08-18 12:01:50 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-08-18 12:01:50 +0800
commitfd232f60704b5bf9ff068d39c25318bb21c301df (patch)
tree7eb859d6b65193427a50bbd5e9835b32905eafe2
parent76b456caa4f398c59c7d8af5765ebb652937ce8a (diff)
downloadgsoc2013-evolution-fd232f60704b5bf9ff068d39c25318bb21c301df.tar.gz
gsoc2013-evolution-fd232f60704b5bf9ff068d39c25318bb21c301df.tar.zst
gsoc2013-evolution-fd232f60704b5bf9ff068d39c25318bb21c301df.zip
new function to open the task editor to add a new task.
2001-08-17 Damon Chaplin <damon@ximian.com> * gui/gnome-cal.c (gnome_calendar_new_task): new function to open the task editor to add a new task. * gui/calendar-commands.c: added new_task_cb() to create a new task in the calendar folder, and added menu commands for it, and a toolbar button (I think that is what Ettore wanted. Maybe he just meant menu commands. Anyway, it is easy to take out.) Note that we don't have a decent icon for 'New Task' for the toolbar. Also added the new Goto button (but we don't have a similar one for the menu command). svn path=/trunk/; revision=12195
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/calendar-commands.c17
-rw-r--r--calendar/gui/gnome-cal.c34
-rw-r--r--calendar/gui/gnome-cal.h2
4 files changed, 66 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 017a1cea13..5153925678 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,16 @@
+2001-08-17 Damon Chaplin <damon@ximian.com>
+
+ * gui/gnome-cal.c (gnome_calendar_new_task): new function to open the
+ task editor to add a new task.
+
+ * gui/calendar-commands.c: added new_task_cb() to create a new task
+ in the calendar folder, and added menu commands for it, and a toolbar
+ button (I think that is what Ettore wanted. Maybe he just meant menu
+ commands. Anyway, it is easy to take out.) Note that we don't have a
+ decent icon for 'New Task' for the toolbar.
+ Also added the new Goto button (but we don't have a similar one for
+ the menu command).
+
2001-08-16 Iain Holmes <iain@ximian.com>
* gui/Makefile.am: Add the libetimezonedialog.a lib link
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index b9e1ec7bb4..7c10f906e2 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -84,6 +84,15 @@ new_event_cb (BonoboUIComponent *uic, gpointer data, const char *path)
gnome_calendar_new_appointment_for (gcal, dtstart, dtend, TRUE);
}
+static void
+new_task_cb (BonoboUIComponent *uic, gpointer data, const char *path)
+{
+ GnomeCalendar *gcal;
+
+ gcal = GNOME_CALENDAR (data);
+ gnome_calendar_new_task (gcal);
+}
+
/* Prints the calendar at its current view and time range */
static void
print (GnomeCalendar *gcal, gboolean preview)
@@ -474,8 +483,11 @@ control_util_set_folder_bar_label (BonoboControl *control, char *label)
static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb),
+
BONOBO_UI_VERB ("CalendarNewAppointment", new_appointment_cb),
BONOBO_UI_VERB ("CalendarNewEvent", new_event_cb),
+ BONOBO_UI_VERB ("CalendarNewTask", new_task_cb),
+
BONOBO_UI_VERB ("CalendarSettings", settings_cmd),
BONOBO_UI_VERB ("CutEvent", cut_event_cmd),
@@ -500,15 +512,20 @@ static BonoboUIVerb verbs [] = {
static EPixmap pixmaps [] =
{
E_PIXMAP ("/menu/File/New/NewFirstItem/NewAppointment", "new_appointment.xpm"),
+ E_PIXMAP ("/menu/File/New/NewFirstItem/NewTask", "task.xpm"),
E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
E_PIXMAP ("/menu/File/Print/PrintPreview", "print-preview.xpm"),
E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewAppointment", "new_appointment.xpm"),
+ E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewEvent", "new_appointment.xpm"),
+ E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewTask", "task.xpm"),
E_PIXMAP ("/menu/ComponentToolsPlaceholder/Tools/CalendarSettings", "configure_16_calendar.xpm"),
E_PIXMAP ("/Toolbar/New", "buttons/new_appointment.png"),
+ E_PIXMAP ("/Toolbar/NewTask", "task.xpm"),
E_PIXMAP ("/Toolbar/Print", "buttons/print.png"),
E_PIXMAP ("/Toolbar/Prev", "buttons/arrow-left-24.png"),
E_PIXMAP ("/Toolbar/Next", "buttons/arrow-right-24.png"),
+ E_PIXMAP ("/Toolbar/Goto", "buttons/goto-24.png"),
E_PIXMAP ("/Toolbar/DayView", "buttons/dayview.xpm"),
E_PIXMAP ("/Toolbar/WorkWeekView", "buttons/workweekview.xpm"),
E_PIXMAP ("/Toolbar/WeekView", "buttons/weekview.xpm"),
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index e26150a86f..6d0e7cbb53 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -41,6 +41,7 @@
#include <cal-util/timeutil.h>
#include "widgets/menus/gal-view-menus.h"
#include "dialogs/event-editor.h"
+#include "dialogs/task-editor.h"
#include "e-calendar-table.h"
#include "e-day-view.h"
#include "e-week-view.h"
@@ -1958,6 +1959,39 @@ gnome_calendar_new_appointment (GnomeCalendar *gcal)
gnome_calendar_new_appointment_for (gcal, dtstart, dtend, FALSE);
}
+/**
+ * gnome_calendar_new_task:
+ * @gcal: An Evolution calendar.
+ *
+ * Opens a task editor dialog for a new task.
+ **/
+void
+gnome_calendar_new_task (GnomeCalendar *gcal)
+{
+ GnomeCalendarPrivate *priv;
+ TaskEditor *tedit;
+ CalComponent *comp;
+
+ g_print ("In gnome_calendar_new_task\n");
+
+ g_return_if_fail (gcal != NULL);
+ g_return_if_fail (GNOME_IS_CALENDAR (gcal));
+
+ priv = gcal->priv;
+
+ tedit = task_editor_new ();
+ comp_editor_set_cal_client (COMP_EDITOR (tedit), priv->task_pad_client);
+
+ comp = cal_component_new ();
+ cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
+
+ comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
+ gtk_object_unref (GTK_OBJECT (comp));
+
+ comp_editor_focus (COMP_EDITOR (tedit));
+}
+
+
/* Returns the selected time range for the current view. Note that this may be
different from the fields in the GnomeCalendar, since the view may clip
this or choose a more appropriate time. */
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 443a0f38da..4bb232680c 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -114,6 +114,8 @@ void gnome_calendar_new_appointment_for (GnomeCalendar *cal,
time_t dtstart, time_t dtend,
gboolean all_day);
+void gnome_calendar_new_task (GnomeCalendar *gcal);
+
/* Returns the selected time range for the current view. Note that this may be
different from the fields in the GnomeCalendar, since the view may clip
this or choose a more appropriate time. */
aniel van Eeden.Vincent van Adrighem2004-03-102-295/+291 * Update Czech translationMiloslav Trmac2004-03-102-206/+274 * Updated Catalan translation by the Catalan Evolution Team.Jordi Mallach2004-03-102-1765/+5580 * Updated Serbian translation.Danilo Šegan2004-03-093-491/+600 * Translation updated by Daniel van Eeden.Vincent van Adrighem2004-03-082-128/+142 * Translation updated.Priit Laes2004-03-062-13340/+1707 * bump version, requirementsJP Rosevear2004-03-0648-62641/+67838 * Update Czech translationMiloslav Trmac2004-03-062-68/+80 * Updated Korean translation.Changwoo Ryu2004-03-062-741/+805 * Update Czech translationMiloslav Trmac2004-03-042-433/+466 * Update Czech translationMiloslav Trmac2004-03-032-86/+94 * Updated the Greek translationKostas Papadimas2004-03-032-860/+883 * Translation updated by Daniel van Eeden.Vincent van Adrighem2004-03-022-63/+63 * Updated Serbian translation.Danilo Šegan2004-03-023-298/+420 * Update Czech translationMiloslav Trmac2004-03-012-221/+241 * Updated Spansih translation.Francisco Javier F. Serrador2004-03-012-395/+426 * Translation updated by Daniel van Eeden.Vincent van Adrighem2004-02-292-750/+753 * update Russian translationLeonid Kanter2004-02-272-790/+447 * Translation updated.Priit Laes2004-02-272-3795/+5012 * Updated Serbian translation -- hey, this Korean guy is a day ahead of me.Danilo Šegan2004-02-273-652/+622 * Updated Korean translation.Changwoo Ryu2004-02-262-322/+363 * Translation updated by Kees van den Broek.Vincent van Adrighem2004-02-262-14/+30 * Update Czech translationMiloslav Trmac2004-02-262-188/+195 * Updated Catalan translation by the Catalan Evolution team.Jordi Mallach2004-02-252-686/+808 * Updated Irish translationAlastair McKinstry2004-02-252-750/+748 * Add mail/em-format-quote.cRodney Dawes2004-02-252-0/+5 * remove dead fileJP Rosevear2004-02-242-1/+4 * Added "en_CA" to ALL_LINGUAS. Added Canadian English translation.Adam Weinberger2004-02-232-0/+18225 * Updated Spanish translation.Francisco Javier F. Serrador2004-02-232-1211/+1251 * Updated finnish translationIlkka Tuohela2004-02-232-1019/+1155 * Updated Serbian translation.Danilo Šegan2004-02-223-2219/+2322 * Update Czech translationMiloslav Trmac2004-02-212-47/+71 * Update Czech translationMiloslav Trmac2004-02-202-194/+212 * Added missing files to POTFILES.in.Danilo Šegan2004-02-202-0/+6 * Updated French translation.Christophe Merlet2004-02-192-308/+349 * Updated Korean translation.Changwoo Ryu2004-02-192-975/+1084 * Update Czech translationMiloslav Trmac2004-02-182-73/+100 * Update Czech translationMiloslav Trmac2004-02-182-113/+119 * Translation updated by Daniel van Eeden.Vincent van Adrighem2004-02-172-1292/+1322 * Translation updated by Daniel van Eeden.Vincent van Adrighem2004-02-162-657/+641 * Update Czech translationMiloslav Trmac2004-02-162-792/+879 * Updated the Greek translationKostas Papadimas2004-02-142-773/+760 * Updated French translation.Christophe Merlet2004-02-142-11864/+657 * Updated Catalan translation by the Catalan Evolution team.Jordi Mallach2004-02-132-2572/+2441 * Remove dead files and add new onesRodney Dawes2004-02-132-5/+8 * svn path=/trunk/; revision=24699Fixed another date-formatted. T.Aihana2004-02-111-10/+10 * svn path=/trunk/; revision=24698Fixed date-formatted again. T.Aihana2004-02-111-6/+6 * svn path=/trunk/; revision=24697Fixed date-formatted in ja.po. T.Aihana2004-02-111-5/+5 * svn path=/trunk/; revision=24696Updated ja.po. T.Aihana2004-02-112-401/+129 * remove files that were killedJP Rosevear2004-02-112-4/+4 * Updated Norwegian translation.Kjartan Maraas2004-02-112-176/+51 * bump version, libtool numbersJP Rosevear2004-02-1047-66321/+71595 * Updated Korean translation.Changwoo Ryu2004-02-082-935/+1046 * Updated Finnish translationIlkka Tuohela2004-02-082-1617/+1614 * Update Czech translationMiloslav Trmac2004-02-082-411/+409 * Update Czech translationMiloslav Trmac2004-02-072-248/+251 * Translation updated by Daniel van Eeden.Vincent van Adrighem2004-02-072-1164/+1209 * Remove e-shell-view-menu.cRodney Dawes2004-02-052-1/+4 * Updated finnish translation (now 100%)Ilkka Tuohela2004-02-052-1883/+1266 * Update Czech translationMiloslav Trmac2004-02-052-183/+238 * Updated with recent additions/movesRodney Dawes2004-02-042-1/+7 * Update Czech translationMiloslav Trmac2004-02-042-125/+146 * Updated finnish translationIlkka Tuohela2004-02-032-7739/+3814 * Update Czech translationMiloslav Trmac2004-02-032-299/+273 * Updated Catalan translation by the Catalan Evolution team.Jordi Mallach2004-02-022-19273/+13036 * Updated Irish translationAlastair McKinstry2004-02-022-96/+67 * *** empty log message ***Denis Lackovic2004-02-022-1916/+1368 * Updated Polish translation.Artur Flinta2004-02-012-188/+122 * Updated Korean translation.Changwoo Ryu2004-01-312-570/+619 * Updated Norwegian translation.Kjartan Maraas2004-01-312-402/+386 * Removed e-meeting-model.cRodney Dawes2004-01-312-1/+4 * Updated Spanish translation.Francisco Javier F. Serrador2004-01-312-226/+283 * Translation updated by Mətin Əmirov.Mətin Əmirovf2004-01-302-10293/+740 * Update Czech translaitonMiloslav Trmac2004-01-30