aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-editor.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2004-12-02 22:05:50 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2004-12-02 22:05:50 +0800
commit300ec3f74d9f2ea59503ad267c927723ea59fd3e (patch)
tree5b6c2f78eb177f049be8a3e9fd91163e5eb6e7da /calendar/gui/dialogs/task-editor.c
parent2f70359db9a97a8e3f13d0ee9970d93a139f839e (diff)
downloadgsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.tar
gsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.tar.gz
gsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.tar.bz2
gsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.tar.lz
gsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.tar.xz
gsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.tar.zst
gsoc2013-evolution-300ec3f74d9f2ea59503ad267c927723ea59fd3e.zip
Add a boolean variable to denote assigned task and construct the meeting
2004-12-02 Chenthill Palanisamy <pchenthill@novell.com> * gui/dialogs/task-editor.[ch] (task_editor_new), (task_editor_construct), (show_assignment): Add a boolean variable to denote assigned task and construct the meeting page only for the assigned task. Set it as a group item in component editor. (_TaskEditorPrivate): added the boolean variable (is_assigned). (task_editor_init): initialized the variable. * gui/dialogs/comp-editor.[ch]: Added functions to set and get whether comp is a group item or individual item. * gui/comp-editor.c (make_title_from_string), (make_title_from_comp): Set the Title for the appointment editor window as "Meeting" or "Assigned Task" if its a group calendar/task item. (_CompEditorPrivate): added a boolean variable (is_group_item). (comp_editor_init): initialized the same. * gui/dialogs/event-editor.c (event_editor_construct), (show_meeting): Set whether the component is a group item or not in comp editor. * gui/e-calendar-table.c (e_calendar_table_open_task), (e_calendar_table_open_selected), (open_task_by_row): Check whether the component being opened is an assigned task by checking for attendees and call open_task with proper value for boolean variable assign. * gui/comp-editor-factory.c (edit_existing): * gui/e-calendar-table.c (open_task): * gui/e-tasks.c (e_tasks_new_task): * gui/gnome-cal.c (gnome_calendar_new_task): * gui/tasks-component.c (create_new_todo): Called the function task_editor_new with a added argument. svn path=/trunk/; revision=28044
Diffstat (limited to 'calendar/gui/dialogs/task-editor.c')
-rw-r--r--calendar/gui/dialogs/task-editor.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 96d0dbe40e..ffcb48c7c7 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -45,6 +45,7 @@ struct _TaskEditorPrivate {
EMeetingStore *model;
gboolean assignment_shown;
+ gboolean is_assigned;
gboolean updating;
};
@@ -115,16 +116,18 @@ task_editor_init (TaskEditor *te)
priv->model = E_MEETING_STORE (e_meeting_store_new ());
priv->assignment_shown = TRUE;
priv->updating = FALSE;
+ priv->is_assigned = FALSE;
}
TaskEditor *
-task_editor_construct (TaskEditor *te, ECal *client)
+task_editor_construct (TaskEditor *te, ECal *client, gboolean is_assigned)
{
TaskEditorPrivate *priv;
priv = te->priv;
+ priv->is_assigned = is_assigned;
priv->task_page = task_page_new ();
g_object_ref (priv->task_page);
gtk_object_sink (GTK_OBJECT (priv->task_page));
@@ -140,13 +143,15 @@ task_editor_construct (TaskEditor *te, ECal *client)
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->task_details_page),
_("Status"));
-
- priv->meet_page = meeting_page_new (priv->model, client);
- g_object_ref (priv->meet_page);
- gtk_object_sink (GTK_OBJECT (priv->meet_page));
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
+ if (priv->is_assigned) {
+ comp_editor_set_group_item (COMP_EDITOR (te), TRUE);
+ priv->meet_page = meeting_page_new (priv->model, client);
+ g_object_ref (priv->meet_page);
+ gtk_object_sink (GTK_OBJECT (priv->meet_page));
+ comp_editor_append_page (COMP_EDITOR (te),
+ COMP_EDITOR_PAGE (priv->meet_page),
+ _("Assignment"));
+ }
comp_editor_set_e_cal (COMP_EDITOR (te), client);
@@ -245,7 +250,9 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
if (ia != NULL)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
}
-
+
+
+ comp_editor_set_group_item (COMP_EDITOR (te), TRUE);
priv->assignment_shown = TRUE;
}
e_cal_component_free_attendee_list (attendees);
@@ -324,12 +331,12 @@ task_editor_finalize (GObject *object)
* editor could not be created.
**/
TaskEditor *
-task_editor_new (ECal *client)
+task_editor_new (ECal *client, gboolean is_assigned)
{
TaskEditor *te;
te = g_object_new (TYPE_TASK_EDITOR, NULL);
- return task_editor_construct (te, client);
+ return task_editor_construct (te, client, is_assigned);
}
static void
@@ -349,8 +356,6 @@ show_assignment (TaskEditor *te)
comp_editor_set_changed (COMP_EDITOR (te), TRUE);
}
- comp_editor_show_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page));
}
void