iter, ThreadListModel.column_names.index("title"))
print thread + ':"' + title + '"', "activated"
- thread_window.WinWrap(self.bbs, self.board, thread)
+ thread_window.open_thread(self.bbs, self.board, thread)
def on_treeview_button_press_event(self, widget, event):
if event.button == 3:
import datfile
import barehtmlparser
import idxfile
+import windowlist
GLADE_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
"..", "data")
GLADE_FILENAME = "thread_window.glade"
+def open_thread(bbs, board, thread):
+ if not bbs or not board or not thread:
+ raise ValueError, "parameter must not be empty"
+
+ key = "/" + bbs + "/" + board + "/" + thread
+ window = windowlist.get_window(key)
+ if window:
+ # already opened
+ window.present()
+ pass
+ else:
+ win_wrap = WinWrap(bbs, board, thread)
+ windowlist.window_created(key, win_wrap.window)
+
class WinWrap: