diff --git a/issues/issue-f765c17cfc7491492564797ce7612053453eea8c.yaml b/issues/issue-f765c17cfc7491492564797ce7612053453eea8c.yaml index b92e14f..c050390 100644 --- a/issues/issue-f765c17cfc7491492564797ce7612053453eea8c.yaml +++ b/issues/issue-f765c17cfc7491492564797ce7612053453eea8c.yaml @@ -7,8 +7,8 @@ type: :feature component: network release: 1.0.0 reporter: Julio Biason -status: :unstarted -disposition: +status: :closed +disposition: :fixed creation_time: 2009-12-22 12:31:41.160379 Z references: [] @@ -18,3 +18,7 @@ log_events: - Julio Biason - created - "" +- - 2009-12-25 15:37:10.805041 Z + - Julio Biason + - closed with disposition fixed + - added. diff --git a/issues/issue-fc295a72e8c2767cc17ac76830e1286430c77d48.yaml b/issues/issue-fc295a72e8c2767cc17ac76830e1286430c77d48.yaml index 71b07a0..f1297e7 100644 --- a/issues/issue-fc295a72e8c2767cc17ac76830e1286430c77d48.yaml +++ b/issues/issue-fc295a72e8c2767cc17ac76830e1286430c77d48.yaml @@ -5,8 +5,8 @@ type: :feature component: pygtk release: 1.0.0 reporter: Julio Biason -status: :unstarted -disposition: +status: :closed +disposition: :fixed creation_time: 2009-12-22 12:33:43.272350 Z references: - network-2 @@ -20,3 +20,7 @@ log_events: - Julio Biason - added reference 1 - "" +- - 2009-12-25 15:37:26.149895 Z + - Julio Biason + - closed with disposition fixed + - "" diff --git a/mitterlib/network/__init__.py b/mitterlib/network/__init__.py index 3d2464d..7f54d1e 100644 --- a/mitterlib/network/__init__.py +++ b/mitterlib/network/__init__.py @@ -200,6 +200,10 @@ class Networks(object): data.network = network return data + def reply_prefix(self, message): + """Return the prefix to be used in the reply for that message.""" + return self.networks[message.network].reply_prefix(message) + def replies(self, network=None): """Return a list of NetworkData objects for the replies for the user messages.""" diff --git a/mitterlib/network/networkbase.py b/mitterlib/network/networkbase.py index 9ab1dee..afbc89a 100644 --- a/mitterlib/network/networkbase.py +++ b/mitterlib/network/networkbase.py @@ -216,6 +216,12 @@ class NetworkBase(object): # anyway? return None + def reply_prefix(self, message): + """Return the prefix to be used in case the user requests a reply for + that message. *message* must be a :class:`NetworkData` object. Returns + a string.""" + return '' + def repost(self, message): """Repost a message in your current timeline. *message* must be a valid :class:`NetworkData` object. Must return the id of the new diff --git a/mitterlib/network/twitter.py b/mitterlib/network/twitter.py index 6e17427..505a618 100644 --- a/mitterlib/network/twitter.py +++ b/mitterlib/network/twitter.py @@ -352,6 +352,10 @@ class Connection(NetworkBase): response = self._request('/statuses/show/%d.json' % (message_id)) return TwitterNetworkData(response) + def reply_prefix(self, message): + """Returns the prefix needed for a reply.""" + return '@' + message.username + ' ' + def replies(self): """Return a list of NetworkData objects for the replies for the user messages.""" diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 168cc63..5c09c1a 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -893,8 +893,9 @@ class Interface(object): """Reply to someone else's message.""" (model, iter) = self._grid.get_selection().get_selected() message = model.get_value(iter, 0) - - self._reply_label.set_text('Replying to %s' % (message.username)) + self._update_text.get_buffer().set_text( + self._connection.reply_prefix(message)) + #self._reply_label.set_text('Replying to %s' % (message.username)) self._reply_message_id = message self._update_text.grab_focus()