Browse Source

Reposting also works now.

master
Julio Biason 15 years ago
parent
commit
04d937a94d
  1. 20
      mitterlib/ui/ui_pygtk.py

20
mitterlib/ui/ui_pygtk.py

@ -549,9 +549,12 @@ class Interface(object):
def _repost_message(self, widget, user_data=None): def _repost_message(self, widget, user_data=None):
"""Repost someone else's message on your timeline.""" """Repost someone else's message on your timeline."""
(grid, counter) = self._grids[self._main_tabs.get_current_page()] page = self._main_tabs.get_current_page()
(model, iter) = grid.get_selection().get_selected() grid = self._main_tabs.get_nth_page(page)
message = model.get_value(iter, 0) message = grid.selected
if not message:
return
self._update_statusbar(_('Reposting %s message...') % self._update_statusbar(_('Reposting %s message...') %
(message.author.username)) (message.author.username))
self._threads.add_work(self._post_repost_message, self._threads.add_work(self._post_repost_message,
@ -562,11 +565,14 @@ class Interface(object):
def _favorite_message(self, widget, user_data=None): def _favorite_message(self, widget, user_data=None):
"""Toggle the favorite status of a message.""" """Toggle the favorite status of a message."""
(grid, counter) = self._grids[self._main_tabs.get_current_page()] page = self._main_tabs.get_current_page()
(model, iter) = grid.get_selection().get_selected() grid = self._main_tabs.get_nth_page(page)
message = model.get_value(iter, 0) message = grid.selected
if not message:
return
self._favorite_info = (grid, iter) # TODO: I removed the iterator for the grid; we need to find a wait to
# the tell the grid a message was favorited
if message.favorite: if message.favorite:
display = _('Removing message from %s from favorites...') display = _('Removing message from %s from favorites...')

Loading…
Cancel
Save