[gnome-boxes] app-window: Remove redundant wizard->properties code
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] app-window: Remove redundant wizard->properties code
- Date: Sun, 7 Dec 2014 23:43:08 +0000 (UTC)
commit c271dd19c994db69bddb97dfcf5d092b8074aefa
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Dec 7 18:34:44 2014 +0000
app-window: Remove redundant wizard->properties code
Remove now redundant code to launch properties from wizard.
https://bugzilla.gnome.org/show_bug.cgi?id=741046
src/app-window.vala | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 3249e29..957d2cd 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -247,30 +247,27 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
}
public void select_item (CollectionItem item) {
- if (ui_state == UIState.COLLECTION && !selection_mode) {
- return_if_fail (item is Machine);
+ if (ui_state != UIState.COLLECTION || selection_mode)
+ return;
- var machine = item as Machine;
+ return_if_fail (item is Machine);
- if (machine.window != App.app.main_window) {
- machine.window.present ();
+ var machine = item as Machine;
- return;
- }
+ if (machine.window != App.app.main_window) {
+ machine.window.present ();
- current_item = item;
+ return;
+ }
- if (current_item is Machine)
- connect_to (machine);
- else
- warning ("unknown item, fix your code");
+ current_item = item;
- item_selected (item);
- } else if (ui_state == UIState.WIZARD) {
- current_item = item;
+ if (current_item is Machine)
+ connect_to (machine);
+ else
+ warning ("unknown item, fix your code");
- set_state (UIState.PROPERTIES);
- }
+ item_selected (item);
}
[GtkCallback]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]