[gnome-boxes] Fix the last of clutter deprecated API warnings



commit 8e2397325949c267e2e07667f5f685f47a396545
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Jan 15 23:49:55 2013 +0200

    Fix the last of clutter deprecated API warnings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691078

 src/app.vala             |   30 +++++++++++++++++++-----------
 src/collection-view.vala |    2 ++
 src/machine.vala         |   10 ++++++++++
 src/notificationbar.vala |    2 ++
 src/properties.vala      |    4 ++++
 src/selectionbar.vala    |    2 ++
 src/sidebar.vala         |   10 ++++++++--
 src/wizard.vala          |    4 ++++
 8 files changed, 51 insertions(+), 13 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 2993f06..4c72714 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -439,8 +439,8 @@ private class Boxes.App: Boxes.UI {
 
         window.key_press_event.connect_after (on_key_pressed);
 
-        stage_bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
-                                           Clutter.BinAlignment.FILL);
+        stage_bin = new Clutter.BinLayout (Clutter.BinAlignment.START,
+                                           Clutter.BinAlignment.START);
         stage.set_layout_manager (stage_bin);
         stage.name = "boxes-stage";
 
@@ -454,6 +454,8 @@ private class Boxes.App: Boxes.UI {
         background.set_repeat (true, true);
         background.x_align = Clutter.ActorAlign.FILL;
         background.y_align = Clutter.ActorAlign.FILL;
+        background.x_expand = true;
+        background.y_expand = true;
         stage.add_child (background);
 
         sidebar = new Sidebar ();
@@ -472,6 +474,8 @@ private class Boxes.App: Boxes.UI {
         vbox.orientation = Clutter.Orientation.VERTICAL;
         vbox_actor.x_align = Clutter.ActorAlign.FILL;
         vbox_actor.y_align = Clutter.ActorAlign.FILL;
+        vbox_actor.x_expand = true;
+        vbox_actor.y_expand = true;
 
         stage.add_child (vbox_actor);
 
@@ -491,8 +495,8 @@ private class Boxes.App: Boxes.UI {
 
         var below_bin_actor = new Clutter.Actor ();
         below_bin_actor.name = "below-bin";
-        var below_bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
-                                               Clutter.BinAlignment.FILL);
+        var below_bin = new Clutter.BinLayout (Clutter.BinAlignment.START,
+                                               Clutter.BinAlignment.START);
         below_bin_actor.set_layout_manager (below_bin);
 
         below_bin_actor.x_expand = true;
@@ -507,16 +511,20 @@ private class Boxes.App: Boxes.UI {
         hbox_actor.set_layout_manager (hbox);
         hbox_actor.x_align = Clutter.ActorAlign.FILL;
         hbox_actor.y_align = Clutter.ActorAlign.FILL;
+        hbox_actor.x_expand = true;
+        hbox_actor.y_expand = true;
 
         below_bin_actor.add_child (hbox_actor);
 
         overlay_bin_actor = new Clutter.Actor ();
         overlay_bin_actor.name = "overlay-bin";
-        overlay_bin = new Clutter.BinLayout (Clutter.BinAlignment.CENTER,
-                                             Clutter.BinAlignment.CENTER);
+        overlay_bin = new Clutter.BinLayout (Clutter.BinAlignment.START,
+                                             Clutter.BinAlignment.START);
         overlay_bin_actor.set_layout_manager (overlay_bin);
         overlay_bin_actor.x_align = Clutter.ActorAlign.FILL;
         overlay_bin_actor.y_align = Clutter.ActorAlign.FILL;
+        overlay_bin_actor.x_expand = true;
+        overlay_bin_actor.y_expand = true;
         below_bin_actor.add_child (overlay_bin_actor);
 
         sidebar_revealer = new Boxes.Revealer (false);
@@ -528,11 +536,13 @@ private class Boxes.App: Boxes.UI {
 
         var content_bin_actor = new Clutter.Actor ();
         content_bin_actor.name = "content-bin";
-        var content_bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
-                                                 Clutter.BinAlignment.FILL);
-        content_bin_actor.set_layout_manager (content_bin);
+        content_bin_actor.x_align = Clutter.ActorAlign.FILL;
+        content_bin_actor.y_align = Clutter.ActorAlign.FILL;
         content_bin_actor.x_expand = true;
         content_bin_actor.y_expand = true;
+        var content_bin = new Clutter.BinLayout (Clutter.BinAlignment.START,
+                                                 Clutter.BinAlignment.START);
+        content_bin_actor.set_layout_manager (content_bin);
         hbox_actor.add_child (content_bin_actor);
 
         below_bin_actor.add_child (notificationbar.actor);
@@ -795,8 +805,6 @@ private class Boxes.App: Boxes.UI {
         actor.set_easing_mode (Clutter.AnimationMode.LINEAR);
         actor.min_width = actor.natural_width = Machine.SCREENSHOT_WIDTH * 2;
         actor.fixed_position_set = false;
-        actor.x_align = Clutter.ActorAlign.CENTER;
-        actor.y_align = Clutter.ActorAlign.CENTER;
         actor.set_easing_duration (App.app.duration);
 
         // Track machine status in toobar
diff --git a/src/collection-view.vala b/src/collection-view.vala
index e1da313..c225d34 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -330,6 +330,8 @@ private class Boxes.CollectionView: Boxes.UI {
         gtkactor.name = "collection-view";
         gtkactor.x_align = Clutter.ActorAlign.FILL;
         gtkactor.y_align = Clutter.ActorAlign.FILL;
+        gtkactor.x_expand = true;
+        gtkactor.y_expand = true;
     }
 
     private bool on_button_press_event (Gtk.Widget view, Gdk.EventButton event) {
diff --git a/src/machine.vala b/src/machine.vala
index b297b37..8f8cbc6 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -722,6 +722,10 @@ private class Boxes.MachineActor: Boxes.UI {
 
         switch (ui_state) {
         case UIState.CREDS:
+            actor.x_align = Clutter.ActorAlign.CENTER;
+            actor.y_align = Clutter.ActorAlign.CENTER;
+            actor.x_expand = true;
+            actor.y_expand = true;
             gtk_vbox.show ();
             break;
 
@@ -730,6 +734,8 @@ private class Boxes.MachineActor: Boxes.UI {
             if (previous_ui_state == UIState.CREDS) {
                 actor.x_align = Clutter.ActorAlign.FILL;
                 actor.y_align = Clutter.ActorAlign.FILL;
+                actor.x_expand = true;
+                actor.y_expand = true;
                 actor.natural_width_set = false;
                 actor.natural_height_set = false;
             } else {
@@ -742,6 +748,8 @@ private class Boxes.MachineActor: Boxes.UI {
                     thumbnail.set_easing_duration (App.app.duration);
                     thumbnail.x_align = Clutter.ActorAlign.FILL;
                     thumbnail.y_align = Clutter.ActorAlign.FILL;
+                    thumbnail.x_expand = true;
+                    thumbnail.y_expand = true;
                     thumbnail.fixed_position_set = false;
                     thumbnail.min_width_set = thumbnail.natural_width_set = false;
                     thumbnail.min_height_set = thumbnail.natural_height_set = false;
@@ -757,6 +765,8 @@ private class Boxes.MachineActor: Boxes.UI {
             break;
 
         case UIState.COLLECTION:
+            actor.x_expand = false;
+            actor.y_expand = false;
             password_entry.set_can_focus (false);
             password_entry.hide ();
             label.show ();
diff --git a/src/notificationbar.vala b/src/notificationbar.vala
index 5fad775..95c78b2 100644
--- a/src/notificationbar.vala
+++ b/src/notificationbar.vala
@@ -24,6 +24,8 @@ private class Boxes.Notificationbar: GLib.Object {
         gtk_actor.name = "notificationbar";
         gtk_actor.x_align = Clutter.ActorAlign.CENTER;
         gtk_actor.y_align = Clutter.ActorAlign.START;
+        gtk_actor.x_expand = true;
+        gtk_actor.y_expand = true;
         Gdk.RGBA transparent = { 0, 0, 0, 0};
         gtk_actor.get_widget ().override_background_color (0, transparent);
 
diff --git a/src/properties.vala b/src/properties.vala
index 31da4b6..d9753d7 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -202,6 +202,10 @@ private class Boxes.Properties: Boxes.UI {
         gtk_actor.get_widget ().get_style_context ().add_class ("boxes-bg");
         gtk_actor.name = "properties";
         gtk_actor.opacity = 0;
+        gtk_actor.x_align = Clutter.ActorAlign.FILL;
+        gtk_actor.y_align = Clutter.ActorAlign.FILL;
+        gtk_actor.x_expand = true;
+        gtk_actor.y_expand = true;
 
         /* topbar */
         var hbox = App.app.topbar.notebook.get_nth_page (Boxes.TopbarPage.PROPERTIES) as Gtk.Box;
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index e5fb27e..1a4f500 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -42,6 +42,8 @@ private class Boxes.Selectionbar: GLib.Object {
         gtk_actor.set_margin_bottom (32);
         gtk_actor.x_align = Clutter.ActorAlign.CENTER;
         gtk_actor.y_align = Clutter.ActorAlign.END;
+        gtk_actor.x_expand = true;
+        gtk_actor.y_expand = true;
 
         favorite_btn = new Gtk.ToggleButton ();
         leftbox.add (favorite_btn);
diff --git a/src/sidebar.vala b/src/sidebar.vala
index e18c7c1..614c03c 100644
--- a/src/sidebar.vala
+++ b/src/sidebar.vala
@@ -40,8 +40,8 @@ private class Boxes.Sidebar: Boxes.UI {
 
     private void setup_sidebar () {
         bin_actor = new Clutter.Actor ();
-        var bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
-                                         Clutter.BinAlignment.FILL);
+        var bin = new Clutter.BinLayout (Clutter.BinAlignment.START,
+                                         Clutter.BinAlignment.START);
         bin_actor.set_layout_manager (bin);
         bin_actor.name = "sidebar-bin";
 
@@ -64,6 +64,8 @@ private class Boxes.Sidebar: Boxes.UI {
         shadow.set_content_gravity (Clutter.ContentGravity.RESIZE_FILL);
         shadow.set_content_scaling_filters (Clutter.ScalingFilter.NEAREST, Clutter.ScalingFilter.NEAREST);
         shadow.x_align = Clutter.ActorAlign.END;
+        shadow.x_expand = true;
+        shadow.y_expand = true;
         bin_actor.add_child (shadow);
 
         var background = new GtkClutter.Texture ();
@@ -75,12 +77,16 @@ private class Boxes.Sidebar: Boxes.UI {
         }
         background.set_repeat (true, true);
         background.set_margin_right (shadow_width);
+        background.x_expand = true;
+        background.y_expand = true;
         bin_actor.add (background);
 
         notebook = new Gtk.Notebook ();
         gtk_actor = new GtkClutter.Actor.with_contents (notebook);
         gtk_actor.get_widget ().get_style_context ().add_class ("boxes-bg");
         gtk_actor.name = "sidebar";
+        gtk_actor.x_expand = true;
+        gtk_actor.y_expand = true;
         bin_actor.add_child (gtk_actor);
         notebook.get_style_context ().add_class (Gtk.STYLE_CLASS_SIDEBAR);
         notebook.get_style_context ().add_class ("boxes-bg");
diff --git a/src/wizard.vala b/src/wizard.vala
index fbe9de5..f0c5b6b 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -522,6 +522,10 @@ private class Boxes.Wizard: Boxes.UI {
         gtk_actor.get_widget ().get_style_context ().add_class ("boxes-bg");
         gtk_actor.name = "wizard";
         gtk_actor.opacity = 0;
+        gtk_actor.x_align = Clutter.ActorAlign.FILL;
+        gtk_actor.y_align = Clutter.ActorAlign.FILL;
+        gtk_actor.x_expand = true;
+        gtk_actor.y_expand = true;
 
         /* Introduction */
         var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 10);



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