[evolution-patches] patch for creating New Assigned task from Calendar [e-plugin]
- From: pchenthill <pchenthill novell com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] patch for creating New Assigned task from Calendar [e-plugin]
- Date: Thu, 16 Dec 2004 22:52:34 +0530
Hi,
Have added a new popup menu item in the right click menu of calendar
view for creating a new assigned task. Have attached the patch for the
same.
thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1407
diff -u -p -r1.1407 ChangeLog
--- ChangeLog 14 Dec 2004 19:10:17 -0000 1.1407
+++ ChangeLog 16 Dec 2004 17:11:49 -0000
@@ -1,3 +1,8 @@
+2004-12-16 Chenthill Palanisamy <pchenthill novell com>
+
+ * configure.in : Added the plugins directories for the
+ assigned task plugin.
+
2004-12-14 JP Rosevear <jpr novell com>
Fixes #6066
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.751
diff -u -p -r1.751 configure.in
--- configure.in 14 Dec 2004 17:13:23 -0000 1.751
+++ configure.in 16 Dec 2004 17:11:50 -0000
@@ -1334,7 +1334,7 @@ AC_ARG_ENABLE(plugins, [ --enable-plugi
dnl Add any new plugins here
plugins_base="calendar-http groupwise-account-setup plugin-manager"
-plugins_all="bbdb subject-thread save-attachments prefer-plain save-calendar select-one-source copy-tool mail-to-meeting mail-to-task folder-unsubscribe mark-calendar-offline audio-inline mailing-list-actions groupwise-account-setup"
+plugins_all="bbdb subject-thread save-attachments prefer-plain save-calendar select-one-source copy-tool mail-to-meeting mail-to-task folder-unsubscribe assign-task mark-calendar-offline audio-inline mailing-list-actions groupwise-account-setup"
case x"$enable_plugins" in
xno)
@@ -1530,7 +1530,6 @@ composer/Makefile
mail/Makefile
mail/default/Makefile
mail/default/C/Makefile
-mail/default/zh_CN/Makefile
mail/importers/Makefile
plugins/Makefile
plugins/calendar-http/Makefile
@@ -1544,6 +1543,7 @@ plugins/save-attachments/Makefile
plugins/save-calendar/Makefile
plugins/select-one-source/Makefile
plugins/mark-calendar-offline/Makefile
+plugins/assign-task/Makefile
plugins/prefer-plain/Makefile
plugins/copy-tool/Makefile
plugins/folder-unsubscribe/Makefile
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2580
diff -u -p -r1.2580 ChangeLog
--- calendar/ChangeLog 13 Dec 2004 16:24:37 -0000 1.2580
+++ calendar/ChangeLog 16 Dec 2004 17:11:52 -0000
@@ -1,3 +1,15 @@
+2004-12-16 Chenthill Palanisamy <pchenthill novell com>
+
+ * gui/e-cal-popup.c: (e_cal_popup_target_new_select):
+ * gui/e-cal-popup.h: Added a new enum variable to use it as a
+ mask for assigned task plugin and mapped it to the string none.
+ * gui/e-calendar-table.h:changed the include path of
+ e-activity-handler.h
+ * gui/e-calendar-view.c: (on_new_task):
+ * gui/gnome-cal.c: (gnome_calendar_new_task):
+ * gui/gnome-cal.h: Added a boolean argument to
+ gnome_calendar_new_task to represent assigned tasks.
+
2004-12-13 Harish Krishnaswamy <kharish novell com>
* gui/dialogs/calendar-setup.c : Correct some white space
Index: calendar/gui/e-cal-popup.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.h,v
retrieving revision 1.5
diff -u -p -r1.5 e-cal-popup.h
--- calendar/gui/e-cal-popup.h 21 Oct 2004 17:07:23 -0000 1.5
+++ calendar/gui/e-cal-popup.h 16 Dec 2004 17:11:52 -0000
@@ -80,6 +80,7 @@ enum _e_cal_popup_target_select_t {
E_CAL_POPUP_SELECT_ASSIGNABLE = 1<<10,
E_CAL_POPUP_SELECT_HASURL = 1<<11,
+ E_CAL_POPUP_SELECT_NONE = 1<<12
};
/**
Index: calendar/gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.8
diff -u -p -r1.8 e-cal-popup.c
--- calendar/gui/e-cal-popup.c 21 Oct 2004 17:07:23 -0000 1.8
+++ calendar/gui/e-cal-popup.c 16 Dec 2004 17:11:52 -0000
@@ -137,6 +137,8 @@ e_cal_popup_target_new_select(ECalPopup
if (t->events->len == 0) {
client = e_cal_model_get_default_client(t->model);
+
+ mask &= ~E_CAL_POPUP_SELECT_NONE;
} else {
ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[0];
@@ -276,6 +278,7 @@ static const EPopupHookTargetMask ecalph
{ "not-meeting", E_CAL_POPUP_SELECT_NOTMEETING },
{ "assignable", E_CAL_POPUP_SELECT_ASSIGNABLE },
{ "hasurl", E_CAL_POPUP_SELECT_HASURL },
+ { "none", E_CAL_POPUP_SELECT_NONE },
{ 0 }
};
Index: calendar/gui/e-calendar-table.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.h,v
retrieving revision 1.24
diff -u -p -r1.24 e-calendar-table.h
--- calendar/gui/e-calendar-table.h 18 Oct 2004 04:08:47 -0000 1.24
+++ calendar/gui/e-calendar-table.h 16 Dec 2004 17:11:52 -0000
@@ -27,7 +27,7 @@
#include <gtk/gtktable.h>
#include <gal/e-table/e-table-scrolled.h>
#include <widgets/misc/e-cell-date-edit.h>
-#include "e-activity-handler.h"
+#include <widgets/misc/e-activity-handler.h>
#include "e-cal-model.h"
G_BEGIN_DECLS
Index: calendar/gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.71
diff -u -p -r1.71 e-calendar-view.c
--- calendar/gui/e-calendar-view.c 9 Dec 2004 12:41:49 -0000 1.71
+++ calendar/gui/e-calendar-view.c 16 Dec 2004 17:11:52 -0000
@@ -976,7 +976,7 @@ on_new_task (EPopup *ep, EPopupItem *pit
{
ECalendarView *cal_view = data;
- gnome_calendar_new_task (cal_view->priv->calendar);
+ gnome_calendar_new_task (cal_view->priv->calendar, FALSE);
}
static void
Index: calendar/gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.357
diff -u -p -r1.357 gnome-cal.c
--- calendar/gui/gnome-cal.c 2 Dec 2004 14:05:50 -0000 1.357
+++ calendar/gui/gnome-cal.c 16 Dec 2004 17:11:53 -0000
@@ -2813,7 +2813,7 @@ gnome_calendar_get_selected_time_range (
* Opens a task editor dialog for a new task.
**/
void
-gnome_calendar_new_task (GnomeCalendar *gcal)
+gnome_calendar_new_task (GnomeCalendar *gcal, gboolean assigned)
{
GnomeCalendarPrivate *priv;
ECal *ecal;
@@ -2833,8 +2833,9 @@ gnome_calendar_new_task (GnomeCalendar
if (!ecal)
return;
- tedit = task_editor_new (ecal, FALSE);
+ tedit = task_editor_new (ecal, assigned);
+
icalcomp = e_cal_model_create_component_with_defaults (model);
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomp);
@@ -2843,6 +2844,9 @@ gnome_calendar_new_task (GnomeCalendar
e_cal_component_set_categories (comp, category);
comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
+ if (assigned)
+ task_editor_show_assignment (tedit);
+
g_object_unref (comp);
comp_editor_focus (COMP_EDITOR (tedit));
Index: calendar/gui/gnome-cal.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.h,v
retrieving revision 1.102
diff -u -p -r1.102 gnome-cal.h
--- calendar/gui/gnome-cal.h 18 Oct 2004 04:08:47 -0000 1.102
+++ calendar/gui/gnome-cal.h 16 Dec 2004 17:11:53 -0000
@@ -150,7 +150,7 @@ void gnome_calendar_get_selected_time
time_t *start_time,
time_t *end_time);
-void gnome_calendar_new_task (GnomeCalendar *gcal);
+void gnome_calendar_new_task (GnomeCalendar *gcal, gboolean assigned);
/* 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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Authors: Chenthill Palanisamy (pchenthill novell com)
*
* Copyright 2004 Novell, Inc. (www.novell.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*
*/
/* This is prototype code only, this may, or may not, use undocumented
* unstable or private internal function calls.
* This code has been derived from the source of the sample eplugin
* select_one_source.
*/
#include <calendar/gui/e-calendar-view.h>
#include <e-util/e-plugin.h>
#include <calendar/gui/e-cal-popup.h>
void org_gnome_assign_task (EPlugin *ep, ECalPopupTargetSelect *select);
void
org_gnome_assign_task (EPlugin *ep, ECalPopupTargetSelect *select)
{
ECalendarView *cal_view = E_CALENDAR_VIEW (select->target.widget);
gnome_calendar_new_task (e_calendar_view_get_calendar (cal_view), TRUE);
}
INCLUDES = \
-I$(top_srcdir) \
$(EVOLUTION_CALENDAR_CFLAGS)
@EVO_PLUGIN_RULE@
plugin_DATA = org-gnome-assign-task.eplug
plugin_LTLIBRARIES = liborg-gnome-assign-task.la
liborg_gnome_assign_task_la_SOURCES = assign-task.c
liborg_gnome_assign_task_la_LDFLAGS = -module -avoid-version
EXTRA_DIST = org-gnome-assign-task.eplug.in
<e-plugin-list>
<e-plugin id="org.gnome.evolution.assign_task" type="shlib" name="assign task" description="Creates an assigned task"
location="@PLUGINDIR@/liborg-gnome-assign-task.so">
<hook class="org.gnome.evolution.calendar.popup:1.0">
<menu id="org.gnome.evolution.calendar.view.popup" target="select">
<item type="item" path="25.assign_task" label="New Assig_ned Task" icon="stock_task" visible="none" activate="org_gnome_assign_task"/>
</menu>
</hook>
</e-plugin>
</e-plugin-list>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]