From 2a7bc6967326be929beb1e0d7a3ba091022d59e9 Mon Sep 17 00:00:00 2001 From: Michael Zucci Date: Mon, 2 Dec 2002 03:21:43 +0000 Subject: ran fix.sh over this. svn path=/trunk/; revision=18976 --- notes/component-factory.c | 12 ++++++------ notes/e-bevel-button.c | 2 +- notes/e-bevel-button.h | 8 ++++---- notes/e-note.c | 40 ++++++++++++++++++++-------------------- notes/e-note.h | 8 ++++---- notes/main.c | 2 +- notes/test-notes.c | 4 ++-- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/notes/component-factory.c b/notes/component-factory.c index 54c1f91e94..9b351db7b9 100644 --- a/notes/component-factory.c +++ b/notes/component-factory.c @@ -97,7 +97,7 @@ create_view (EvolutionShellComponent *shell_component, control = notes_factory_new_control (); #ifdef THIS_CODE_IS_TOTALY_DEAD - gtk_signal_connect (GTK_OBJECT (control), "activate", + g_signal_connect((control), "activate", control_activate_cb, NULL); #endif @@ -128,10 +128,10 @@ notes_component_factory (BonoboGenericFactory *factory, shell_component = evolution_shell_component_new (folder_types, create_view, NULL); - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", - GTK_SIGNAL_FUNC (owner_set_cb), NULL); - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset", - GTK_SIGNAL_FUNC (owner_unset_cb), NULL); + g_signal_connect((shell_component), "owner_set", + G_CALLBACK (owner_set_cb), NULL); + g_signal_connect((shell_component), "owner_unset", + G_CALLBACK (owner_unset_cb), NULL); return BONOBO_OBJECT (shell_component); } @@ -148,7 +148,7 @@ component_factory_init (void) factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, notes_component_factory, NULL); if (factory == NULL) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + e_notice (NULL, GTK_MESSAGE_ERROR, _("Cannot initialize Evolution's notes component.")); exit (1); } diff --git a/notes/e-bevel-button.c b/notes/e-bevel-button.c index 1d96d88531..03b0edf23d 100644 --- a/notes/e-bevel-button.c +++ b/notes/e-bevel-button.c @@ -131,7 +131,7 @@ e_bevel_button_class_init (EBevelButtonClass *klass) widget_class = (GtkWidgetClass *)klass; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); widget_class->draw = e_bevel_button_draw; widget_class->expose_event = e_bevel_button_expose; diff --git a/notes/e-bevel-button.h b/notes/e-bevel-button.h index 333c317b43..e9197c3b63 100644 --- a/notes/e-bevel-button.h +++ b/notes/e-bevel-button.h @@ -9,10 +9,10 @@ #include #define E_TYPE_BEVEL_BUTTON (e_bevel_button_get_type ()) -#define E_BEVEL_BUTTON(obj) (GTK_CHECK_CAST ((obj), E_TYPE_BEVEL_BUTTON, EBevelButton)) -#define E_BEVEL_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_BEVEL_BUTTON, EBevelButtonClass)) -#define E_IS_BEVEL_BUTTON(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_BEVEL_BUTTON)) -#define E_IS_BEVEL_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_BEVEL_BUTTON)) +#define E_BEVEL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_BEVEL_BUTTON, EBevelButton)) +#define E_BEVEL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_BEVEL_BUTTON, EBevelButtonClass)) +#define E_IS_BEVEL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_BEVEL_BUTTON)) +#define E_IS_BEVEL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_BEVEL_BUTTON)) typedef struct _EBevelButton EBevelButton; typedef struct _EBevelButtonPrivate EBevelButtonPrivate; diff --git a/notes/e-note.c b/notes/e-note.c index 642fd1178a..e7d84a8256 100644 --- a/notes/e-note.c +++ b/notes/e-note.c @@ -181,7 +181,7 @@ e_note_canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpoin gnome_canvas_item_set (note->priv->text_item, "width", (gdouble) allocation->width - 10, NULL); - gtk_object_get (GTK_OBJECT (note->priv->text_item), + g_object_get((note->priv->text_item), "height", &height, NULL); height = MAX (height, allocation->height); @@ -223,7 +223,7 @@ e_note_class_init (ENoteClass *klass) object_class = (GtkObjectClass *)klass; widget_class = (GtkWidgetClass *)klass; - parent_class = gtk_type_class (PARENT_TYPE); + parent_class = g_type_class_ref(PARENT_TYPE); widget_class->realize = e_note_realize; @@ -231,7 +231,7 @@ e_note_class_init (ENoteClass *klass) gtk_signal_new ("changed", GTK_RUN_LAST, object_class->type, - GTK_SIGNAL_OFFSET (ENoteClass, text_changed), + G_STRUCT_OFFSET (ENoteClass, text_changed), gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); @@ -256,8 +256,8 @@ e_note_init (ENote *note) gtk_widget_pop_visual (); gtk_widget_pop_colormap (); - gtk_signal_connect (GTK_OBJECT (priv->canvas), "size_allocate", - GTK_SIGNAL_FUNC (e_note_canvas_size_allocate), note); + g_signal_connect((priv->canvas), "size_allocate", + G_CALLBACK (e_note_canvas_size_allocate), note); gtk_widget_show (priv->canvas); gtk_container_add (GTK_CONTAINER (note), priv->canvas); @@ -292,16 +292,16 @@ e_note_init (ENote *note) e_canvas_item_move_absolute(priv->text_item, 5.0, 25.0); - gtk_signal_connect (GTK_OBJECT (E_TEXT (priv->text_item)->model), "changed", - GTK_SIGNAL_FUNC (e_note_text_changed), note); + g_signal_connect((E_TEXT (priv->text_item)->model), "changed", + G_CALLBACK (e_note_text_changed), note); button = e_bevel_button_new (); - gtk_signal_connect (GTK_OBJECT (button), "button_press_event", - GTK_SIGNAL_FUNC (e_note_move_button_changed), note); - gtk_signal_connect (GTK_OBJECT (button), "button_release_event", - GTK_SIGNAL_FUNC (e_note_move_button_changed), note); - gtk_signal_connect (GTK_OBJECT (button), "motion_notify_event", - GTK_SIGNAL_FUNC (e_note_move_motion_event), note); + g_signal_connect((button), "button_press_event", + G_CALLBACK (e_note_move_button_changed), note); + g_signal_connect((button), "button_release_event", + G_CALLBACK (e_note_move_button_changed), note); + g_signal_connect((button), "motion_notify_event", + G_CALLBACK (e_note_move_motion_event), note); gtk_widget_show (button); priv->move_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), gnome_canvas_widget_get_type (), @@ -323,12 +323,12 @@ e_note_init (ENote *note) NULL); button = e_bevel_button_new (); - gtk_signal_connect (GTK_OBJECT (button), "button_press_event", - GTK_SIGNAL_FUNC (e_note_resize_button_changed), note); - gtk_signal_connect (GTK_OBJECT (button), "button_release_event", - GTK_SIGNAL_FUNC (e_note_resize_button_changed), note); - gtk_signal_connect (GTK_OBJECT (button), "motion_notify_event", - GTK_SIGNAL_FUNC (e_note_resize_motion_event), note); + g_signal_connect((button), "button_press_event", + G_CALLBACK (e_note_resize_button_changed), note); + g_signal_connect((button), "button_release_event", + G_CALLBACK (e_note_resize_button_changed), note); + g_signal_connect((button), "motion_notify_event", + G_CALLBACK (e_note_resize_motion_event), note); gtk_widget_show (button); priv->resize_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)), gnome_canvas_widget_get_type (), @@ -361,7 +361,7 @@ e_note_get_text (ENote *note) g_return_val_if_fail (E_IS_NOTE (note), NULL); g_return_val_if_fail (text != NULL, NULL); - gtk_object_get (GTK_OBJECT (note->priv->text_item), + g_object_get((note->priv->text_item), "text", &text, NULL); diff --git a/notes/e-note.h b/notes/e-note.h index d7d4c63b95..1bf1273d01 100644 --- a/notes/e-note.h +++ b/notes/e-note.h @@ -8,10 +8,10 @@ #include "e-bevel-button.h" #define E_TYPE_NOTE (e_note_get_type ()) -#define E_NOTE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_NOTE, ENote)) -#define E_NOTE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_NOTE, ENoteClass)) -#define E_IS_NOTE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_NOTE)) -#define E_IS_NOTE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_NOTE)) +#define E_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_NOTE, ENote)) +#define E_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_NOTE, ENoteClass)) +#define E_IS_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_NOTE)) +#define E_IS_NOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_NOTE)) typedef struct _ENote ENote; typedef struct _ENotePrivate ENotePrivate; diff --git a/notes/main.c b/notes/main.c index 148b9a409d..340a09469b 100644 --- a/notes/main.c +++ b/notes/main.c @@ -26,7 +26,7 @@ static void init_bonobo (void) { if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + e_notice (NULL, GTK_MESSAGE_ERROR, _("Notes Component: Could not initialize bonobo")); exit (1); } diff --git a/notes/test-notes.c b/notes/test-notes.c index 41def58a24..1114b57e66 100644 --- a/notes/test-notes.c +++ b/notes/test-notes.c @@ -24,8 +24,8 @@ main (gint argc, gchar **argv) note = e_note_new (); e_note_set_text (E_NOTE (note), "This is a text note widget"); - gtk_signal_connect (GTK_OBJECT (note), "changed", - GTK_SIGNAL_FUNC (text_changed), NULL); + g_signal_connect((note), "changed", + G_CALLBACK (text_changed), NULL); gtk_widget_show (note); gtk_main (); -- cgit v1.2.3