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