[cheese/gtk3] cheese: Port to GTK+ 3.x



commit 027ef9075cf7d926e11ec9b88beee6c1912d23c0
Author: Luciana Fujii Pontello <luciana fujii eti br>
Date:   Wed Feb 16 20:28:43 2011 -0200

    cheese: Port to GTK+ 3.x
    
    Change deprecated methods.

 src/cheese-main.vala        |    2 +-
 src/cheese-preferences.vala |    2 +-
 src/cheese-window.vala      |   16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/cheese-main.vala b/src/cheese-main.vala
index 75f91ba..f02b400 100644
--- a/src/cheese-main.vala
+++ b/src/cheese-main.vala
@@ -88,7 +88,7 @@ public class Cheese.Main
 
     main_window = new Cheese.MainWindow ();
 
-    Unique.App app = new Unique.App ("org.gnome.Cheese", null);
+    Unique.App app = new Unique.App ("org.gnome.Cheese", "");
     if (app.is_running)
     {
       Unique.Response response;
diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala
index 622b52a..eb0a925 100644
--- a/src/cheese-preferences.vala
+++ b/src/cheese-preferences.vala
@@ -258,7 +258,7 @@ public class Cheese.PreferencesDialog : GLib.Object
   [CCode (instance_pos = -1)]
   public void on_dialog_close (Gtk.Button button)
   {
-    this.dialog.hide_all ();
+    this.dialog.hide ();
   }
 
   [CCode (instance_pos = -1)]
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index abc9f69..8afb045 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -537,13 +537,13 @@ public class Cheese.MainWindow : Gtk.Window
     {
       if (is_wide_mode)
       {
-        thumbnails_right.hide_all ();
+        thumbnails_right.hide ();
       }
       else
       {
-        thumbnails_bottom.hide_all ();
+        thumbnails_bottom.hide ();
       }
-      menubar.hide_all ();
+      menubar.hide ();
       leave_fullscreen_button_container.no_show_all = false;
       leave_fullscreen_button_container.show_all ();
 
@@ -568,7 +568,7 @@ public class Cheese.MainWindow : Gtk.Window
         thumbnails_bottom.show_all ();
       }
       menubar.show_all ();
-      leave_fullscreen_button_container.hide_all ();
+      leave_fullscreen_button_container.hide ();
 
       /* Make all buttons look, uhm, Normal */
       foreach (Gtk.Button b in buttons)
@@ -609,7 +609,7 @@ public class Cheese.MainWindow : Gtk.Window
       thumbnails_right.add (thumb_nav);
       thumbnails_right.show_all ();
       thumbnails_right.resize_children ();
-      thumbnails_bottom.hide_all ();
+      thumbnails_bottom.hide ();
     }
     else
     {
@@ -622,15 +622,15 @@ public class Cheese.MainWindow : Gtk.Window
       thumbnails_bottom.add (thumb_nav);
       thumbnails_bottom.show_all ();
       thumbnails_bottom.resize_children ();
-      thumbnails_right.hide_all ();
+      thumbnails_right.hide ();
     }
 
     /* handy trick to keep the window to the desired size while not
      * requesting a fixed one. This way the window is resized to its
      * natural size (particularly with the constraints imposed by the
      * viewport, see above) but can still be shrinked down */
-    Gtk.Requisition req;
-    this.size_request (out req);
+    Gtk.Requisition req, natural;
+    this.get_preferred_size (out req, out natural);
     this.resize (req.width, req.height);
     viewport_widget.set_size_request (-1, -1);
   }



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