aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c107
-rw-r--r--calendar/gui/dialogs/comp-editor-page.h6
-rw-r--r--calendar/gui/dialogs/comp-editor.h2
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.h2
-rw-r--r--calendar/gui/dialogs/event-editor.h2
-rw-r--r--calendar/gui/dialogs/event-page.h2
-rw-r--r--calendar/gui/dialogs/memo-editor.h2
-rw-r--r--calendar/gui/dialogs/memo-page.h2
-rw-r--r--calendar/gui/dialogs/recurrence-page.c10
-rw-r--r--calendar/gui/dialogs/recurrence-page.h2
-rw-r--r--calendar/gui/dialogs/schedule-page.h2
-rw-r--r--calendar/gui/dialogs/task-details-page.h2
-rw-r--r--calendar/gui/dialogs/task-editor.h2
-rw-r--r--calendar/gui/dialogs/task-page.h2
14 files changed, 72 insertions, 73 deletions
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index 174f7eb50d..609c872db7 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -33,9 +33,9 @@
static void comp_editor_page_class_init (CompEditorPageClass *class);
static void comp_editor_page_init (CompEditorPage *page);
-static void comp_editor_page_destroy (GtkObject *object);
+static void comp_editor_page_dispose (GObject *object);
-static GtkObjectClass *parent_class = NULL;
+static gpointer parent_class;
/* Signal IDs */
@@ -64,40 +64,54 @@ static guint comp_editor_page_signals[LAST_SIGNAL];
*
* Return value: The type ID of the #CompEditorPage class.
**/
-GtkType
+GType
comp_editor_page_get_type (void)
{
- static GtkType comp_editor_page_type = 0;
+ static GType type = 0;
- if (!comp_editor_page_type) {
- static const GtkTypeInfo comp_editor_page_info = {
- "CompEditorPage",
- sizeof (CompEditorPage),
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
sizeof (CompEditorPageClass),
- (GtkClassInitFunc) comp_editor_page_class_init,
- (GtkObjectInitFunc) comp_editor_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) comp_editor_page_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (CompEditorPage),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) comp_editor_page_init,
+ NULL /* value_table */
};
- comp_editor_page_type =
- gtk_type_unique (GTK_TYPE_OBJECT,
- &comp_editor_page_info);
+ type = g_type_register_static (
+ G_TYPE_OBJECT, "CompEditorPage", &type_info, 0);
}
- return comp_editor_page_type;
+ return type;
}
/* Class initialization function for the abstract editor page */
static void
comp_editor_page_class_init (CompEditorPageClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
+
+ parent_class = g_type_class_peek_parent (class);
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = comp_editor_page_dispose;
- object_class = (GtkObjectClass *) class;
+ class->changed = NULL;
+ class->summary_changed = NULL;
+ class->dates_changed = NULL;
- parent_class = g_type_class_ref(GTK_TYPE_OBJECT);
+ class->get_widget = NULL;
+ class->focus_main_widget = NULL;
+ class->fill_widgets = NULL;
+ class->fill_component = NULL;
+ class->fill_timezones = NULL;
+ class->set_summary = NULL;
+ class->set_dates = NULL;
comp_editor_page_signals[CHANGED] =
g_signal_new ("changed",
@@ -159,20 +173,6 @@ comp_editor_page_class_init (CompEditorPageClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- class->changed = NULL;
- class->summary_changed = NULL;
- class->dates_changed = NULL;
-
- class->get_widget = NULL;
- class->focus_main_widget = NULL;
- class->fill_widgets = NULL;
- class->fill_component = NULL;
- class->fill_timezones = NULL;
- class->set_summary = NULL;
- class->set_dates = NULL;
-
- object_class->destroy = comp_editor_page_destroy;
}
@@ -186,7 +186,7 @@ comp_editor_page_init (CompEditorPage *page)
static void
-comp_editor_page_destroy (GtkObject *object)
+comp_editor_page_dispose (GObject *object)
{
CompEditorPage *page;
@@ -205,8 +205,7 @@ comp_editor_page_destroy (GtkObject *object)
page->accel_group = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -362,9 +361,9 @@ comp_editor_page_unset_focused_widget (CompEditorPage *page, GtkWidget *widget)
g_return_if_fail (page!= NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[FOCUS_OUT],
- widget);
+ g_signal_emit (page,
+ comp_editor_page_signals[FOCUS_OUT], 0,
+ widget);
}
@@ -379,9 +378,9 @@ comp_editor_page_set_focused_widget (CompEditorPage *page, GtkWidget *widget)
g_return_if_fail (page!= NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[FOCUS_IN],
- widget);
+ g_signal_emit (page,
+ comp_editor_page_signals[FOCUS_IN], 0,
+ widget);
}
/**
@@ -414,7 +413,7 @@ comp_editor_page_notify_changed (CompEditorPage *page)
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[CHANGED]);
+ g_signal_emit (page, comp_editor_page_signals[CHANGED], 0);
}
/**
@@ -429,7 +428,7 @@ comp_editor_page_notify_needs_send (CompEditorPage *page)
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[NEEDS_SEND]);
+ g_signal_emit (page, comp_editor_page_signals[NEEDS_SEND], 0);
}
/**
@@ -447,9 +446,9 @@ comp_editor_page_notify_summary_changed (CompEditorPage *page,
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[SUMMARY_CHANGED],
- summary);
+ g_signal_emit (page,
+ comp_editor_page_signals[SUMMARY_CHANGED], 0,
+ summary);
}
/**
@@ -466,9 +465,9 @@ comp_editor_page_notify_dates_changed (CompEditorPage *page,
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[DATES_CHANGED],
- dates);
+ g_signal_emit (page,
+ comp_editor_page_signals[DATES_CHANGED], 0,
+ dates);
}
/**
@@ -486,9 +485,9 @@ comp_editor_page_notify_client_changed (CompEditorPage *page,
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
comp_editor_page_set_e_cal (page, client);
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[CLIENT_CHANGED],
- client);
+ g_signal_emit (page,
+ comp_editor_page_signals[CLIENT_CHANGED], 0,
+ client);
}
/**
diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h
index 19d8ede6f6..5a121ab92b 100644
--- a/calendar/gui/dialogs/comp-editor-page.h
+++ b/calendar/gui/dialogs/comp-editor-page.h
@@ -53,7 +53,7 @@ typedef enum {
} CompEditorPageFlags;
typedef struct {
- GtkObject object;
+ GObject object;
/* Some of the pages need the ECal to access timezone data. Also,
* the event page needs to know it to fill the source option menu. */
@@ -70,7 +70,7 @@ typedef struct {
} CompEditorPage;
typedef struct {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
/* Notification signals */
@@ -95,7 +95,7 @@ typedef struct {
void (* set_dates) (CompEditorPage *page, CompEditorPageDates *dates);
} CompEditorPageClass;
-GtkType comp_editor_page_get_type (void);
+GType comp_editor_page_get_type (void);
GtkWidget *comp_editor_page_get_widget (CompEditorPage *page);
void comp_editor_page_focus_main_widget (CompEditorPage *page);
void comp_editor_page_unset_focused_widget (CompEditorPage *page, GtkWidget *widget);
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index 7243808386..fa1c9eccb0 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -68,7 +68,7 @@ typedef enum {
COMP_EDITOR_IS_SHARED = 1 << 5
} CompEditorFlags;
-GtkType comp_editor_get_type (void);
+GType comp_editor_get_type (void);
void comp_editor_set_changed (CompEditor *editor,
gboolean changed);
gboolean comp_editor_get_changed (CompEditor *editor);
diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h
index c58e668846..67787190af 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.h
+++ b/calendar/gui/dialogs/e-delegate-dialog.h
@@ -48,7 +48,7 @@ struct _EDelegateDialogClass {
GtkObjectClass parent_class;
};
-GtkType e_delegate_dialog_get_type (void);
+GType e_delegate_dialog_get_type (void);
EDelegateDialog* e_delegate_dialog_construct (EDelegateDialog *etd,
const char *name,
diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h
index 26c6d22a71..eacb87d780 100644
--- a/calendar/gui/dialogs/event-editor.h
+++ b/calendar/gui/dialogs/event-editor.h
@@ -50,7 +50,7 @@ struct _EventEditorClass {
CompEditorClass parent_class;
};
-GtkType event_editor_get_type (void);
+GType event_editor_get_type (void);
EventEditor *event_editor_construct (EventEditor *ee,
ECal *client);
EventEditor *event_editor_new (ECal *client, CompEditorFlags flags);
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
index 0d711379c6..1620c11050 100644
--- a/calendar/gui/dialogs/event-page.h
+++ b/calendar/gui/dialogs/event-page.h
@@ -56,7 +56,7 @@ typedef struct {
} EventPageClass;
-GtkType event_page_get_type (void);
+GType event_page_get_type (void);
EventPage *event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client);
EventPage *event_page_new (EMeetingStore *model, ECal *client, BonoboUIComponent *uic);
ECalComponent *event_page_get_cancel_comp (EventPage *page);
diff --git a/calendar/gui/dialogs/memo-editor.h b/calendar/gui/dialogs/memo-editor.h
index ca6b4863d6..d913628158 100644
--- a/calendar/gui/dialogs/memo-editor.h
+++ b/calendar/gui/dialogs/memo-editor.h
@@ -50,7 +50,7 @@ struct _MemoEditorClass {
CompEditorClass parent_class;
};
-GtkType memo_editor_get_type (void);
+GType memo_editor_get_type (void);
MemoEditor *memo_editor_construct (MemoEditor *te,
ECal *client);
MemoEditor *memo_editor_new (ECal *client, CompEditorFlags flags);
diff --git a/calendar/gui/dialogs/memo-page.h b/calendar/gui/dialogs/memo-page.h
index 52b419f078..964f4fba00 100644
--- a/calendar/gui/dialogs/memo-page.h
+++ b/calendar/gui/dialogs/memo-page.h
@@ -50,7 +50,7 @@ typedef struct {
CompEditorPageClass parent_class;
} MemoPageClass;
-GtkType memo_page_get_type (void);
+GType memo_page_get_type (void);
MemoPage *memo_page_construct (MemoPage *epage);
MemoPage *memo_page_new (BonoboUIComponent *uic, CompEditorPageFlags flags);
void memo_page_set_classification (MemoPage *page, ECalComponentClassification class);
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index c95eb34937..cfa6b2b49d 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -966,8 +966,8 @@ month_num_submenu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
item = gtk_menu_get_active (GTK_MENU (menu_shell));
item = gtk_menu_get_active (GTK_MENU (gtk_menu_item_get_submenu (GTK_MENU_ITEM (item))));
- month_index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item)));
- gtk_object_set_user_data (GTK_OBJECT (data), GINT_TO_POINTER (month_index));
+ month_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "data"));
+ g_object_set_data (G_OBJECT (data), "data", GINT_TO_POINTER (month_index));
}
/* Creates the option menu for the monthly recurrence number */
@@ -981,7 +981,7 @@ make_recur_month_num_submenu (const char *title, int start, int end)
for (i = start; i < end; i++) {
item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[i]));
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
- gtk_object_set_user_data (GTK_OBJECT (item), GINT_TO_POINTER (i + 1));
+ g_object_set_data (G_OBJECT (item), "data", GINT_TO_POINTER (i + 1));
gtk_widget_show (item);
}
@@ -1071,7 +1071,7 @@ make_recur_month_num_menu (int month_index)
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (submenu_item), submenu);
- gtk_object_set_user_data (GTK_OBJECT (submenu_item), GINT_TO_POINTER (month_index));
+ g_object_set_data (G_OBJECT (submenu_item), "data", GINT_TO_POINTER (month_index));
g_signal_connect((submenu), "selection_done",
G_CALLBACK (month_num_submenu_selection_done_cb),
submenu_item);
@@ -1140,7 +1140,7 @@ month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
GtkWidget *label, *item;
item = gtk_menu_get_active (GTK_MENU (menu_shell));
- priv->month_index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item)));
+ priv->month_index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "data"));
month_num = MONTH_NUM_DAY;
e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map);
diff --git a/calendar/gui/dialogs/recurrence-page.h b/calendar/gui/dialogs/recurrence-page.h
index b21a9994c1..2f4e94d5ec 100644
--- a/calendar/gui/dialogs/recurrence-page.h
+++ b/calendar/gui/dialogs/recurrence-page.h
@@ -51,7 +51,7 @@ typedef struct {
} RecurrencePageClass;
-GtkType recurrence_page_get_type (void);
+GType recurrence_page_get_type (void);
RecurrencePage *recurrence_page_construct (RecurrencePage *rpage);
RecurrencePage *recurrence_page_new (void);
diff --git a/calendar/gui/dialogs/schedule-page.h b/calendar/gui/dialogs/schedule-page.h
index 39fdacb5e5..cc09918ed2 100644
--- a/calendar/gui/dialogs/schedule-page.h
+++ b/calendar/gui/dialogs/schedule-page.h
@@ -49,7 +49,7 @@ typedef struct {
} SchedulePageClass;
-GtkType schedule_page_get_type (void);
+GType schedule_page_get_type (void);
SchedulePage *schedule_page_construct (SchedulePage *mpage, EMeetingStore *ems);
SchedulePage *schedule_page_new (EMeetingStore *ems);
void schedule_page_set_name_selector (SchedulePage *spage, ENameSelector *name_selector);
diff --git a/calendar/gui/dialogs/task-details-page.h b/calendar/gui/dialogs/task-details-page.h
index a7d06e49a6..a47cafa9ed 100644
--- a/calendar/gui/dialogs/task-details-page.h
+++ b/calendar/gui/dialogs/task-details-page.h
@@ -50,7 +50,7 @@ typedef struct {
} TaskDetailsPageClass;
-GtkType task_details_page_get_type (void);
+GType task_details_page_get_type (void);
TaskDetailsPage *task_details_page_construct (TaskDetailsPage *tdpage);
TaskDetailsPage *task_details_page_new (void);
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
index 9d823f7ba3..2980c7c2ae 100644
--- a/calendar/gui/dialogs/task-editor.h
+++ b/calendar/gui/dialogs/task-editor.h
@@ -51,7 +51,7 @@ struct _TaskEditorClass {
CompEditorClass parent_class;
};
-GtkType task_editor_get_type (void);
+GType task_editor_get_type (void);
TaskEditor *task_editor_construct (TaskEditor *te,
ECal *client);
TaskEditor *task_editor_new (ECal *client, CompEditorFlags flags);
diff --git a/calendar/gui/dialogs/task-page.h b/calendar/gui/dialogs/task-page.h
index 37041a033e..f97ad923ea 100644
--- a/calendar/gui/dialogs/task-page.h
+++ b/calendar/gui/dialogs/task-page.h
@@ -55,7 +55,7 @@ typedef struct {
CompEditorPageClass parent_class;
} TaskPageClass;
-GtkType task_page_get_type (void);
+GType task_page_get_type (void);
TaskPage *task_page_construct (TaskPage *epage, EMeetingStore *model, ECal *client);
TaskPage *task_page_new (EMeetingStore *model, ECal *client, BonoboUIComponent *uic);
ECalComponent * task_page_get_cancel_comp (TaskPage *page);