aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-editor.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-07-03 03:21:49 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-07-03 03:21:49 +0800
commitb4e780fd75795ff4218a369075a3feb9bc2fb3ce (patch)
treec901d6cc187458ea015185219ab962e070cbcbb5 /calendar/gui/dialogs/task-editor.c
parente28ff48d57c7535b099fe9d4d7544c6b4ec360ec (diff)
downloadgsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.tar
gsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.tar.gz
gsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.tar.bz2
gsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.tar.lz
gsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.tar.xz
gsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.tar.zst
gsoc2013-evolution-b4e780fd75795ff4218a369075a3feb9bc2fb3ce.zip
implement
2001-07-02 JP Rosevear <jpr@ximian.com> * gui/e-itip-control.c (send_freebusy): implement * cal-util/cal-component.c (set_attendee_list): add the delto property rather than the delfrom property twice * gui/dialogs/task-editor.c (task_editor_edit_comp): show delegation info if appropriate (delegate_task_cmd): delegate command (cancel_task_cmd): cancel command (refresh_task_cmd): refresh command * gui/dialogs/task-details-page.c: Load new widgets (task_details_page_show_delegation): show/hide delegation info widgets * gui/dialogs/task-details-page.h: new proto * gui/dialogs/event-editor.c (event_editor_edit_comp): free attendee list when finished * gui/dialogs/comp-editor.c (setup_widgets): explicitly show the widgets, update pixmaps after the verbs have been added (comp_editor_focus): don't do a show all svn path=/trunk/; revision=10697
Diffstat (limited to 'calendar/gui/dialogs/task-editor.c')
-rw-r--r--calendar/gui/dialogs/task-editor.c77
1 files changed, 72 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 165d871680..6b582315f4 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -1,6 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Event editor dialog
+/* Evolution calendar - Task editor dialog
*
* Copyright (C) 2000 Ximian, Inc.
* Copyright (C) 2001 Ximian, Inc.
@@ -8,6 +7,7 @@
* Authors: Miguel de Icaza <miguel@ximian.com>
* Federico Mena-Quintero <federico@ximian.com>
* Seth Alves <alves@hungry.com>
+ * JP Rosevear <jpr@ximian.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@
#include "task-page.h"
#include "task-details-page.h"
#include "recurrence-page.h"
+#include "cancel-comp.h"
#include "task-editor.h"
struct _TaskEditorPrivate {
@@ -44,17 +45,24 @@ struct _TaskEditorPrivate {
static void task_editor_class_init (TaskEditorClass *class);
static void task_editor_init (TaskEditor *te);
+static void task_editor_edit_comp (CompEditor *editor, CalComponent *comp);
static void task_editor_destroy (GtkObject *object);
+static void delegate_task_cmd (GtkWidget *widget, gpointer data);
+static void refresh_task_cmd (GtkWidget *widget, gpointer data);
+static void cancel_task_cmd (GtkWidget *widget, gpointer data);
static void forward_cmd (GtkWidget *widget, gpointer data);
static BonoboUIVerb verbs [] = {
+ BONOBO_UI_UNSAFE_VERB ("ActionDelegateTask", delegate_task_cmd),
+ BONOBO_UI_UNSAFE_VERB ("ActionRefreshTask", refresh_task_cmd),
+ BONOBO_UI_UNSAFE_VERB ("ActionCancelTask", cancel_task_cmd),
BONOBO_UI_UNSAFE_VERB ("ActionForward", forward_cmd),
BONOBO_UI_VERB_END
};
-static CompEditor *parent_class;
+static CompEditorClass *parent_class;
@@ -92,14 +100,18 @@ task_editor_get_type (void)
/* Class initialization function for the event editor */
static void
-task_editor_class_init (TaskEditorClass *class)
+task_editor_class_init (TaskEditorClass *klass)
{
GtkObjectClass *object_class;
+ CompEditorClass *editor_class;
- object_class = (GtkObjectClass *) class;
+ object_class = (GtkObjectClass *) klass;
+ editor_class = (CompEditorClass *) klass;
parent_class = gtk_type_class (TYPE_COMP_EDITOR);
+ editor_class->edit_comp = task_editor_edit_comp;
+
object_class->destroy = task_editor_destroy;
}
@@ -127,6 +139,27 @@ task_editor_init (TaskEditor *te)
verbs);
}
+static void
+task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
+{
+ TaskEditor *te;
+ TaskEditorPrivate *priv;
+ GSList *attendees = NULL;
+
+ te = TASK_EDITOR (editor);
+ priv = te->priv;
+
+ cal_component_get_attendee_list (comp, &attendees);
+ if (attendees == NULL)
+ task_details_page_show_delegation (priv->task_details_page, FALSE);
+ else
+ task_details_page_show_delegation (priv->task_details_page, TRUE);
+ cal_component_free_attendee_list (attendees);
+
+ if (parent_class->edit_comp)
+ parent_class->edit_comp (editor, comp);
+}
+
/* Destroy handler for the event editor */
static void
task_editor_destroy (GtkObject *object)
@@ -159,6 +192,40 @@ task_editor_new (void)
}
static void
+delegate_task_cmd (GtkWidget *widget, gpointer data)
+{
+ TaskEditor *te = TASK_EDITOR (data);
+ TaskEditorPrivate *priv;
+
+ priv = te->priv;
+
+ task_details_page_show_delegation (priv->task_details_page, TRUE);
+ comp_editor_show_page (COMP_EDITOR (te),
+ COMP_EDITOR_PAGE (priv->task_details_page));
+}
+
+static void
+refresh_task_cmd (GtkWidget *widget, gpointer data)
+{
+ TaskEditor *te = TASK_EDITOR (data);
+
+ comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_REFRESH);
+}
+
+static void
+cancel_task_cmd (GtkWidget *widget, gpointer data)
+{
+ TaskEditor *te = TASK_EDITOR (data);
+ CalComponent *comp;
+
+ comp = comp_editor_get_current_comp (COMP_EDITOR (te));
+ if (cancel_component_dialog (comp)) {
+ comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_CANCEL);
+ comp_editor_delete_comp (COMP_EDITOR (te));
+ }
+}
+
+static void
forward_cmd (GtkWidget *widget, gpointer data)
{
TaskEditor *te = TASK_EDITOR (data);