[gnome-boxes] Adapt to Clutter 1.12 API
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Adapt to Clutter 1.12 API
- Date: Thu, 10 Jan 2013 22:29:01 +0000 (UTC)
commit b3ea499792b88dfaa08dd50ab0ac03caa5c6b915
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jan 10 09:56:18 2013 +0100
Adapt to Clutter 1.12 API
This gets rid of most deprecation warnings for clutter 1.12, but
we still get a few warnings about Clutter.BinAlignment that we
can't really get rid of (as its needed for the BinLayout constructor).
https://bugzilla.gnome.org/show_bug.cgi?id=691078
src/app.vala | 19 +++++++++++++------
src/machine.vala | 2 +-
src/sidebar.vala | 7 +++----
3 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index ee48b59..2993f06 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -469,7 +469,7 @@ private class Boxes.App: Boxes.UI {
vbox_actor.name = "top-vbox";
var vbox = new Clutter.BoxLayout ();
vbox_actor.set_layout_manager (vbox);
- vbox.set_vertical (true);
+ vbox.orientation = Clutter.Orientation.VERTICAL;
vbox_actor.x_align = Clutter.ActorAlign.FILL;
vbox_actor.y_align = Clutter.ActorAlign.FILL;
@@ -477,14 +477,16 @@ private class Boxes.App: Boxes.UI {
var topbar_revealer = new Boxes.Revealer (true);
topbar_revealer.name = "topbar-revealer";
- vbox.pack (topbar_revealer, false, true, true, Clutter.BoxAlignment.START, Clutter.BoxAlignment.START);
+ topbar_revealer.x_expand = true;
+ vbox_actor.add_child (topbar_revealer);
topbar_revealer.add (topbar.actor);
searchbar_revealer = new Boxes.Revealer (true);
searchbar_revealer.resize = true;
searchbar_revealer.unreveal ();
searchbar_revealer.name = "searchbar-revealer";
- vbox.pack (searchbar_revealer, false, true, true, Clutter.BoxAlignment.START, Clutter.BoxAlignment.START);
+ searchbar_revealer.x_expand = true;
+ vbox_actor.add_child (searchbar_revealer);
searchbar_revealer.add (searchbar.actor);
var below_bin_actor = new Clutter.Actor ();
@@ -493,7 +495,9 @@ private class Boxes.App: Boxes.UI {
Clutter.BinAlignment.FILL);
below_bin_actor.set_layout_manager (below_bin);
- vbox.pack (below_bin_actor, true, true, true, Clutter.BoxAlignment.START, Clutter.BoxAlignment.START);
+ below_bin_actor.x_expand = true;
+ below_bin_actor.y_expand = true;
+ vbox_actor.add_child (below_bin_actor);
below_bin_actor.add_child (view.actor);
@@ -517,7 +521,8 @@ private class Boxes.App: Boxes.UI {
sidebar_revealer = new Boxes.Revealer (false);
sidebar_revealer.name = "sidebar-revealer";
- hbox.pack (sidebar_revealer, false, true, true, Clutter.BoxAlignment.START, Clutter.BoxAlignment.START);
+ sidebar_revealer.y_expand = true;
+ hbox_actor.add_child (sidebar_revealer);
sidebar_revealer.unreveal ();
sidebar_revealer.add (sidebar.actor);
@@ -526,7 +531,9 @@ private class Boxes.App: Boxes.UI {
var content_bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
Clutter.BinAlignment.FILL);
content_bin_actor.set_layout_manager (content_bin);
- hbox.pack (content_bin_actor, true, true, true, Clutter.BoxAlignment.START, Clutter.BoxAlignment.START);
+ content_bin_actor.x_expand = true;
+ content_bin_actor.y_expand = true;
+ hbox_actor.add_child (content_bin_actor);
below_bin_actor.add_child (notificationbar.actor);
diff --git a/src/machine.vala b/src/machine.vala
index 95748e7..b297b37 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -518,7 +518,7 @@ private class Boxes.MachineActor: Boxes.UI {
this.machine = machine;
var layout = new Clutter.BoxLayout ();
- layout.vertical = true;
+ layout.orientation = Clutter.Orientation.VERTICAL;
layout.spacing = 10;
_actor = new Clutter.Actor ();
_actor.set_layout_manager (layout);
diff --git a/src/sidebar.vala b/src/sidebar.vala
index ade14f3..e18c7c1 100644
--- a/src/sidebar.vala
+++ b/src/sidebar.vala
@@ -63,9 +63,8 @@ private class Boxes.Sidebar: Boxes.UI {
shadow.set_content (canvas);
shadow.set_content_gravity (Clutter.ContentGravity.RESIZE_FILL);
shadow.set_content_scaling_filters (Clutter.ScalingFilter.NEAREST, Clutter.ScalingFilter.NEAREST);
- bin.add (shadow,
- Clutter.BinAlignment.END,
- Clutter.BinAlignment.FILL);
+ shadow.x_align = Clutter.ActorAlign.END;
+ bin_actor.add_child (shadow);
var background = new GtkClutter.Texture ();
background.name = "sidebar-background";
@@ -76,7 +75,7 @@ private class Boxes.Sidebar: Boxes.UI {
}
background.set_repeat (true, true);
background.set_margin_right (shadow_width);
- bin.add (background, Clutter.BinAlignment.FILL, Clutter.BinAlignment.FILL);
+ bin_actor.add (background);
notebook = new Gtk.Notebook ();
gtk_actor = new GtkClutter.Actor.with_contents (notebook);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]