diff options
Diffstat (limited to 'calendar/gui/dialogs/task-editor.c')
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 1fe4023bde..96d0dbe40e 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -23,10 +23,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif + #include <string.h> #include <glade/glade.h> -#include <gal/util/e-util.h> #include <libgnome/gnome-i18n.h> #include "task-page.h" @@ -48,8 +50,6 @@ struct _TaskEditorPrivate { -static void task_editor_class_init (TaskEditorClass *class); -static void task_editor_init (TaskEditor *te); static void task_editor_set_e_cal (CompEditor *editor, ECal *client); static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp); static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method); @@ -63,21 +63,7 @@ static void forward_cmd (GtkWidget *widget, gpointer data); static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data); -static CompEditorClass *parent_class; - - - -/** - * task_editor_get_type: - * - * Registers the #TaskEditor class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #TaskEditor class. - **/ - -E_MAKE_TYPE (task_editor, "TaskEditor", TaskEditor, task_editor_class_init, task_editor_init, - TYPE_COMP_EDITOR); +G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR); /* Class initialization function for the event editor */ static void @@ -89,8 +75,6 @@ task_editor_class_init (TaskEditorClass *klass) object_class = (GObjectClass *) klass; editor_class = (CompEditorClass *) klass; - parent_class = g_type_class_ref(TYPE_COMP_EDITOR); - editor_class->set_e_cal = task_editor_set_e_cal; editor_class->edit_comp = task_editor_edit_comp; editor_class->send_comp = task_editor_send_comp; @@ -182,8 +166,8 @@ task_editor_set_e_cal (CompEditor *editor, ECal *client) e_meeting_store_set_e_cal (priv->model, client); - if (parent_class->set_e_cal) - parent_class->set_e_cal (editor, client); + if (COMP_EDITOR_CLASS (task_editor_parent_class)->set_e_cal) + COMP_EDITOR_CLASS (task_editor_parent_class)->set_e_cal (editor, client); } static void @@ -200,8 +184,8 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp) priv->updating = TRUE; - if (parent_class->edit_comp) - parent_class->edit_comp (editor, comp); + if (COMP_EDITOR_CLASS (task_editor_parent_class)->edit_comp) + COMP_EDITOR_CLASS (task_editor_parent_class)->edit_comp (editor, comp); client = comp_editor_get_e_cal (COMP_EDITOR (editor)); @@ -299,8 +283,8 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) } parent: - if (parent_class->send_comp) - return parent_class->send_comp (editor, method); + if (COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp) + return COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp (editor, method); return FALSE; } @@ -326,8 +310,8 @@ task_editor_finalize (GObject *object) g_free (priv); - if (G_OBJECT_CLASS (parent_class)->finalize) - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + if (G_OBJECT_CLASS (task_editor_parent_class)->finalize) + (* G_OBJECT_CLASS (task_editor_parent_class)->finalize) (object); } /** |