[gnome-boxes] app: Remove a redundant return value
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] app: Remove a redundant return value
- Date: Tue, 7 Aug 2012 17:09:20 +0000 (UTC)
commit baa61f71ed1463f9b013048834e122e75df74d34
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Jul 31 11:57:07 2012 +0200
app: Remove a redundant return value
https://bugzilla.gnome.org/show_bug.cgi?id=680851
src/app.vala | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index e9085e1..e4b9f4b 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -157,22 +157,20 @@ private class Boxes.App: Boxes.UI {
return application.run ();
}
- public bool open (string name) {
+ public void open (string name) {
ui_state = UIState.COLLECTION;
view.visible = false; // to avoid some glitches
// after "ready" all items should be listed
foreach (var item in collection.items.data) {
- if (item.name != name)
- continue;
+ if (item.name == name) {
+ select_item (item);
- return select_item (item);
+ break;
+ }
}
-
- return false;
}
-
public LibvirtMachine add_domain (CollectionSource source, GVir.Connection connection, GVir.Domain domain)
throws GLib.Error {
var machine = domain.get_data<LibvirtMachine> ("machine");
@@ -614,7 +612,7 @@ private class Boxes.App: Boxes.UI {
return false;
}
- public bool select_item (CollectionItem item) {
+ public void select_item (CollectionItem item) {
if (ui_state == UIState.COLLECTION && !selection_mode) {
current_item = item;
@@ -628,7 +626,5 @@ private class Boxes.App: Boxes.UI {
item_selected (item);
}
-
- return false;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]