[gnome-shell] Stop using APIs deprecated in Clutter master



commit 1aa97b19f77affdc0466715f2ae7662070cb37bf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 19 13:29:19 2011 -0400

    Stop using APIs deprecated in Clutter master
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662627

 src/main.c             |    5 ++++-
 src/shell-recorder.c   |    2 +-
 src/st/st-scroll-bar.c |   11 +++++++----
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 503f8a1..0b80783 100644
--- a/src/main.c
+++ b/src/main.c
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <cogl-pango/cogl-pango.h>
 #include <clutter/clutter.h>
 #include <clutter/x11/clutter-x11.h>
 #include <dbus/dbus-glib.h>
@@ -258,13 +259,15 @@ static void
 shell_fonts_init (void)
 {
   GtkSettings *settings;
+  CoglPangoFontMap *fontmap;
 
   /* Disable text mipmapping; it causes problems on pre-GEM Intel
    * drivers and we should just be rendering text at the right
    * size rather than scaling it. If we do effects where we dynamically
    * zoom labels, then we might want to reconsider.
    */
-  clutter_set_font_flags (clutter_get_font_flags () & ~CLUTTER_FONT_MIPMAPPING);
+  fontmap = COGL_PANGO_FONT_MAP (clutter_get_font_map ());
+  cogl_pango_font_map_set_use_mipmapping (fontmap, FALSE);
 
   settings = gtk_settings_get_default ();
   g_object_connect (settings,
diff --git a/src/shell-recorder.c b/src/shell-recorder.c
index a624389..f75212e 100644
--- a/src/shell-recorder.c
+++ b/src/shell-recorder.c
@@ -341,7 +341,7 @@ recorder_update_memory_used (ShellRecorder *recorder,
            * seems like a bad idea.
            */
           recorder->only_paint = TRUE;
-          clutter_redraw (recorder->stage);
+          clutter_stage_ensure_redraw (recorder->stage);
           recorder->only_paint = FALSE;
         }
     }
diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c
index e6eb81f..1eb0791 100644
--- a/src/st/st-scroll-bar.c
+++ b/src/st/st-scroll-bar.c
@@ -777,16 +777,16 @@ move_slider (StScrollBar *bar,
 static void
 stop_scrolling (StScrollBar *bar)
 {
-  ClutterActor *stage;
+  ClutterStage *stage;
 
   if (!bar->priv->capture_handler)
     return;
 
-  stage = clutter_actor_get_stage (bar->priv->trough);
+  stage = CLUTTER_STAGE (clutter_actor_get_stage (bar->priv->trough));
   g_signal_handler_disconnect (stage, bar->priv->capture_handler);
   bar->priv->capture_handler = 0;
 
-  clutter_set_motion_events_enabled (TRUE);
+  clutter_stage_set_motion_events_enabled (stage, TRUE);
   g_signal_emit (bar, signals[SCROLL_STOP], 0);
 }
 
@@ -829,6 +829,7 @@ handle_button_press_event_cb (ClutterActor       *actor,
                               ClutterButtonEvent *event,
                               StScrollBar        *bar)
 {
+  ClutterStage *stage;
   StScrollBarPrivate *priv = bar->priv;
 
   if (event->button != 1)
@@ -845,8 +846,10 @@ handle_button_press_event_cb (ClutterActor       *actor,
   priv->x_origin += clutter_actor_get_x (priv->trough);
   priv->y_origin += clutter_actor_get_y (priv->trough);
 
+  stage = CLUTTER_STAGE (clutter_actor_get_stage (bar->priv->trough));
+
   /* Turn off picking for motion events */
-  clutter_set_motion_events_enabled (FALSE);
+  clutter_stage_set_motion_events_enabled (stage, FALSE);
 
   priv->capture_handler = g_signal_connect_after (
     clutter_actor_get_stage (priv->trough),



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