Merge lp:~rick-rickspencer3/pytask/theme_bug_hack_around into lp:pytask

Proposed by Rick Spencer
Status: Merged
Merged at revision: 165
Proposed branch: lp:~rick-rickspencer3/pytask/theme_bug_hack_around
Merge into: lp:pytask
Diff against target: 279 lines (+38/-37)
9 files modified
bin/pytask (+14/-14)
data/ui/AboutPytxskDialog.ui (+1/-1)
data/ui/PreferencesPytxskDialog.ui (+1/-1)
data/ui/PytxskWindow.ui (+3/-2)
data/ui/about_pytask_dialog.xml (+2/-2)
data/ui/preferences_pytask_dialog.xml (+2/-2)
data/ui/pytask_window.xml (+2/-2)
pytask/AboutPytxskDialog.py (+7/-7)
pytask/PreferencesPytxskDialog.py (+6/-6)
To merge this branch: bzr merge lp:~rick-rickspencer3/pytask/theme_bug_hack_around
Reviewer Review Type Date Requested Status
Ryan Macnish Approve
Review via email: mp+42439@code.launchpad.net

Commit message

Changed PytaskWindow to PytxkWindow to work around a theming bug in Ubuntu, and make PyTask suitable for Maverick.

Did the same for the About box and the Preferences dialog. Ensured that quickly design worked.

Description of the change

I propose this branch, as it makes PyTask look normal and suitable for running on Maverick. When the underlying bug is fixed, the code can be adjusted back as expected by:
1. find and replace PytxskWindow with PytaskWindow
2. bzr mv data/ui/PytxskWindow data/ui/PytaskWindow
3. repeat for the about box and preferences dialog

To post a comment you must log in.
166. By Rick Spencer

fixed up preferences and about dialog as well, made quickly design work again

167. By Rick Spencer

renamed modules

