From c5f392ca0e8b878206a012da11522125e1d86342 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 4 Oct 2001 23:52:20 +0000 Subject: add E_OBJECT_CLASS_ADD_SIGNALS and E_OBJECT_CLASS_TYPE to ease migration 2001-10-05 Michael Meeks * gal/util/e-util.h: add E_OBJECT_CLASS_ADD_SIGNALS and E_OBJECT_CLASS_TYPE to ease migration to Gnome 2.0 from a single source base. * All C files: s/object_class->type,/E_OBJECT_CLASS_TYPE (object_class),/g; s/gtk_object_class_add_signals([^\(]*)\(([^,]*),([^,]*),([^\)]*)/ E_OBJECT_CLASS_ADD_SIGNALS\1(\2,\3,\4/; svn path=/trunk/; revision=13428 --- widgets/misc/e-canvas.c | 5 +++-- widgets/misc/e-printable.c | 12 ++++++------ widgets/misc/e-reflow-model.c | 9 +++++---- widgets/misc/e-reflow.c | 4 ++-- widgets/misc/e-selection-model.c | 8 ++++---- 5 files changed, 20 insertions(+), 18 deletions(-) (limited to 'widgets/misc') diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index f06aa6e33b..0e374d391c 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -22,6 +22,7 @@ #include #include "e-canvas.h" +#include "gal/util/e-util.h" static void e_canvas_init (ECanvas *card); static void e_canvas_destroy (GtkObject *object); @@ -107,12 +108,12 @@ e_canvas_class_init (ECanvasClass *klass) e_canvas_signals [REFLOW] = gtk_signal_new ("reflow", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ECanvasClass, reflow), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, e_canvas_signals, LAST_SIGNAL); + E_OBJECT_CLASS_ADD_SIGNALS (object_class, e_canvas_signals, LAST_SIGNAL); } static void diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c index f029e88573..b3d4cca6a6 100644 --- a/widgets/misc/e-printable.c +++ b/widgets/misc/e-printable.c @@ -39,7 +39,7 @@ e_printable_class_init (GtkObjectClass *object_class) e_printable_signals [PRINT_PAGE] = gtk_signal_new ("print_page", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EPrintableClass, print_page), e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL, GTK_TYPE_NONE, 4, GTK_TYPE_OBJECT, GTK_TYPE_DOUBLE, GTK_TYPE_DOUBLE, GTK_TYPE_BOOL); @@ -47,7 +47,7 @@ e_printable_class_init (GtkObjectClass *object_class) e_printable_signals [DATA_LEFT] = gtk_signal_new ("data_left", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EPrintableClass, data_left), gtk_marshal_BOOL__NONE, GTK_TYPE_BOOL, 0, GTK_TYPE_NONE); @@ -55,7 +55,7 @@ e_printable_class_init (GtkObjectClass *object_class) e_printable_signals [RESET] = gtk_signal_new ("reset", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EPrintableClass, reset), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0, GTK_TYPE_NONE); @@ -63,7 +63,7 @@ e_printable_class_init (GtkObjectClass *object_class) e_printable_signals [HEIGHT] = gtk_signal_new ("height", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EPrintableClass, height), e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL, GTK_TYPE_DOUBLE, 4, GTK_TYPE_OBJECT, GTK_TYPE_DOUBLE, GTK_TYPE_DOUBLE, GTK_TYPE_BOOL); @@ -71,12 +71,12 @@ e_printable_class_init (GtkObjectClass *object_class) e_printable_signals [WILL_FIT] = gtk_signal_new ("will_fit", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EPrintableClass, will_fit), e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL, GTK_TYPE_BOOL, 4, GTK_TYPE_OBJECT, GTK_TYPE_DOUBLE, GTK_TYPE_DOUBLE, GTK_TYPE_BOOL); - gtk_object_class_add_signals (object_class, e_printable_signals, LAST_SIGNAL); + E_OBJECT_CLASS_ADD_SIGNALS (object_class, e_printable_signals, LAST_SIGNAL); klass->print_page = NULL; klass->data_left = NULL; diff --git a/widgets/misc/e-reflow-model.c b/widgets/misc/e-reflow-model.c index 74e7b1726c..4967d21ea3 100644 --- a/widgets/misc/e-reflow-model.c +++ b/widgets/misc/e-reflow-model.c @@ -10,6 +10,7 @@ #include #include "e-reflow-model.h" #include +#include "gal/util/e-util.h" #define ERM_CLASS(e) ((EReflowModelClass *)((GtkObject *)e)->klass) @@ -143,7 +144,7 @@ e_reflow_model_class_init (GtkObjectClass *object_class) e_reflow_model_signals [MODEL_CHANGED] = gtk_signal_new ("model_changed", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EReflowModelClass, model_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -151,7 +152,7 @@ e_reflow_model_class_init (GtkObjectClass *object_class) e_reflow_model_signals [MODEL_ITEMS_INSERTED] = gtk_signal_new ("model_items_inserted", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EReflowModelClass, model_items_inserted), gtk_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); @@ -159,12 +160,12 @@ e_reflow_model_class_init (GtkObjectClass *object_class) e_reflow_model_signals [MODEL_ITEM_CHANGED] = gtk_signal_new ("model_item_changed", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EReflowModelClass, model_item_changed), gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); - gtk_object_class_add_signals (object_class, e_reflow_model_signals, LAST_SIGNAL); + E_OBJECT_CLASS_ADD_SIGNALS (object_class, e_reflow_model_signals, LAST_SIGNAL); klass->set_width = NULL; klass->count = NULL; diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index 3674b6d11f..9402821c4f 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -1180,12 +1180,12 @@ e_reflow_class_init (EReflowClass *klass) signals [SELECTION_EVENT] = gtk_signal_new ("selection_event", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (EReflowClass, selection_event), e_marshal_INT__OBJECT_POINTER, GTK_TYPE_INT, 2, GTK_TYPE_OBJECT, GTK_TYPE_GDK_EVENT); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); + E_OBJECT_CLASS_ADD_SIGNALS (object_class, signals, LAST_SIGNAL); object_class->set_arg = e_reflow_set_arg; object_class->get_arg = e_reflow_get_arg; diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c index e8b19fc618..26f6769ae3 100644 --- a/widgets/misc/e-selection-model.c +++ b/widgets/misc/e-selection-model.c @@ -136,7 +136,7 @@ e_selection_model_class_init (ESelectionModelClass *klass) e_selection_model_signals [CURSOR_CHANGED] = gtk_signal_new ("cursor_changed", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESelectionModelClass, cursor_changed), gtk_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); @@ -144,7 +144,7 @@ e_selection_model_class_init (ESelectionModelClass *klass) e_selection_model_signals [CURSOR_ACTIVATED] = gtk_signal_new ("cursor_activated", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESelectionModelClass, cursor_activated), gtk_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); @@ -152,7 +152,7 @@ e_selection_model_class_init (ESelectionModelClass *klass) e_selection_model_signals [SELECTION_CHANGED] = gtk_signal_new ("selection_changed", GTK_RUN_LAST, - object_class->type, + E_OBJECT_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (ESelectionModelClass, selection_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -180,7 +180,7 @@ e_selection_model_class_init (ESelectionModelClass *klass) klass->set_selection_end = NULL; - gtk_object_class_add_signals (object_class, e_selection_model_signals, LAST_SIGNAL); + E_OBJECT_CLASS_ADD_SIGNALS (object_class, e_selection_model_signals, LAST_SIGNAL); gtk_object_add_arg_type ("ESelectionModel::sorter", GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_SORTER); -- cgit