[blam] Move ItemList.GetSelected() to use Selected()
- From: Carlos MartÃn Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam] Move ItemList.GetSelected() to use Selected()
- Date: Tue, 15 Jan 2013 22:14:21 +0000 (UTC)
commit 720fb056df985e395be12c9b7f0e44353c1363e9
Author: Carlos MartÃn Nieto <cmn dwim me>
Date: Tue Jan 15 23:14:09 2013 +0100
Move ItemList.GetSelected() to use Selected()
src/ItemList.cs | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/ItemList.cs b/src/ItemList.cs
index 84bf841..7d8799d 100644
--- a/src/ItemList.cs
+++ b/src/ItemList.cs
@@ -194,18 +194,17 @@ namespace Imendio.Blam {
}
}
- public Item GetSelected ()
- {
- TreeIter iter;
- TreeModel model;
+ public Item GetSelected()
+ {
+ TreeIter iter;
+ TreeModel model;
- if (!this.Selection.GetSelected (out model, out iter)) {
- return null;
- }
+ if (Selected(out model, out iter))
+ return (Item)model.GetValue(iter, 0);
+
+ return null;
+ }
- return (Item) model.GetValue (iter, 0);
- }
-
private void SelectionChanged (object obj, EventArgs args)
{
TreeSelection selection = (TreeSelection) obj;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]