[gtkhtml] Bug #631321 - GtkObject is gone in GTK3
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug #631321 - GtkObject is gone in GTK3
- Date: Tue, 5 Oct 2010 10:31:46 +0000 (UTC)
commit 63cb71fdf12588966bb5a1e94b75c80f2213cec7
Author: Milan Crha <mcrha redhat com>
Date: Tue Oct 5 12:31:05 2010 +0200
Bug #631321 - GtkObject is gone in GTK3
components/editor/gtkhtml-color-combo.c | 4 +-
components/editor/gtkhtml-face-tool-button.c | 4 +-
gtkhtml/gtkhtml-embedded.c | 12 ++---
gtkhtml/gtkhtml.c | 66 +++++++++++--------------
gtkhtml/htmlprinter.c | 2 +-
5 files changed, 39 insertions(+), 49 deletions(-)
---
diff --git a/components/editor/gtkhtml-color-combo.c b/components/editor/gtkhtml-color-combo.c
index 59d1ef3..3fbbd0b 100644
--- a/components/editor/gtkhtml-color-combo.c
+++ b/components/editor/gtkhtml-color-combo.c
@@ -259,8 +259,8 @@ color_combo_child_key_press_event_cb (GtkhtmlColorCombo *combo,
{
GtkWidget *window = combo->priv->window;
- if (!gtk_bindings_activate_event (GTK_OBJECT (window), event))
- gtk_bindings_activate_event (GTK_OBJECT (combo), event);
+ if (!gtk_bindings_activate_event (G_OBJECT (window), event))
+ gtk_bindings_activate_event (G_OBJECT (combo), event);
return TRUE;
}
diff --git a/components/editor/gtkhtml-face-tool-button.c b/components/editor/gtkhtml-face-tool-button.c
index e3eef0f..d476b1d 100644
--- a/components/editor/gtkhtml-face-tool-button.c
+++ b/components/editor/gtkhtml-face-tool-button.c
@@ -213,8 +213,8 @@ face_tool_button_child_key_press_event_cb (GtkhtmlFaceToolButton *button,
{
GtkWidget *window = button->priv->window;
- if (!gtk_bindings_activate_event (GTK_OBJECT (window), event))
- gtk_bindings_activate_event (GTK_OBJECT (button), event);
+ if (!gtk_bindings_activate_event (G_OBJECT (window), event))
+ gtk_bindings_activate_event (G_OBJECT (button), event);
return TRUE;
}
diff --git a/gtkhtml/gtkhtml-embedded.c b/gtkhtml/gtkhtml-embedded.c
index 163b0f5..9681a08 100644
--- a/gtkhtml/gtkhtml-embedded.c
+++ b/gtkhtml/gtkhtml-embedded.c
@@ -119,8 +119,8 @@ static void gtk_html_embedded_remove (GtkContainer *container, GtkWidget *child)
gtk_html_embedded_changed (GTK_HTML_EMBEDDED (container));
}
-typedef void (*draw_print_signal)(GtkObject *, gpointer, gpointer);
-typedef void (*draw_gdk_signal)(GtkObject *, gpointer, gpointer, gint, gint, gpointer);
+typedef void (*draw_print_signal)(GObject *, gpointer, gpointer);
+typedef void (*draw_gdk_signal)(GObject *, gpointer, gpointer, gint, gint, gpointer);
static void
draw_gdk_signal_marshaller (GClosure *closure,
@@ -160,12 +160,10 @@ static void
gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = G_OBJECT_CLASS (class);
- object_class = GTK_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
container_class = GTK_CONTAINER_CLASS (class);
@@ -173,7 +171,7 @@ gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class)
signals[CHANGED] =
g_signal_new ("changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLEmbeddedClass, changed),
NULL, NULL,
@@ -181,7 +179,7 @@ gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class)
G_TYPE_NONE, 0);
signals[DRAW_GDK] =
g_signal_new ("draw_gdk",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLEmbeddedClass, draw_gdk),
NULL, NULL,
@@ -191,7 +189,7 @@ gtk_html_embedded_class_init (GtkHTMLEmbeddedClass *class)
signals[DRAW_PRINT] =
g_signal_new ("draw_print",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLEmbeddedClass, draw_print),
NULL, NULL,
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 534aa71..a0fd654 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -759,10 +759,10 @@ remove_scroll_timeout (GtkHTML *html)
}
-/* GtkObject methods. */
+/* GObject methods. */
static void
-destroy (GtkObject *object)
+dispose (GObject *object)
{
GtkHTML *html;
@@ -822,8 +822,8 @@ destroy (GtkObject *object)
html->engine = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose != NULL)
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
GtkHTML *
@@ -1067,7 +1067,7 @@ key_press_event (GtkWidget *widget, GdkEventKey *event)
}
if (html_class->use_emacs_bindings && html_class->emacs_bindings && !html->binding_handled)
- gtk_binding_set_activate (html_class->emacs_bindings, event->keyval, event->state, GTK_OBJECT (widget));
+ gtk_binding_set_activate (html_class->emacs_bindings, event->keyval, event->state, G_OBJECT (widget));
if (!html->binding_handled) {
html->priv->in_key_binding = TRUE;
@@ -2878,33 +2878,25 @@ gtk_html_direction_changed (GtkWidget *widget, GtkTextDirection previous_dir)
static void
gtk_html_class_init (GtkHTMLClass *klass)
{
-#ifdef USE_PROPS
GObjectClass *gobject_class;
-#endif
GtkHTMLClass *html_class;
GtkWidgetClass *widget_class;
- GtkObjectClass *object_class;
GtkLayoutClass *layout_class;
GtkContainerClass *container_class;
gchar *filename;
GConfClient *client;
html_class = (GtkHTMLClass *) klass;
-#ifdef USE_PROPS
gobject_class = (GObjectClass *) klass;
-#endif
widget_class = (GtkWidgetClass *) klass;
- object_class = (GtkObjectClass *) klass;
layout_class = (GtkLayoutClass *) klass;
container_class = (GtkContainerClass *) klass;
- object_class->destroy = destroy;
-
parent_class = g_type_class_peek_parent (klass);
signals[TITLE_CHANGED] =
g_signal_new ("title_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, title_changed),
NULL, NULL,
@@ -2913,7 +2905,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
G_TYPE_STRING);
signals[URL_REQUESTED] =
g_signal_new ("url_requested",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkHTMLClass, url_requested),
NULL, NULL,
@@ -2923,7 +2915,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
G_TYPE_POINTER);
signals[LOAD_DONE] =
g_signal_new ("load_done",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, load_done),
NULL, NULL,
@@ -2931,7 +2923,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
G_TYPE_NONE, 0);
signals[LINK_CLICKED] =
g_signal_new ("link_clicked",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, link_clicked),
NULL, NULL,
@@ -2940,7 +2932,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
G_TYPE_STRING);
signals[SET_BASE] =
g_signal_new ("set_base",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, set_base),
NULL, NULL,
@@ -2949,7 +2941,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
G_TYPE_STRING);
signals[SET_BASE_TARGET] =
g_signal_new ("set_base_target",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, set_base_target),
NULL, NULL,
@@ -2959,7 +2951,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[ON_URL] =
g_signal_new ("on_url",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, on_url),
NULL, NULL,
@@ -2969,7 +2961,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[REDIRECT] =
g_signal_new ("redirect",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, redirect),
NULL, NULL,
@@ -2980,7 +2972,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[SUBMIT] =
g_signal_new ("submit",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, submit),
NULL, NULL,
@@ -2992,7 +2984,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[OBJECT_REQUESTED] =
g_signal_new ("object_requested",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkHTMLClass, object_requested),
NULL, NULL,
@@ -3002,7 +2994,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[CURRENT_PARAGRAPH_STYLE_CHANGED] =
g_signal_new ("current_paragraph_style_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, current_paragraph_style_changed),
NULL, NULL,
@@ -3012,7 +3004,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[CURRENT_PARAGRAPH_INDENTATION_CHANGED] =
g_signal_new ("current_paragraph_indentation_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, current_paragraph_indentation_changed),
NULL, NULL,
@@ -3022,7 +3014,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[CURRENT_PARAGRAPH_ALIGNMENT_CHANGED] =
g_signal_new ("current_paragraph_alignment_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, current_paragraph_alignment_changed),
NULL, NULL,
@@ -3032,7 +3024,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[INSERTION_FONT_STYLE_CHANGED] =
g_signal_new ("insertion_font_style_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, insertion_font_style_changed),
NULL, NULL,
@@ -3042,7 +3034,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[INSERTION_COLOR_CHANGED] =
g_signal_new ("insertion_color_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, insertion_color_changed),
NULL, NULL,
@@ -3052,7 +3044,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[SIZE_CHANGED] =
g_signal_new ("size_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, size_changed),
NULL, NULL,
@@ -3060,7 +3052,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
G_TYPE_NONE, 0);
signals[IFRAME_CREATED] =
g_signal_new ("iframe_created",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, iframe_created),
NULL, NULL,
@@ -3070,7 +3062,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[SCROLL] =
g_signal_new ("scroll",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkHTMLClass, scroll),
NULL, NULL,
@@ -3081,7 +3073,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[CURSOR_MOVE] =
g_signal_new ("cursor_move",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkHTMLClass, cursor_move),
NULL, NULL,
@@ -3090,7 +3082,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[COMMAND] =
g_signal_new ("command",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkHTMLClass, command),
NULL, NULL,
@@ -3099,7 +3091,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[CURSOR_CHANGED] =
g_signal_new ("cursor_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, cursor_changed),
NULL, NULL,
@@ -3108,7 +3100,7 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[OBJECT_INSERTED] =
g_signal_new ("object_inserted",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, object_inserted),
NULL, NULL,
@@ -3118,14 +3110,14 @@ gtk_html_class_init (GtkHTMLClass *klass)
signals[OBJECT_DELETE] =
g_signal_new ("object_delete",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHTMLClass, object_delete),
NULL, NULL,
html_g_cclosure_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
G_TYPE_INT, G_TYPE_INT);
- object_class->destroy = destroy;
+ gobject_class->dispose = dispose;
#ifdef USE_PROPS
gobject_class->get_property = gtk_html_get_property;
diff --git a/gtkhtml/htmlprinter.c b/gtkhtml/htmlprinter.c
index 82ceb8e..0091dc5 100644
--- a/gtkhtml/htmlprinter.c
+++ b/gtkhtml/htmlprinter.c
@@ -65,7 +65,7 @@ html_printer_scale_to_gnome_print (HTMLPrinter *printer, gint x)
}
-/* GtkObject methods. */
+/* GObject methods. */
static void
finalize (GObject *object)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]