[cheese/wip/kill-gnome-common: 12/13] Avoid deprecation warnings



commit 6a4b321028b18b6c9c806c1c928ea0fe5f6d2d99
Author: David King <amigadave amigadave com>
Date:   Thu Jan 29 13:10:10 2015 +0000

    Avoid deprecation warnings
    
    Exlicitly ignore deprecation warnings.

 libcheese/cheese-flash.c       |    3 +++
 libcheese/cheese-widget.c      |    4 ++++
 libcheese/totem-aspect-frame.c |    6 ++++++
 tests/cheese-test-camera.c     |    2 ++
 4 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/cheese-flash.c b/libcheese/cheese-flash.c
index 8500acb..655c995 100644
--- a/libcheese/cheese-flash.c
+++ b/libcheese/cheese-flash.c
@@ -98,8 +98,11 @@ cheese_flash_init (CheeseFlash *self)
   gtk_window_set_focus_on_map (window, FALSE);
 
   /* Make it white */
+/* FIXME: Use a custom style provider. */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_widget_override_background_color (GTK_WIDGET (window), GTK_STATE_NORMAL,
                                         &white);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /* Don't consume input */
   gtk_widget_realize (GTK_WIDGET (window));
diff --git a/libcheese/cheese-widget.c b/libcheese/cheese-widget.c
index 586824d..5ceb098 100644
--- a/libcheese/cheese-widget.c
+++ b/libcheese/cheese-widget.c
@@ -158,6 +158,7 @@ cheese_widget_spinner_invert (GtkWidget *spinner, GtkWidget *parent)
 
     context = gtk_widget_get_style_context (spinner);
     gtk_style_context_get_color (context, gtk_style_context_get_state (context), &fg);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &bg);
 
     gtk_widget_override_color (spinner, i, &bg);
@@ -165,6 +166,7 @@ cheese_widget_spinner_invert (GtkWidget *spinner, GtkWidget *parent)
 
     gtk_widget_override_color (parent, i, &bg);
     gtk_widget_override_background_color (parent, i, &fg);
+G_GNUC_END_IGNORE_DEPRECATIONS
   }
 }
 
@@ -217,7 +219,9 @@ cheese_widget_init (CheeseWidget *widget)
   clutter_actor_set_background_color (stage, &black);
   frame = totem_aspect_frame_new ();
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   priv->texture = clutter_texture_new ();
+G_GNUC_END_IGNORE_DEPRECATIONS
   totem_aspect_frame_set_child (TOTEM_ASPECT_FRAME (frame), priv->texture);
 
   clutter_actor_set_layout_manager (stage, clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FILL, 
CLUTTER_BIN_ALIGNMENT_FILL));
diff --git a/libcheese/totem-aspect-frame.c b/libcheese/totem-aspect-frame.c
index 7837ddf..1ce0e28 100644
--- a/libcheese/totem-aspect-frame.c
+++ b/libcheese/totem-aspect-frame.c
@@ -296,9 +296,12 @@ totem_aspect_frame_paint (ClutterActor *actor)
 
       clutter_actor_get_size (actor, &width, &height);
 
+/* FIXME: Avoid using deprecated COGL API (check Totem). */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       cogl_clip_push_rectangle (0.0, 0.0, width, height);
       clutter_actor_paint (child);
       cogl_clip_pop ();
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
   else
     clutter_actor_paint (child);
@@ -323,9 +326,12 @@ totem_aspect_frame_pick (ClutterActor       *actor,
 
   if (priv->expand)
     {
+/* FIXME: Avoid using deprecated COGL API (check Totem). */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       cogl_clip_push_rectangle (0.0, 0.0, box.x2 - box.x1, box.y2 - box.y1);
       clutter_actor_paint (child);
       cogl_clip_pop ();
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
   else
     clutter_actor_paint (child);
diff --git a/tests/cheese-test-camera.c b/tests/cheese-test-camera.c
index e777cba..6e05336 100644
--- a/tests/cheese-test-camera.c
+++ b/tests/cheese-test-camera.c
@@ -54,7 +54,9 @@ main (int argc, char **argv)
 
   screen = gtk_clutter_embed_new ();
   stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (screen));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   texture = clutter_texture_new ();
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   clutter_actor_set_size (texture, 400, 300);
   clutter_actor_add_child (stage, texture);


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