Revision history for this message
Ryan Macnish (nisshh) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/pytask'
2--- bin/pytask 2010-11-19 12:01:18 +0000
3+++ bin/pytask 2010-12-02 01:08:10 +0000
4@@ -51,7 +51,7 @@
5
6 # Here are all the local imports
7 from pytask import (
8- AboutPytaskDialog, PreferencesPytaskDialog)
9+ AboutPytxskDialog, PreferencesPytxskDialog)
10 from pytask.helpers import get_builder
11
12 ind = appindicator.Indicator("Pytask", "/usr/share/pytask/media/pytask-indicator.png", appindicator.CATEGORY_APPLICATION_STATUS)
13@@ -68,7 +68,7 @@
14 menu.append(about_item)
15 menu.append(quit_item)
16
17-about = AboutPytaskDialog.AboutPytaskDialog()
18+about = AboutPytxskDialog.AboutPytxskDialog()
19
20 #window_state_item.connect("activate", indicator_window_state)
21 #about_item.connect("activate", about)
22@@ -79,8 +79,8 @@
23 quit_item.show()
24 ind.set_menu(menu)
25
26-class PytaskWindow(gtk.Window):
27- __gtype_name__ = "PytaskWindow"
28+class PytxskWindow(gtk.Window):
29+ __gtype_name__ = "PytxskWindow"
30
31 # To construct a new instance of this method, the following notable
32 # methods are called in this order:
33@@ -96,9 +96,9 @@
34 """Special static method that's automatically called by Python when
35 constructing a new instance of this class.
36
37- Returns a fully instantiated PytaskWindow object.
38+ Returns a fully instantiated PytxskWindow object.
39 """
40- builder = get_builder('PytaskWindow')
41+ builder = get_builder('PytxskWindow')
42 new_object = builder.get_object("pytask_window")
43 new_object.finish_initializing(builder)
44 return new_object
45@@ -107,8 +107,8 @@
46 """Called while initializing this instance in __new__
47
48 finish_initalizing should be called after parsing the UI definition
49- and creating a PytaskWindow object with it in order to finish
50- initializing the start of the new PytaskWindow instance.
51+ and creating a PytxskWindow object with it in order to finish
52+ initializing the start of the new PytxskWindow instance.
53
54 Put your initilization code in here and leave __init__ undefined.
55 """
56@@ -128,7 +128,7 @@
57 launchpad_available = False
58
59 # Uncomment the following code to read in preferences at start up.
60- #dlg = PreferencesPytaskDialog.NewPreferencesPytaskDialog()
61+ #dlg = PreferencesPytxskDialog.NewPreferencesPytxskDialog()
62 #self.preferences = dlg.get_preferences()
63
64 # Code for other initialization actions should be added here.
65@@ -200,13 +200,13 @@
66
67 def about(self, widget, data=None):
68 """Display the about box for pytask."""
69- about = AboutPytaskDialog.AboutPytaskDialog()
70+ about = AboutPytxskDialog.AboutPytxskDialog()
71 response = about.run()
72 about.destroy()
73
74 def preferences(self, widget, data=None):
75 """Display the preferences window for pytask."""
76- prefs = PreferencesPytaskDialog.PreferencesPytaskDialog()
77+ prefs = PreferencesPytxskDialog.PreferencesPytxskDialog()
78 response = prefs.run()
79 if response == gtk.RESPONSE_OK:
80 # Make any updates based on changed preferences here.
81@@ -214,11 +214,11 @@
82 prefs.destroy()
83
84 def quit(self, widget, data=None):
85- """Signal handler for closing the PytaskWindow."""
86+ """Signal handler for closing the PytxskWindow."""
87 self.destroy()
88
89 def on_destroy(self, widget, data=None):
90- """Called when the PytaskWindow is closed."""
91+ """Called when the PytxskWindow is closed."""
92 # Clean up code for saving application state should be added here.
93 gtk.main_quit()
94
95@@ -239,6 +239,6 @@
96 logging.debug('debug mode enabled...')
97
98 # Run the application.
99- window = PytaskWindow()
100+ window = PytxskWindow()
101 window.show()
102 gtk.main()
103
104=== renamed file 'data/ui/AboutPytaskDialog.ui' => 'data/ui/AboutPytxskDialog.ui'
105--- data/ui/AboutPytaskDialog.ui 2010-11-17 06:44:54 +0000
106+++ data/ui/AboutPytxskDialog.ui 2010-12-02 01:08:10 +0000
107@@ -3,7 +3,7 @@
108 <requires lib="gtk+" version="2.16"/>
109 <!-- interface-requires about_pytask_dialog 1.0 -->
110 <!-- interface-naming-policy toplevel-contextual -->
111- <object class="AboutPytaskDialog" id="about_pytask_dialog">
112+ <object class="AboutPytxskDialog" id="about_pytask_dialog">
113 <property name="border_width">5</property>
114 <property name="window_position">center-on-parent</property>
115 <property name="icon">../media/pytask24.png</property>
116
117=== renamed file 'data/ui/PreferencesPytaskDialog.ui' => 'data/ui/PreferencesPytxskDialog.ui'
118--- data/ui/PreferencesPytaskDialog.ui 2010-05-30 16:22:55 +0000
119+++ data/ui/PreferencesPytxskDialog.ui 2010-12-02 01:08:10 +0000
120@@ -3,7 +3,7 @@
121 <requires lib="gtk+" version="2.16"/>
122 <!-- interface-requires preferences_pytask_dialog 1.0 -->
123 <!-- interface-naming-policy project-wide -->
124- <object class="PreferencesPytaskDialog" id="preferences_pytask_dialog">
125+ <object class="PreferencesPytxskDialog" id="preferences_pytask_dialog">
126 <property name="border_width">5</property>
127 <property name="icon">../media/pytask24.png</property>
128 <property name="type_hint">normal</property>
129
130=== renamed file 'data/ui/PytaskWindow.ui' => 'data/ui/PytxskWindow.ui'
131--- data/ui/PytaskWindow.ui 2010-09-11 21:49:59 +0000
132+++ data/ui/PytxskWindow.ui 2010-12-02 01:08:10 +0000
133@@ -1,11 +1,12 @@
134-<?xml version="1.0"?>
135+<?xml version="1.0" encoding="UTF-8"?>
136 <interface>
137 <requires lib="gtk+" version="2.16"/>
138 <!-- interface-requires pytask_window 1.0 -->
139 <!-- interface-naming-policy project-wide -->
140 <!-- interface-local-resource-path ../media -->
141- <object class="PytaskWindow" id="pytask_window">
142+ <object class="PytxskWindow" id="pytask_window">
143 <property name="title" translatable="yes">Pytask</property>
144+ <property name="window_position">mouse</property>
145 <property name="default_width">500</property>
146 <property name="default_height">400</property>
147 <property name="icon">../media/pytask24.png</property>
148
149=== modified file 'data/ui/about_pytask_dialog.xml'
150--- data/ui/about_pytask_dialog.xml 2010-05-16 10:57:01 +0000
151+++ data/ui/about_pytask_dialog.xml 2010-12-02 01:08:10 +0000
152@@ -1,8 +1,8 @@
153 <glade-catalog name="about_pytask_dialog" domain="glade-3"
154 depends="gtk+" version="1.0">
155 <glade-widget-classes>
156- <glade-widget-class title="About Pytask Dialog" name="AboutPytaskDialog"
157- generic-name="AboutPytaskDialog" parent="GtkAboutDialog"
158+ <glade-widget-class title="About Pytask Dialog" name="AboutPytxskDialog"
159+ generic-name="AboutPytxskDialog" parent="GtkAboutDialog"
160 icon-name="widget-gtk-about-dialog"/>
161 </glade-widget-classes>
162
163
164=== modified file 'data/ui/preferences_pytask_dialog.xml'
165--- data/ui/preferences_pytask_dialog.xml 2010-05-16 10:57:01 +0000
166+++ data/ui/preferences_pytask_dialog.xml 2010-12-02 01:08:10 +0000
167@@ -1,8 +1,8 @@
168 <glade-catalog name="preferences_pytask_dialog" domain="glade-3"
169 depends="gtk+" version="1.0">
170 <glade-widget-classes>
171- <glade-widget-class title="Pytask Preferences Dialog" name="PreferencesPytaskDialog"
172- generic-name="PreferencePytaskDialog" parent="GtkDialog"
173+ <glade-widget-class title="Pytask Preferences Dialog" name="PreferencesPytxskDialog"
174+ generic-name="PreferencesPytxskDialog" parent="GtkDialog"
175 icon-name="widget-gtk-dialog"/>
176 </glade-widget-classes>
177
178
179=== modified file 'data/ui/pytask_window.xml'
180--- data/ui/pytask_window.xml 2010-05-16 10:57:01 +0000
181+++ data/ui/pytask_window.xml 2010-12-02 01:08:10 +0000
182@@ -1,8 +1,8 @@
183 <glade-catalog name="pytask_window" domain="glade-3"
184 depends="gtk+" version="1.0">
185 <glade-widget-classes>
186- <glade-widget-class title="Pytask Window" name="PytaskWindow"
187- generic-name="PytaskWindow" parent="GtkWindow"
188+ <glade-widget-class title="Pytxsk Window" name="PytxskWindow"
189+ generic-name="PytxskWindow" parent="GtkWindow"
190 icon-name="widget-gtk-window"/>
191 </glade-widget-classes>
192 </glade-catalog>
193
194=== renamed file 'pytask/AboutPytaskDialog.py' => 'pytask/AboutPytxskDialog.py'
195--- pytask/AboutPytaskDialog.py 2010-09-17 22:43:50 +0000
196+++ pytask/AboutPytxskDialog.py 2010-12-02 01:08:10 +0000
197@@ -22,16 +22,16 @@
198 from gettext import gettext as _
199 gettext.textdomain('pytask')
200
201-class AboutPytaskDialog(gtk.AboutDialog):
202- __gtype_name__ = "AboutPytaskDialog"
203+class AboutPytxskDialog(gtk.AboutDialog):
204+ __gtype_name__ = "AboutPytxskDialog"
205
206 def __new__(cls):
207 """Special static method that's automatically called by Python when
208 constructing a new instance of this class.
209
210- Returns a fully instantiated AboutPytaskDialog object.
211+ Returns a fully instantiated AboutPytxskDialog object.
212 """
213- builder = get_builder('AboutPytaskDialog')
214+ builder = get_builder('AboutPytxskDialog')
215 new_object = builder.get_object("about_pytask_dialog")
216 new_object.finish_initializing(builder)
217 return new_object
218@@ -40,8 +40,8 @@
219 """Called while initializing this instance in __new__
220
221 finish_initalizing should be called after parsing the ui definition
222- and creating a AboutPytaskDialog object with it in order to
223- finish initializing the start of the new AboutPytaskDialog
224+ and creating a AboutPytxskDialog object with it in order to
225+ finish initializing the start of the new AboutPytxskDialog
226 instance.
227
228 Put your initialization code in here and leave __init__ undefined.
229@@ -54,6 +54,6 @@
230
231
232 if __name__ == "__main__":
233- dialog = AboutPytaskDialog()
234+ dialog = AboutPytxskDialog()
235 dialog.show()
236 gtk.main()
237
238=== renamed file 'pytask/PreferencesPytaskDialog.py' => 'pytask/PreferencesPytxskDialog.py'
239--- pytask/PreferencesPytaskDialog.py 2010-09-17 22:43:50 +0000
240+++ pytask/PreferencesPytxskDialog.py 2010-12-02 01:08:10 +0000
241@@ -24,17 +24,17 @@
242 from gettext import gettext as _
243 gettext.textdomain('pytask')
244
245-class PreferencesPytaskDialog(gtk.Dialog):
246- __gtype_name__ = "PreferencesPytaskDialog"
247+class PreferencesPytxskDialog(gtk.Dialog):
248+ __gtype_name__ = "PreferencesPytxskDialog"
249 preferences = {}
250
251 def __new__(cls):
252 """Special static method that's automatically called by Python when
253 constructing a new instance of this class.
254
255- Returns a fully instantiated PreferencesPytaskDialog object.
256+ Returns a fully instantiated PreferencesPytxskDialog object.
257 """
258- builder = get_builder('PreferencesPytaskDialog')
259+ builder = get_builder('PreferencesPytxskDialog')
260 new_object = builder.get_object("preferences_pytask_dialog")
261 new_object.finish_initializing(builder)
262 return new_object
263@@ -43,7 +43,7 @@
264 """Called while initializing this instance in __new__
265
266 finish_initalizing should be called after parsing the ui definition
267- and creating a PreferencesPytaskDialog object with it in order to
268+ and creating a PreferencesPytxskDialog object with it in order to
269 finish initializing the start of the new PerferencesPytaskDialog
270 instance.
271
272@@ -116,6 +116,6 @@
273 pass
274
275 if __name__ == "__main__":
276- dialog = PreferencesPytaskDialog()
277+ dialog = PreferencesPytxskDialog()
278 dialog.show()
279 gtk.main()

Subscribers

People subscribed via source and target branches