[gnome-boxes] app-window: Add list view
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] app-window: Add list view
- Date: Sat, 22 Aug 2015 12:11:53 +0000 (UTC)
commit 364a7b0d199a97865eb498a59522d789d8099cd7
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Jul 7 22:02:43 2015 +0200
app-window: Add list view
Add a list view alongside the current icon view.
https://bugzilla.gnome.org/show_bug.cgi?id=733252
data/ui/app-window.ui | 11 +++++++++++
src/app-window.vala | 12 ++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/app-window.ui b/data/ui/app-window.ui
index d95ca7c..a6a7fcc 100644
--- a/data/ui/app-window.ui
+++ b/data/ui/app-window.ui
@@ -18,6 +18,8 @@
| | |
| | |-> view = new Boxes.CollectionView ();
| | |
+ | | |-> list_view = new Boxes.ListView ();
+ | | |
| | |-> empty_boxes = new Boxes.EmptyBoxes ();
| | |
| | |-> display_page = new Boxes.DisplayPage ();
@@ -91,6 +93,15 @@
</child>
<child>
+ <object class="BoxesListView" id="list_view">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="name">collection-list-view</property>
+ </packing>
+ </child>
+
+ <child>
<object class="BoxesDisplayPage" id="display_page">
<property name="visible">True</property>
</object>
diff --git a/src/app-window.vala b/src/app-window.vala
index 38c479b..72d307e 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -90,6 +90,8 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
public Gtk.Stack below_bin;
[GtkChild]
private CollectionView collection_view;
+ [GtkChild]
+ private ListView list_view;
public ICollectionView view {
get { return collection_view; }
@@ -140,13 +142,14 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
move (x, y);
}
- views = { collection_view };
+ views = { collection_view, list_view };
}
public void setup_ui () {
topbar.setup_ui (this);
display_page.setup_ui (this);
collection_view.setup_ui (this);
+ list_view.setup_ui (this);
selectionbar.setup_ui (this);
searchbar.setup_ui (this);
empty_boxes.setup_ui (this);
@@ -175,7 +178,12 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
private void ui_state_changed () {
// The order is important for some widgets here (e.g properties must change its state before wizard
so it can
// flush any deferred changes for wizard to pick-up when going back from properties to wizard
(review).
- foreach (var ui in new Boxes.UI[] { topbar, collection_view, props_window, wizard_window,
empty_boxes }) {
+ foreach (var ui in new Boxes.UI[] { topbar,
+ collection_view,
+ list_view,
+ props_window,
+ wizard_window,
+ empty_boxes }) {
ui.set_state (ui_state);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]