Stop using APIs deprecated in Clutter master

https://bugzilla.gnome.org/show_bug.cgi?id=662627
This commit is contained in:
Jasper St. Pierre 2011-10-19 13:29:19 -04:00
parent 95de48e986
commit 1aa97b19f7
3 changed files with 12 additions and 6 deletions

View File

@ -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,

View File

@ -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;
}
}

View File

@ -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),