aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-tasks.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-10-14 23:53:29 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-10-14 23:53:29 +0800
commitdce3735025a16ac72151b751a061120fe4209648 (patch)
treef3c60bed93fe807fbeccbbde1cce6c2599852610 /calendar/gui/e-tasks.c
parent086338bb035c96491b792bd93f65a94d1f236916 (diff)
downloadgsoc2013-evolution-dce3735025a16ac72151b751a061120fe4209648.tar.gz
gsoc2013-evolution-dce3735025a16ac72151b751a061120fe4209648.tar.zst
gsoc2013-evolution-dce3735025a16ac72151b751a061120fe4209648.zip
convert to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com> * gui/e-meeting-attendee.c: convert to G_DEFINE_TYPE * gui/e-meeting-list-view.c: ditto * gui/e-meeting-time-sel.c: ditto * gui/e-meeting-time-sel-item.c: ditto * gui/e-select-names-renderer.c: ditto * gui/e-timezone-entry.c: ditto * gui/e-tasks.c: ditto * gui/gnome-cal.c: ditto * gui/weekday-picker.c: ditto svn path=/trunk/; revision=27584
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r--calendar/gui/e-tasks.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 068be379f8..e6c82a4355 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -28,7 +28,6 @@
#include <gnome.h>
#include <libgnomevfs/gnome-vfs-ops.h>
-#include <gal/util/e-util.h>
#include <gal/e-table/e-table-scrolled.h>
#include <gal/menus/gal-view-instance.h>
#include <gal/menus/gal-view-factory-etable.h>
@@ -89,8 +88,6 @@ struct _ETasksPrivate {
GList *notifications;
};
-static void e_tasks_class_init (ETasksClass *class);
-static void e_tasks_init (ETasks *tasks);
static void setup_widgets (ETasks *tasks);
static void e_tasks_destroy (GtkObject *object);
static void update_view (ETasks *tasks);
@@ -115,13 +112,9 @@ static GtkTargetEntry list_drag_types[] = {
};
static const int num_list_drag_types = sizeof (list_drag_types) / sizeof (list_drag_types[0]);
-static GtkTableClass *parent_class;
static guint e_tasks_signals[LAST_SIGNAL] = { 0 };
-
-E_MAKE_TYPE (e_tasks, "ETasks", ETasks,
- e_tasks_class_init, e_tasks_init,
- GTK_TYPE_TABLE)
+G_DEFINE_TYPE (ETasks, e_tasks, GTK_TYPE_TABLE)
/* Callback used when the cursor changes in the table */
static void
@@ -373,11 +366,10 @@ table_drag_data_get (ETable *table,
priv = tasks->priv;
if (priv->current_uid) {
- ETableModel *model;
+ ECalModel *model;
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
+ comp_data = e_cal_model_get_component_at (model, row);
if (info == TARGET_VCALENDAR) {
/* we will pass an icalcalendar component for both types */
@@ -432,13 +424,13 @@ table_drag_data_delete (ETable *table,
{
ETasksPrivate *priv;
ECalModelComponent *comp_data;
- ETableModel *model;
+ ECalModel *model;
gboolean read_only = TRUE;
priv = tasks->priv;
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
+ comp_data = e_cal_model_get_component_at (model, row);
e_cal_is_read_only (comp_data->client, &read_only, NULL);
if (read_only)
@@ -551,8 +543,6 @@ e_tasks_class_init (ETasksClass *class)
object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (GTK_TYPE_TABLE);
-
e_tasks_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
GTK_RUN_LAST,
@@ -705,8 +695,8 @@ e_tasks_destroy (GtkObject *object)
tasks->priv = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GTK_OBJECT_CLASS (e_tasks_parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (e_tasks_parent_class)->destroy) (object);
}
static void