[gnome-boxes] properties: Switch to 'System' tab for VM under construction
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] properties: Switch to 'System' tab for VM under construction
- Date: Tue, 9 Oct 2012 16:06:46 +0000 (UTC)
commit 40acaab801d635c5d218dfa2a4e88f9d8f28999c
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Oct 9 04:45:19 2012 +0300
properties: Switch to 'System' tab for VM under construction
Switch to 'System' tab automatically when going from wizard to
properties. The assumption here is that when users want to customize the
box before creation, its usually the system properties they want to edit.
https://bugzilla.gnome.org/show_bug.cgi?id=685780
src/properties.vala | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/properties.vala b/src/properties.vala
index 3964762..53501ba 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -154,7 +154,7 @@ private class Boxes.Properties: Boxes.UI {
list_append (listmodel, page.name);
}
- tree_view.get_selection ().select_path (new Gtk.TreePath.from_string ("0"));
+ PropertiesPage current_page;
var machine = App.app.current_item as LibvirtMachine;
if (machine != null) {
@@ -163,7 +163,14 @@ private class Boxes.Properties: Boxes.UI {
net.points = machine.net_stats;
io.points = machine.io_stats;
});
- }
+
+ current_page = (previous_ui_state == UIState.WIZARD) ? PropertiesPage.SYSTEM : PropertiesPage.LOGIN;
+ } else
+ current_page = PropertiesPage.LOGIN;
+
+ var path = new Gtk.TreePath.from_indices (current_page);
+ tree_view.get_selection ().select_path (path);
+ notebook.set_current_page (current_page);
}
private void setup_ui () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]