[gucharmap] Fix the build with gtk3



commit 00c4bd7dcde2de41e01b8b76a1501c7272fae81d
Author: Christian Persch <chpe gnome org>
Date:   Sun Oct 3 16:58:58 2010 +0200

    Fix the build with gtk3
    
    Patch by Matthias Clasen, bug #631204.

 configure.ac                        |    2 +-
 gucharmap/gucharmap-chartable.c     |    3 +--
 gucharmap/gucharmap-mini-fontsel.h  |    4 ++--
 gucharmap/gucharmap-search-dialog.c |    2 +-
 gucharmap/gucharmap-window.c        |    4 ++++
 5 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd7a386..9ede7fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,7 @@ case "$with_gtk" in
        GUCHARMAP_LIBRARY_SUFFIX=
        ;;
   3.0) GTK_API_VERSION=3.0
-       GTK_REQUIRED=2.90.0
+       GTK_REQUIRED=2.91.0
        GUCHARMAP_API_VERSION=2.90
        GUCHARMAP_API_MAJOR_VERSION=2
        GUCHARMAP_API_MINOR_VERSION=90
diff --git a/gucharmap/gucharmap-chartable.c b/gucharmap/gucharmap-chartable.c
index 6ad98ac..1dc63e5 100644
--- a/gucharmap/gucharmap-chartable.c
+++ b/gucharmap/gucharmap-chartable.c
@@ -670,8 +670,7 @@ create_glyph_pixbuf (GucharmapChartable *chartable,
 
   surface = create_glyph_surface (chartable, wc, font_factor, draw_font_family,
                                   &width, &height);
-  pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
-  gdk_pixbuf_get_from_surface (pixbuf, surface, 0, 0, 0, 0, width, height);
+  pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, width, height);
   cairo_surface_destroy (surface);
 
   if (zoom_surface_width)
diff --git a/gucharmap/gucharmap-mini-fontsel.h b/gucharmap/gucharmap-mini-fontsel.h
index 476dd79..9421554 100644
--- a/gucharmap/gucharmap-mini-fontsel.h
+++ b/gucharmap/gucharmap-mini-fontsel.h
@@ -43,9 +43,9 @@ struct _GucharmapMiniFontSelection
   GtkWidget            *bold;   /* toggle button*/
   GtkWidget            *italic; /* toggle button*/
 
-  GtkObject            *size_adj; 
+  GtkAdjustment        *size_adj;
   GtkWidget            *size;   /* spin button */
-  
+
   PangoFontDescription *font_desc;
 
   gint                  default_size;
diff --git a/gucharmap/gucharmap-search-dialog.c b/gucharmap/gucharmap-search-dialog.c
index cc3c88c..a5113f7 100644
--- a/gucharmap/gucharmap-search-dialog.c
+++ b/gucharmap/gucharmap-search-dialog.c
@@ -699,7 +699,7 @@ search_find_response (GtkDialog *dialog,
 }
 
 static void
-entry_changed (GtkObject             *object,
+entry_changed (GObject               *object,
                GucharmapSearchDialog *search_dialog)
 {
   GucharmapSearchDialogPrivate *priv = GUCHARMAP_SEARCH_DIALOG_GET_PRIVATE (search_dialog);
diff --git a/gucharmap/gucharmap-window.c b/gucharmap/gucharmap-window.c
index 650fbc5..92efe53 100644
--- a/gucharmap/gucharmap-window.c
+++ b/gucharmap/gucharmap-window.c
@@ -525,7 +525,11 @@ next_or_prev_character (GtkAction       *action,
   gtk_binding_set_activate (gtk_binding_set_by_class (klass),
                             keyval,
                             0,
+#if GTK_CHECK_VERSION (2, 91, 0)
+                            G_OBJECT (chartable));
+#else
                             GTK_OBJECT (chartable));
+#endif
 }
 
 static void



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