[gnome-applets] invest: Select the newly added stock for editing.
- From: Callum McKenzie <callum src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-applets] invest: Select the newly added stock for editing.
- Date: Fri, 10 Jul 2009 09:01:29 +0000 (UTC)
commit 6c77ab3d9c189bae30f5b7cee25a63fddbe41018
Author: Callum McKenzie <callum spooky-possum org>
Date: Fri Jul 10 20:50:51 2009 +1200
invest: Select the newly added stock for editing.
Nice patch from Enrico Minack to make adding a new stock more intuitive.
See bug 473706.
invest-applet/invest/preferences.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/invest-applet/invest/preferences.py b/invest-applet/invest/preferences.py
index 4f63321..e823faf 100644
--- a/invest-applet/invest/preferences.py
+++ b/invest-applet/invest/preferences.py
@@ -104,7 +104,9 @@ class PrefsDialog:
pass
def on_add_stock(self, w):
- self.treeview.get_model().append(["GOOG", 0, 0, 0])
+ iter = self.model.append(["GOOG", 0, 0, 0])
+ path = self.model.get_path(iter)
+ self.treeview.set_cursor(path, self.treeview.get_column(0), True)
def on_remove_stock(self, w):
model, paths = self.treeview.get_selection().get_selected_rows()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]