OSDN Git Service

Enable to get dictionaries in the data store.
[fukui-no-namari/fukui-no-namari.git] / src / FukuiNoNamari / board_window.py
index 97bb3e6..e5dae3f 100644 (file)
@@ -124,14 +124,13 @@ class WinWrap(winwrapbase.WinWrapBase, board_data.BoardData):
         if not iter:
             return
 
-        thread = model.get_value(iter, ThreadListModel.column_names.index("id"))
-        title = model.get_value(
-            iter, ThreadListModel.column_names.index("title"))
+        dic = model.get_dict(iter)
+        thread = dic["id"]
+        title = dic["title"]
         print thread + ':"' + title + '"', "activated"
 
-        res = model.get_value(iter, ThreadListModel.column_names.index("res"))
-        lineCount = model.get_value(
-            iter, ThreadListModel.column_names.index("lineCount"))
+        res = dic["res"]
+        lineCount = dic["lineCount"]
 
         update = res > lineCount
 
@@ -345,8 +344,7 @@ class WinWrap(winwrapbase.WinWrapBase, board_data.BoardData):
         model, iter = selection.get_selected()
         if not iter:
             return
-        thread = model.get_value(
-            iter, ThreadListModel.column_names.index("id"))
+        thread = model.get_dict(iter)["id"]
         
         bbs_type_for_thread = self.bbs_type.clone_with_thread(thread)