aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-10-14 22:22:12 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-10-14 22:22:12 +0800
commit4d0c841a0368793bee8b0d5a17ead69b3093b30b (patch)
tree1cb5ef945b063f5b5537b1e7105d3718fcd7a6b2
parent9e6e6c7141a2cb29148ab9dc4f98ebcc40c2f02c (diff)
downloadgsoc2013-evolution-4d0c841a0368793bee8b0d5a17ead69b3093b30b.tar.gz
gsoc2013-evolution-4d0c841a0368793bee8b0d5a17ead69b3093b30b.tar.zst
gsoc2013-evolution-4d0c841a0368793bee8b0d5a17ead69b3093b30b.zip
conver to G_DEFINE_TYPE
2004-10-14 JP Rosevear <jpr@novell.com> * gui/dialogs/comp-editor.c: conver to G_DEFINE_TYPE * gui/dialogs/meeting-page.c: ditto * gui/dialogs/recurrence-page.c: ditto * gui/dialogs/schedule-page.c: ditto * gui/dialogs/e-delegate-dialog.c: ditto * gui/dialogs/event-editor.c: ditto * gui/dialogs/task-editor.c: ditto * gui/dialogs/task-details-page.c: ditto * gui/dialogs/select-source-dialog.c (primary_selection_changed_cb): fix warning svn path=/trunk/; revision=27576
-rw-r--r--calendar/ChangeLog21
-rw-r--r--calendar/gui/dialogs/comp-editor.c18
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c17
-rw-r--r--calendar/gui/dialogs/event-editor.c40
-rw-r--r--calendar/gui/dialogs/meeting-page.c30
-rw-r--r--calendar/gui/dialogs/recurrence-page.c26
-rw-r--r--calendar/gui/dialogs/schedule-page.c26
-rw-r--r--calendar/gui/dialogs/select-source-dialog.c4
-rw-r--r--calendar/gui/dialogs/task-details-page.c26
-rw-r--r--calendar/gui/dialogs/task-editor.c40
10 files changed, 75 insertions, 173 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 26cdc962b3..dbf5cf066e 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,24 @@
+2004-10-14 JP Rosevear <jpr@novell.com>
+
+ * gui/dialogs/comp-editor.c: conver to G_DEFINE_TYPE
+
+ * gui/dialogs/meeting-page.c: ditto
+
+ * gui/dialogs/recurrence-page.c: ditto
+
+ * gui/dialogs/schedule-page.c: ditto
+
+ * gui/dialogs/e-delegate-dialog.c: ditto
+
+ * gui/dialogs/event-editor.c: ditto
+
+ * gui/dialogs/task-editor.c: ditto
+
+ * gui/dialogs/task-details-page.c: ditto
+
+ * gui/dialogs/select-source-dialog.c
+ (primary_selection_changed_cb): fix warning
+
2004-10-13 JP Rosevear <jpr@novell.com>
* gui/dialogs/task-page.c: ditto
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 49b0a43715..824bb7ceb7 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -82,8 +82,6 @@ struct _CompEditorPrivate {
-static void comp_editor_class_init (CompEditorClass *class);
-static void comp_editor_init (CompEditor *editor);
static gint comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e);
static void comp_editor_finalize (GObject *object);
@@ -102,12 +100,7 @@ static void page_dates_changed_cb (GtkObject *obj, CompEditorPageDates *dates, g
static void obj_modified_cb (ECal *client, GList *objs, gpointer data);
static void obj_removed_cb (ECal *client, GList *uids, gpointer data);
-static GtkObjectClass *parent_class;
-
-
-
-E_MAKE_TYPE (comp_editor, "CompEditor", CompEditor, comp_editor_class_init, comp_editor_init,
- GTK_TYPE_DIALOG);
+G_DEFINE_TYPE (CompEditor, comp_editor, GTK_TYPE_DIALOG);
/* Class initialization function for the calendar component editor */
static void
@@ -116,7 +109,6 @@ comp_editor_class_init (CompEditorClass *klass)
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- parent_class = g_type_class_peek_parent (klass);
object_class = G_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
@@ -435,8 +427,8 @@ comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e)
}
#endif
- if (GTK_WIDGET_CLASS (parent_class)->key_press_event)
- return (* GTK_WIDGET_CLASS (parent_class)->key_press_event) (d, e);
+ if (GTK_WIDGET_CLASS (comp_editor_parent_class)->key_press_event)
+ return (* GTK_WIDGET_CLASS (comp_editor_parent_class)->key_press_event) (d, e);
return FALSE;
}
@@ -486,8 +478,8 @@ comp_editor_finalize (GObject *object)
g_free (priv);
editor->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (comp_editor_parent_class)->finalize)
+ (* G_OBJECT_CLASS (comp_editor_parent_class)->finalize) (object);
}
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
index ff27699011..6ca0574a11 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ b/calendar/gui/dialogs/e-delegate-dialog.c
@@ -19,7 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-exception.h>
@@ -31,7 +34,6 @@
#include <gnome.h>
#include <libical/ical.h>
#include <glade/glade.h>
-#include <gal/util/e-util.h>
#include <widgets/misc/e-map.h>
#include <addressbook/util/e-destination.h>
#include "Evolution-Addressbook-SelectNames.h"
@@ -56,17 +58,12 @@ struct _EDelegateDialogPrivate {
#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
static const char *section_name = "Delegate To";
-static void e_delegate_dialog_class_init (EDelegateDialogClass *class);
-static void e_delegate_dialog_init (EDelegateDialog *edd);
static void e_delegate_dialog_finalize (GObject *object);
static gboolean get_widgets (EDelegateDialog *edd);
static void addressbook_clicked_cb (GtkWidget *widget, gpointer data);
-static GtkObjectClass *parent_class;
-
-E_MAKE_TYPE (e_delegate_dialog, "EDelegateDialog", EDelegateDialog, e_delegate_dialog_class_init,
- e_delegate_dialog_init, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EDelegateDialog, e_delegate_dialog, G_TYPE_OBJECT);
/* Class initialization function for the event editor */
static void
@@ -76,8 +73,6 @@ e_delegate_dialog_class_init (EDelegateDialogClass *class)
gobject_class = (GObjectClass *) class;
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
gobject_class->finalize = e_delegate_dialog_finalize;
}
@@ -117,8 +112,8 @@ e_delegate_dialog_finalize (GObject *object)
g_free (priv);
edd->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (e_delegate_dialog_parent_class)->finalize)
+ (* G_OBJECT_CLASS (e_delegate_dialog_parent_class)->finalize) (object);
}
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 454e467a66..8d1b89cb15 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-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 <widgets/misc/e-dateedit.h>
#include <e-util/e-icon-factory.h>
@@ -52,8 +54,6 @@ struct _EventEditorPrivate {
-static void event_editor_class_init (EventEditorClass *class);
-static void event_editor_init (EventEditor *ee);
static void event_editor_set_e_cal (CompEditor *editor, ECal *client);
static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method);
@@ -68,21 +68,7 @@ static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path,
static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
-static CompEditorClass *parent_class;
-
-
-
-/**
- * event_editor_get_type:
- *
- * Registers the #EventEditor class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #EventEditor class.
- **/
-
-E_MAKE_TYPE (event_editor, "EventEditor", EventEditor, event_editor_class_init,
- event_editor_init, TYPE_COMP_EDITOR);
+G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR);
/* Class initialization function for the event editor */
static void
@@ -94,8 +80,6 @@ event_editor_class_init (EventEditorClass *klass)
gobject_class = (GObjectClass *) klass;
editor_class = (CompEditorClass *) klass;
- parent_class = g_type_class_ref(TYPE_COMP_EDITOR);
-
editor_class->set_e_cal = event_editor_set_e_cal;
editor_class->edit_comp = event_editor_edit_comp;
editor_class->send_comp = event_editor_send_comp;
@@ -194,8 +178,8 @@ event_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 (event_editor_parent_class)->set_e_cal)
+ COMP_EDITOR_CLASS (event_editor_parent_class)->set_e_cal (editor, client);
}
static void
@@ -212,8 +196,8 @@ event_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 (event_editor_parent_class)->edit_comp)
+ COMP_EDITOR_CLASS (event_editor_parent_class)->edit_comp (editor, comp);
client = comp_editor_get_e_cal (COMP_EDITOR (editor));
@@ -318,8 +302,8 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
}
parent:
- if (parent_class->send_comp)
- return parent_class->send_comp (editor, method);
+ if (COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp)
+ return COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp (editor, method);
return FALSE;
}
@@ -346,8 +330,8 @@ event_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 (event_editor_parent_class)->finalize)
+ (* G_OBJECT_CLASS (event_editor_parent_class)->finalize) (object);
}
/**
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index a842e63f4a..241712a006 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -35,7 +35,6 @@
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <libgnomeui/gnome-stock-icons.h>
-#include <gal/util/e-util.h>
#include <gal/widgets/e-gui-utils.h>
#include <widgets/misc/e-dateedit.h>
#include <e-util/e-dialog-utils.h>
@@ -94,8 +93,6 @@ struct _MeetingPagePrivate {
-static void meeting_page_class_init (MeetingPageClass *class);
-static void meeting_page_init (MeetingPage *mpage);
static void meeting_page_finalize (GObject *object);
static GtkWidget *meeting_page_get_widget (CompEditorPage *page);
@@ -103,21 +100,7 @@ static void meeting_page_focus_main_widget (CompEditorPage *page);
static gboolean meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
static gboolean meeting_page_fill_component (CompEditorPage *page, ECalComponent *comp);
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * meeting_page_get_type:
- *
- * Registers the #MeetingPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #MeetingPage class.
- **/
-
-E_MAKE_TYPE (meeting_page, "MeetingPage", MeetingPage, meeting_page_class_init, meeting_page_init,
- TYPE_COMP_EDITOR_PAGE);
+G_DEFINE_TYPE (MeetingPage, meeting_page, TYPE_COMP_EDITOR_PAGE);
/* Class initialization function for the task page */
static void
@@ -129,8 +112,6 @@ meeting_page_class_init (MeetingPageClass *class)
editor_page_class = (CompEditorPageClass *) class;
object_class = (GObjectClass *) class;
- parent_class = g_type_class_ref (TYPE_COMP_EDITOR_PAGE);
-
editor_page_class->get_widget = meeting_page_get_widget;
editor_page_class->focus_main_widget = meeting_page_focus_main_widget;
editor_page_class->fill_widgets = meeting_page_fill_widgets;
@@ -271,8 +252,8 @@ meeting_page_finalize (GObject *object)
g_free (priv);
mpage->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (meeting_page_parent_class)->finalize)
+ (* G_OBJECT_CLASS (meeting_page_parent_class)->finalize) (object);
}
@@ -324,7 +305,7 @@ clear_widgets (MeetingPage *mpage)
static void
sensitize_widgets (MeetingPage *mpage)
{
- gboolean read_only, user_org;
+ gboolean read_only;
MeetingPagePrivate *priv = mpage->priv;
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (mpage)->client, &read_only, NULL))
@@ -939,8 +920,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
gtk_box_pack_start (GTK_BOX (priv->list_box), sw, TRUE, TRUE, 0);
/* Set the mnemonic widget for the Attendees label */
- gtk_label_set_mnemonic_widget (GTK_LABEL (priv->att_label),
- priv->list_view);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (priv->att_label), GTK_WIDGET (priv->list_view));
/* Init the widget signals */
init_widgets (mpage);
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 921f3d32bd..9d61469aac 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -198,8 +198,6 @@ struct _RecurrencePagePrivate {
-static void recurrence_page_class_init (RecurrencePageClass *class);
-static void recurrence_page_init (RecurrencePage *rpage);
static void recurrence_page_finalize (GObject *object);
static GtkWidget *recurrence_page_get_widget (CompEditorPage *page);
@@ -210,21 +208,7 @@ static void recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates
static void field_changed (RecurrencePage *apage);
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * recurrence_page_get_type:
- *
- * Registers the #RecurrencePage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #RecurrencePage class.
- **/
-
-E_MAKE_TYPE (recurrence_page, "RecurrencePage", RecurrencePage, recurrence_page_class_init,
- recurrence_page_init, TYPE_COMP_EDITOR_PAGE);
+G_DEFINE_TYPE (RecurrencePage, recurrence_page, TYPE_COMP_EDITOR_PAGE);
/* Class initialization function for the recurrence page */
static void
@@ -236,8 +220,6 @@ recurrence_page_class_init (RecurrencePageClass *class)
editor_page_class = (CompEditorPageClass *) class;
object_class = (GObjectClass *) class;
- parent_class = g_type_class_ref(TYPE_COMP_EDITOR_PAGE);
-
editor_page_class->get_widget = recurrence_page_get_widget;
editor_page_class->focus_main_widget = recurrence_page_focus_main_widget;
editor_page_class->fill_widgets = recurrence_page_fill_widgets;
@@ -322,8 +304,8 @@ recurrence_page_finalize (GObject *object)
g_free (priv);
rpage->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (recurrence_page_parent_class)->finalize)
+ (* G_OBJECT_CLASS (recurrence_page_parent_class)->finalize) (object);
}
@@ -532,7 +514,7 @@ sensitize_buttons (RecurrencePage *rpage)
gint selected_rows;
RecurrencePagePrivate *priv;
icalcomponent *icalcomp;
- char *uid;
+ const char *uid;
priv = rpage->priv;
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index c15b6582eb..83bc6d788a 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -67,8 +67,6 @@ struct _SchedulePagePrivate {
-static void schedule_page_class_init (SchedulePageClass *class);
-static void schedule_page_init (SchedulePage *spage);
static void schedule_page_finalize (GObject *object);
static GtkWidget *schedule_page_get_widget (CompEditorPage *page);
@@ -79,21 +77,7 @@ static void schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *
static void times_changed_cb (GtkWidget *widget, gpointer data);
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * schedule_page_get_type:
- *
- * Registers the #SchedulePage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #SchedulePage class.
- **/
-
-E_MAKE_TYPE (schedule_page, "SchedulePage", SchedulePage, schedule_page_class_init,
- schedule_page_init, TYPE_COMP_EDITOR_PAGE);
+G_DEFINE_TYPE (SchedulePage, schedule_page, TYPE_COMP_EDITOR_PAGE);
/* Class initialization function for the schedule page */
static void
@@ -105,8 +89,6 @@ schedule_page_class_init (SchedulePageClass *class)
editor_page_class = (CompEditorPageClass *) class;
object_class = (GObjectClass *) class;
- parent_class = g_type_class_ref (TYPE_COMP_EDITOR_PAGE);
-
editor_page_class->get_widget = schedule_page_get_widget;
editor_page_class->focus_main_widget = schedule_page_focus_main_widget;
editor_page_class->fill_widgets = schedule_page_fill_widgets;
@@ -161,8 +143,8 @@ schedule_page_finalize (GObject *object)
g_free (priv);
spage->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (schedule_page_parent_class)->finalize)
+ (* G_OBJECT_CLASS (schedule_page_parent_class)->finalize) (object);
}
@@ -202,7 +184,7 @@ sensitize_widgets (SchedulePage *spage)
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (spage)->client, &read_only, NULL))
read_only = TRUE;
- e_meeting_time_selector_set_read_only (GTK_WIDGET (priv->sel), read_only);
+ e_meeting_time_selector_set_read_only (priv->sel, read_only);
}
static void
diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c
index 68747ff4e0..66a671b1d3 100644
--- a/calendar/gui/dialogs/select-source-dialog.c
+++ b/calendar/gui/dialogs/select-source-dialog.c
@@ -52,10 +52,10 @@ primary_selection_changed_cb (ESourceSelector *selector, gpointer user_data)
if (*our_selection) {
g_object_ref (*our_selection);
gtk_dialog_set_response_sensitive (
- GTK_DIALOG (gtk_widget_get_toplevel (selector)), GTK_RESPONSE_OK, TRUE);
+ GTK_DIALOG (gtk_widget_get_toplevel (GTK_WIDGET (selector))), GTK_RESPONSE_OK, TRUE);
} else {
gtk_dialog_set_response_sensitive (
- GTK_DIALOG (gtk_widget_get_toplevel (selector)), GTK_RESPONSE_OK, FALSE);
+ GTK_DIALOG (gtk_widget_get_toplevel (GTK_WIDGET (selector))), GTK_RESPONSE_OK, FALSE);
}
}
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 9e88e915b8..b7814142f9 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -87,8 +87,6 @@ static const int priority_map[] = {
-static void task_details_page_class_init (TaskDetailsPageClass *class);
-static void task_details_page_init (TaskDetailsPage *tdpage);
static void task_details_page_finalize (GObject *object);
static GtkWidget *task_details_page_get_widget (CompEditorPage *page);
@@ -97,21 +95,7 @@ static gboolean task_details_page_fill_widgets (CompEditorPage *page, ECalCompon
static gboolean task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static gboolean task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones);
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * task_details_page_get_type:
- *
- * Registers the #TaskDetailsPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #TaskDetailsPage class.
- **/
-
-E_MAKE_TYPE (task_details_page, "TaskDetailsPage", TaskDetailsPage, task_details_page_class_init,
- task_details_page_init, TYPE_COMP_EDITOR_PAGE);
+G_DEFINE_TYPE (TaskDetailsPage, task_details_page, TYPE_COMP_EDITOR_PAGE);
/* Class initialization function for the task page */
static void
@@ -123,8 +107,6 @@ task_details_page_class_init (TaskDetailsPageClass *class)
editor_page_class = (CompEditorPageClass *) class;
object_class = (GObjectClass *) class;
- parent_class = g_type_class_ref(TYPE_COMP_EDITOR_PAGE);
-
editor_page_class->get_widget = task_details_page_get_widget;
editor_page_class->focus_main_widget = task_details_page_focus_main_widget;
editor_page_class->fill_widgets = task_details_page_fill_widgets;
@@ -185,8 +167,8 @@ task_details_page_finalize (GObject *object)
g_free (priv);
tdpage->priv = NULL;
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (task_details_page_parent_class)->finalize)
+ (* G_OBJECT_CLASS (task_details_page_parent_class)->finalize) (object);
}
@@ -293,7 +275,7 @@ sensitize_widgets (TaskDetailsPage *tdpage)
gtk_widget_set_sensitive (priv->percent_complete, !read_only);
gtk_widget_set_sensitive (priv->completed_date, !read_only);
gtk_widget_set_sensitive (priv->url_label, !read_only);
- gtk_entry_set_editable (GTK_ENTRY (e_url_entry_get_entry (priv->url_entry)), !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry))), !read_only);
}
/* fill_widgets handler for the task page */
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);
}
/**