diff --git a/src/config.py b/src/config.py index 5e2bc3e0a..18b31187e 100644 --- a/src/config.py +++ b/src/config.py @@ -1629,8 +1629,7 @@ class AccountsWindow: def on_accounts_treeview_row_activated(self, widget, path, column): model = widget.get_model() - iter = model.get_iter(path) - account = model[iter][0].decode('utf-8') + account = model[path][0].decode('utf-8') self.show_modification_window(account) def show_modification_window(self, account): diff --git a/src/groupchat_control.py b/src/groupchat_control.py index cfe141b0d..b2921e117 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1333,14 +1333,13 @@ class GroupchatControl(ChatControlBase): def on_list_treeview_row_activated(self, widget, path, col = 0): '''When an iter is double clicked: open the chat window''' model = widget.get_model() - iter = model.get_iter(path) if len(path) == 1: # It's a group if (widget.row_expanded(path)): widget.collapse_row(path) else: widget.expand_row(path, False) else: # We want to send a private message - nick = model[iter][C_NICK].decode('utf-8') + nick = model[path][C_NICK].decode('utf-8') self._start_private_message(nick) def on_list_treeview_button_press_event(self, widget, event): diff --git a/src/history_window.py b/src/history_window.py index e4f4fd9d1..6cd5514cf 100644 --- a/src/history_window.py +++ b/src/history_window.py @@ -354,9 +354,8 @@ class HistoryWindow: cur_year, cur_month, cur_day = self.calendar.get_date() cur_month = gtkgui_helpers.make_gtk_month_python_month(cur_month) model = widget.get_model() - iter = model.get_iter(path) # make it a tupple (Y, M, D, 0, 0, 0...) - tim = time.strptime(model[iter][C_UNIXTIME], '%x') + tim = time.strptime(model[path][C_UNIXTIME], '%x') year = tim[0] gtk_month = tim[1] month = gtkgui_helpers.make_python_month_gtk_month(gtk_month) @@ -367,7 +366,7 @@ class HistoryWindow: self.calendar.select_month(month, year) self.calendar.select_day(day) - unix_time = model[iter][C_TIME] + unix_time = model[path][C_TIME] self.scroll_to_result(unix_time) #FIXME: one day do not search just for unix_time but the whole and user # specific format of the textbuffer line [time] nick: message diff --git a/src/roster_window.py b/src/roster_window.py index 151576a21..0f9f61120 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2131,10 +2131,9 @@ _('If "%s" accepts this request you will know his or her status.') % jid) def on_roster_treeview_row_activated(self, widget, path, col = 0): '''When an iter is double clicked: open the first event window''' model = self.tree.get_model() - iter = model.get_iter(path) - account = model[iter][C_ACCOUNT].decode('utf-8') - type = model[iter][C_TYPE] - jid = model[iter][C_JID].decode('utf-8') + account = model[path][C_ACCOUNT].decode('utf-8') + type = model[path][C_TYPE] + jid = model[path][C_JID].decode('utf-8') if type in ('group', 'account'): if self.tree.row_expanded(path): self.tree.collapse_row(path)