[gtk/wip/iainl/deprecataions-gtk-3-24] Fix fallout from g_object_ref change



commit 6e08d682a650d849514fc5dbed0f7d3469e33ba7
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 8 17:48:47 2017 -0500

    Fix fallout from g_object_ref change
    
    g_object_ref now returns the type of the object that was
    passed. Introduce cast as necessary to avoid warnings due
    to this.
    
    Modified by Iain Lane <iainl gnome org>: many of these were applied
    already.
    
    (cherry picked from commit 072f06abf713d7536ce2a84a5ac266f585c88d39)

 gtk/gtkcolorplane.c                              | 2 +-
 modules/printbackends/cups/gtkprintbackendcups.c | 2 +-
 tests/testentrycompletion.c                      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c
index 910f7a0801..aa964bb976 100644
--- a/gtk/gtkcolorplane.c
+++ b/gtk/gtkcolorplane.c
@@ -451,7 +451,7 @@ plane_set_property (GObject      *object,
                    GParamSpec   *pspec)
 {
   GtkColorPlane *plane = GTK_COLOR_PLANE (object);
-  GObject *adjustment;
+  GtkAdjustment *adjustment;
 
   /* Construct only properties can only be set once, these are created
    * only in order to be properly buildable from gtkcoloreditor.ui
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c 
b/modules/printbackends/cups/gtkprintbackendcups.c
index ccd08e50a0..97c74d6bf4 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -3966,7 +3966,7 @@ cups_request_ppd (GtkPrinter *printer)
   g_io_channel_set_encoding (data->ppd_io, NULL, NULL);
   g_io_channel_set_close_on_unref (data->ppd_io, TRUE);
 
-  data->printer = g_object_ref (printer);
+  data->printer = (GtkPrinterCups *) g_object_ref (printer);
 
   resource = g_strdup_printf ("/printers/%s.ppd",
                               gtk_printer_cups_get_ppd_name (GTK_PRINTER_CUPS (printer)));
diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c
index 51fb6ee611..a8b0b44aea 100644
--- a/tests/testentrycompletion.c
+++ b/tests/testentrycompletion.c
@@ -233,7 +233,7 @@ animation_timer (GtkEntryCompletion *completion)
        {
          g_print ("removing model!\n");
 
-         old_store = g_object_ref (store);
+         old_store = GTK_LIST_STORE (g_object_ref (store));
          gtk_entry_completion_set_model (completion, NULL);
        }
       else


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