aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gncal-todo.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-07-26 03:49:15 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-07-26 03:49:15 +0800
commitcd27c67fbc2f2a363579ce612c5937a4b12d1e49 (patch)
tree8e8d54ce72794dcc736ab075013264dc3d154217 /calendar/gui/gncal-todo.c
parent516b594aa9e8abf1643905e7eb48e21f8684c1aa (diff)
downloadgsoc2013-evolution-cd27c67fbc2f2a363579ce612c5937a4b12d1e49.tar.gz
gsoc2013-evolution-cd27c67fbc2f2a363579ce612c5937a4b12d1e49.tar.zst
gsoc2013-evolution-cd27c67fbc2f2a363579ce612c5937a4b12d1e49.zip
new ECalendarTable to show an ETable view for Todo/Event items.
2000-07-25 Damon Chaplin <damon@helixcode.com> * gui/e-calendar-table.[hc]: new ECalendarTable to show an ETable view for Todo/Event items. * gui/task-assigned-to.xpm: * gui/task-recurring.xpm: * gui/task-assigned.xpm: * gui/task.xpm: new pixmaps (all the same at present) to go in the icon column of the ETable. * gui/event-editor.c: hid the silly 'Calendar' labels on the GnomeDateEdits and hid the times when you select 'All day event'. Also adjusted the time_t's so that when an all day event finishes on say midnight 13th May, we show 12th May in the dialog, since it implicitly includes all of that day up to midnight. * gui/dialogs/task-editor-dialog.glade: * gui/dialogs/task-editor.[hc]: unfinished dialog to edit tasks. * gui/gncal-todo.c: temporary hack so that we can use the simple dialog with our new ETable. svn path=/trunk/; revision=4323
Diffstat (limited to 'calendar/gui/gncal-todo.c')
-rw-r--r--calendar/gui/gncal-todo.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c
index 7ef0689cc1..6d1ead3118 100644
--- a/calendar/gui/gncal-todo.c
+++ b/calendar/gui/gncal-todo.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <string.h>
#include <gnome.h>
+#include <cal-client/cal-client.h>
#include "event-editor.h"
#include "gncal-todo.h"
#include "calendar-commands.h"
@@ -59,7 +60,7 @@ static void
ok_button (GtkWidget *widget, GnomeDialog *dialog)
{
iCalObject *ico;
- GncalTodo *todo;
+ CalClient *cal_client;
GtkEntry *entry;
GnomeDateEdit *due_date;
GtkText *comment;
@@ -67,7 +68,7 @@ ok_button (GtkWidget *widget, GnomeDialog *dialog)
ico = gtk_object_get_user_data (GTK_OBJECT (dialog));
- todo = GNCAL_TODO (gtk_object_get_data (GTK_OBJECT (dialog), "gncal_todo"));
+ cal_client = (CalClient*) (gtk_object_get_data (GTK_OBJECT (dialog), "cal_client"));
entry = GTK_ENTRY (gtk_object_get_data (GTK_OBJECT (dialog), "summary_entry"));
due_date = GNOME_DATE_EDIT (gtk_object_get_data(GTK_OBJECT(dialog), "due_date"));
priority = GTK_SPIN_BUTTON (gtk_object_get_data(GTK_OBJECT(dialog), "priority"));
@@ -82,7 +83,7 @@ ok_button (GtkWidget *widget, GnomeDialog *dialog)
ico->comment = gtk_editable_get_chars( GTK_EDITABLE(comment), 0, -1);
ico->user_data = NULL;
- if (!cal_client_update_object (todo->calendar->client, ico))
+ if (!cal_client_update_object (cal_client, ico))
g_message ("ok_button(): Could not update the object!");
ical_object_unref (ico);
@@ -113,8 +114,10 @@ delete_event (GtkWidget *widget, GdkEvent *event, GnomeDialog *dialog)
return TRUE;
}
-static void
-simple_todo_editor (GncalTodo *todo, iCalObject *ico)
+/* I've hacked this so we can use it separate from the rest of GncalTodo.
+ This whole file will go once we've got the new editor working. */
+void
+gncal_todo_edit (CalClient *client, iCalObject *ico)
{
GtkWidget *dialog;
GtkWidget *hbox;
@@ -138,8 +141,10 @@ simple_todo_editor (GncalTodo *todo, iCalObject *ico)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL,
NULL);
+#if 0
gnome_dialog_set_parent (GNOME_DIALOG (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (todo->calendar))));
+#endif
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_border_width (GTK_CONTAINER (hbox), 4);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
@@ -228,7 +233,7 @@ simple_todo_editor (GncalTodo *todo, iCalObject *ico)
gtk_object_set_user_data (GTK_OBJECT (dialog), ico);
ical_object_ref (ico);
- gtk_object_set_data (GTK_OBJECT (dialog), "gncal_todo", todo);
+ gtk_object_set_data (GTK_OBJECT (dialog), "cal_client", client);
gtk_object_set_data (GTK_OBJECT (dialog), "summary_entry", entry);
gtk_object_set_data (GTK_OBJECT (dialog), "due_date", due_entry);
gtk_object_set_data (GTK_OBJECT (dialog), "priority", pri_spin);
@@ -271,14 +276,18 @@ add_todo (GncalTodo *todo)
ico->type = ICAL_TODO;
ico->new = TRUE;
- simple_todo_editor (todo, ico);
+#if 0
+ gncal_todo_edit (todo, ico);
+#endif
ical_object_unref (ico);
}
static void
edit_todo (GncalTodo *todo)
{
- simple_todo_editor (todo, get_clist_selected_ico (todo->clist));
+#if 0
+ gncal_todo_edit (todo, get_clist_selected_ico (todo->clist));
+#endif
}
static void