Merge lp:~eduardo-mucelli/cairo-dock-plug-ins-extras/Twitter into lp:~cairo-dock-team/cairo-dock-plug-ins-extras/third-party

Proposed by Eduardo Mucelli Rezende Oliveira
Status: Merged
Merged at revision: 267
Proposed branch: lp:~eduardo-mucelli/cairo-dock-plug-ins-extras/Twitter
Merge into: lp:~cairo-dock-team/cairo-dock-plug-ins-extras/third-party
Diff against target: 90 lines (+13/-16)
2 files modified
Twitter/Twitter (+9/-12)
Twitter/emblem.py (+4/-4)
To merge this branch: bzr merge lp:~eduardo-mucelli/cairo-dock-plug-ins-extras/Twitter
Reviewer Review Type Date Requested Status
Cairo-Dock Devs Pending
Review via email: mp+106483@code.launchpad.net

Description of the change

Twitter: Fixing visual aspects

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Twitter/Twitter'
2--- Twitter/Twitter 2012-05-18 00:00:39 +0000
3+++ Twitter/Twitter 2012-05-19 00:14:19 +0000
4@@ -15,20 +15,14 @@
5 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6 # GNU General Public License for more details.
7
8-# This applet provides Cairo-Dock an interface with Twitter
9-
10-# On the first time, the applet is going to ask your nickname and authorization to connect with Twitter.
11-# The applet is going to open your browser with the authorization page
12-# As soon as you authorize it, a PIN number will be shown on the page, copy this number
13-# Paste this number on the next dialog box will be shown.
14-# The plugin is going to inform that you are successfully connected.
15-
16+# This applet provides Cairo-Dock with an interface with Twitter
17+
18+# This applet supports both Twitter, and Identi.ca. You can send tweets, direct messages, see your timeline, retweet, and answer direct messages. It will alert you when there are new tweets, and directed messages. On the first time, you need to choose which network to add, once at a time by right-click -> Add account -> Twitter or Identi.ca. The applet is going to ask your nickname and authorization to connect on the networks. The network authorization page will be open. As soon as you authorize it, a PIN number will be shown on the page, copy this number\nPaste this number on the next dialog box will be shown. The plugin is going to inform that you are successfully connected.
19 # To see the received tweets right-click on the icon -> Twitter -> [New] tweets. You can retweet any of them by left-clicking on it.
20 # To see the received direct messages right-click on the icon -> Twitter -> [New] direct messages. You can reply any of them by left-clicking on it.
21 # To see some user's info right-click on the icon -> Twitter -> Info
22
23-# TODO: Change icon someway when Identi.ca is added.
24-# Try to fix someway that ugly hack "if not adding_identica:", dammit!
25+# TODO:
26 # Add more possibilties to the Identi.ca API
27
28 import os, webbrowser, Queue
29@@ -253,6 +247,8 @@
30 # Initial Information -> Ask for screen name (username) -> Ask for authorization (open browser) -> Insert PIN -> Succesful connected
31
32 def show_inexistence_of_networks(self):
33+ self.emblem.update("!!!") # create the emblem with and alert mark
34+ self.icon.SetIcon(self.emblem.emblem)
35 message = _("This applet supports Twitter, and Identi.ca.\nRight-click -> Add account -> Twitter.\nRight-click -> Add account -> Identi.ca.")
36 self.show_popup_message(message)
37
38@@ -309,11 +305,12 @@
39 self.new_network.user.write() # writing user's access token and access secret to be ...
40 if isinstance(self.new_network, Twitter):
41 if self.new_network.get_api(self.on_receive_new_entry_into_stream_callback): # ... used here, check twitter.py method get_api
42- self.show_popup_message(_("Successfully connected with Twitter"))
43+ message = _("Successfully connected with Twitter")
44 else:
45 if self.new_network.get_api(): # ... used here, check identica.py method get_api
46- self.show_popup_message(_("Successfully connected with Identi.ca"))
47+ message = _("Successfully connected with Identi.ca")
48 self.set_visual_for_active_networks()
49+ self.show_popup_message(message)
50
51 def show_popup_message(self, message, dialog={}, widget={}):
52 dialog_attributes = {'message':message}
53
54=== modified file 'Twitter/emblem.py'
55--- Twitter/emblem.py 2012-05-13 00:58:06 +0000
56+++ Twitter/emblem.py 2012-05-19 00:14:19 +0000
57@@ -33,7 +33,7 @@
58 svg = open(self.emblem, 'w')
59 svg.write(self.draw())
60 svg.close()
61-
62+
63 def set_size_small(self):
64 self.size = self.size_small
65
66@@ -227,7 +227,7 @@
67 </g>
68 </g>
69 </svg>"""
70- formated_counter = str('%02d' % self.counter)
71+ formated_counter = str('%02s' % self.counter)
72 return emblem_string.format(formated_counter) # replaces the '{0}' on the triple-quoted http://stackoverflow.com/questions/3877623/in-python-can-you-have-variables-within-triple-quotes-if-so-how
73
74 def draw_medium(self):
75@@ -406,7 +406,7 @@
76 </g>
77 </g>
78 </svg>"""
79- formated_counter = str('%02d' % self.counter)
80+ formated_counter = str('%02s' % self.counter)
81 return emblem_string.format(formated_counter) # replaces the '{0}' on the triple-quoted http://stackoverflow.com/questions/3877623/in-python-can-you-have-variables-within-triple-quotes-if-so-how
82
83 def draw_large(self):
84@@ -584,5 +584,5 @@
85 </g>
86 </g>
87 </svg>"""
88- formated_counter = str('%02d' % self.counter)
89+ formated_counter = str('%02s' % self.counter)
90 return emblem_string.format(formated_counter) # replaces the '{0}' on the triple-quoted http://stackoverflow.com/questions/3877623/in-python-can-you-have-variables-within-triple-quotes-if-so-how

Subscribers

People subscribed via source and target branches