aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ChangeLog10
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.h8
-rw-r--r--widgets/menus/gal-view-instance.c2
-rw-r--r--widgets/menus/gal-view-menus.h10
-rw-r--r--widgets/misc/ChangeLog40
-rw-r--r--widgets/misc/e-activity-handler.h10
-rw-r--r--widgets/misc/e-attachment-bar.h2
-rw-r--r--widgets/misc/e-attachment.c5
-rw-r--r--widgets/misc/e-calendar-item.c743
-rw-r--r--widgets/misc/e-calendar-item.h10
-rw-r--r--widgets/misc/e-calendar.h2
-rw-r--r--widgets/misc/e-canvas-background.h2
-rw-r--r--widgets/misc/e-canvas-vbox.h2
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-canvas.h2
-rw-r--r--widgets/misc/e-cell-date-edit.c272
-rw-r--r--widgets/misc/e-cell-date-edit.h6
-rw-r--r--widgets/misc/e-combo-button.c15
-rw-r--r--widgets/misc/e-combo-button.h2
-rw-r--r--widgets/misc/e-config-page.h2
-rw-r--r--widgets/misc/e-dateedit.c8
-rw-r--r--widgets/misc/e-dateedit.h2
-rw-r--r--widgets/misc/e-dropdown-button.c6
-rw-r--r--widgets/misc/e-dropdown-button.h2
-rw-r--r--widgets/misc/e-filter-bar.c43
-rw-r--r--widgets/misc/e-gui-utils.c10
-rw-r--r--widgets/misc/e-gui-utils.h2
-rw-r--r--widgets/misc/e-image-chooser.c2
-rw-r--r--widgets/misc/e-map.c31
-rw-r--r--widgets/misc/e-map.h2
-rw-r--r--widgets/misc/e-multi-config-dialog.h2
-rw-r--r--widgets/misc/e-popup-menu.h2
-rw-r--r--widgets/misc/e-printable.h2
-rw-r--r--widgets/misc/e-reflow.h2
-rw-r--r--widgets/misc/e-send-options.h8
-rw-r--r--widgets/misc/e-task-bar.h10
-rw-r--r--widgets/misc/e-task-widget.h10
-rw-r--r--widgets/misc/e-url-entry.c68
-rw-r--r--widgets/misc/e-url-entry.h2
-rw-r--r--widgets/table/ChangeLog13
-rw-r--r--widgets/table/e-table-memory-callbacks.c2
-rw-r--r--widgets/table/e-table-memory-store.c2
-rw-r--r--widgets/table/e-table-model.c14
-rw-r--r--widgets/table/e-table-simple.c2
-rw-r--r--widgets/table/e-tree-memory-callbacks.c2
-rw-r--r--widgets/table/e-tree-model.c18
-rw-r--r--widgets/table/e-tree-simple.c2
-rw-r--r--widgets/text/e-text.h2
48 files changed, 856 insertions, 562 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index d40f1f3755..57ed111d10 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #534360
+
+ * e-timezone-dialog/e-timezone-dialog.h:
+ * menus/gal-view-instance.c:
+ * menus/gal-view-menus.h:
+ * text/e-text.h:
+ Migrate from deprecated GtkObject symbols to GObject equivalents.
+
2008-04-25 Danny Baumann <dannybaumann@web.de>
** Fix for bug #529893
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.h b/widgets/e-timezone-dialog/e-timezone-dialog.h
index be7f4f22a0..7ce78c381a 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.h
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.h
@@ -28,11 +28,11 @@
#define E_TYPE_TIMEZONE_DIALOG (e_timezone_dialog_get_type ())
-#define E_TIMEZONE_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TIMEZONE_DIALOG, ETimezoneDialog))
-#define E_TIMEZONE_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TIMEZONE_DIALOG, \
+#define E_TIMEZONE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TIMEZONE_DIALOG, ETimezoneDialog))
+#define E_TIMEZONE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_TIMEZONE_DIALOG, \
ETimezoneDialogClass))
-#define E_IS_TIMEZONE_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TIMEZONE_DIALOG))
-#define E_IS_TIMEZONE_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_TIMEZONE_DIALOG))
+#define E_IS_TIMEZONE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TIMEZONE_DIALOG))
+#define E_IS_TIMEZONE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_TIMEZONE_DIALOG))
typedef struct _ETimezoneDialog ETimezoneDialog;
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 014ad424b1..4fbf639d8f 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -488,7 +488,7 @@ view_item_cb (GtkWidget *widget,
static void
add_popup_radio_item (EPopupMenu *menu_item,
gchar *title,
- GtkSignalFunc fn,
+ GCallback fn,
gpointer closure,
gboolean value)
{
diff --git a/widgets/menus/gal-view-menus.h b/widgets/menus/gal-view-menus.h
index 1e857d8e2b..b6a6fdbed4 100644
--- a/widgets/menus/gal-view-menus.h
+++ b/widgets/menus/gal-view-menus.h
@@ -9,10 +9,10 @@
#include <glib-object.h>
#define GAL_VIEW_MENUS_TYPE (gal_view_menus_get_type ())
-#define GAL_VIEW_MENUS(o) (GTK_CHECK_CAST ((o), GAL_VIEW_MENUS_TYPE, GalViewMenus))
-#define GAL_VIEW_MENUS_CLASS(k) (GTK_CHECK_CLASS_CAST((k), GAL_VIEW_MENUS_TYPE, GalViewMenusClass))
-#define GAL_IS_VIEW_MENUS(o) (GTK_CHECK_TYPE ((o), GAL_VIEW_MENUS_TYPE))
-#define GAL_IS_VIEW_MENUS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GAL_VIEW_MENUS_TYPE))
+#define GAL_VIEW_MENUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_VIEW_MENUS_TYPE, GalViewMenus))
+#define GAL_VIEW_MENUS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_VIEW_MENUS_TYPE, GalViewMenusClass))
+#define GAL_IS_VIEW_MENUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_VIEW_MENUS_TYPE))
+#define GAL_IS_VIEW_MENUS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_VIEW_MENUS_TYPE))
typedef struct _GalViewMenusPrivate GalViewMenusPrivate;
@@ -25,7 +25,7 @@ typedef struct {
GObjectClass parent_class;
} GalViewMenusClass;
-GtkType gal_view_menus_get_type (void);
+GType gal_view_menus_get_type (void);
GalViewMenus *gal_view_menus_new (GalViewInstance *instance);
GalViewMenus *gal_view_menus_construct (GalViewMenus *menus,
GalViewInstance *instance);
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 492646360e..6b302ca415 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,43 @@
+2008-05-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #534360
+
+ * e-activity-handler.h:
+ * e-attachment-bar.h:
+ * e-attachment.c:
+ * e-calendar-item.c:
+ * e-calendar-item.h:
+ * e-calendar.h:
+ * e-canvas-background.h:
+ * e-canvas-vbox.h:
+ * e-canvas.c:
+ * e-canvas.h:
+ * e-cell-date-edit.c:
+ * e-cell-date-edit.h:
+ * e-combo-button.c:
+ * e-combo-button.h:
+ * e-config-page.h:
+ * e-dateedit.c:
+ * e-dateedit.h:
+ * e-dropdown-button.c:
+ * e-dropdown-button.h:
+ * e-filter-bar.c:
+ * e-gui-utils.c:
+ * e-gui-utils.h:
+ * e-image-chooser.c:
+ * e-map.c:
+ * e-map.h:
+ * e-multi-config-dialog.h:
+ * e-popup-menu.h:
+ * e-printable.h:
+ * e-reflow.h:
+ * e-send-options.h:
+ * e-task-bar.h:
+ * e-task-widget.h:
+ * e-url-entry.c:
+ * e-url-entry.h:
+ Migrate from deprecated GtkObject symbols to GObject equivalents.
+
2008-05-14 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #311042, Patch by Milan Crha
diff --git a/widgets/misc/e-activity-handler.h b/widgets/misc/e-activity-handler.h
index 98ba6c38da..8b105720e7 100644
--- a/widgets/misc/e-activity-handler.h
+++ b/widgets/misc/e-activity-handler.h
@@ -33,10 +33,10 @@ extern "C" {
#endif /* __cplusplus */
#define E_TYPE_ACTIVITY_HANDLER (e_activity_handler_get_type ())
-#define E_ACTIVITY_HANDLER(obj) (GTK_CHECK_CAST ((obj), E_TYPE_ACTIVITY_HANDLER, EActivityHandler))
-#define E_ACTIVITY_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_ACTIVITY_HANDLER, EActivityHandlerClass))
-#define E_IS_ACTIVITY_HANDLER(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_ACTIVITY_HANDLER))
-#define E_IS_ACTIVITY_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_ACTIVITY_HANDLER))
+#define E_ACTIVITY_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_ACTIVITY_HANDLER, EActivityHandler))
+#define E_ACTIVITY_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_ACTIVITY_HANDLER, EActivityHandlerClass))
+#define E_IS_ACTIVITY_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_ACTIVITY_HANDLER))
+#define E_IS_ACTIVITY_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_ACTIVITY_HANDLER))
typedef struct _EActivityHandler EActivityHandler;
@@ -57,7 +57,7 @@ struct _EActivityHandlerClass {
};
-GtkType e_activity_handler_get_type (void);
+GType e_activity_handler_get_type (void);
EActivityHandler *e_activity_handler_new (void);
diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h
index d975b24633..1cd8bca475 100644
--- a/widgets/misc/e-attachment-bar.h
+++ b/widgets/misc/e-attachment-bar.h
@@ -66,7 +66,7 @@ struct _EAttachmentBarClass {
};
-GtkType e_attachment_bar_get_type (void);
+GType e_attachment_bar_get_type (void);
GtkWidget *e_attachment_bar_new (GtkAdjustment *adj);
void e_attachment_bar_to_multipart (EAttachmentBar *bar, CamelMultipart *multipart,
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 27729b396f..b48d528428 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -885,8 +885,5 @@ e_attachment_edit (EAttachment *attachment, GtkWidget *parent)
/* make sure that when the parent gets hidden/closed that our windows also close */
parent = gtk_widget_get_toplevel (parent);
- gtk_signal_connect_while_alive (GTK_OBJECT (parent), "destroy", (GCallback) close_cb, dialog_data,
- GTK_OBJECT (dialog_data->dialog));
- gtk_signal_connect_while_alive (GTK_OBJECT (parent), "hide", (GCallback) close_cb, dialog_data,
- GTK_OBJECT (dialog_data->dialog));
+ gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog_data->dialog), TRUE);
}
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 8b3b3a474d..73e201e694 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -56,13 +56,15 @@ static const int e_calendar_item_days_in_month[12] = {
&& ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))) ? 1 : 0)
-static void e_calendar_item_destroy (GtkObject *o);
-static void e_calendar_item_get_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id);
-static void e_calendar_item_set_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id);
+static void e_calendar_item_dispose (GObject *object);
+static void e_calendar_item_get_property(GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void e_calendar_item_set_property(GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
static void e_calendar_item_realize (GnomeCanvasItem *item);
static void e_calendar_item_unrealize (GnomeCanvasItem *item);
static void e_calendar_item_unmap (GnomeCanvasItem *item);
@@ -203,29 +205,29 @@ static void e_calendar_item_set_selection_if_emission (ECalendarItem *calitem,
/* Our arguments. */
enum {
- ARG_0,
- ARG_YEAR,
- ARG_MONTH,
- ARG_X1,
- ARG_Y1,
- ARG_X2,
- ARG_Y2,
- ARG_FONT_DESC,
- ARG_WEEK_NUMBER_FONT,
- ARG_WEEK_NUMBER_FONT_DESC,
- ARG_ROW_HEIGHT,
- ARG_COLUMN_WIDTH,
- ARG_MINIMUM_ROWS,
- ARG_MINIMUM_COLUMNS,
- ARG_MAXIMUM_ROWS,
- ARG_MAXIMUM_COLUMNS,
- ARG_WEEK_START_DAY,
- ARG_SHOW_WEEK_NUMBERS,
- ARG_MAXIMUM_DAYS_SELECTED,
- ARG_DAYS_TO_START_WEEK_SELECTION,
- ARG_MOVE_SELECTION_WHEN_MOVING,
- ARG_PRESERVE_DAY_WHEN_MOVING,
- ARG_DISPLAY_POPUP
+ PROP_0,
+ PROP_YEAR,
+ PROP_MONTH,
+ PROP_X1,
+ PROP_Y1,
+ PROP_X2,
+ PROP_Y2,
+ PROP_FONT_DESC,
+ PROP_WEEK_NUMBER_FONT,
+ PROP_WEEK_NUMBER_FONT_DESC,
+ PROP_ROW_HEIGHT,
+ PROP_COLUMN_WIDTH,
+ PROP_MINIMUM_ROWS,
+ PROP_MINIMUM_COLUMNS,
+ PROP_MAXIMUM_ROWS,
+ PROP_MAXIMUM_COLUMNS,
+ PROP_WEEK_START_DAY,
+ PROP_SHOW_WEEK_NUMBERS,
+ PROP_MAXIMUM_DAYS_SELECTED,
+ PROP_DAYS_TO_START_WEEK_SELECTION,
+ PROP_MOVE_SELECTION_WHEN_MOVING,
+ PROP_PRESERVE_DAY_WHEN_MOVING,
+ PROP_DISPLAY_POPUP
};
enum {
@@ -244,90 +246,284 @@ G_DEFINE_TYPE (ECalendarItem, e_calendar_item, GNOME_TYPE_CANVAS_ITEM)
static void
e_calendar_item_class_init (ECalendarItemClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GnomeCanvasItemClass *item_class;
- object_class = GTK_OBJECT_CLASS (class);
- item_class = GNOME_CANVAS_ITEM_CLASS (class);
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = e_calendar_item_dispose;
+ object_class->get_property = e_calendar_item_get_property;
+ object_class->set_property = e_calendar_item_set_property;
- gtk_object_add_arg_type ("ECalendarItem::year",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_YEAR);
- gtk_object_add_arg_type ("ECalendarItem::month",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_MONTH);
- gtk_object_add_arg_type ("ECalendarItem::x1",
- GTK_TYPE_DOUBLE, GTK_ARG_READWRITE,
- ARG_X1);
- gtk_object_add_arg_type ("ECalendarItem::y1",
- GTK_TYPE_DOUBLE, GTK_ARG_READWRITE,
- ARG_Y1);
- gtk_object_add_arg_type ("ECalendarItem::x2",
- GTK_TYPE_DOUBLE, GTK_ARG_READWRITE,
- ARG_X2);
- gtk_object_add_arg_type ("ECalendarItem::y2",
- GTK_TYPE_DOUBLE, GTK_ARG_READWRITE,
- ARG_Y2);
- gtk_object_add_arg_type ("ECalendarItem::font_desc",
- GTK_TYPE_POINTER, GTK_ARG_READWRITE,
- ARG_FONT_DESC);
- gtk_object_add_arg_type ("ECalendarItem::week_number_font_desc",
- GTK_TYPE_POINTER, GTK_ARG_READWRITE,
- ARG_WEEK_NUMBER_FONT_DESC);
- gtk_object_add_arg_type ("ECalendarItem::row_height",
- GTK_TYPE_INT, GTK_ARG_READABLE,
- ARG_ROW_HEIGHT);
- gtk_object_add_arg_type ("ECalendarItem::column_width",
- GTK_TYPE_INT, GTK_ARG_READABLE,
- ARG_COLUMN_WIDTH);
- gtk_object_add_arg_type ("ECalendarItem::minimum_rows",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_MINIMUM_ROWS);
- gtk_object_add_arg_type ("ECalendarItem::minimum_columns",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_MINIMUM_COLUMNS);
- gtk_object_add_arg_type ("ECalendarItem::maximum_rows",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_MAXIMUM_ROWS);
- gtk_object_add_arg_type ("ECalendarItem::maximum_columns",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_MAXIMUM_COLUMNS);
- gtk_object_add_arg_type ("ECalendarItem::week_start_day",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_WEEK_START_DAY);
- gtk_object_add_arg_type ("ECalendarItem::show_week_numbers",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_SHOW_WEEK_NUMBERS);
- gtk_object_add_arg_type ("ECalendarItem::maximum_days_selected",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_MAXIMUM_DAYS_SELECTED);
- gtk_object_add_arg_type ("ECalendarItem::days_to_start_week_selection",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_DAYS_TO_START_WEEK_SELECTION);
- gtk_object_add_arg_type ("ECalendarItem::move_selection_when_moving",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_MOVE_SELECTION_WHEN_MOVING);
- gtk_object_add_arg_type ("ECalendarItem::preserve_day_when_moving",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_PRESERVE_DAY_WHEN_MOVING);
- gtk_object_add_arg_type ("ECalendarItem::display_popup",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_DISPLAY_POPUP);
+ item_class = GNOME_CANVAS_ITEM_CLASS (class);
+ item_class->realize = e_calendar_item_realize;
+ item_class->unrealize = e_calendar_item_unrealize;
+ item_class->unmap = e_calendar_item_unmap;
+ item_class->update = e_calendar_item_update;
+ item_class->draw = e_calendar_item_draw;
+ item_class->point = e_calendar_item_point;
+ item_class->event = e_calendar_item_event;
+ item_class->bounds = e_calendar_item_bounds;
+
+ class->date_range_changed = NULL;
+ class->selection_changed = NULL;
+ class->selection_preview_changed = NULL;
+
+ g_object_class_install_property (
+ object_class,
+ PROP_YEAR,
+ g_param_spec_int (
+ "year",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MONTH,
+ g_param_spec_int (
+ "month",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_X1,
+ g_param_spec_double (
+ "x1",
+ NULL,
+ NULL,
+ -G_MAXDOUBLE,
+ G_MAXDOUBLE,
+ 0.,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_Y1,
+ g_param_spec_double (
+ "y1",
+ NULL,
+ NULL,
+ -G_MAXDOUBLE,
+ G_MAXDOUBLE,
+ 0.,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_X2,
+ g_param_spec_double (
+ "x2",
+ NULL,
+ NULL,
+ -G_MAXDOUBLE,
+ G_MAXDOUBLE,
+ 0.,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_Y2,
+ g_param_spec_double (
+ "y2",
+ NULL,
+ NULL,
+ -G_MAXDOUBLE,
+ G_MAXDOUBLE,
+ 0.,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FONT_DESC,
+ g_param_spec_boxed (
+ "font_desc",
+ NULL,
+ NULL,
+ PANGO_TYPE_FONT_DESCRIPTION,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WEEK_NUMBER_FONT_DESC,
+ g_param_spec_boxed (
+ "week_number_font_desc",
+ NULL,
+ NULL,
+ PANGO_TYPE_FONT_DESCRIPTION,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_ROW_HEIGHT,
+ g_param_spec_int (
+ "row_height",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_COLUMN_WIDTH,
+ g_param_spec_int (
+ "column_width",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MINIMUM_ROWS,
+ g_param_spec_int (
+ "minimum_rows",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MINIMUM_COLUMNS,
+ g_param_spec_int (
+ "minimum_columns",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MAXIMUM_ROWS,
+ g_param_spec_int (
+ "maximum_rows",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MAXIMUM_COLUMNS,
+ g_param_spec_int (
+ "maximum_columns",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WEEK_START_DAY,
+ g_param_spec_int (
+ "week_start_day",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SHOW_WEEK_NUMBERS,
+ g_param_spec_boolean (
+ "show_week_numbers",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MAXIMUM_DAYS_SELECTED,
+ g_param_spec_int (
+ "maximum_days_selected",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_DAYS_TO_START_WEEK_SELECTION,
+ g_param_spec_int (
+ "days_to_start_week_selection",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MOVE_SELECTION_WHEN_MOVING,
+ g_param_spec_boolean (
+ "move_selection_when_moving",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_PRESERVE_DAY_WHEN_MOVING,
+ g_param_spec_boolean (
+ "preserve_day_when_moving",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_DISPLAY_POPUP,
+ g_param_spec_boolean (
+ "display_popup",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
e_calendar_item_signals[DATE_RANGE_CHANGED] =
- gtk_signal_new ("date_range_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("date_range_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
e_calendar_item_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (ECalendarItemClass, selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("selection_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalendarItemClass, selection_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
e_calendar_item_signals[SELECTION_PREVIEW_CHANGED] =
g_signal_new ("selection_preview_changed",
G_TYPE_FROM_CLASS (object_class),
@@ -337,24 +533,6 @@ e_calendar_item_class_init (ECalendarItemClass *class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- object_class->destroy = e_calendar_item_destroy;
- object_class->get_arg = e_calendar_item_get_arg;
- object_class->set_arg = e_calendar_item_set_arg;
-
- /* GnomeCanvasItem method overrides */
- item_class->realize = e_calendar_item_realize;
- item_class->unrealize = e_calendar_item_unrealize;
- item_class->unmap = e_calendar_item_unmap;
- item_class->update = e_calendar_item_update;
- item_class->draw = e_calendar_item_draw;
- item_class->point = e_calendar_item_point;
- item_class->event = e_calendar_item_event;
- item_class->bounds = e_calendar_item_bounds;
-
- class->date_range_changed = NULL;
- class->selection_changed = NULL;
- class->selection_preview_changed = NULL;
-
e_calendar_item_a11y_init ();
}
@@ -416,11 +594,11 @@ e_calendar_item_init (ECalendarItem *calitem)
static void
-e_calendar_item_destroy (GtkObject *o)
+e_calendar_item_dispose (GObject *object)
{
ECalendarItem *calitem;
- calitem = E_CALENDAR_ITEM (o);
+ calitem = E_CALENDAR_ITEM (object);
e_calendar_item_set_style_callback (calitem, NULL, NULL, NULL);
e_calendar_item_set_get_time_callback (calitem, NULL, NULL, NULL);
@@ -447,228 +625,229 @@ e_calendar_item_destroy (GtkObject *o)
if (calitem->selecting_axis)
g_free (calitem->selecting_axis);
- if (GTK_OBJECT_CLASS (e_calendar_item_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (e_calendar_item_parent_class)->destroy) (o);
+
+ G_OBJECT_CLASS (e_calendar_item_parent_class)->dispose (object);
}
static void
-e_calendar_item_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+e_calendar_item_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECalendarItem *calitem;
- calitem = E_CALENDAR_ITEM (o);
+ calitem = E_CALENDAR_ITEM (object);
- switch (arg_id) {
- case ARG_YEAR:
- GTK_VALUE_INT (*arg) = calitem->year;
- break;
- case ARG_MONTH:
- GTK_VALUE_INT (*arg) = calitem->month;
- break;
- case ARG_X1:
- GTK_VALUE_DOUBLE (*arg) = calitem->x1;
- break;
- case ARG_Y1:
- GTK_VALUE_DOUBLE (*arg) = calitem->y1;
- break;
- case ARG_X2:
- GTK_VALUE_DOUBLE (*arg) = calitem->x2;
- break;
- case ARG_Y2:
- GTK_VALUE_DOUBLE (*arg) = calitem->y2;
- break;
- case ARG_FONT_DESC:
- GTK_VALUE_BOXED (*arg) = calitem->font_desc;
- break;
- case ARG_WEEK_NUMBER_FONT_DESC:
- GTK_VALUE_BOXED (*arg) = calitem->week_number_font_desc;
- break;
- case ARG_ROW_HEIGHT:
+ switch (property_id) {
+ case PROP_YEAR:
+ g_value_set_int (value, calitem->year);
+ return;
+ case PROP_MONTH:
+ g_value_set_int (value, calitem->month);
+ return;
+ case PROP_X1:
+ g_value_set_double (value, calitem->x1);
+ return;
+ case PROP_Y1:
+ g_value_set_double (value, calitem->y1);
+ return;
+ case PROP_X2:
+ g_value_set_double (value, calitem->x2);
+ return;
+ case PROP_Y2:
+ g_value_set_double (value, calitem->y2);
+ return;
+ case PROP_FONT_DESC:
+ g_value_set_boxed (value, calitem->font_desc);
+ return;
+ case PROP_WEEK_NUMBER_FONT_DESC:
+ g_value_set_boxed (value, calitem->week_number_font_desc);
+ return;
+ case PROP_ROW_HEIGHT:
e_calendar_item_recalc_sizes (calitem);
- GTK_VALUE_INT (*arg) = calitem->min_month_height;
- break;
- case ARG_COLUMN_WIDTH:
+ g_value_set_int (value, calitem->min_month_height);
+ return;
+ case PROP_COLUMN_WIDTH:
e_calendar_item_recalc_sizes (calitem);
- GTK_VALUE_INT (*arg) = calitem->min_month_width;
- break;
- case ARG_MINIMUM_ROWS:
- GTK_VALUE_INT (*arg) = calitem->min_rows;
- break;
- case ARG_MINIMUM_COLUMNS:
- GTK_VALUE_INT (*arg) = calitem->min_cols;
- break;
- case ARG_MAXIMUM_ROWS:
- GTK_VALUE_INT (*arg) = calitem->max_rows;
- break;
- case ARG_MAXIMUM_COLUMNS:
- GTK_VALUE_INT (*arg) = calitem->max_cols;
- break;
- case ARG_WEEK_START_DAY:
- GTK_VALUE_INT (*arg) = calitem->week_start_day;
- break;
- case ARG_SHOW_WEEK_NUMBERS:
- GTK_VALUE_BOOL (*arg) = calitem->show_week_numbers;
- break;
- case ARG_MAXIMUM_DAYS_SELECTED:
- GTK_VALUE_INT (*arg) = e_calendar_item_get_max_days_sel (calitem);
- break;
- case ARG_DAYS_TO_START_WEEK_SELECTION:
- GTK_VALUE_INT (*arg) = e_calendar_item_get_days_start_week_sel (calitem);
- break;
- case ARG_MOVE_SELECTION_WHEN_MOVING:
- GTK_VALUE_BOOL (*arg) = calitem->move_selection_when_moving;
- break;
- case ARG_PRESERVE_DAY_WHEN_MOVING:
- GTK_VALUE_BOOL (*arg) = calitem->preserve_day_when_moving;
- break;
- case ARG_DISPLAY_POPUP:
- GTK_VALUE_BOOL (*arg) = e_calendar_item_get_display_popup (calitem);
- break;
- default:
- g_warning ("Invalid arg");
+ g_value_set_int (value, calitem->min_month_width);
+ return;
+ case PROP_MINIMUM_ROWS:
+ g_value_set_int (value, calitem->min_rows);
+ return;
+ case PROP_MINIMUM_COLUMNS:
+ g_value_set_int (value, calitem->min_cols);
+ return;
+ case PROP_MAXIMUM_ROWS:
+ g_value_set_int (value, calitem->max_rows);
+ return;
+ case PROP_MAXIMUM_COLUMNS:
+ g_value_set_int (value, calitem->max_cols);
+ return;
+ case PROP_WEEK_START_DAY:
+ g_value_set_int (value, calitem->week_start_day);
+ return;
+ case PROP_SHOW_WEEK_NUMBERS:
+ g_value_set_boolean (value, calitem->show_week_numbers);
+ return;
+ case PROP_MAXIMUM_DAYS_SELECTED:
+ g_value_set_int (value, e_calendar_item_get_max_days_sel (calitem));
+ return;
+ case PROP_DAYS_TO_START_WEEK_SELECTION:
+ g_value_set_int (value, e_calendar_item_get_days_start_week_sel (calitem));
+ return;
+ case PROP_MOVE_SELECTION_WHEN_MOVING:
+ g_value_set_boolean (value, calitem->move_selection_when_moving);
+ return;
+ case PROP_PRESERVE_DAY_WHEN_MOVING:
+ g_value_set_boolean (value, calitem->preserve_day_when_moving);
+ return;
+ case PROP_DISPLAY_POPUP:
+ g_value_set_boolean (value, e_calendar_item_get_display_popup (calitem));
+ return;
}
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
static void
-e_calendar_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+e_calendar_item_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GnomeCanvasItem *item;
ECalendarItem *calitem;
PangoFontDescription *font_desc;
- gboolean need_update = FALSE;
gdouble dvalue;
gint ivalue;
gboolean bvalue;
- item = GNOME_CANVAS_ITEM (o);
- calitem = E_CALENDAR_ITEM (o);
+ item = GNOME_CANVAS_ITEM (object);
+ calitem = E_CALENDAR_ITEM (object);
- switch (arg_id){
- case ARG_YEAR:
- ivalue = GTK_VALUE_INT (*arg);
+ switch (property_id) {
+ case PROP_YEAR:
+ ivalue = g_value_get_int (value);
e_calendar_item_set_first_month (calitem, ivalue,
calitem->month);
- break;
- case ARG_MONTH:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_MONTH:
+ ivalue = g_value_get_int (value);
e_calendar_item_set_first_month (calitem, calitem->year,
ivalue);
- break;
- case ARG_X1:
- dvalue = GTK_VALUE_DOUBLE (*arg);
+ return;
+ case PROP_X1:
+ dvalue = g_value_get_double (value);
if (calitem->x1 != dvalue) {
calitem->x1 = dvalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_Y1:
- dvalue = GTK_VALUE_DOUBLE (*arg);
+ return;
+ case PROP_Y1:
+ dvalue = g_value_get_double (value);
if (calitem->y1 != dvalue) {
calitem->y1 = dvalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_X2:
- dvalue = GTK_VALUE_DOUBLE (*arg);
+ return;
+ case PROP_X2:
+ dvalue = g_value_get_double (value);
if (calitem->x2 != dvalue) {
calitem->x2 = dvalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_Y2:
- dvalue = GTK_VALUE_DOUBLE (*arg);
+ return;
+ case PROP_Y2:
+ dvalue = g_value_get_double (value);
if (calitem->y2 != dvalue) {
calitem->y2 = dvalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_FONT_DESC:
- font_desc = GTK_VALUE_BOXED (*arg);
+ return;
+ case PROP_FONT_DESC:
+ font_desc = g_value_get_boxed (value);
if (calitem->font_desc)
pango_font_description_free (calitem->font_desc);
calitem->font_desc = pango_font_description_copy (font_desc);
- need_update = TRUE;
- break;
- case ARG_WEEK_NUMBER_FONT_DESC:
- font_desc = GTK_VALUE_BOXED (*arg);
+ gnome_canvas_item_request_update (item);
+ return;
+ case PROP_WEEK_NUMBER_FONT_DESC:
+ font_desc = g_value_get_boxed (value);
if (calitem->week_number_font_desc)
pango_font_description_free (calitem->week_number_font_desc);
calitem->week_number_font_desc = pango_font_description_copy (font_desc);
- need_update = TRUE;
- break;
- case ARG_MINIMUM_ROWS:
- ivalue = GTK_VALUE_INT (*arg);
+ gnome_canvas_item_request_update (item);
+ return;
+ case PROP_MINIMUM_ROWS:
+ ivalue = g_value_get_int (value);
ivalue = MAX (1, ivalue);
if (calitem->min_rows != ivalue) {
calitem->min_rows = ivalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_MINIMUM_COLUMNS:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_MINIMUM_COLUMNS:
+ ivalue = g_value_get_int (value);
ivalue = MAX (1, ivalue);
if (calitem->min_cols != ivalue) {
calitem->min_cols = ivalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_MAXIMUM_ROWS:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_MAXIMUM_ROWS:
+ ivalue = g_value_get_int (value);
if (calitem->max_rows != ivalue) {
calitem->max_rows = ivalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_MAXIMUM_COLUMNS:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_MAXIMUM_COLUMNS:
+ ivalue = g_value_get_int (value);
if (calitem->max_cols != ivalue) {
calitem->max_cols = ivalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_WEEK_START_DAY:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_WEEK_START_DAY:
+ ivalue = g_value_get_int (value);
if (calitem->week_start_day != ivalue) {
calitem->week_start_day = ivalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_SHOW_WEEK_NUMBERS:
- bvalue = GTK_VALUE_BOOL (*arg);
+ return;
+ case PROP_SHOW_WEEK_NUMBERS:
+ bvalue = g_value_get_boolean (value);
if (calitem->show_week_numbers != bvalue) {
calitem->show_week_numbers = bvalue;
- need_update = TRUE;
+ gnome_canvas_item_request_update (item);
}
- break;
- case ARG_MAXIMUM_DAYS_SELECTED:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_MAXIMUM_DAYS_SELECTED:
+ ivalue = g_value_get_int (value);
e_calendar_item_set_max_days_sel (calitem, ivalue);
- break;
- case ARG_DAYS_TO_START_WEEK_SELECTION:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_DAYS_TO_START_WEEK_SELECTION:
+ ivalue = g_value_get_int (value);
e_calendar_item_set_days_start_week_sel (calitem, ivalue);
- break;
- case ARG_MOVE_SELECTION_WHEN_MOVING:
- bvalue = GTK_VALUE_BOOL (*arg);
+ return;
+ case PROP_MOVE_SELECTION_WHEN_MOVING:
+ bvalue = g_value_get_boolean (value);
calitem->move_selection_when_moving = bvalue;
- break;
- case ARG_PRESERVE_DAY_WHEN_MOVING:
- bvalue = GTK_VALUE_BOOL (*arg);
+ return;
+ case PROP_PRESERVE_DAY_WHEN_MOVING:
+ bvalue = g_value_get_boolean (value);
calitem->preserve_day_when_moving = bvalue;
- break;
- case ARG_DISPLAY_POPUP:
- bvalue = GTK_VALUE_BOOL (*arg);
+ return;
+ case PROP_DISPLAY_POPUP:
+ bvalue = g_value_get_boolean (value);
e_calendar_item_set_display_popup (calitem, bvalue);
- break;
- default:
- g_warning ("Invalid arg");
+ return;
}
- if (need_update) {
- gnome_canvas_item_request_update (item);
- }
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
static void
@@ -3195,7 +3374,7 @@ void
e_calendar_item_set_style_callback (ECalendarItem *calitem,
ECalendarItemStyleCallback cb,
gpointer data,
- GtkDestroyNotify destroy)
+ GDestroyNotify destroy)
{
g_return_if_fail (E_IS_CALENDAR_ITEM (calitem));
@@ -3246,14 +3425,12 @@ e_calendar_item_signal_emission_idle_cb (gpointer data)
if (calitem->date_range_changed) {
calitem->date_range_changed = FALSE;
- gtk_signal_emit (GTK_OBJECT (calitem),
- e_calendar_item_signals[DATE_RANGE_CHANGED]);
+ g_signal_emit (calitem, e_calendar_item_signals[DATE_RANGE_CHANGED], 0);
}
if (calitem->selection_changed) {
calitem->selection_changed = FALSE;
- gtk_signal_emit (GTK_OBJECT (calitem),
- e_calendar_item_signals[SELECTION_CHANGED]);
+ g_signal_emit (calitem, e_calendar_item_signals[SELECTION_CHANGED], 0);
}
g_object_unref((calitem));
@@ -3270,7 +3447,7 @@ void
e_calendar_item_set_get_time_callback (ECalendarItem *calitem,
ECalendarItemGetTimeCallback cb,
gpointer data,
- GtkDestroyNotify destroy)
+ GDestroyNotify destroy)
{
g_return_if_fail (E_IS_CALENDAR_ITEM (calitem));
diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h
index c78d9d14ec..309e3ab23e 100644
--- a/widgets/misc/e-calendar-item.h
+++ b/widgets/misc/e-calendar-item.h
@@ -232,11 +232,11 @@ struct _ECalendarItem
ECalendarItemStyleCallback style_callback;
gpointer style_callback_data;
- GtkDestroyNotify style_callback_destroy;
+ GDestroyNotify style_callback_destroy;
ECalendarItemGetTimeCallback time_callback;
gpointer time_callback_data;
- GtkDestroyNotify time_callback_destroy;
+ GDestroyNotify time_callback_destroy;
/* Colors for drawing. */
GdkColor colors[E_CALENDAR_ITEM_COLOR_LAST];
@@ -262,7 +262,7 @@ struct _ECalendarItemClass
};
-GtkType e_calendar_item_get_type (void);
+GType e_calendar_item_get_type (void);
/* FIXME: months are 0-11 throughout, but 1-12 may be better. */
@@ -351,7 +351,7 @@ void e_calendar_item_mark_days (ECalendarItem *calitem,
void e_calendar_item_set_style_callback (ECalendarItem *calitem,
ECalendarItemStyleCallback cb,
gpointer data,
- GtkDestroyNotify destroy);
+ GDestroyNotify destroy);
/* Sets a callback to use to get the current time. This is useful if the
application needs to use its own timezone data rather than rely on the
@@ -359,7 +359,7 @@ void e_calendar_item_set_style_callback (ECalendarItem *calitem,
void e_calendar_item_set_get_time_callback (ECalendarItem *calitem,
ECalendarItemGetTimeCallback cb,
gpointer data,
- GtkDestroyNotify destroy);
+ GDestroyNotify destroy);
void e_calendar_item_normalize_date (ECalendarItem *calitem,
gint *year,
gint *month);
diff --git a/widgets/misc/e-calendar.h b/widgets/misc/e-calendar.h
index 3afff4bd52..a31fccceff 100644
--- a/widgets/misc/e-calendar.h
+++ b/widgets/misc/e-calendar.h
@@ -76,7 +76,7 @@ struct _ECalendarClass
};
-GtkType e_calendar_get_type (void);
+GType e_calendar_get_type (void);
GtkWidget* e_calendar_new (void);
void e_calendar_set_minimum_size (ECalendar *cal,
diff --git a/widgets/misc/e-canvas-background.h b/widgets/misc/e-canvas-background.h
index 94da38baf9..452f606429 100644
--- a/widgets/misc/e-canvas-background.h
+++ b/widgets/misc/e-canvas-background.h
@@ -65,7 +65,7 @@ struct _ECanvasBackgroundClass {
/* Standard Gtk function */
-GtkType e_canvas_background_get_type (void);
+GType e_canvas_background_get_type (void);
G_END_DECLS
diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h
index d78d358095..6fb7ab3852 100644
--- a/widgets/misc/e-canvas-vbox.h
+++ b/widgets/misc/e-canvas-vbox.h
@@ -83,7 +83,7 @@ struct _ECanvasVboxClass
*/
void e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
void e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
-GtkType e_canvas_vbox_get_type (void);
+GType e_canvas_vbox_get_type (void);
#ifdef __cplusplus
}
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 55b19ad2a3..6fc73f2e28 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -649,7 +649,7 @@ ec_style_set_recursive (GnomeCanvasItem *item, GtkStyle *previous_style)
if (signal_id >= 1) {
GSignalQuery query;
g_signal_query (signal_id, &query);
- if (query.return_type == GTK_TYPE_NONE && query.n_params == 1 && query.param_types[0] == GTK_TYPE_STYLE) {
+ if (query.return_type == G_TYPE_NONE && query.n_params == 1 && query.param_types[0] == GTK_TYPE_STYLE) {
g_signal_emit (item, signal_id, 0, previous_style);
}
}
diff --git a/widgets/misc/e-canvas.h b/widgets/misc/e-canvas.h
index de0f0f361c..63b0fb3107 100644
--- a/widgets/misc/e-canvas.h
+++ b/widgets/misc/e-canvas.h
@@ -106,7 +106,7 @@ struct _ECanvasClass
};
-GtkType e_canvas_get_type (void);
+GType e_canvas_get_type (void);
GtkWidget *e_canvas_new (void);
/* Used to send all of the keystroke events to a specific item as well as
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index b61bb3ce1b..e54d5581f4 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -52,12 +52,14 @@
#include "e-calendar.h"
static void e_cell_date_edit_destroy (GtkObject *object);
-static void e_cell_date_edit_get_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id);
-static void e_cell_date_edit_set_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id);
+static void e_cell_date_edit_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void e_cell_date_edit_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
static gint e_cell_date_edit_do_popup (ECellPopup *ecp,
GdkEvent *event,
@@ -103,57 +105,114 @@ static void e_cell_date_edit_hide_popup (ECellDateEdit *ecde);
/* Our arguments. */
enum {
- ARG_0,
- ARG_SHOW_TIME,
- ARG_SHOW_NOW_BUTTON,
- ARG_SHOW_TODAY_BUTTON,
- ARG_ALLOW_NO_DATE_SET,
- ARG_USE_24_HOUR_FORMAT,
- ARG_LOWER_HOUR,
- ARG_UPPER_HOUR
+ PROP_0,
+ PROP_SHOW_TIME,
+ PROP_SHOW_NOW_BUTTON,
+ PROP_SHOW_TODAY_BUTTON,
+ PROP_ALLOW_NO_DATE_SET,
+ PROP_USE_24_HOUR_FORMAT,
+ PROP_LOWER_HOUR,
+ PROP_UPPER_HOUR
};
G_DEFINE_TYPE (ECellDateEdit, e_cell_date_edit, E_CELL_POPUP_TYPE)
static void
-e_cell_date_edit_class_init (ECellDateEditClass *ecdec)
+e_cell_date_edit_class_init (ECellDateEditClass *class)
{
- GtkObjectClass *object_class = (GtkObjectClass *) ecdec;
- ECellPopupClass *ecpc = (ECellPopupClass *) ecdec;
-
- gtk_object_add_arg_type ("ECellDateEdit::show_time",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_SHOW_TIME);
- gtk_object_add_arg_type ("ECellDateEdit::show_now_button",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_SHOW_NOW_BUTTON);
- gtk_object_add_arg_type ("ECellDateEdit::show_today_button",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_SHOW_TODAY_BUTTON);
- gtk_object_add_arg_type ("ECellDateEdit::allow_no_date_set",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_ALLOW_NO_DATE_SET);
- gtk_object_add_arg_type ("ECellDateEdit::use_24_hour_format",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE,
- ARG_USE_24_HOUR_FORMAT);
- gtk_object_add_arg_type ("ECellDateEdit::lower_hour",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_LOWER_HOUR);
- gtk_object_add_arg_type ("ECellDateEdit::upper_hour",
- GTK_TYPE_INT, GTK_ARG_READWRITE,
- ARG_UPPER_HOUR);
-
- object_class->destroy = e_cell_date_edit_destroy;
- object_class->get_arg = e_cell_date_edit_get_arg;
- object_class->set_arg = e_cell_date_edit_set_arg;
+ GObjectClass *object_class;
+ GtkObjectClass *gtk_object_class;
+ ECellPopupClass *ecpc;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->get_property = e_cell_date_edit_get_property;
+ object_class->set_property = e_cell_date_edit_set_property;
+
+ gtk_object_class = GTK_OBJECT_CLASS (class);
+ gtk_object_class->destroy = e_cell_date_edit_destroy;
+
+ ecpc = E_CELL_POPUP_CLASS (class);
ecpc->popup = e_cell_date_edit_do_popup;
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SHOW_TIME,
+ g_param_spec_boolean (
+ "show_time",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SHOW_NOW_BUTTON,
+ g_param_spec_boolean (
+ "show_now_button",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SHOW_TODAY_BUTTON,
+ g_param_spec_boolean (
+ "show_today_button",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_ALLOW_NO_DATE_SET,
+ g_param_spec_boolean (
+ "allow_no_date_set",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_USE_24_HOUR_FORMAT,
+ g_param_spec_boolean (
+ "use_24_hour_format",
+ NULL,
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_LOWER_HOUR,
+ g_param_spec_int (
+ "lower_hour",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_UPPER_HOUR,
+ g_param_spec_int (
+ "upper_hour",
+ NULL,
+ NULL,
+ G_MININT,
+ G_MAXINT,
+ 24,
+ G_PARAM_READWRITE));
}
static void
-e_cell_date_edit_init (ECellDateEdit *ecde)
+e_cell_date_edit_init (ECellDateEdit *ecde)
{
GtkWidget *frame, *vbox, *hbox, *vbox2;
GtkWidget *scrolled_window, *list, *bbox;
@@ -305,120 +364,113 @@ e_cell_date_edit_destroy (GtkObject *object)
static void
-e_cell_date_edit_get_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id)
+e_cell_date_edit_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECellDateEdit *ecde;
- ecde = E_CELL_DATE_EDIT (o);
-
- switch (arg_id) {
- case ARG_SHOW_TIME:
- GTK_VALUE_BOOL (*arg) = GTK_WIDGET_VISIBLE (ecde->time_entry) ? TRUE : FALSE;
- break;
- case ARG_SHOW_NOW_BUTTON:
- GTK_VALUE_BOOL (*arg) = GTK_WIDGET_VISIBLE (ecde->now_button) ? TRUE : FALSE;
- break;
- case ARG_SHOW_TODAY_BUTTON:
- GTK_VALUE_BOOL (*arg) = GTK_WIDGET_VISIBLE (ecde->today_button) ? TRUE : FALSE;
- break;
- case ARG_ALLOW_NO_DATE_SET:
- GTK_VALUE_BOOL (*arg) = GTK_WIDGET_VISIBLE (ecde->none_button) ? TRUE : FALSE;
- break;
- case ARG_USE_24_HOUR_FORMAT:
- GTK_VALUE_BOOL (*arg) = ecde->use_24_hour_format;
- break;
- case ARG_LOWER_HOUR:
- GTK_VALUE_INT (*arg) = ecde->lower_hour;
- break;
- case ARG_UPPER_HOUR:
- GTK_VALUE_INT (*arg) = ecde->upper_hour;
- break;
- default:
- g_warning ("Invalid arg");
+ ecde = E_CELL_DATE_EDIT (object);
+
+ switch (property_id) {
+ case PROP_SHOW_TIME:
+ g_value_set_boolean (value, GTK_WIDGET_VISIBLE (ecde->time_entry));
+ return;
+ case PROP_SHOW_NOW_BUTTON:
+ g_value_set_boolean (value, GTK_WIDGET_VISIBLE (ecde->now_button));
+ return;
+ case PROP_SHOW_TODAY_BUTTON:
+ g_value_set_boolean (value, GTK_WIDGET_VISIBLE (ecde->today_button));
+ return;
+ case PROP_ALLOW_NO_DATE_SET:
+ g_value_set_boolean (value, GTK_WIDGET_VISIBLE (ecde->none_button));
+ return;
+ case PROP_USE_24_HOUR_FORMAT:
+ g_value_set_boolean (value, ecde->use_24_hour_format);
+ return;
+ case PROP_LOWER_HOUR:
+ g_value_set_int (value, ecde->lower_hour);
+ return;
+ case PROP_UPPER_HOUR:
+ g_value_set_int (value, ecde->upper_hour);
+ return;
}
+
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
static void
-e_cell_date_edit_set_arg (GtkObject *o,
- GtkArg *arg,
- guint arg_id)
+e_cell_date_edit_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ECellDateEdit *ecde;
gint ivalue;
gboolean bvalue;
- ecde = E_CELL_DATE_EDIT (o);
+ ecde = E_CELL_DATE_EDIT (object);
- switch (arg_id){
- case ARG_SHOW_TIME:
- bvalue = GTK_VALUE_BOOL (*arg);
- if (bvalue) {
+ switch (property_id) {
+ case PROP_SHOW_TIME:
+ if (g_value_get_boolean (value)) {
gtk_widget_show (ecde->time_entry);
gtk_widget_show (ecde->time_list);
} else {
gtk_widget_hide (ecde->time_entry);
gtk_widget_hide (ecde->time_list);
}
- break;
- case ARG_SHOW_NOW_BUTTON:
- bvalue = GTK_VALUE_BOOL (*arg);
- if (bvalue) {
+ return;
+ case PROP_SHOW_NOW_BUTTON:
+ if (g_value_get_boolean (value)) {
gtk_widget_show (ecde->now_button);
} else {
gtk_widget_hide (ecde->now_button);
}
- break;
- case ARG_SHOW_TODAY_BUTTON:
- bvalue = GTK_VALUE_BOOL (*arg);
- if (bvalue) {
+ return;
+ case PROP_SHOW_TODAY_BUTTON:
+ if (g_value_get_boolean (value)) {
gtk_widget_show (ecde->today_button);
} else {
gtk_widget_hide (ecde->today_button);
}
- break;
- case ARG_ALLOW_NO_DATE_SET:
- bvalue = GTK_VALUE_BOOL (*arg);
- if (bvalue) {
+ return;
+ case PROP_ALLOW_NO_DATE_SET:
+ if (g_value_get_boolean (value)) {
gtk_widget_show (ecde->none_button);
} else {
/* FIXME: What if we have no date set now. */
gtk_widget_hide (ecde->none_button);
}
- break;
- case ARG_USE_24_HOUR_FORMAT:
- bvalue = GTK_VALUE_BOOL (*arg);
+ return;
+ case PROP_USE_24_HOUR_FORMAT:
+ bvalue = g_value_get_boolean (value);
if (ecde->use_24_hour_format != bvalue) {
ecde->use_24_hour_format = bvalue;
ecde->need_time_list_rebuild = TRUE;
}
- break;
- case ARG_LOWER_HOUR:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_LOWER_HOUR:
+ ivalue = g_value_get_int (value);
ivalue = CLAMP (ivalue, 0, 24);
if (ecde->lower_hour != ivalue) {
ecde->lower_hour = ivalue;
ecde->need_time_list_rebuild = TRUE;
}
- break;
- case ARG_UPPER_HOUR:
- ivalue = GTK_VALUE_INT (*arg);
+ return;
+ case PROP_UPPER_HOUR:
+ ivalue = g_value_get_int (value);
ivalue = CLAMP (ivalue, 0, 24);
if (ecde->upper_hour != ivalue) {
ecde->upper_hour = ivalue;
ecde->need_time_list_rebuild = TRUE;
}
- break;
- default:
- g_warning ("Invalid arg");
+ return;
}
-#if 0
- if (ecde->need_time_list_rebuild && ecde->freeze_count == 0)
- e_cell_date_edit_rebuild_time_list (ecde);
-#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
@@ -949,7 +1001,7 @@ void
e_cell_date_edit_set_get_time_callback (ECellDateEdit *ecde,
ECellDateEditGetTimeCallback cb,
gpointer data,
- GtkDestroyNotify destroy)
+ GDestroyNotify destroy)
{
g_return_if_fail (E_IS_CELL_DATE_EDIT (ecde));
diff --git a/widgets/misc/e-cell-date-edit.h b/widgets/misc/e-cell-date-edit.h
index c1253f30c9..33fff3746b 100644
--- a/widgets/misc/e-cell-date-edit.h
+++ b/widgets/misc/e-cell-date-edit.h
@@ -75,7 +75,7 @@ struct _ECellDateEdit {
ECellDateEditGetTimeCallback time_callback;
gpointer time_callback_data;
- GtkDestroyNotify time_callback_destroy;
+ GDestroyNotify time_callback_destroy;
};
struct _ECellDateEditClass {
@@ -83,7 +83,7 @@ struct _ECellDateEditClass {
};
-GtkType e_cell_date_edit_get_type (void);
+GType e_cell_date_edit_get_type (void);
ECell *e_cell_date_edit_new (void);
@@ -100,7 +100,7 @@ void e_cell_date_edit_thaw (ECellDateEdit *ecde);
void e_cell_date_edit_set_get_time_callback(ECellDateEdit *ecde,
ECellDateEditGetTimeCallback cb,
gpointer data,
- GtkDestroyNotify destroy);
+ GDestroyNotify destroy);
#endif /* _E_CELL_DATE_EDIT_H_ */
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index 5b732e1299..541d476d2e 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -391,7 +391,7 @@ impl_released (GtkButton *button)
gtk_button_clicked (button);
if (! priv->menu_popped_up)
- gtk_signal_emit (GTK_OBJECT (button), signals[ACTIVATE_DEFAULT]);
+ g_signal_emit (button, signals[ACTIVATE_DEFAULT], 0);
}
new_state = (button->in_button ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL);
@@ -429,12 +429,13 @@ e_combo_button_class_init (EComboButtonClass *combo_button_class)
button_class = GTK_BUTTON_CLASS (object_class);
button_class->released = impl_released;
- signals[ACTIVATE_DEFAULT] = gtk_signal_new ("activate_default",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- G_STRUCT_OFFSET (EComboButtonClass, activate_default),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ signals[ACTIVATE_DEFAULT] = g_signal_new ("activate_default",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EComboButtonClass, activate_default),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
e_combo_button_a11y_init ();
}
diff --git a/widgets/misc/e-combo-button.h b/widgets/misc/e-combo-button.h
index f14c2c7901..f8b27f7dde 100644
--- a/widgets/misc/e-combo-button.h
+++ b/widgets/misc/e-combo-button.h
@@ -62,7 +62,7 @@ struct _EComboButtonClass {
};
-GtkType e_combo_button_get_type (void);
+GType e_combo_button_get_type (void);
void e_combo_button_construct (EComboButton *combo_button);
GtkWidget *e_combo_button_new (void);
diff --git a/widgets/misc/e-config-page.h b/widgets/misc/e-config-page.h
index 812f357fe2..957d314d5b 100644
--- a/widgets/misc/e-config-page.h
+++ b/widgets/misc/e-config-page.h
@@ -57,7 +57,7 @@ struct _EConfigPageClass {
};
-GtkType e_config_page_get_type (void);
+GType e_config_page_get_type (void);
GtkWidget *e_config_page_new (void);
#ifdef __cplusplus
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index acfd0dfcc9..ca3c683cbe 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -125,7 +125,7 @@ struct _EDateEditPrivate {
EDateEditGetTimeCallback time_callback;
gpointer time_callback_data;
- GtkDestroyNotify time_callback_destroy;
+ GDestroyNotify time_callback_destroy;
gboolean twodigit_year_can_future;
};
@@ -219,7 +219,7 @@ static GtkHBoxClass *parent_class;
/**
* e_date_edit_get_type:
*
- * Returns the GtkType for the EDateEdit widget
+ * Returns the GType for the EDateEdit widget
*/
GType
e_date_edit_get_type (void)
@@ -261,7 +261,7 @@ e_date_edit_class_init (EDateEditClass *class)
G_STRUCT_OFFSET (EDateEditClass, changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
+ G_TYPE_NONE, 0);
object_class->dispose = e_date_edit_dispose;
@@ -2153,7 +2153,7 @@ void
e_date_edit_set_get_time_callback (EDateEdit *dedit,
EDateEditGetTimeCallback cb,
gpointer data,
- GtkDestroyNotify destroy)
+ GDestroyNotify destroy)
{
EDateEditPrivate *priv;
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index 29005a575b..e9a3d715c7 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -180,7 +180,7 @@ void e_date_edit_set_twodigit_year_can_future (EDateEdit *dedit,
void e_date_edit_set_get_time_callback (EDateEdit *dedit,
EDateEditGetTimeCallback cb,
gpointer data,
- GtkDestroyNotify destroy);
+ GDestroyNotify destroy);
GtkWidget* e_date_edit_get_entry (EDateEdit *dedit);
diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c
index 4054e4a254..dad8cc723f 100644
--- a/widgets/misc/e-dropdown-button.c
+++ b/widgets/misc/e-dropdown-button.c
@@ -207,9 +207,9 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button,
priv->menu = GTK_WIDGET (menu);
- gtk_signal_connect_while_alive (GTK_OBJECT (priv->menu), "deactivate",
- G_CALLBACK (menu_deactivate_cb),
- dropdown_button, GTK_OBJECT (dropdown_button));
+ g_signal_connect_object (priv->menu, "deactivate",
+ G_CALLBACK (menu_deactivate_cb),
+ dropdown_button, 0);
}
/**
diff --git a/widgets/misc/e-dropdown-button.h b/widgets/misc/e-dropdown-button.h
index 3e531dfcae..2571913e2d 100644
--- a/widgets/misc/e-dropdown-button.h
+++ b/widgets/misc/e-dropdown-button.h
@@ -57,7 +57,7 @@ struct _EDropdownButtonClass {
};
-GtkType e_dropdown_button_get_type (void);
+GType e_dropdown_button_get_type (void);
void e_dropdown_button_construct (EDropdownButton *dropdown_button,
const char *label_text,
GtkMenu *menu);
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index 20d85d8f63..2e01ed4097 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -924,24 +924,24 @@ class_init (EFilterBarClass *klass)
pspec = g_param_spec_string ("state", NULL, NULL, NULL, G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_STATE, pspec);
- /*gtk_object_add_arg_type ("EFilterBar::query", GTK_TYPE_STRING, GTK_ARG_READABLE, ARG_QUERY);*/
+ /*gtk_object_add_arg_type ("EFilterBar::query", G_TYPE_STRING, GTK_ARG_READABLE, ARG_QUERY);*/
#if 0
esb_signals [QUERY_CHANGED] =
- gtk_signal_new ("query_changed",
- GTK_RUN_LAST,
+ g_signal_new ("query_changed",
+ G_SIGNAL_RUN_LAST,
object_class->type,
G_STRUCT_OFFSET (EFilterBarClass, query_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
esb_signals [MENU_ACTIVATED] =
- gtk_signal_new ("menu_activated",
- GTK_RUN_LAST,
+ g_signal_new ("menu_activated",
+ G_SIGNAL_RUN_LAST,
object_class->type,
G_STRUCT_OFFSET (EFilterBarClass, menu_activated),
g_cclosure_marshal_VOID__INT,
- GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+ G_TYPE_NONE, 1, G_TYPE_INT);
gtk_object_class_add_signals (object_class, esb_signals, LAST_SIGNAL);
#endif
@@ -1007,24 +1007,27 @@ e_filter_bar_new_construct (RuleContext *context,
}
-GtkType
+GType
e_filter_bar_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
- if (!type) {
- static const GtkTypeInfo info = {
- "EFilterBar",
- sizeof (EFilterBar),
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
sizeof (EFilterBarClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EFilterBar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) init,
+ NULL /* value_table */
};
- type = gtk_type_unique (e_search_bar_get_type (), &info);
+ type = g_type_register_static (
+ e_search_bar_get_type (), "EFilterBar", &type_info, 0);
}
return type;
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c
index 3a827c430f..326e7b3ab6 100644
--- a/widgets/misc/e-gui-utils.c
+++ b/widgets/misc/e-gui-utils.c
@@ -164,11 +164,11 @@ e_container_change_tab_order(GtkContainer *container, GList *widgets)
GList *list;
list = g_list_copy(widgets);
g_list_foreach(list, (GFunc) g_object_ref, NULL);
- return gtk_signal_connect_full(GTK_OBJECT(container), "focus",
- GTK_SIGNAL_FUNC(e_container_change_tab_order_callback),
- NULL, list,
- e_container_change_tab_order_destroy_notify,
- FALSE, FALSE);
+ return g_signal_connect_data (container, "focus",
+ G_CALLBACK(e_container_change_tab_order_callback),
+ list,
+ (GClosureNotify) e_container_change_tab_order_destroy_notify,
+ 0);
}
struct widgetandint {
diff --git a/widgets/misc/e-gui-utils.h b/widgets/misc/e-gui-utils.h
index a4d0c3795f..7c23362223 100644
--- a/widgets/misc/e-gui-utils.h
+++ b/widgets/misc/e-gui-utils.h
@@ -47,7 +47,7 @@ gint e_container_change_tab_order (GtkContainer *container,
gboolean e_glade_xml_connect_widget (GladeXML *gui,
char *name,
char *signal,
- GtkSignalFunc cb,
+ GCallback cb,
gpointer closure);
gboolean e_glade_xml_set_sensitive (GladeXML *gui,
char *name,
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index f3fb4070ba..b80da133ec 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -139,7 +139,7 @@ e_image_chooser_class_init (EImageChooserClass *klass)
G_STRUCT_OFFSET (EImageChooserClass, changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
+ G_TYPE_NONE, 0);
/*
object_class->set_property = e_image_chooser_set_property;
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 44051101c4..3c7005dc00 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -132,29 +132,30 @@ static GtkWidgetClass *parent_class;
* Return value: The type ID of the #EMap class.
**/
-GtkType
+GType
e_map_get_type (void)
{
- static GtkType e_map_type = 0;
+ static GType type = 0;
- if (!e_map_type)
- {
- static const GtkTypeInfo e_map_info =
- {
- "EMap",
- sizeof (EMap),
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
sizeof (EMapClass),
- (GtkClassInitFunc) e_map_class_init,
- (GtkObjectInitFunc) e_map_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) e_map_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMap),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_map_init,
+ NULL /* value_table */
};
- e_map_type = gtk_type_unique (GTK_TYPE_WIDGET, &e_map_info);
+ type = g_type_register_static (
+ GTK_TYPE_WIDGET, "EMap", &type_info, 0);
}
- return e_map_type;
+ return type;
}
/* Class initialization function for the map view */
diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h
index 6632a6e2a1..9b67a24e6f 100644
--- a/widgets/misc/e-map.h
+++ b/widgets/misc/e-map.h
@@ -69,7 +69,7 @@ struct _EMapPoint
/* --- Widget --- */
-GtkType e_map_get_type (void);
+GType e_map_get_type (void);
EMap *e_map_new (void);
diff --git a/widgets/misc/e-multi-config-dialog.h b/widgets/misc/e-multi-config-dialog.h
index 5b4258341c..0847576ab5 100644
--- a/widgets/misc/e-multi-config-dialog.h
+++ b/widgets/misc/e-multi-config-dialog.h
@@ -59,7 +59,7 @@ struct _EMultiConfigDialogClass {
};
-GtkType e_multi_config_dialog_get_type (void);
+GType e_multi_config_dialog_get_type (void);
GtkWidget *e_multi_config_dialog_new (void);
void e_multi_config_dialog_add_page (EMultiConfigDialog *dialog,
diff --git a/widgets/misc/e-popup-menu.h b/widgets/misc/e-popup-menu.h
index 88e08de05f..7153e36efd 100644
--- a/widgets/misc/e-popup-menu.h
+++ b/widgets/misc/e-popup-menu.h
@@ -97,7 +97,7 @@ typedef struct _EPopupMenu EPopupMenu;
struct _EPopupMenu {
char *name;
char *pixname;
- GtkSignalFunc fn;
+ GCallback fn;
EPopupMenu *submenu;
guint32 disable_mask;
diff --git a/widgets/misc/e-printable.h b/widgets/misc/e-printable.h
index b79e042d08..cadefc81c0 100644
--- a/widgets/misc/e-printable.h
+++ b/widgets/misc/e-printable.h
@@ -61,7 +61,7 @@ typedef struct {
gboolean (*will_fit) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized);
} EPrintableClass;
-GtkType e_printable_get_type (void);
+GType e_printable_get_type (void);
EPrintable *e_printable_new (void);
diff --git a/widgets/misc/e-reflow.h b/widgets/misc/e-reflow.h
index 1a11ddbddc..6bf750d038 100644
--- a/widgets/misc/e-reflow.h
+++ b/widgets/misc/e-reflow.h
@@ -138,7 +138,7 @@ struct _EReflowClass
* should also do an ECanvas parent reflow request if its size
* changes.
*/
-GtkType e_reflow_get_type (void);
+GType e_reflow_get_type (void);
#ifdef __cplusplus
}
diff --git a/widgets/misc/e-send-options.h b/widgets/misc/e-send-options.h
index c096d4696c..9817ff61b1 100644
--- a/widgets/misc/e-send-options.h
+++ b/widgets/misc/e-send-options.h
@@ -27,10 +27,10 @@
#include <time.h>
#define E_TYPE_SENDOPTIONS_DIALOG (e_sendoptions_dialog_get_type ())
-#define E_SENDOPTIONS_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SENDOPTIONS_DIALOG, ESendOptionsDialog))
-#define E_SENDOPTIONS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SENDOPTIONS_DIALOG, ESendOptionsDialogClass))
-#define E_IS_SENDOPTIONS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SENDOPTIONS_DIALOG))
-#define E_IS_SENDOPTIONS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_SENDOPTIONS_DIALOG))
+#define E_SENDOPTIONS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SENDOPTIONS_DIALOG, ESendOptionsDialog))
+#define E_SENDOPTIONS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SENDOPTIONS_DIALOG, ESendOptionsDialogClass))
+#define E_IS_SENDOPTIONS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SENDOPTIONS_DIALOG))
+#define E_IS_SENDOPTIONS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_SENDOPTIONS_DIALOG))
typedef struct _ESendOptionsDialog ESendOptionsDialog;
typedef struct _ESendOptionsDialogClass ESendOptionsDialogClass;
diff --git a/widgets/misc/e-task-bar.h b/widgets/misc/e-task-bar.h
index 4cacf4cf79..0ef0c18049 100644
--- a/widgets/misc/e-task-bar.h
+++ b/widgets/misc/e-task-bar.h
@@ -33,10 +33,10 @@ extern "C" {
#endif /* __cplusplus */
#define E_TYPE_TASK_BAR (e_task_bar_get_type ())
-#define E_TASK_BAR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TASK_BAR, ETaskBar))
-#define E_TASK_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TASK_BAR, ETaskBarClass))
-#define E_IS_TASK_BAR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TASK_BAR))
-#define E_IS_TASK_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_TASK_BAR))
+#define E_TASK_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TASK_BAR, ETaskBar))
+#define E_TASK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_TASK_BAR, ETaskBarClass))
+#define E_IS_TASK_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TASK_BAR))
+#define E_IS_TASK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_TASK_BAR))
typedef struct _ETaskBar ETaskBar;
@@ -54,7 +54,7 @@ struct _ETaskBarClass {
};
-GtkType e_task_bar_get_type (void);
+GType e_task_bar_get_type (void);
void e_task_bar_construct (ETaskBar *task_bar);
GtkWidget *e_task_bar_new (void);
diff --git a/widgets/misc/e-task-widget.h b/widgets/misc/e-task-widget.h
index eb7efa017e..5d1864050c 100644
--- a/widgets/misc/e-task-widget.h
+++ b/widgets/misc/e-task-widget.h
@@ -32,10 +32,10 @@ extern "C" {
#endif /* __cplusplus */
#define E_TYPE_TASK_WIDGET (e_task_widget_get_type ())
-#define E_TASK_WIDGET(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TASK_WIDGET, ETaskWidget))
-#define E_TASK_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TASK_WIDGET, ETaskWidgetClass))
-#define E_IS_TASK_WIDGET(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TASK_WIDGET))
-#define E_IS_TASK_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_TASK_WIDGET))
+#define E_TASK_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TASK_WIDGET, ETaskWidget))
+#define E_TASK_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_TASK_WIDGET, ETaskWidgetClass))
+#define E_IS_TASK_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TASK_WIDGET))
+#define E_IS_TASK_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_TASK_WIDGET))
typedef struct _ETaskWidget ETaskWidget;
@@ -54,7 +54,7 @@ struct _ETaskWidgetClass {
};
-GtkType e_task_widget_get_type (void);
+GType e_task_widget_get_type (void);
void e_task_widget_construct (ETaskWidget *task_widget,
GdkPixbuf *icon_pixbuf,
const char *component_id,
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index 1b921f07b0..1ee2ddbf79 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -36,56 +36,56 @@ struct _EUrlEntryPrivate {
GtkWidget *button;
};
-static void class_init (EUrlEntryClass *klass);
+static void class_init (EUrlEntryClass *class);
static void init (EUrlEntry *url_entry);
-static void destroy (GtkObject *obj);
+static void finalize (GObject *object);
static void button_clicked_cb (GtkWidget *widget, gpointer data);
static void entry_changed_cb (GtkEditable *editable, gpointer data);
static gboolean mnemonic_activate (GtkWidget *widget, gboolean group_cycling);
-static GtkHBoxClass *parent_class = NULL;
+static gpointer parent_class = NULL;
-GtkType
+GType
e_url_entry_get_type (void)
{
- static GtkType type = 0;
-
- if (type == 0)
- {
- static const GtkTypeInfo info =
- {
- "EUrlEntry",
- sizeof (EUrlEntry),
- sizeof (EUrlEntryClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (gtk_hbox_get_type (), &info);
- }
-
- return type;
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
+ sizeof (EUrlEntryClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EUrlEntry),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) init,
+ NULL /* value_table */
+ };
+
+ type = g_type_register_static (
+ GTK_TYPE_HBOX, "EUrlEntry", &type_info, 0);
+ }
+
+ return type;
}
static void
-class_init (EUrlEntryClass *klass)
+class_init (EUrlEntryClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
-
- parent_class = g_type_class_ref(gtk_hbox_get_type ());
+ parent_class = g_type_class_peek_parent (class);
- object_class->destroy = destroy;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = finalize;
+ widget_class = GTK_WIDGET_CLASS (class);
widget_class->mnemonic_activate = mnemonic_activate;
}
@@ -119,17 +119,17 @@ init (EUrlEntry *url_entry)
}
static void
-destroy (GtkObject *obj)
+finalize (GObject *object)
{
EUrlEntry *url_entry;
- url_entry = E_URL_ENTRY (obj);
+ url_entry = E_URL_ENTRY (object);
if (url_entry->priv) {
g_free (url_entry->priv);
url_entry->priv = NULL;
}
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
/* GtkWidget::mnemonic_activate() handler for the EUrlEntry */
diff --git a/widgets/misc/e-url-entry.h b/widgets/misc/e-url-entry.h
index f124c72a58..5a9a3ad13e 100644
--- a/widgets/misc/e-url-entry.h
+++ b/widgets/misc/e-url-entry.h
@@ -58,7 +58,7 @@ struct _EUrlEntryClass {
-GtkType e_url_entry_get_type (void);
+GType e_url_entry_get_type (void);
GtkWidget *e_url_entry_new (void);
GtkWidget *e_url_entry_get_entry (EUrlEntry *url_entry);
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index ae3ab90667..77d88894af 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,3 +1,16 @@
+2008-05-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #534360
+
+ * e-table-memory-callbacks.c:
+ * e-table-memory-store.c:
+ * e-table-model.c:
+ * e-table-simple.c:
+ * e-tree-memory-callbacks.c:
+ * e-tree-model.c:
+ * e-tree-simple.c:
+ Migrate from deprecated GtkObject symbols to GObject equivalents.
+
2008-04-30 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #528288
diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c
index 4b05a42120..7998d4613b 100644
--- a/widgets/table/e-table-memory-callbacks.c
+++ b/widgets/table/e-table-memory-callbacks.c
@@ -174,7 +174,7 @@ e_table_memory_callbacks_init (ETableMemoryCalbacks *etmc)
* This initializes a new ETableMemoryCalbacksModel object. ETableMemoryCalbacksModel is
* an implementaiton of the abstract class ETableModel. The ETableMemoryCalbacksModel
* is designed to allow people to easily create ETableModels without having
- * to create a new GtkType derived from ETableModel every time they need one.
+ * to create a new GType derived from ETableModel every time they need one.
*
* Instead, ETableMemoryCalbacksModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETableModel method
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 7ebbcbd70c..4cbf821cf1 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -286,7 +286,7 @@ e_table_memory_store_class_init (ETableMemoryStoreClass *klass)
* This initializes a new ETableMemoryStoreModel object. ETableMemoryStoreModel is
* an implementaiton of the abstract class ETableModel. The ETableMemoryStoreModel
* is designed to allow people to easily create ETableModels without having
- * to create a new GtkType derived from ETableModel every time they need one.
+ * to create a new GType derived from ETableModel every time they need one.
*
* Instead, ETableMemoryStoreModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETableModel method
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 36dd691a86..01a49ce370 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -398,7 +398,7 @@ e_table_model_pre_change (ETableModel *e_table_model)
return;
d(print_tabs());
- d(g_print("Emitting pre_change on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
+ d(g_print("Emitting pre_change on model 0x%p, a %s.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_PRE_CHANGE], 0);
@@ -428,7 +428,7 @@ e_table_model_no_change (ETableModel *e_table_model)
return;
d(print_tabs());
- d(g_print("Emitting model_no_change on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
+ d(g_print("Emitting model_no_change on model 0x%p, a %s.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_NO_CHANGE], 0);
@@ -458,7 +458,7 @@ e_table_model_changed (ETableModel *e_table_model)
return;
d(print_tabs());
- d(g_print("Emitting model_changed on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
+ d(g_print("Emitting model_changed on model 0x%p, a %s.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_CHANGED], 0);
@@ -485,7 +485,7 @@ e_table_model_row_changed (ETableModel *e_table_model, int row)
return;
d(print_tabs());
- d(g_print("Emitting row_changed on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
+ d(g_print("Emitting row_changed on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_ROW_CHANGED], 0, row);
@@ -513,7 +513,7 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row)
return;
d(print_tabs());
- d(g_print("Emitting cell_changed on model 0x%p, a %s, row %d, col %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row, col));
+ d(g_print("Emitting cell_changed on model 0x%p, a %s, row %d, col %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row, col));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_CELL_CHANGED], 0, col, row);
@@ -541,7 +541,7 @@ e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count)
return;
d(print_tabs());
- d(g_print("Emitting row_inserted on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
+ d(g_print("Emitting row_inserted on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_ROWS_INSERTED], 0, row, count);
@@ -584,7 +584,7 @@ e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count)
return;
d(print_tabs());
- d(g_print("Emitting row_deleted on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
+ d(g_print("Emitting row_deleted on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_ROWS_DELETED], 0, row, count);
diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c
index 41ce63f943..acee2b3535 100644
--- a/widgets/table/e-table-simple.c
+++ b/widgets/table/e-table-simple.c
@@ -214,7 +214,7 @@ e_table_simple_init (ETableSimple *simple)
* This initializes a new ETableSimpleModel object. ETableSimpleModel is
* an implementaiton of the abstract class ETableModel. The ETableSimpleModel
* is designed to allow people to easily create ETableModels without having
- * to create a new GtkType derived from ETableModel every time they need one.
+ * to create a new GType derived from ETableModel every time they need one.
*
* Instead, ETableSimpleModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETableModel method
diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c
index b10e14c262..4c1373865d 100644
--- a/widgets/table/e-tree-memory-callbacks.c
+++ b/widgets/table/e-tree-memory-callbacks.c
@@ -225,7 +225,7 @@ e_tree_memory_callbacks_init (ETreeMemoryCallbacks *etmc)
* ETreeMemoryCallbacksModel is an implementaiton of the somewhat
* abstract class ETreeMemory. The ETreeMemoryCallbacksModel is
* designed to allow people to easily create ETreeMemorys without
- * having to create a new GtkType derived from ETreeMemory every time
+ * having to create a new GType derived from ETreeMemory every time
* they need one.
*
* Instead, ETreeMemoryCallbacksModel uses a setup based in callback functions, every
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 54cece5d00..8ea4cb48be 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -216,7 +216,7 @@ e_tree_model_pre_change (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting pre_change on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting pre_change on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [PRE_CHANGE], 0);
}
@@ -236,7 +236,7 @@ e_tree_model_no_change (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting no_change on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting no_change on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NO_CHANGE], 0);
}
@@ -256,7 +256,7 @@ e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_changed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_CHANGED], 0, node);
}
@@ -276,7 +276,7 @@ e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_data_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_data_changed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_DATA_CHANGED], 0, node);
}
@@ -296,7 +296,7 @@ e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, int col)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_col_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_col_changed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_COL_CHANGED], 0, node, col);
}
@@ -317,7 +317,7 @@ e_tree_model_node_inserted (ETreeModel *tree_model,
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_inserted on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_inserted on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_INSERTED], 0,
parent_node, inserted_node);
@@ -337,7 +337,7 @@ e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETree
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_removed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_removed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_REMOVED], 0,
parent_node, removed_node, old_position);
@@ -356,7 +356,7 @@ e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_deleted on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_deleted on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_DELETED], 0, deleted_node);
}
@@ -374,7 +374,7 @@ e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_request_collapse on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_request_collapse on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_REQUEST_COLLAPSE], 0, collapsed_node);
}
diff --git a/widgets/table/e-tree-simple.c b/widgets/table/e-tree-simple.c
index 8d77ca7078..23d85b0623 100644
--- a/widgets/table/e-tree-simple.c
+++ b/widgets/table/e-tree-simple.c
@@ -162,7 +162,7 @@ G_DEFINE_TYPE (ETreeSimple, e_tree_simple, E_TREE_MODEL_TYPE)
* This initializes a new ETreeSimpleModel object. ETreeSimpleModel is
* an implementaiton of the abstract class ETreeModel. The ETreeSimpleModel
* is designed to allow people to easily create ETreeModels without having
- * to create a new GtkType derived from ETreeModel every time they need one.
+ * to create a new GType derived from ETreeModel every time they need one.
*
* Instead, ETreeSimpleModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETreeModel method
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index eb7539f14b..60e28a0b44 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -232,7 +232,7 @@ struct _ETextClass {
/* Standard Gtk function */
-GtkType e_text_get_type (void);
+GType e_text_get_type (void);
void e_text_cancel_editing (EText *text);
void e_text_stop_editing (EText *text);