From 7522ec013c8718c7bcac77fa57d6a9c1657114ac Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 23 Jul 2014 13:48:58 +0100 Subject: [PATCH] Avoid using deprecated GtkAlignment in main window --- data/cheese-main-window.ui | 8 +++----- src/cheese-window.vala | 8 ++++---- src/thumbview/cheese-thumb-view.c | 3 +++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/data/cheese-main-window.ui b/data/cheese-main-window.ui index b8c1be2d..08367977 100644 --- a/data/cheese-main-window.ui +++ b/data/cheese-main-window.ui @@ -28,7 +28,7 @@ - + True True @@ -186,9 +186,8 @@ - + False - False @@ -197,9 +196,8 @@ - + False - False diff --git a/src/cheese-window.vala b/src/cheese-window.vala index a2927143..90ad2554 100644 --- a/src/cheese-window.vala +++ b/src/cheese-window.vala @@ -60,9 +60,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow private Eog.ThumbNav thumb_nav; private Cheese.ThumbView thumb_view; [GtkChild] - private Gtk.Alignment thumbnails_right; + private Gtk.Box thumbnails_right; [GtkChild] - private Gtk.Alignment thumbnails_bottom; + private Gtk.Box thumbnails_bottom; [GtkChild] private Gtk.Widget leave_fullscreen_button_box; [GtkChild] @@ -617,7 +617,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow { thumb_view.set_vertical (true); thumb_nav.set_vertical (true); - if (thumbnails_bottom.get_child () != null) + if (thumbnails_bottom.get_children () != null) { thumbnails_bottom.remove (thumb_nav); } @@ -633,7 +633,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow { thumb_view.set_vertical (false); thumb_nav.set_vertical (false); - if (thumbnails_right.get_child () != null) + if (thumbnails_right.get_children () != null) { thumbnails_right.remove (thumb_nav); } diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c index a4279967..b5ce06b3 100644 --- a/src/thumbview/cheese-thumb-view.c +++ b/src/thumbview/cheese-thumb-view.c @@ -782,6 +782,9 @@ cheese_thumb_view_set_vertical (CheeseThumbView *thumb_view, gboolean vertical) gtk_icon_view_set_columns(GTK_ICON_VIEW (thumb_view), priv->n_items); else gtk_icon_view_set_columns(GTK_ICON_VIEW (thumb_view), 1); + + gtk_widget_set_hexpand (GTK_WIDGET (thumb_view), !vertical); + gtk_widget_set_vexpand (GTK_WIDGET (thumb_view), vertical); } void -- 2.11.4.GIT