[gnome-boxes] collection-view: Setup UI once window is constructed
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] collection-view: Setup UI once window is constructed
- Date: Fri, 8 Aug 2014 16:22:09 +0000 (UTC)
commit 72e5b774067dccc2d03e3c05a2006ed7b532878a
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Jul 16 11:15:30 2014 +0200
collection-view: Setup UI once window is constructed
This is part of the move of the 'selection-mode' property from App to
AppWindow. This adds setup_ui() to the CollectionView class to ensure that
the connection to the notification of 'selection-mode' is done once the
window is constructed.
This is needed to drop the use of AppWindow singleton and therefore to
make multiple windows possible.
https://bugzilla.gnome.org/show_bug.cgi?id=732098
src/app-window.vala | 1 +
src/collection-view.vala | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index eed6d98..42e79a5 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -106,6 +106,7 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
topbar.setup_ui ();
wizard.setup_ui ();
display_page.setup_ui ();
+ view.setup_ui ();
}
private void save_window_geometry () {
diff --git a/src/collection-view.vala b/src/collection-view.vala
index 1da54fd..79c136a 100644
--- a/src/collection-view.vala
+++ b/src/collection-view.vala
@@ -37,6 +37,9 @@ private class Boxes.CollectionView: Gd.MainView, Boxes.UI {
category = new Category (_("New and Recent"), Category.Kind.NEW);
setup_view ();
notify["ui-state"].connect (ui_state_changed);
+ }
+
+ public void setup_ui () {
App.app.notify["selection-mode"].connect (() => {
set_selection_mode (App.app.selection_mode);
if (!App.app.selection_mode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]