[gtkhtml] Bug 606244 - Remove usage of deprecated GTK+ symbols



commit 265e4da7d533ab32243f4e63c5c35c12de5d62b2
Author: Frédéric Péters <fpeters 0d be>
Date:   Thu Jan 7 14:12:52 2010 -0500

    Bug 606244 - Remove usage of deprecated GTK+ symbols
    
    GTK_WIDGET_TOPLEVEL is replaced by gtk_widget_is_toplevel, and
    GTK_OBJECT_TYPE by G_OBJECT_TYPE.  The required GTK+ version is bumped
    to 2.18.

 components/editor/gtkhtml-color-combo.c      |    4 ++--
 components/editor/gtkhtml-face-tool-button.c |    2 +-
 configure.ac                                 |    2 +-
 gtkhtml/gtkhtml.c                            |    2 +-
 gtkhtml/htmlframe.c                          |    4 ++--
 gtkhtml/htmliframe.c                         |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/components/editor/gtkhtml-color-combo.c b/components/editor/gtkhtml-color-combo.c
index 2f4d397..c3af77b 100644
--- a/components/editor/gtkhtml-color-combo.c
+++ b/components/editor/gtkhtml-color-combo.c
@@ -276,7 +276,7 @@ color_combo_custom_clicked_cb (GtkhtmlColorCombo *combo)
 		GTK_COLOR_SELECTION_DIALOG (dialog));
 	toplevel = gtk_widget_get_toplevel (GTK_WIDGET (combo));
 
-	if (GTK_WIDGET_TOPLEVEL (toplevel))
+	if (gtk_widget_is_toplevel (toplevel))
 		gtk_window_set_transient_for (
 			GTK_WINDOW (dialog), GTK_WINDOW (toplevel));
 
@@ -895,7 +895,7 @@ color_combo_init (GtkhtmlColorCombo *combo)
 	gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
 	gtk_window_set_type_hint (
 		GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_COMBO);
-	if (GTK_WIDGET_TOPLEVEL (toplevel)) {
+	if (gtk_widget_is_toplevel (toplevel)) {
 		gtk_window_group_add_window (
 			gtk_window_get_group (GTK_WINDOW (toplevel)),
 			GTK_WINDOW (window));
diff --git a/components/editor/gtkhtml-face-tool-button.c b/components/editor/gtkhtml-face-tool-button.c
index df2ceb4..2787081 100644
--- a/components/editor/gtkhtml-face-tool-button.c
+++ b/components/editor/gtkhtml-face-tool-button.c
@@ -522,7 +522,7 @@ face_tool_button_init (GtkhtmlFaceToolButton *button)
 	gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
 	gtk_window_set_type_hint (
 		GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_COMBO);
-	if (GTK_WIDGET_TOPLEVEL (toplevel)) {
+	if (gtk_widget_is_toplevel (toplevel)) {
 		gtk_window_group_add_window (
 			gtk_window_get_group (GTK_WINDOW (toplevel)),
 			GTK_WINDOW (window));
diff --git a/configure.ac b/configure.ac
index d00316e..12c4224 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ AC_CONFIG_SRCDIR(README)
 PACKAGE=gtkhtml
 
 # Required Package Versions
-m4_define([gtk_minimum_version], [2.16.0])
+m4_define([gtk_minimum_version], [2.18.0])
 m4_define([gail_minimum_version], [1.1.0])
 m4_define([gnome_icon_theme_minimum_version], [2.22.0])
 
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 06199ea..967b99e 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -1807,7 +1807,7 @@ hierarchy_changed (GtkWidget *widget,
 
 	toplevel = gtk_widget_get_toplevel (widget);
 
-	if (GTK_WIDGET_TOPLEVEL (toplevel) && priv->toplevel_unmap_handler == 0) {
+	if (gtk_widget_is_toplevel (toplevel) && priv->toplevel_unmap_handler == 0) {
 		priv->toplevel_unmap_handler = g_signal_connect (G_OBJECT (toplevel), "unmap-event",
 								 G_CALLBACK (toplevel_unmap), widget);
 	}
diff --git a/gtkhtml/htmlframe.c b/gtkhtml/htmlframe.c
index 868854c..1418bb0 100644
--- a/gtkhtml/htmlframe.c
+++ b/gtkhtml/htmlframe.c
@@ -168,7 +168,7 @@ draw (HTMLObject *o,
 	HTMLEngine   *e       = GTK_HTML (frame->html)->engine;
 	GdkRectangle paint;
 
-	if (GTK_OBJECT_TYPE (e->painter) == HTML_TYPE_PRINTER) {
+	if (G_OBJECT_TYPE (e->painter) == HTML_TYPE_PRINTER) {
 		gint pixel_size = html_painter_get_pixel_size (e->painter);
 
 		if (!html_object_intersect (o, &paint, x, y, width, height))
@@ -194,7 +194,7 @@ set_painter (HTMLObject *o, HTMLPainter *painter)
 	}
 
 	html_engine_set_painter (GTK_HTML (frame->html)->engine,
-				 GTK_OBJECT_TYPE (painter) != HTML_TYPE_PRINTER ? frame->gdk_painter : painter);
+				 G_OBJECT_TYPE (painter) != HTML_TYPE_PRINTER ? frame->gdk_painter : painter);
 }
 
 static void
diff --git a/gtkhtml/htmliframe.c b/gtkhtml/htmliframe.c
index 9cbdf21..048552a 100644
--- a/gtkhtml/htmliframe.c
+++ b/gtkhtml/htmliframe.c
@@ -169,7 +169,7 @@ draw (HTMLObject *o,
 	HTMLEngine   *e       = GTK_HTML (iframe->html)->engine;
 	GdkRectangle paint;
 
-	if (GTK_OBJECT_TYPE (e->painter) == HTML_TYPE_PRINTER) {
+	if (G_OBJECT_TYPE (e->painter) == HTML_TYPE_PRINTER) {
 		gint pixel_size = html_painter_get_pixel_size (e->painter);
 
 		if (!html_object_intersect (o, &paint, x, y, width, height))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]