Merge lp:~mterry/ubuntu/maverick/apturl/gtkbuilder into lp:apturl
- Maverick (10.10)
- gtkbuilder
- Merge into ubuntu
Proposed by
Michael Terry
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 100 | ||||
Proposed branch: | lp:~mterry/ubuntu/maverick/apturl/gtkbuilder | ||||
Merge into: | lp:apturl | ||||
Diff against target: |
377 lines (+67/-65) 9 files modified
AptUrl/gtk/GtkUI.py (+9/-10) AptUrl/kde/KdeUI.py (+1/-1) data/apturl-gtk.ui (+46/-48) debian/apturl-kde.install (+1/-1) debian/apturl.install (+1/-1) debian/changelog (+6/-0) debian/control (+1/-2) po/POTFILES.in (+1/-1) setup.py (+1/-1) |
||||
To merge this branch: | bzr merge lp:~mterry/ubuntu/maverick/apturl/gtkbuilder | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Core Development Team | Pending | ||
Review via email: mp+37619@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'AptUrl/gtk/GtkUI.py' |
2 | --- AptUrl/gtk/GtkUI.py 2010-03-08 16:17:34 +0000 |
3 | +++ AptUrl/gtk/GtkUI.py 2010-10-05 15:16:15 +0000 |
4 | @@ -2,7 +2,6 @@ |
5 | import pygtk |
6 | pygtk.require("2.0") |
7 | import gtk |
8 | -import gtk.glade |
9 | import gobject |
10 | gobject.threads_init() |
11 | import subprocess |
12 | @@ -24,10 +23,10 @@ |
13 | def __init__(self): |
14 | gtk.init_check() |
15 | # create empty dialog |
16 | - self.dia_xml = gtk.glade.XML('/usr/share/apturl/apturl.glade', |
17 | - 'confirmation_dialog', |
18 | - "apturl") |
19 | - self.dia = self.dia_xml.get_widget('confirmation_dialog') |
20 | + self.dia_xml = gtk.Builder() |
21 | + self.dia_xml.set_translation_domain("apturl") |
22 | + self.dia_xml.add_from_file('/usr/share/apturl/apturl-gtk.ui') |
23 | + self.dia = self.dia_xml.get_object('confirmation_dialog') |
24 | self.dia.realize() |
25 | |
26 | # generic dialogs |
27 | @@ -139,11 +138,11 @@ |
28 | body = _("Do you want to install package '%s'?") % package |
29 | dia.set_keep_above(True) |
30 | dia.set_title('') |
31 | - header_label = dia_xml.get_widget('header_label') |
32 | + header_label = dia_xml.get_object('header_label') |
33 | header_label.set_markup("<b><big>%s</big></b>" % header) |
34 | - body_label = dia_xml.get_widget('body_label') |
35 | + body_label = dia_xml.get_object('body_label') |
36 | body_label.set_label(body) |
37 | - description_text_view = dia_xml.get_widget('description_text_view') |
38 | + description_text_view = dia_xml.get_object('description_text_view') |
39 | tbuf = gtk.TextBuffer() |
40 | desc = "%s\n\n%s" % (summary, Helpers.format_description(description)) |
41 | tbuf.set_text(desc) |
42 | @@ -156,8 +155,8 @@ |
43 | # be locked via apt_pkg.GetLock() |
44 | # - but that needs to run as root |
45 | # - a dbus helper might be the best answer here |
46 | - #args = (update_button_status, dia_xml.get_widget("yes_button"), |
47 | - # dia_xml.get_widget("infolabel")) |
48 | + #args = (update_button_status, dia_xml.get_object("yes_button"), |
49 | + # dia_xml.get_object("infolabel")) |
50 | #args[0](*args[1:]) |
51 | #timer_id = gobject.timeout_add(750, *args ) |
52 | |
53 | |
54 | === modified file 'AptUrl/kde/KdeUI.py' |
55 | --- AptUrl/kde/KdeUI.py 2010-08-07 03:11:07 +0000 |
56 | +++ AptUrl/kde/KdeUI.py 2010-10-05 15:16:15 +0000 |
57 | @@ -39,7 +39,7 @@ |
58 | self.d = QWidget(self.dialog) |
59 | self.dialog.setMainWidget(self.d) |
60 | |
61 | - uic.loadUi('/usr/share/apturl/apturl.ui', self.d) |
62 | + uic.loadUi('/usr/share/apturl/apturl-qt.ui', self.d) |
63 | self.d.image_label.setPixmap(KIcon("application-x-deb").pixmap(64,64)) |
64 | |
65 | # generic dialogs |
66 | |
67 | === renamed file 'data/apturl.glade' => 'data/apturl-gtk.ui' |
68 | --- data/apturl.glade 2009-01-08 19:46:00 +0000 |
69 | +++ data/apturl-gtk.ui 2010-10-05 15:16:15 +0000 |
70 | @@ -1,8 +1,7 @@ |
71 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
72 | -<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> |
73 | +<?xml version="1.0"?> |
74 | <!--*- mode: xml -*--> |
75 | -<glade-interface> |
76 | - <widget class="GtkDialog" id="confirmation_dialog"> |
77 | +<interface> |
78 | + <object class="GtkDialog" id="confirmation_dialog"> |
79 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
80 | <property name="border_width">5</property> |
81 | <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> |
82 | @@ -10,61 +9,61 @@ |
83 | <property name="skip_taskbar_hint">True</property> |
84 | <property name="has_separator">False</property> |
85 | <child internal-child="vbox"> |
86 | - <widget class="GtkVBox" id="dialog-vbox1"> |
87 | + <object class="GtkVBox" id="dialog-vbox1"> |
88 | <property name="visible">True</property> |
89 | <property name="spacing">2</property> |
90 | <child> |
91 | - <widget class="GtkHBox" id="hbox1"> |
92 | + <object class="GtkHBox" id="hbox1"> |
93 | <property name="visible">True</property> |
94 | <property name="spacing">10</property> |
95 | <child> |
96 | - <widget class="GtkImage" id="dialog_image"> |
97 | + <object class="GtkImage" id="dialog_image"> |
98 | <property name="visible">True</property> |
99 | <property name="yalign">0</property> |
100 | <property name="stock">gtk-dialog-question</property> |
101 | <property name="icon_size">6</property> |
102 | - </widget> |
103 | + </object> |
104 | <packing> |
105 | <property name="expand">False</property> |
106 | </packing> |
107 | </child> |
108 | <child> |
109 | - <widget class="GtkVBox" id="vbox1"> |
110 | + <object class="GtkVBox" id="vbox1"> |
111 | <property name="visible">True</property> |
112 | <property name="spacing">12</property> |
113 | <child> |
114 | - <widget class="GtkLabel" id="header_label"> |
115 | + <object class="GtkLabel" id="header_label"> |
116 | <property name="visible">True</property> |
117 | <property name="xalign">0</property> |
118 | <property name="use_markup">True</property> |
119 | - </widget> |
120 | + </object> |
121 | <packing> |
122 | <property name="expand">False</property> |
123 | </packing> |
124 | </child> |
125 | <child> |
126 | - <widget class="GtkLabel" id="body_label"> |
127 | + <object class="GtkLabel" id="body_label"> |
128 | <property name="visible">True</property> |
129 | <property name="xalign">0</property> |
130 | - </widget> |
131 | + </object> |
132 | <packing> |
133 | <property name="expand">False</property> |
134 | <property name="position">1</property> |
135 | </packing> |
136 | </child> |
137 | <child> |
138 | - <widget class="GtkExpander" id="description_expander"> |
139 | + <object class="GtkExpander" id="description_expander"> |
140 | <property name="visible">True</property> |
141 | <property name="can_focus">True</property> |
142 | <child> |
143 | - <widget class="GtkScrolledWindow" id="scrolledwindow1"> |
144 | + <object class="GtkScrolledWindow" id="scrolledwindow1"> |
145 | <property name="visible">True</property> |
146 | <property name="can_focus">True</property> |
147 | <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> |
148 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> |
149 | <property name="shadow_type">GTK_SHADOW_OUT</property> |
150 | <child> |
151 | - <widget class="GtkTextView" id="description_text_view"> |
152 | + <object class="GtkTextView" id="description_text_view"> |
153 | <property name="width_request">400</property> |
154 | <property name="height_request">200</property> |
155 | <property name="visible">True</property> |
156 | @@ -74,42 +73,39 @@ |
157 | <property name="wrap_mode">GTK_WRAP_WORD</property> |
158 | <property name="left_margin">5</property> |
159 | <property name="right_margin">5</property> |
160 | - </widget> |
161 | + </object> |
162 | </child> |
163 | - </widget> |
164 | + </object> |
165 | </child> |
166 | - <child> |
167 | - <widget class="GtkLabel" id="description_label"> |
168 | + <child type="label"> |
169 | + <object class="GtkLabel" id="description_label"> |
170 | <property name="visible">True</property> |
171 | <property name="label" translatable="yes">Description</property> |
172 | - </widget> |
173 | - <packing> |
174 | - <property name="type">label_item</property> |
175 | - </packing> |
176 | + </object> |
177 | </child> |
178 | - </widget> |
179 | + </object> |
180 | <packing> |
181 | <property name="position">2</property> |
182 | </packing> |
183 | </child> |
184 | - </widget> |
185 | + </object> |
186 | <packing> |
187 | <property name="position">1</property> |
188 | </packing> |
189 | </child> |
190 | - </widget> |
191 | + </object> |
192 | <packing> |
193 | <property name="padding">5</property> |
194 | <property name="position">1</property> |
195 | </packing> |
196 | </child> |
197 | <child> |
198 | - <widget class="GtkLabel" id="infolabel"> |
199 | + <object class="GtkLabel" id="infolabel"> |
200 | <property name="visible">True</property> |
201 | <property name="xalign">1</property> |
202 | <property name="use_markup">True</property> |
203 | <property name="justify">GTK_JUSTIFY_RIGHT</property> |
204 | - </widget> |
205 | + </object> |
206 | <packing> |
207 | <property name="expand">False</property> |
208 | <property name="fill">False</property> |
209 | @@ -117,11 +113,11 @@ |
210 | </packing> |
211 | </child> |
212 | <child internal-child="action_area"> |
213 | - <widget class="GtkHButtonBox" id="dialog-action_area1"> |
214 | + <object class="GtkHButtonBox" id="dialog-action_area1"> |
215 | <property name="visible">True</property> |
216 | <property name="layout_style">GTK_BUTTONBOX_END</property> |
217 | <child> |
218 | - <widget class="GtkButton" id="no_button"> |
219 | + <object class="GtkButton" id="no_button"> |
220 | <property name="visible">True</property> |
221 | <property name="can_focus">True</property> |
222 | <property name="has_focus">True</property> |
223 | @@ -129,61 +125,63 @@ |
224 | <property name="has_default">True</property> |
225 | <property name="label">gtk-cancel</property> |
226 | <property name="use_stock">True</property> |
227 | - <property name="response_id">0</property> |
228 | - </widget> |
229 | + </object> |
230 | </child> |
231 | <child> |
232 | - <widget class="GtkButton" id="yes_button"> |
233 | + <object class="GtkButton" id="yes_button"> |
234 | <property name="visible">True</property> |
235 | <property name="can_focus">True</property> |
236 | - <property name="response_id">-8</property> |
237 | <child> |
238 | - <widget class="GtkAlignment" id="alignment1"> |
239 | + <object class="GtkAlignment" id="alignment1"> |
240 | <property name="visible">True</property> |
241 | <property name="xscale">0</property> |
242 | <property name="yscale">0</property> |
243 | <child> |
244 | - <widget class="GtkHBox" id="hbox2"> |
245 | + <object class="GtkHBox" id="hbox2"> |
246 | <property name="visible">True</property> |
247 | <property name="spacing">2</property> |
248 | <child> |
249 | - <widget class="GtkImage" id="image1"> |
250 | + <object class="GtkImage" id="image1"> |
251 | <property name="visible">True</property> |
252 | <property name="stock">gtk-save</property> |
253 | - </widget> |
254 | + </object> |
255 | <packing> |
256 | <property name="expand">False</property> |
257 | <property name="fill">False</property> |
258 | </packing> |
259 | </child> |
260 | <child> |
261 | - <widget class="GtkLabel" id="label1"> |
262 | + <object class="GtkLabel" id="label1"> |
263 | <property name="visible">True</property> |
264 | <property name="label" translatable="yes">_Install</property> |
265 | <property name="use_underline">True</property> |
266 | - </widget> |
267 | + </object> |
268 | <packing> |
269 | <property name="expand">False</property> |
270 | <property name="fill">False</property> |
271 | <property name="position">1</property> |
272 | </packing> |
273 | </child> |
274 | - </widget> |
275 | + </object> |
276 | </child> |
277 | - </widget> |
278 | + </object> |
279 | </child> |
280 | - </widget> |
281 | + </object> |
282 | <packing> |
283 | <property name="position">1</property> |
284 | </packing> |
285 | </child> |
286 | - </widget> |
287 | + </object> |
288 | <packing> |
289 | <property name="expand">False</property> |
290 | <property name="pack_type">GTK_PACK_END</property> |
291 | </packing> |
292 | </child> |
293 | - </widget> |
294 | + </object> |
295 | </child> |
296 | - </widget> |
297 | -</glade-interface> |
298 | + <action-widgets> |
299 | + <action-widget response="0">no_button</action-widget> |
300 | + <action-widget response="-8">yes_button</action-widget> |
301 | + </action-widgets> |
302 | + </object> |
303 | +</interface> |
304 | |
305 | === renamed file 'data/apturl.ui' => 'data/apturl-qt.ui' |
306 | === modified file 'debian/apturl-kde.install' |
307 | --- debian/apturl-kde.install 2009-09-01 19:09:49 +0000 |
308 | +++ debian/apturl-kde.install 2010-10-05 15:16:15 +0000 |
309 | @@ -1,3 +1,3 @@ |
310 | usr/bin/apturl-kde |
311 | usr/lib/python2.6/site-packages/AptUrl/kde/*py* |
312 | -usr/share/apturl/*ui |
313 | +usr/share/apturl/*-qt.ui |
314 | |
315 | === modified file 'debian/apturl.install' |
316 | --- debian/apturl.install 2009-09-01 19:09:49 +0000 |
317 | +++ debian/apturl.install 2010-10-05 15:16:15 +0000 |
318 | @@ -1,4 +1,4 @@ |
319 | usr/bin/apturl-gtk |
320 | usr/lib/python2.6/site-packages/AptUrl/gtk/*py* |
321 | -usr/share/apturl/*glade |
322 | +usr/share/apturl/*-gtk.ui |
323 | usr/share/gconf |
324 | |
325 | === modified file 'debian/changelog' |
326 | --- debian/changelog 2010-09-07 15:40:47 +0000 |
327 | +++ debian/changelog 2010-10-05 15:16:15 +0000 |
328 | @@ -1,3 +1,9 @@ |
329 | +apturl (0.4.1ubuntu8) UNRELEASED; urgency=low |
330 | + |
331 | + * Switch from glade to GtkBuilder (LP: #403533) |
332 | + |
333 | + -- Michael Terry <mterry@ubuntu.com> Tue, 05 Oct 2010 11:06:24 -0400 |
334 | + |
335 | apturl (0.4.1ubuntu7) maverick; urgency=low |
336 | |
337 | * Fix KDE protocol files to enlist in the local protocol class |
338 | |
339 | === modified file 'debian/control' |
340 | --- debian/control 2010-09-07 15:40:47 +0000 |
341 | +++ debian/control 2010-10-05 15:16:15 +0000 |
342 | @@ -38,9 +38,8 @@ |
343 | gconf2, |
344 | gksu (>= 2.0.0-1ubuntu3), |
345 | gnome-icon-theme (>= 2.14.0-1), |
346 | - python-glade2 (>= 2.6.3-2), |
347 | python-gobject, |
348 | - python-gtk2 (>= 2.6.3-2), |
349 | + python-gtk2 (>= 2.12), |
350 | python-webkit, |
351 | python-vte (>= 1:0.11.15-4), |
352 | software-properties-gtk, |
353 | |
354 | === modified file 'po/POTFILES.in' |
355 | --- po/POTFILES.in 2009-08-26 14:09:53 +0000 |
356 | +++ po/POTFILES.in 2010-10-05 15:16:15 +0000 |
357 | @@ -6,6 +6,6 @@ |
358 | AptUrl/UI.py |
359 | AptUrl/gtk/GtkUI.py |
360 | AptUrl/kde/KdeUI.py |
361 | -data/apturl.glade |
362 | +[type: gettext/glade] data/apturl-gtk.ui |
363 | data/apturl.schemas.in |
364 | |
365 | |
366 | === modified file 'setup.py' |
367 | --- setup.py 2010-07-27 12:43:56 +0000 |
368 | +++ setup.py 2010-10-05 15:16:15 +0000 |
369 | @@ -29,7 +29,7 @@ |
370 | packages=['AptUrl','AptUrl.gtk','AptUrl.kde'], |
371 | scripts=['apturl','apturl-gtk','apturl-kde'], |
372 | data_files=[('share/apturl/', |
373 | - ["data/apturl.glade","data/apturl.ui"]), |
374 | + ["data/apturl-gtk.ui","data/apturl-qt.ui"]), |
375 | ('../etc/firefox/pref/', |
376 | ["data/apturl.js"]), |
377 | ('share/kde4/services/', |