Merge lp:~rlameiro/ubuntustudio-controls/gtkbuilder into lp:~ubuntustudio-dev/ubuntustudio-controls/old
- gtkbuilder
- Merge into old
Proposed by
Eric Hedekar
Status: | Merged |
---|---|
Approved by: | Eric Hedekar |
Approved revision: | not available |
Merged at revision: | 105 |
Proposed branch: | lp:~rlameiro/ubuntustudio-controls/gtkbuilder |
Merge into: | lp:~ubuntustudio-dev/ubuntustudio-controls/old |
Diff against target: |
840 lines (+384/-366) 4 files modified
setup.py (+1/-1) src/gui.glade (+0/-344) src/gui.xml (+360/-0) src/ubuntustudio-controls (+23/-21) |
To merge this branch: | bzr merge lp:~rlameiro/ubuntustudio-controls/gtkbuilder |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eric Hedekar (community) | Approve | ||
Review via email:
|
Commit message
rlamiero's branch switches to gtkbuilder from glade
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eric Hedekar (stochastic) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Eric Hedekar (stochastic) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'setup.py' | |||
2 | --- setup.py 2008-01-10 23:58:25 +0000 | |||
3 | +++ setup.py 2010-01-28 02:35:23 +0000 | |||
4 | @@ -11,6 +11,6 @@ | |||
5 | 11 | package_dir = {'':'src'}, | 11 | package_dir = {'':'src'}, |
6 | 12 | py_modules = ['changesettings', 'meminfo_total'], | 12 | py_modules = ['changesettings', 'meminfo_total'], |
7 | 13 | scripts = ['src/ubuntustudio-controls'], | 13 | scripts = ['src/ubuntustudio-controls'], |
9 | 14 | data_files = [('share/ubuntustudio-controls', ['src/gui.glade', 'src/ubuntustudio-controls.svg'])], | 14 | data_files = [('share/ubuntustudio-controls', ['src/gui.xml', 'src/ubuntustudio-controls.svg'])], |
10 | 15 | classifiers = ['License :: OSI Approved :: GNU General Public License (GPL)']) | 15 | classifiers = ['License :: OSI Approved :: GNU General Public License (GPL)']) |
11 | 16 | 16 | ||
12 | 17 | 17 | ||
13 | === removed file 'src/gui.glade' | |||
14 | --- src/gui.glade 2009-08-09 21:29:18 +0000 | |||
15 | +++ src/gui.glade 1970-01-01 00:00:00 +0000 | |||
16 | @@ -1,344 +0,0 @@ | |||
17 | 1 | <?xml version="1.0"?> | ||
18 | 2 | <glade-interface> | ||
19 | 3 | <!-- interface-requires gtk+ 2.16 --> | ||
20 | 4 | <!-- interface-naming-policy toplevel-contextual --> | ||
21 | 5 | <widget class="GtkWindow" id="mainWindow"> | ||
22 | 6 | <property name="visible">True</property> | ||
23 | 7 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
24 | 8 | <property name="title" translatable="yes">Ubuntu Studio Controls</property> | ||
25 | 9 | <property name="resizable">False</property> | ||
26 | 10 | <property name="icon">ubuntustudio-controls.svg</property> | ||
27 | 11 | <signal name="destroy" handler="on_mainWindow_destroy"/> | ||
28 | 12 | <child> | ||
29 | 13 | <widget class="GtkVBox" id="vbox1"> | ||
30 | 14 | <property name="visible">True</property> | ||
31 | 15 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
32 | 16 | <property name="spacing">5</property> | ||
33 | 17 | <child> | ||
34 | 18 | <widget class="GtkHButtonBox" id="hbuttonbox2"> | ||
35 | 19 | <property name="visible">True</property> | ||
36 | 20 | <child> | ||
37 | 21 | <widget class="GtkCheckButton" id="memlock_checkButton"> | ||
38 | 22 | <property name="label" translatable="yes">Enable memlock</property> | ||
39 | 23 | <property name="visible">True</property> | ||
40 | 24 | <property name="can_focus">True</property> | ||
41 | 25 | <property name="receives_default">False</property> | ||
42 | 26 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
43 | 27 | <property name="draw_indicator">True</property> | ||
44 | 28 | <signal name="toggled" handler="on_memlock_checkButton_toggled"/> | ||
45 | 29 | </widget> | ||
46 | 30 | <packing> | ||
47 | 31 | <property name="expand">False</property> | ||
48 | 32 | <property name="fill">False</property> | ||
49 | 33 | <property name="position">0</property> | ||
50 | 34 | </packing> | ||
51 | 35 | </child> | ||
52 | 36 | <child> | ||
53 | 37 | <widget class="GtkSpinButton" id="memlock_spinbutton"> | ||
54 | 38 | <property name="visible">True</property> | ||
55 | 39 | <property name="sensitive">False</property> | ||
56 | 40 | <property name="can_focus">True</property> | ||
57 | 41 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
58 | 42 | <property name="adjustment">0 0 100 1 10 10</property> | ||
59 | 43 | <property name="numeric">True</property> | ||
60 | 44 | <signal name="value_changed" handler="on_memlock_spinbutton_value_changed"/> | ||
61 | 45 | </widget> | ||
62 | 46 | <packing> | ||
63 | 47 | <property name="expand">False</property> | ||
64 | 48 | <property name="fill">False</property> | ||
65 | 49 | <property name="position">1</property> | ||
66 | 50 | </packing> | ||
67 | 51 | </child> | ||
68 | 52 | <child> | ||
69 | 53 | <widget class="GtkLabel" id="memlock_mbLabel"> | ||
70 | 54 | <property name="visible">True</property> | ||
71 | 55 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
72 | 56 | <property name="label" translatable="yes"> % of system memory </property> | ||
73 | 57 | </widget> | ||
74 | 58 | <packing> | ||
75 | 59 | <property name="expand">False</property> | ||
76 | 60 | <property name="fill">False</property> | ||
77 | 61 | <property name="pack_type">end</property> | ||
78 | 62 | <property name="position">2</property> | ||
79 | 63 | </packing> | ||
80 | 64 | </child> | ||
81 | 65 | </widget> | ||
82 | 66 | <packing> | ||
83 | 67 | <property name="position">0</property> | ||
84 | 68 | </packing> | ||
85 | 69 | </child> | ||
86 | 70 | <child> | ||
87 | 71 | <widget class="GtkHSeparator" id="hseparator1"> | ||
88 | 72 | <property name="visible">True</property> | ||
89 | 73 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
90 | 74 | </widget> | ||
91 | 75 | <packing> | ||
92 | 76 | <property name="expand">False</property> | ||
93 | 77 | <property name="position">1</property> | ||
94 | 78 | </packing> | ||
95 | 79 | </child> | ||
96 | 80 | <child> | ||
97 | 81 | <widget class="GtkHBox" id="hbox4"> | ||
98 | 82 | <property name="visible">True</property> | ||
99 | 83 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
100 | 84 | <child> | ||
101 | 85 | <widget class="GtkCheckButton" id="raw1394_checkbutton"> | ||
102 | 86 | <property name="label" translatable="yes">Enable raw1394 access</property> | ||
103 | 87 | <property name="visible">True</property> | ||
104 | 88 | <property name="can_focus">True</property> | ||
105 | 89 | <property name="receives_default">False</property> | ||
106 | 90 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
107 | 91 | <property name="draw_indicator">True</property> | ||
108 | 92 | <signal name="toggled" handler="on_raw1394_checkbutton_toggled"/> | ||
109 | 93 | </widget> | ||
110 | 94 | <packing> | ||
111 | 95 | <property name="expand">False</property> | ||
112 | 96 | <property name="fill">False</property> | ||
113 | 97 | <property name="position">0</property> | ||
114 | 98 | </packing> | ||
115 | 99 | </child> | ||
116 | 100 | <child> | ||
117 | 101 | <placeholder/> | ||
118 | 102 | </child> | ||
119 | 103 | <child> | ||
120 | 104 | <placeholder/> | ||
121 | 105 | </child> | ||
122 | 106 | </widget> | ||
123 | 107 | <packing> | ||
124 | 108 | <property name="position">2</property> | ||
125 | 109 | </packing> | ||
126 | 110 | </child> | ||
127 | 111 | <child> | ||
128 | 112 | <widget class="GtkHSeparator" id="hseparator2"> | ||
129 | 113 | <property name="visible">True</property> | ||
130 | 114 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
131 | 115 | </widget> | ||
132 | 116 | <packing> | ||
133 | 117 | <property name="expand">False</property> | ||
134 | 118 | <property name="position">3</property> | ||
135 | 119 | </packing> | ||
136 | 120 | </child> | ||
137 | 121 | <child> | ||
138 | 122 | <widget class="GtkHButtonBox" id="hbuttonbox1"> | ||
139 | 123 | <property name="visible">True</property> | ||
140 | 124 | <child> | ||
141 | 125 | <widget class="GtkCheckButton" id="EnableNice"> | ||
142 | 126 | <property name="label" translatable="yes">Enable nice</property> | ||
143 | 127 | <property name="visible">True</property> | ||
144 | 128 | <property name="can_focus">True</property> | ||
145 | 129 | <property name="receives_default">False</property> | ||
146 | 130 | <property name="draw_indicator">True</property> | ||
147 | 131 | <signal name="toggled" handler="on_EnableNice_toggled"/> | ||
148 | 132 | </widget> | ||
149 | 133 | <packing> | ||
150 | 134 | <property name="expand">False</property> | ||
151 | 135 | <property name="fill">False</property> | ||
152 | 136 | <property name="position">0</property> | ||
153 | 137 | </packing> | ||
154 | 138 | </child> | ||
155 | 139 | <child> | ||
156 | 140 | <widget class="GtkSpinButton" id="nicePercentageAmount"> | ||
157 | 141 | <property name="visible">True</property> | ||
158 | 142 | <property name="can_focus">True</property> | ||
159 | 143 | <property name="adjustment">-10 -99 0 1 10 10</property> | ||
160 | 144 | <property name="numeric">True</property> | ||
161 | 145 | <signal name="value_changed" handler="on_nicePercentageAmount_value_changed"/> | ||
162 | 146 | </widget> | ||
163 | 147 | <packing> | ||
164 | 148 | <property name="expand">False</property> | ||
165 | 149 | <property name="fill">False</property> | ||
166 | 150 | <property name="position">1</property> | ||
167 | 151 | </packing> | ||
168 | 152 | </child> | ||
169 | 153 | <child> | ||
170 | 154 | <widget class="GtkLabel" id="nicePercentage"> | ||
171 | 155 | <property name="visible">True</property> | ||
172 | 156 | <property name="label" translatable="yes">Nice percentage</property> | ||
173 | 157 | </widget> | ||
174 | 158 | <packing> | ||
175 | 159 | <property name="expand">False</property> | ||
176 | 160 | <property name="fill">False</property> | ||
177 | 161 | <property name="position">2</property> | ||
178 | 162 | </packing> | ||
179 | 163 | </child> | ||
180 | 164 | </widget> | ||
181 | 165 | <packing> | ||
182 | 166 | <property name="position">4</property> | ||
183 | 167 | </packing> | ||
184 | 168 | </child> | ||
185 | 169 | <child> | ||
186 | 170 | <widget class="GtkHBox" id="hbox1"> | ||
187 | 171 | <property name="visible">True</property> | ||
188 | 172 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
189 | 173 | <child> | ||
190 | 174 | <widget class="GtkButton" id="about_button"> | ||
191 | 175 | <property name="label" translatable="yes"> About </property> | ||
192 | 176 | <property name="visible">True</property> | ||
193 | 177 | <property name="can_focus">True</property> | ||
194 | 178 | <property name="receives_default">True</property> | ||
195 | 179 | <property name="events">GDK_BUTTON_PRESS_MASK</property> | ||
196 | 180 | <signal name="clicked" handler="on_about_button_clicked"/> | ||
197 | 181 | </widget> | ||
198 | 182 | <packing> | ||
199 | 183 | <property name="expand">False</property> | ||
200 | 184 | <property name="position">0</property> | ||
201 | 185 | </packing> | ||
202 | 186 | </child> | ||
203 | 187 | <child> | ||
204 | 188 | <widget class="GtkLabel" id="label3"> | ||
205 | 189 | <property name="visible">True</property> | ||
206 | 190 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
207 | 191 | <property name="label" translatable="yes"> </property> | ||
208 | 192 | </widget> | ||
209 | 193 | <packing> | ||
210 | 194 | <property name="position">2</property> | ||
211 | 195 | </packing> | ||
212 | 196 | </child> | ||
213 | 197 | <child> | ||
214 | 198 | <widget class="GtkHBox" id="hbox3"> | ||
215 | 199 | <property name="visible">True</property> | ||
216 | 200 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
217 | 201 | <property name="homogeneous">True</property> | ||
218 | 202 | <child> | ||
219 | 203 | <widget class="GtkButton" id="apply_button"> | ||
220 | 204 | <property name="label" translatable="yes"> Apply </property> | ||
221 | 205 | <property name="visible">True</property> | ||
222 | 206 | <property name="sensitive">False</property> | ||
223 | 207 | <property name="can_focus">True</property> | ||
224 | 208 | <property name="receives_default">True</property> | ||
225 | 209 | <property name="events">GDK_BUTTON_PRESS_MASK</property> | ||
226 | 210 | <signal name="clicked" handler="on_apply_button_clicked"/> | ||
227 | 211 | </widget> | ||
228 | 212 | <packing> | ||
229 | 213 | <property name="expand">False</property> | ||
230 | 214 | <property name="position">0</property> | ||
231 | 215 | </packing> | ||
232 | 216 | </child> | ||
233 | 217 | <child> | ||
234 | 218 | <widget class="GtkButton" id="close_button"> | ||
235 | 219 | <property name="label" translatable="yes"> Close </property> | ||
236 | 220 | <property name="visible">True</property> | ||
237 | 221 | <property name="can_focus">True</property> | ||
238 | 222 | <property name="receives_default">True</property> | ||
239 | 223 | <property name="events">GDK_BUTTON_PRESS_MASK</property> | ||
240 | 224 | <signal name="clicked" handler="on_closeButton_clicked"/> | ||
241 | 225 | </widget> | ||
242 | 226 | <packing> | ||
243 | 227 | <property name="expand">False</property> | ||
244 | 228 | <property name="pack_type">end</property> | ||
245 | 229 | <property name="position">1</property> | ||
246 | 230 | </packing> | ||
247 | 231 | </child> | ||
248 | 232 | </widget> | ||
249 | 233 | <packing> | ||
250 | 234 | <property name="pack_type">end</property> | ||
251 | 235 | <property name="position">1</property> | ||
252 | 236 | </packing> | ||
253 | 237 | </child> | ||
254 | 238 | </widget> | ||
255 | 239 | <packing> | ||
256 | 240 | <property name="position">6</property> | ||
257 | 241 | </packing> | ||
258 | 242 | </child> | ||
259 | 243 | <child> | ||
260 | 244 | <placeholder/> | ||
261 | 245 | </child> | ||
262 | 246 | <child> | ||
263 | 247 | <placeholder/> | ||
264 | 248 | </child> | ||
265 | 249 | </widget> | ||
266 | 250 | </child> | ||
267 | 251 | </widget> | ||
268 | 252 | <widget class="GtkAboutDialog" id="about"> | ||
269 | 253 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
270 | 254 | <property name="border_width">5</property> | ||
271 | 255 | <property name="title" translatable="yes">About Ubuntu Studio Controls</property> | ||
272 | 256 | <property name="window_position">center-on-parent</property> | ||
273 | 257 | <property name="type_hint">dialog</property> | ||
274 | 258 | <property name="has_separator">False</property> | ||
275 | 259 | <property name="program_name">Ubuntu Studio Controls</property> | ||
276 | 260 | <property name="version">0.4</property> | ||
277 | 261 | <property name="copyright" translatable="yes">Copyright © 2008 Andrew Hunter, Luis de Bethencourt</property> | ||
278 | 262 | <property name="comments" translatable="yes">Ubuntu Studio Controls is the official Ubuntu Studio application to handle your system controls. </property> | ||
279 | 263 | <property name="website">http://www.ubuntustudio.org</property> | ||
280 | 264 | <property name="website_label" translatable="yes">http://www.ubuntustudio.org</property> | ||
281 | 265 | <property name="license" translatable="yes">Ubuntu Studio Controls is free software; you can redistribute it and/or modify it | ||
282 | 266 | under the terms of the GNU General Public License as published | ||
283 | 267 | by the Free Software Foundation; either version 2 of the License, | ||
284 | 268 | or (at your option) any later version. | ||
285 | 269 | |||
286 | 270 | ubuntustudio-controls is distributed in the hope that it will be useful, but | ||
287 | 271 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
288 | 272 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
289 | 273 | the GNU General Public License for more details. | ||
290 | 274 | |||
291 | 275 | You should have received a copy of the GNU General Public | ||
292 | 276 | License along with Nautilus; if not, write to the Free Software | ||
293 | 277 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
294 | 278 | 02111-1307 USA</property> | ||
295 | 279 | <property name="authors">Andrew Hunter, Luis de Bethencourt, Cory Kontros</property> | ||
296 | 280 | <property name="documenters"></property> | ||
297 | 281 | <property name="artists">Huw Wilkins <hushimi@gmail.com></property> | ||
298 | 282 | <property name="logo">ubuntustudio-controls.svg</property> | ||
299 | 283 | <signal name="close" handler="on_about_close"/> | ||
300 | 284 | <child internal-child="vbox"> | ||
301 | 285 | <widget class="GtkVBox" id="dialog-vbox1"> | ||
302 | 286 | <property name="visible">True</property> | ||
303 | 287 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
304 | 288 | <property name="spacing">2</property> | ||
305 | 289 | <child> | ||
306 | 290 | <placeholder/> | ||
307 | 291 | </child> | ||
308 | 292 | <child internal-child="action_area"> | ||
309 | 293 | <widget class="GtkHButtonBox" id="dialog-action_area1"> | ||
310 | 294 | <property name="visible">True</property> | ||
311 | 295 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
312 | 296 | <property name="layout_style">end</property> | ||
313 | 297 | </widget> | ||
314 | 298 | <packing> | ||
315 | 299 | <property name="expand">False</property> | ||
316 | 300 | <property name="pack_type">end</property> | ||
317 | 301 | <property name="position">0</property> | ||
318 | 302 | </packing> | ||
319 | 303 | </child> | ||
320 | 304 | </widget> | ||
321 | 305 | </child> | ||
322 | 306 | </widget> | ||
323 | 307 | <widget class="GtkMessageDialog" id="raw_dialog"> | ||
324 | 308 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
325 | 309 | <property name="border_width">5</property> | ||
326 | 310 | <property name="resizable">False</property> | ||
327 | 311 | <property name="window_position">center-on-parent</property> | ||
328 | 312 | <property name="type_hint">dialog</property> | ||
329 | 313 | <property name="skip_taskbar_hint">True</property> | ||
330 | 314 | <property name="has_separator">False</property> | ||
331 | 315 | <property name="message_type">warning</property> | ||
332 | 316 | <property name="buttons">close</property> | ||
333 | 317 | <property name="text">Warning: Enabling this feature can pose a security risk as raw1394 devices are run with root privilages.</property> | ||
334 | 318 | <child internal-child="vbox"> | ||
335 | 319 | <widget class="GtkVBox" id="dialog-vbox2"> | ||
336 | 320 | <property name="visible">True</property> | ||
337 | 321 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
338 | 322 | <property name="spacing">2</property> | ||
339 | 323 | <child internal-child="action_area"> | ||
340 | 324 | <widget class="GtkHButtonBox" id="dialog-action_area2"> | ||
341 | 325 | <property name="visible">True</property> | ||
342 | 326 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
343 | 327 | <property name="layout_style">end</property> | ||
344 | 328 | <child> | ||
345 | 329 | <placeholder/> | ||
346 | 330 | </child> | ||
347 | 331 | <child> | ||
348 | 332 | <placeholder/> | ||
349 | 333 | </child> | ||
350 | 334 | </widget> | ||
351 | 335 | <packing> | ||
352 | 336 | <property name="expand">False</property> | ||
353 | 337 | <property name="pack_type">end</property> | ||
354 | 338 | <property name="position">0</property> | ||
355 | 339 | </packing> | ||
356 | 340 | </child> | ||
357 | 341 | </widget> | ||
358 | 342 | </child> | ||
359 | 343 | </widget> | ||
360 | 344 | </glade-interface> | ||
361 | 345 | 0 | ||
362 | === added file 'src/gui.xml' | |||
363 | --- src/gui.xml 1970-01-01 00:00:00 +0000 | |||
364 | +++ src/gui.xml 2010-01-28 02:35:23 +0000 | |||
365 | @@ -0,0 +1,360 @@ | |||
366 | 1 | <?xml version="1.0"?> | ||
367 | 2 | <interface> | ||
368 | 3 | <object class="GtkAdjustment" id="adjustment1"> | ||
369 | 4 | <property name="upper">100</property> | ||
370 | 5 | <property name="lower">0</property> | ||
371 | 6 | <property name="page_increment">10</property> | ||
372 | 7 | <property name="step_increment">1</property> | ||
373 | 8 | <property name="page_size">10</property> | ||
374 | 9 | <property name="value">0</property> | ||
375 | 10 | </object> | ||
376 | 11 | <object class="GtkAdjustment" id="adjustment2"> | ||
377 | 12 | <property name="upper">0</property> | ||
378 | 13 | <property name="lower">-99</property> | ||
379 | 14 | <property name="page_increment">10</property> | ||
380 | 15 | <property name="step_increment">1</property> | ||
381 | 16 | <property name="page_size">10</property> | ||
382 | 17 | <property name="value">0</property> | ||
383 | 18 | </object> | ||
384 | 19 | <!-- interface-requires gtk+ 2.16 --> | ||
385 | 20 | <!-- interface-naming-policy toplevel-contextual --> | ||
386 | 21 | <object class="GtkWindow" id="mainWindow"> | ||
387 | 22 | <property name="visible">True</property> | ||
388 | 23 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
389 | 24 | <property name="title" translatable="yes">Ubuntu Studio Controls</property> | ||
390 | 25 | <property name="resizable">False</property> | ||
391 | 26 | <property name="icon">ubuntustudio-controls.svg</property> | ||
392 | 27 | <signal handler="on_mainWindow_destroy" name="destroy"/> | ||
393 | 28 | <child> | ||
394 | 29 | <object class="GtkVBox" id="vbox1"> | ||
395 | 30 | <property name="visible">True</property> | ||
396 | 31 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
397 | 32 | <property name="spacing">5</property> | ||
398 | 33 | <child> | ||
399 | 34 | <object class="GtkHButtonBox" id="hbuttonbox2"> | ||
400 | 35 | <property name="visible">True</property> | ||
401 | 36 | <child> | ||
402 | 37 | <object class="GtkCheckButton" id="memlock_checkButton"> | ||
403 | 38 | <property name="label" translatable="yes">Enable memlock</property> | ||
404 | 39 | <property name="visible">True</property> | ||
405 | 40 | <property name="can_focus">True</property> | ||
406 | 41 | <property name="receives_default">False</property> | ||
407 | 42 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
408 | 43 | <property name="draw_indicator">True</property> | ||
409 | 44 | <signal handler="on_memlock_checkButton_toggled" name="toggled"/> | ||
410 | 45 | </object> | ||
411 | 46 | <packing> | ||
412 | 47 | <property name="expand">False</property> | ||
413 | 48 | <property name="fill">False</property> | ||
414 | 49 | <property name="position">0</property> | ||
415 | 50 | </packing> | ||
416 | 51 | </child> | ||
417 | 52 | <child> | ||
418 | 53 | <object class="GtkSpinButton" id="memlock_spinbutton"> | ||
419 | 54 | <property name="visible">True</property> | ||
420 | 55 | <property name="sensitive">False</property> | ||
421 | 56 | <property name="can_focus">True</property> | ||
422 | 57 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
423 | 58 | <property name="adjustment">adjustment1</property> | ||
424 | 59 | <property name="numeric">True</property> | ||
425 | 60 | <signal handler="on_memlock_spinbutton_value_changed" name="value_changed"/> | ||
426 | 61 | </object> | ||
427 | 62 | <packing> | ||
428 | 63 | <property name="expand">False</property> | ||
429 | 64 | <property name="fill">False</property> | ||
430 | 65 | <property name="position">1</property> | ||
431 | 66 | </packing> | ||
432 | 67 | </child> | ||
433 | 68 | <child> | ||
434 | 69 | <object class="GtkLabel" id="memlock_mbLabel"> | ||
435 | 70 | <property name="visible">True</property> | ||
436 | 71 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
437 | 72 | <property name="label" translatable="yes"> % of system memory </property> | ||
438 | 73 | </object> | ||
439 | 74 | <packing> | ||
440 | 75 | <property name="expand">False</property> | ||
441 | 76 | <property name="fill">False</property> | ||
442 | 77 | <property name="pack_type">end</property> | ||
443 | 78 | <property name="position">2</property> | ||
444 | 79 | </packing> | ||
445 | 80 | </child> | ||
446 | 81 | </object> | ||
447 | 82 | <packing> | ||
448 | 83 | <property name="position">0</property> | ||
449 | 84 | </packing> | ||
450 | 85 | </child> | ||
451 | 86 | <child> | ||
452 | 87 | <object class="GtkHSeparator" id="hseparator1"> | ||
453 | 88 | <property name="visible">True</property> | ||
454 | 89 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
455 | 90 | </object> | ||
456 | 91 | <packing> | ||
457 | 92 | <property name="expand">False</property> | ||
458 | 93 | <property name="position">1</property> | ||
459 | 94 | </packing> | ||
460 | 95 | </child> | ||
461 | 96 | <child> | ||
462 | 97 | <object class="GtkHBox" id="hbox4"> | ||
463 | 98 | <property name="visible">True</property> | ||
464 | 99 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
465 | 100 | <child> | ||
466 | 101 | <object class="GtkCheckButton" id="raw1394_checkbutton"> | ||
467 | 102 | <property name="label" translatable="yes">Enable raw1394 access</property> | ||
468 | 103 | <property name="visible">True</property> | ||
469 | 104 | <property name="can_focus">True</property> | ||
470 | 105 | <property name="receives_default">False</property> | ||
471 | 106 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
472 | 107 | <property name="draw_indicator">True</property> | ||
473 | 108 | <signal handler="on_raw1394_checkbutton_toggled" name="toggled"/> | ||
474 | 109 | </object> | ||
475 | 110 | <packing> | ||
476 | 111 | <property name="expand">False</property> | ||
477 | 112 | <property name="fill">False</property> | ||
478 | 113 | <property name="position">0</property> | ||
479 | 114 | </packing> | ||
480 | 115 | </child> | ||
481 | 116 | <child> | ||
482 | 117 | <placeholder/> | ||
483 | 118 | </child> | ||
484 | 119 | <child> | ||
485 | 120 | <placeholder/> | ||
486 | 121 | </child> | ||
487 | 122 | </object> | ||
488 | 123 | <packing> | ||
489 | 124 | <property name="position">2</property> | ||
490 | 125 | </packing> | ||
491 | 126 | </child> | ||
492 | 127 | <child> | ||
493 | 128 | <object class="GtkHSeparator" id="hseparator2"> | ||
494 | 129 | <property name="visible">True</property> | ||
495 | 130 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
496 | 131 | </object> | ||
497 | 132 | <packing> | ||
498 | 133 | <property name="expand">False</property> | ||
499 | 134 | <property name="position">3</property> | ||
500 | 135 | </packing> | ||
501 | 136 | </child> | ||
502 | 137 | <child> | ||
503 | 138 | <object class="GtkHButtonBox" id="hbuttonbox1"> | ||
504 | 139 | <property name="visible">True</property> | ||
505 | 140 | <child> | ||
506 | 141 | <object class="GtkCheckButton" id="EnableNice"> | ||
507 | 142 | <property name="label" translatable="yes">Enable nice</property> | ||
508 | 143 | <property name="visible">True</property> | ||
509 | 144 | <property name="can_focus">True</property> | ||
510 | 145 | <property name="receives_default">False</property> | ||
511 | 146 | <property name="draw_indicator">True</property> | ||
512 | 147 | <signal handler="on_EnableNice_toggled" name="toggled"/> | ||
513 | 148 | </object> | ||
514 | 149 | <packing> | ||
515 | 150 | <property name="expand">False</property> | ||
516 | 151 | <property name="fill">False</property> | ||
517 | 152 | <property name="position">0</property> | ||
518 | 153 | </packing> | ||
519 | 154 | </child> | ||
520 | 155 | <child> | ||
521 | 156 | <object class="GtkSpinButton" id="nicePercentageAmount"> | ||
522 | 157 | <property name="visible">True</property> | ||
523 | 158 | <property name="can_focus">True</property> | ||
524 | 159 | <property name="adjustment">adjustment2</property> | ||
525 | 160 | <property name="numeric">True</property> | ||
526 | 161 | <signal handler="on_nicePercentageAmount_value_changed" name="value_changed"/> | ||
527 | 162 | </object> | ||
528 | 163 | <packing> | ||
529 | 164 | <property name="expand">False</property> | ||
530 | 165 | <property name="fill">False</property> | ||
531 | 166 | <property name="position">1</property> | ||
532 | 167 | </packing> | ||
533 | 168 | </child> | ||
534 | 169 | <child> | ||
535 | 170 | <object class="GtkLabel" id="nicePercentage"> | ||
536 | 171 | <property name="visible">True</property> | ||
537 | 172 | <property name="label" translatable="yes">Nice percentage</property> | ||
538 | 173 | </object> | ||
539 | 174 | <packing> | ||
540 | 175 | <property name="expand">False</property> | ||
541 | 176 | <property name="fill">False</property> | ||
542 | 177 | <property name="position">2</property> | ||
543 | 178 | </packing> | ||
544 | 179 | </child> | ||
545 | 180 | </object> | ||
546 | 181 | <packing> | ||
547 | 182 | <property name="position">4</property> | ||
548 | 183 | </packing> | ||
549 | 184 | </child> | ||
550 | 185 | <child> | ||
551 | 186 | <object class="GtkHBox" id="hbox1"> | ||
552 | 187 | <property name="visible">True</property> | ||
553 | 188 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
554 | 189 | <child> | ||
555 | 190 | <object class="GtkButton" id="about_button"> | ||
556 | 191 | <property name="label" translatable="yes"> About </property> | ||
557 | 192 | <property name="visible">True</property> | ||
558 | 193 | <property name="can_focus">True</property> | ||
559 | 194 | <property name="receives_default">True</property> | ||
560 | 195 | <property name="events">GDK_BUTTON_PRESS_MASK</property> | ||
561 | 196 | <signal handler="on_about_button_clicked" name="clicked"/> | ||
562 | 197 | </object> | ||
563 | 198 | <packing> | ||
564 | 199 | <property name="expand">False</property> | ||
565 | 200 | <property name="position">0</property> | ||
566 | 201 | </packing> | ||
567 | 202 | </child> | ||
568 | 203 | <child> | ||
569 | 204 | <object class="GtkLabel" id="label3"> | ||
570 | 205 | <property name="visible">True</property> | ||
571 | 206 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
572 | 207 | <property name="label" translatable="yes"> </property> | ||
573 | 208 | </object> | ||
574 | 209 | <packing> | ||
575 | 210 | <property name="position">2</property> | ||
576 | 211 | </packing> | ||
577 | 212 | </child> | ||
578 | 213 | <child> | ||
579 | 214 | <object class="GtkHBox" id="hbox3"> | ||
580 | 215 | <property name="visible">True</property> | ||
581 | 216 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
582 | 217 | <property name="homogeneous">True</property> | ||
583 | 218 | <child> | ||
584 | 219 | <object class="GtkButton" id="apply_button"> | ||
585 | 220 | <property name="label" translatable="yes"> Apply </property> | ||
586 | 221 | <property name="visible">True</property> | ||
587 | 222 | <property name="sensitive">False</property> | ||
588 | 223 | <property name="can_focus">True</property> | ||
589 | 224 | <property name="receives_default">True</property> | ||
590 | 225 | <property name="events">GDK_BUTTON_PRESS_MASK</property> | ||
591 | 226 | <signal handler="on_apply_button_clicked" name="clicked"/> | ||
592 | 227 | </object> | ||
593 | 228 | <packing> | ||
594 | 229 | <property name="expand">False</property> | ||
595 | 230 | <property name="position">0</property> | ||
596 | 231 | </packing> | ||
597 | 232 | </child> | ||
598 | 233 | <child> | ||
599 | 234 | <object class="GtkButton" id="close_button"> | ||
600 | 235 | <property name="label" translatable="yes"> Close </property> | ||
601 | 236 | <property name="visible">True</property> | ||
602 | 237 | <property name="can_focus">True</property> | ||
603 | 238 | <property name="receives_default">True</property> | ||
604 | 239 | <property name="events">GDK_BUTTON_PRESS_MASK</property> | ||
605 | 240 | <signal handler="on_closeButton_clicked" name="clicked"/> | ||
606 | 241 | </object> | ||
607 | 242 | <packing> | ||
608 | 243 | <property name="expand">False</property> | ||
609 | 244 | <property name="pack_type">end</property> | ||
610 | 245 | <property name="position">1</property> | ||
611 | 246 | </packing> | ||
612 | 247 | </child> | ||
613 | 248 | </object> | ||
614 | 249 | <packing> | ||
615 | 250 | <property name="pack_type">end</property> | ||
616 | 251 | <property name="position">1</property> | ||
617 | 252 | </packing> | ||
618 | 253 | </child> | ||
619 | 254 | </object> | ||
620 | 255 | <packing> | ||
621 | 256 | <property name="position">6</property> | ||
622 | 257 | </packing> | ||
623 | 258 | </child> | ||
624 | 259 | <child> | ||
625 | 260 | <placeholder/> | ||
626 | 261 | </child> | ||
627 | 262 | <child> | ||
628 | 263 | <placeholder/> | ||
629 | 264 | </child> | ||
630 | 265 | </object> | ||
631 | 266 | </child> | ||
632 | 267 | </object> | ||
633 | 268 | <object class="GtkAboutDialog" id="about"> | ||
634 | 269 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
635 | 270 | <property name="border_width">5</property> | ||
636 | 271 | <property name="title" translatable="yes">About Ubuntu Studio Controls</property> | ||
637 | 272 | <property name="window_position">center-on-parent</property> | ||
638 | 273 | <property name="type_hint">dialog</property> | ||
639 | 274 | <property name="has_separator">False</property> | ||
640 | 275 | <property name="program_name">Ubuntu Studio Controls</property> | ||
641 | 276 | <property name="version">0.4</property> | ||
642 | 277 | <property name="copyright" translatable="yes">Copyright © 2008 Andrew Hunter, Luis de Bethencourt</property> | ||
643 | 278 | <property name="comments" translatable="yes">Ubuntu Studio Controls is the official Ubuntu Studio application to handle your system controls. </property> | ||
644 | 279 | <property name="website">http://www.ubuntustudio.org</property> | ||
645 | 280 | <property name="website_label" translatable="yes">http://www.ubuntustudio.org</property> | ||
646 | 281 | <property name="license" translatable="yes">Ubuntu Studio Controls is free software; you can redistribute it and/or modify it | ||
647 | 282 | under the terms of the GNU General Public License as published | ||
648 | 283 | by the Free Software Foundation; either version 2 of the License, | ||
649 | 284 | or (at your option) any later version. | ||
650 | 285 | |||
651 | 286 | ubuntustudio-controls is distributed in the hope that it will be useful, but | ||
652 | 287 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
653 | 288 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
654 | 289 | the GNU General Public License for more details. | ||
655 | 290 | |||
656 | 291 | You should have received a copy of the GNU General Public | ||
657 | 292 | License along with Nautilus; if not, write to the Free Software | ||
658 | 293 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
659 | 294 | 02111-1307 USA</property> | ||
660 | 295 | <property name="authors">Andrew Hunter, Luis de Bethencourt, Cory Kontros</property> | ||
661 | 296 | <property name="documenters"/> | ||
662 | 297 | <property name="artists">Huw Wilkins <hushimi@gmail.com></property> | ||
663 | 298 | <property name="logo">ubuntustudio-controls.svg</property> | ||
664 | 299 | <signal handler="on_about_close" name="close"/> | ||
665 | 300 | <child internal-child="vbox"> | ||
666 | 301 | <object class="GtkVBox" id="dialog-vbox1"> | ||
667 | 302 | <property name="visible">True</property> | ||
668 | 303 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
669 | 304 | <property name="spacing">2</property> | ||
670 | 305 | <child> | ||
671 | 306 | <placeholder/> | ||
672 | 307 | </child> | ||
673 | 308 | <child internal-child="action_area"> | ||
674 | 309 | <object class="GtkHButtonBox" id="dialog-action_area1"> | ||
675 | 310 | <property name="visible">True</property> | ||
676 | 311 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
677 | 312 | <property name="layout_style">end</property> | ||
678 | 313 | </object> | ||
679 | 314 | <packing> | ||
680 | 315 | <property name="expand">False</property> | ||
681 | 316 | <property name="pack_type">end</property> | ||
682 | 317 | <property name="position">0</property> | ||
683 | 318 | </packing> | ||
684 | 319 | </child> | ||
685 | 320 | </object> | ||
686 | 321 | </child> | ||
687 | 322 | </object> | ||
688 | 323 | <object class="GtkMessageDialog" id="raw_dialog"> | ||
689 | 324 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
690 | 325 | <property name="border_width">5</property> | ||
691 | 326 | <property name="resizable">False</property> | ||
692 | 327 | <property name="window_position">center-on-parent</property> | ||
693 | 328 | <property name="type_hint">dialog</property> | ||
694 | 329 | <property name="skip_taskbar_hint">True</property> | ||
695 | 330 | <property name="has_separator">False</property> | ||
696 | 331 | <property name="message_type">warning</property> | ||
697 | 332 | <property name="buttons">close</property> | ||
698 | 333 | <property name="text">Warning: Enabling this feature can pose a security risk as raw1394 devices are run with root privilages.</property> | ||
699 | 334 | <child internal-child="vbox"> | ||
700 | 335 | <object class="GtkVBox" id="dialog-vbox2"> | ||
701 | 336 | <property name="visible">True</property> | ||
702 | 337 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
703 | 338 | <property name="spacing">2</property> | ||
704 | 339 | <child internal-child="action_area"> | ||
705 | 340 | <object class="GtkHButtonBox" id="dialog-action_area2"> | ||
706 | 341 | <property name="visible">True</property> | ||
707 | 342 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
708 | 343 | <property name="layout_style">end</property> | ||
709 | 344 | <child> | ||
710 | 345 | <placeholder/> | ||
711 | 346 | </child> | ||
712 | 347 | <child> | ||
713 | 348 | <placeholder/> | ||
714 | 349 | </child> | ||
715 | 350 | </object> | ||
716 | 351 | <packing> | ||
717 | 352 | <property name="expand">False</property> | ||
718 | 353 | <property name="pack_type">end</property> | ||
719 | 354 | <property name="position">0</property> | ||
720 | 355 | </packing> | ||
721 | 356 | </child> | ||
722 | 357 | </object> | ||
723 | 358 | </child> | ||
724 | 359 | </object> | ||
725 | 360 | </interface> | ||
726 | 0 | 361 | ||
727 | === modified file 'src/ubuntustudio-controls' | |||
728 | --- src/ubuntustudio-controls 2009-08-09 21:29:18 +0000 | |||
729 | +++ src/ubuntustudio-controls 2010-01-28 02:35:23 +0000 | |||
730 | @@ -18,7 +18,6 @@ | |||
731 | 18 | #Error message dialoge lifted from Terminator. http://launchpad.net/terminator | 18 | #Error message dialoge lifted from Terminator. http://launchpad.net/terminator |
732 | 19 | try: | 19 | try: |
733 | 20 | import gtk, meminfo_total, sys, os, cPickle | 20 | import gtk, meminfo_total, sys, os, cPickle |
734 | 21 | from gtk import glade | ||
735 | 22 | from changesettings import ChangeSettings | 21 | from changesettings import ChangeSettings |
736 | 23 | except: | 22 | except: |
737 | 24 | import_error = gtk.MessageDialog (None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, ('You need to install python bindings for gtk and/or glade ("python-gtk2 & python-glade2" in debian/ubuntu)')) | 23 | import_error = gtk.MessageDialog (None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, ('You need to install python bindings for gtk and/or glade ("python-gtk2 & python-glade2" in debian/ubuntu)')) |
738 | @@ -28,14 +27,17 @@ | |||
739 | 28 | class Uscontrols: | 27 | class Uscontrols: |
740 | 29 | def __init__(self): | 28 | def __init__(self): |
741 | 30 | #Set the Glade file | 29 | #Set the Glade file |
745 | 31 | self.gladefile = "/usr/share/ubuntustudio-controls/gui.glade" #Remove /usr/share/ubuntustudio-controls/ to run from src dir | 30 | #debug src directory |
746 | 32 | self.wTree = gtk.glade.XML(self.gladefile) | 31 | self.gtkbuilderfile = "gui.xml" |
747 | 33 | 32 | #self.gtkbuilderfile = "/usr/share/ubuntustudio-controls/gui.gtkbuilder" #Remove /usr/share/ubuntustudio-controls/ to run from src dir | |
748 | 33 | #builder = gtk.glade.XML(self.gladefile) | ||
749 | 34 | self.builder = gtk.Builder() | ||
750 | 35 | self.builder.add_from_file(self.gtkbuilderfile) | ||
751 | 34 | #Get the Main Window, and connect the "destroy" event | 36 | #Get the Main Window, and connect the "destroy" event |
756 | 35 | self.window = self.wTree.get_widget("mainWindow") | 37 | self.window = self.builder.get_object("mainWindow") |
757 | 36 | self.aboutWidget = self.wTree.get_widget("about") | 38 | self.aboutWidget = self.builder.get_object("about") |
758 | 37 | self.raw1394Warning = self.wTree.get_widget("raw_dialog") | 39 | self.raw1394Warning = self.builder.get_object("raw_dialog") |
759 | 38 | 40 | ||
760 | 39 | #Create our dictionary and connect it | 41 | #Create our dictionary and connect it |
761 | 40 | dic = { "on_closeButton_clicked" : self.close_window, | 42 | dic = { "on_closeButton_clicked" : self.close_window, |
762 | 41 | "on_mainWindow_destroy" : self.close_window, | 43 | "on_mainWindow_destroy" : self.close_window, |
763 | @@ -48,7 +50,7 @@ | |||
764 | 48 | "on_nicePercentageAmount_value_changed" : self.set_nice_amount, | 50 | "on_nicePercentageAmount_value_changed" : self.set_nice_amount, |
765 | 49 | } | 51 | } |
766 | 50 | 52 | ||
768 | 51 | self.wTree.signal_autoconnect(dic) | 53 | self.builder.connect_signals(dic) |
769 | 52 | 54 | ||
770 | 53 | #Determine how much memory is on the system | 55 | #Determine how much memory is on the system |
771 | 54 | memtotal = meminfo_total.meminfo_total() | 56 | memtotal = meminfo_total.meminfo_total() |
772 | @@ -81,9 +83,9 @@ | |||
773 | 81 | 83 | ||
774 | 82 | def apply_settings(self, apply_button): | 84 | def apply_settings(self, apply_button): |
775 | 83 | #Get all the widgets and add those widgets to a diction in the format {widget : self.instance} | 85 | #Get all the widgets and add those widgets to a diction in the format {widget : self.instance} |
779 | 84 | self.active_settings = { self.wTree.get_widget('memlock_checkButton') : [self.memlock], | 86 | self.active_settings = { self.builder.get_object('memlock_checkButton') : [self.memlock], |
780 | 85 | self.wTree.get_widget('raw1394_checkbutton') : [self.raw1394, self.load_raw1394_module], | 87 | self.builder.get_object('raw1394_checkbutton') : [self.raw1394, self.load_raw1394_module], |
781 | 86 | self.wTree.get_widget('EnableNice') : [self.nice] | 88 | self.builder.get_object('EnableNice') : [self.nice] |
782 | 87 | } | 89 | } |
783 | 88 | #Apply those settings | 90 | #Apply those settings |
784 | 89 | for widget, instanceArray in self.active_settings.items(): | 91 | for widget, instanceArray in self.active_settings.items(): |
785 | @@ -102,12 +104,12 @@ | |||
786 | 102 | memlock_entry_amount = str(int(self.memtotal*(spin_object.get_value()/100))) | 104 | memlock_entry_amount = str(int(self.memtotal*(spin_object.get_value()/100))) |
787 | 103 | self.memlock.line_replacement = "@audio - memlock " + memlock_entry_amount | 105 | self.memlock.line_replacement = "@audio - memlock " + memlock_entry_amount |
788 | 104 | print self.memlock.line_replacement | 106 | print self.memlock.line_replacement |
790 | 105 | apply_button = self.wTree.get_widget('apply_button') | 107 | apply_button = self.builder.get_object('apply_button') |
791 | 106 | apply_button.set_sensitive(True) | 108 | apply_button.set_sensitive(True) |
792 | 107 | 109 | ||
793 | 108 | def set_memlock_enable(self, memlock_checkButton): | 110 | def set_memlock_enable(self, memlock_checkButton): |
794 | 109 | self.memlock_enabled = memlock_checkButton.get_active() | 111 | self.memlock_enabled = memlock_checkButton.get_active() |
796 | 110 | memlock_spinbutton = self.wTree.get_widget('memlock_spinbutton') | 112 | memlock_spinbutton = self.builder.get_object('memlock_spinbutton') |
797 | 111 | memlock_spinbutton.set_sensitive(memlock_checkButton.get_active()) | 113 | memlock_spinbutton.set_sensitive(memlock_checkButton.get_active()) |
798 | 112 | print self.memlock_enabled | 114 | print self.memlock_enabled |
799 | 113 | 115 | ||
800 | @@ -127,7 +129,7 @@ | |||
801 | 127 | self.raw1394Warning.hide() | 129 | self.raw1394Warning.hide() |
802 | 128 | 130 | ||
803 | 129 | def set_apply_sensitive(self): | 131 | def set_apply_sensitive(self): |
805 | 130 | apply_button = self.wTree.get_widget('apply_button') | 132 | apply_button = self.builder.get_object('apply_button') |
806 | 131 | apply_button.set_sensitive(True) | 133 | apply_button.set_sensitive(True) |
807 | 132 | 134 | ||
808 | 133 | def set_nice_amount(self, spin_button): | 135 | def set_nice_amount(self, spin_button): |
809 | @@ -137,15 +139,15 @@ | |||
810 | 137 | print self.nice.line_replacement | 139 | print self.nice.line_replacement |
811 | 138 | 140 | ||
812 | 139 | def set_nice_enable(self, check_button): | 141 | def set_nice_enable(self, check_button): |
814 | 140 | self.nice_spin_button = self.wTree.get_widget('nicePercentageAmount') | 142 | self.nice_spin_button = self.builder.get_object('nicePercentageAmount') |
815 | 141 | self.nice_spin_button.set_sensitive(check_button.get_active()) | 143 | self.nice_spin_button.set_sensitive(check_button.get_active()) |
816 | 142 | print 'Nice toggled' | 144 | print 'Nice toggled' |
817 | 143 | 145 | ||
818 | 144 | def serialize_settings(self): | 146 | def serialize_settings(self): |
819 | 145 | self.settings_value = {} | 147 | self.settings_value = {} |
823 | 146 | self.settings_value['memlock'] = { 'memlock_checkButton' : self.wTree.get_widget('memlock_checkButton').get_active(), 'memlock_spinbutton' : self.wTree.get_widget('memlock_spinbutton').get_value() } | 148 | self.settings_value['memlock'] = { 'memlock_checkButton' : self.builder.get_object('memlock_checkButton').get_active(), 'memlock_spinbutton' : self.builder.get_object('memlock_spinbutton').get_value() } |
824 | 147 | self.settings_value['raw1394'] = { 'raw1394_checkbutton' : self.wTree.get_widget('raw1394_checkbutton').get_active() } | 149 | self.settings_value['raw1394'] = { 'raw1394_checkbutton' : self.builder.get_object('raw1394_checkbutton').get_active() } |
825 | 148 | self.settings_value['nice'] = { 'EnableNice' : self.wTree.get_widget('EnableNice').get_active(), 'nicePercentageAmount' : self.wTree.get_widget('nicePercentageAmount').get_value() } | 150 | self.settings_value['nice'] = { 'EnableNice' : self.builder.get_object('EnableNice').get_active(), 'nicePercentageAmount' : self.builder.get_object('nicePercentageAmount').get_value() } |
826 | 149 | us_config = open(os.path.expanduser('~/.us-controls'), 'w') | 151 | us_config = open(os.path.expanduser('~/.us-controls'), 'w') |
827 | 150 | cPickle.dump(self.settings_value, us_config) | 152 | cPickle.dump(self.settings_value, us_config) |
828 | 151 | us_config.close() | 153 | us_config.close() |
829 | @@ -156,9 +158,9 @@ | |||
830 | 156 | for key, value in self.settings_value.items(): | 158 | for key, value in self.settings_value.items(): |
831 | 157 | for widget, value in value.items(): | 159 | for widget, value in value.items(): |
832 | 158 | try: | 160 | try: |
834 | 159 | self.wTree.get_widget(widget).set_value(value) | 161 | self.builder.get_object(widget).set_value(value) |
835 | 160 | except: | 162 | except: |
837 | 161 | self.wTree.get_widget(widget).set_active(value) | 163 | self.builder.get_object(widget).set_active(value) |
838 | 162 | us_config.close() | 164 | us_config.close() |
839 | 163 | 165 | ||
840 | 164 | print __name__ | 166 | print __name__ |
Switch ubuntustudio- controls to gtkbuilder from glade