Merge lp:~nixternal/apport/apport-kde into lp:~apport-hackers/apport/trunk
- apport-kde
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~nixternal/apport/apport-kde |
Merge into: | lp:~apport-hackers/apport/trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~nixternal/apport/apport-kde |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt (community) | Needs Information | ||
Review via email:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Rich Johnson (nixternal) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Martin Pitt (pitti) wrote : | # |
Thanks! However, I don't think we want to maintain a qt4 _and_ a KDE UI. I suppose the *.ui files are compatible between both, so we should have just one set. And the kde/apport-kde code is not all that different either.
I see two options here:
- Drop apport-qt entirely and just use kde/.
- If you think that it's useful for something to have a pure Qt version, do you think it's feasible to try and import PyKDE, and on ImportError provide some Qt fallback in the code?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Rich Johnson (nixternal) wrote : | # |
Ya, no reason to keep both honestly, however I can't picture a reason to fall back to PyQt on an ImportError, but at the same time it does make sense especially during the dev cycle, as we have been known to break pykde4 for a day :)
So maybe drop the qt4/ directory, add apport-qt to the kde/ directory, and it can utilize the ui files in kde/, and then do the ImportError stuff.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Martin Pitt (pitti) wrote : | # |
OK, I merged your's and dropped the qt4/ directory. I updated the build system, i18n, etc. for kde.
Preview Diff
1 | === added directory 'kde' |
2 | === added file 'kde/Makefile' |
3 | --- kde/Makefile 1970-01-01 00:00:00 +0000 |
4 | +++ kde/Makefile 2009-06-11 02:18:16 +0000 |
5 | @@ -0,0 +1,9 @@ |
6 | +top_srcdir = .. |
7 | + |
8 | +all: apport-kde.desktop apport-kde-mime.desktop apport-kde-mimelnk.desktop |
9 | + |
10 | +%.desktop : %.desktop.in |
11 | + intltool-merge -d ${top_srcdir}/po/ $< $@ |
12 | + |
13 | +clean: |
14 | + rm -f *.desktop |
15 | |
16 | === added file 'kde/apport-kde' |
17 | --- kde/apport-kde 1970-01-01 00:00:00 +0000 |
18 | +++ kde/apport-kde 2009-06-11 02:18:16 +0000 |
19 | @@ -0,0 +1,417 @@ |
20 | +#!/usr/bin/python |
21 | + |
22 | +''' KDE 4 Apport User Interface |
23 | + |
24 | +Copyright (C) 2007-2009 Canonical Ltd. |
25 | +Author: Richard A. Johnson <nixternal@ubuntu.com> |
26 | + |
27 | +This program is free software; you can redistribute it and/or modify it |
28 | +under the terms of the GNU General Public License as published by the |
29 | +Free Software Foundation; either version 2 of the License, or (at your |
30 | +option) any later version. See http://www.gnu.org/copyleft/gpl.html for |
31 | +the full text of the license. |
32 | +''' |
33 | + |
34 | +import os.path |
35 | +import subprocess |
36 | +import sys |
37 | + |
38 | +try: |
39 | + from PyQt4.QtCore import * |
40 | + from PyQt4.QtGui import (QDialog, QLabel, QCheckBox, QRadioButton, |
41 | + QTreeWidget, QTreeWidgetItem, QMessageBox, |
42 | + QVBoxLayout, QFileDialog, QDialogButtonBox, |
43 | + QProgressBar, QGroupBox) |
44 | + from PyQt4 import uic |
45 | + from PyKDE4.kdecore import (i18n, ki18n, KAboutData, KCmdLineArgs, |
46 | + KLocalizedString) |
47 | + from PyKDE4.kdeui import (KApplication, KNotification, KMessageBox, KIcon, |
48 | + KStandardGuiItem) |
49 | + import apport.ui |
50 | +except ImportError, e: |
51 | + # this can happen while upgrading python packages |
52 | + print >> sys.stderr, 'Could not import module, is a package upgrade in progress? Error:', e |
53 | + sys.exit(1) |
54 | + |
55 | +def translate(self, prop): |
56 | + ''' Reimplement method from uic to change it to use gettext ''' |
57 | + if prop.get("notr", None) == "true": |
58 | + return self._cstring(prop) |
59 | + else: |
60 | + if prop.text is None: |
61 | + return "" |
62 | + text = prop.text.encode("UTF-8") |
63 | + return i18n(text) |
64 | + |
65 | +uic.properties.Properties._string = translate |
66 | + |
67 | +class Dialog(QDialog): |
68 | + ''' Main dialog wrapper ''' |
69 | + |
70 | + def __init__(self, ui, title, heading, text): |
71 | + QDialog.__init__(self, None, Qt.Window) |
72 | + |
73 | + uic.loadUi(os.path.join(os.path.dirname(sys.argv[0]), ui), self) |
74 | + |
75 | + self.setWindowTitle(title) |
76 | + if self.findChild(QLabel, 'heading'): |
77 | + self.findChild(QLabel, 'heading').setText('<h2>%s</h2>' % heading) |
78 | + self.findChild(QLabel, 'text').setText(text) |
79 | + |
80 | + def on_buttons_clicked(self, button): |
81 | + self.actionbutton = button |
82 | + if self.sender().buttonRole(button) == QDialogButtonBox.ActionRole: |
83 | + button.window().done(2) |
84 | + |
85 | + def addbutton(self, button): |
86 | + return self.findChild(QDialogButtonBox, 'buttons').addButton(button, |
87 | + QDialogButtonBox.ActionRole) |
88 | + |
89 | +class ErrorDialog(Dialog): |
90 | + ''' Error dialog wrapper ''' |
91 | + |
92 | + def __init__(self, title, heading, text, checker=None): |
93 | + Dialog.__init__(self, 'error.ui', title, heading, text) |
94 | + |
95 | + self.setMaximumSize(1, 1) |
96 | + self.findChild(QLabel, 'icon').setPixmap( |
97 | + QMessageBox.standardIcon(QMessageBox.Critical)) |
98 | + |
99 | + self.checker = self.findChild(QCheckBox, 'checker') |
100 | + if checker: |
101 | + self.checker.setText(checker) |
102 | + else: |
103 | + self.checker.hide() |
104 | + |
105 | + def checked(self): |
106 | + return self.checker.isChecked() |
107 | + |
108 | +class ChoicesDialog(Dialog): |
109 | + ''' Choices dialog wrapper ''' |
110 | + |
111 | + def __init__(self, title, text): |
112 | + Dialog.__init__(self, 'choices.ui', title, None, text) |
113 | + |
114 | + self.setMaximumSize(1, 1) |
115 | + |
116 | + def on_buttons_clicked(self, button): |
117 | + Dialog.on_buttons_clicked(self, button) |
118 | + if self.sender().buttonRole(button) == QDialogButtonBox.RejectRole: |
119 | + sys.exit(0) |
120 | + |
121 | +class ProgressDialog(Dialog): |
122 | + ''' Progress dialog wrapper ''' |
123 | + |
124 | + def __init__(self, title, heading, text): |
125 | + Dialog.__init__(self, 'progress.ui', title, heading, text) |
126 | + |
127 | + self.setMaximumSize(1, 1) |
128 | + |
129 | + def on_buttons_clicked(self, button): |
130 | + Dialog.on_buttons_clicked(self, button) |
131 | + if self.sender().buttonRole(button) == QDialogButtonBox.RejectRole: |
132 | + sys.exit(0) |
133 | + |
134 | + def set(self, value=None): |
135 | + progress = self.findChild(QProgressBar, 'progress') |
136 | + if not value: |
137 | + progress.setRange(0, 0) |
138 | + progress.setValue(0) |
139 | + else: |
140 | + progress.setRange(0, 1000) |
141 | + progress.setValue(value * 1000) |
142 | + |
143 | +class ReportDialog(Dialog): |
144 | + ''' Report dialog wrapper ''' |
145 | + |
146 | + def __init__(self, title, heading, text): |
147 | + Dialog.__init__(self, 'bugreport.ui', title, heading, text) |
148 | + |
149 | + self.details = self.addbutton(i18n("&Details...")) |
150 | + self.details.setCheckable(True) |
151 | + |
152 | + self.treeview = self.findChild(QTreeWidget, 'details') |
153 | + self.showtree(False) |
154 | + |
155 | + def on_buttons_clicked(self, button): |
156 | + if self.details == button: |
157 | + self.showtree(button.isChecked()) |
158 | + else: |
159 | + Dialog.on_buttons_clicked(self, button) |
160 | + if self.sender().buttonRole(button) == QDialogButtonBox.RejectRole: |
161 | + sys.exit(0) |
162 | + |
163 | + def showtree(self, visible): |
164 | + self.treeview.setVisible(visible) |
165 | + if visible: |
166 | + self.setMaximumSize(16777215, 16777215) |
167 | + else: |
168 | + self.setMaximumSize(1, 1) |
169 | + |
170 | +class MainUserInterface(apport.ui.UserInterface): |
171 | + ''' The main user interface presented to the user ''' |
172 | + |
173 | + def __init__(self): |
174 | + apport.ui.UserInterface.__init__(self) |
175 | + |
176 | + self.run_argv() |
177 | + |
178 | + # |
179 | + # ui_* implementation of abstract UserInterface classes |
180 | + # |
181 | + |
182 | + def ui_present_crash(self, desktop_entry): |
183 | + # adapt dialog heading and label appropriately |
184 | + if desktop_entry: |
185 | + name = desktop_entry.getName() |
186 | + heading = i18n('Sorry, %s closed unexpectedly') % name |
187 | + elif self.report.has_key('ExecutablePath'): |
188 | + name = os.path.basename(self.report['ExecutablePath']) |
189 | + heading = i18n('Sorry, the program "%s" closed unexpectedly.') % name |
190 | + else: |
191 | + name = self.cur_package |
192 | + heading = i18n('Sorry, %s closed unexpectedly.') % name |
193 | + |
194 | + dialog = ErrorDialog(name, heading, |
195 | + i18n('If you were not doing anything confidential (entering ' |
196 | + 'passwords or other private information), you can help ' |
197 | + 'to improve the application by reporting the problem.'), |
198 | + i18n('&Ignore future crashes of this program version')) |
199 | + |
200 | + reportbutton = dialog.addbutton(i18n('&Report Problem...')) |
201 | + |
202 | + if desktop_entry and self.report.has_key('ExecutablePath') and \ |
203 | + os.path.dirname(self.report['ExecutablePath']) in \ |
204 | + os.environ['PATH'].split(':') and subprocess.call(['pgrep', |
205 | + '-x', os.path.basename(self.report['ExecutablePath']), |
206 | + '-u', str(os.getuid())], stdout=subprocess.PIPE) != 0: |
207 | + restartbutton = dialog.addbutton(i18n('Restart &Program')) |
208 | + |
209 | + # show crash notification dialog |
210 | + response = dialog.exec_() |
211 | + blacklist = dialog.checked() |
212 | + |
213 | + if response == QDialog.Rejected: |
214 | + return {'action': 'cancel', 'blacklist': blacklist} |
215 | + if dialog.actionbutton == reportbutton: |
216 | + return {'action': 'report', 'blacklist': blacklist} |
217 | + if dialog.actionbutton == restartbutton: |
218 | + return {'action': 'restart', 'blacklist': blacklist} |
219 | + # Fallback |
220 | + return {'action': 'cancel', 'blacklist': blacklist} |
221 | + |
222 | + def ui_present_package_error(self): |
223 | + name = self.report['Package'] |
224 | + dialog = ErrorDialog(name, |
225 | + i18n('Sorry, the package "%s" failed to install or upgrade.') % |
226 | + name, |
227 | + i18n('You can help the developers to fix the package by ' |
228 | + 'reporting the problem.')) |
229 | + |
230 | + reportbutton = dialog.addbutton(i18n('&Report Problem...')) |
231 | + |
232 | + response = dialog.exec_() |
233 | + |
234 | + if response == QDialog.Rejected: |
235 | + return 'cancel' |
236 | + if dialog.actionbutton == reportbutton: |
237 | + return 'report' |
238 | + # Fallback |
239 | + return 'cancel' |
240 | + |
241 | + def ui_present_kernel_error(self): |
242 | + message = i18n('Your system encountered a serious kernel problem.') |
243 | + annotate = '' |
244 | + if self.report.has_key('Annotation'): |
245 | + annotate = self.report['Annotation'] + '\n\n' |
246 | + annotate += i18n('You can help the developers to fix the problem by ' |
247 | + 'reporting it.') |
248 | + |
249 | + dialog = ErrorDialog(i18n('Kernel problem'), message, annotate) |
250 | + |
251 | + reportbutton = dialog.addbutton(i18n('&Report Problem...')) |
252 | + |
253 | + response = dialog.exec_() |
254 | + |
255 | + if response == QDialog.Rejected: |
256 | + return 'cancel' |
257 | + if dialog.actionbutton == reportbutton: |
258 | + return 'report' |
259 | + # Fallback |
260 | + return 'cancel' |
261 | + |
262 | + def ui_present_report_details(self): |
263 | + dialog = ReportDialog(self.report.get('Package', |
264 | + i18n('Generic error')).split()[0], |
265 | + i18n('Send problem report to the developers?'), |
266 | + i18n('After the problem report has been sent, please fill out ' |
267 | + 'the form in the automatically opened web browser.')) |
268 | + |
269 | + sendbutton = dialog.addbutton(i18n('&Send')) |
270 | + sendbutton.setDefault(True) |
271 | + |
272 | + # report contents |
273 | + details = dialog.findChild(QTreeWidget, 'details') |
274 | + for key in self.report: |
275 | + keyitem = QTreeWidgetItem([key]) |
276 | + details.addTopLevelItem(keyitem) |
277 | + |
278 | + # string value |
279 | + if not hasattr(self.report[key], 'gzipvalue') and \ |
280 | + hasattr(self.report[key], 'isspace') and \ |
281 | + not self.report._is_binary(self.report[key]): |
282 | + lines = self.report[key].splitlines() |
283 | + for line in lines: |
284 | + QTreeWidgetItem(keyitem, [line]) |
285 | + if len(lines) < 4: |
286 | + keyitem.setExpanded(True) |
287 | + else: |
288 | + QTreeWidgetItem(keyitem, [i18n('(binary data)')]) |
289 | + |
290 | + details.header().hide() |
291 | + |
292 | + # complete/reduce radio buttons |
293 | + if self.report.has_key('CoreDump') and \ |
294 | + self.report.has_useful_stacktrace(): |
295 | + dialog.findChild(QRadioButton, 'complete').setText( |
296 | + i18n('Complete report (recommended; %s)') % |
297 | + self.format_filesize(self.get_complete_size())) |
298 | + dialog.findChild(QRadioButton, 'reduced').setText( |
299 | + i18n('Reduced report (slow Internet connection; %s)') % |
300 | + self.format_filesize(self.get_reduced_size())) |
301 | + else: |
302 | + dialog.findChild(QGroupBox, 'options').hide() |
303 | + |
304 | + response = dialog.exec_() |
305 | + |
306 | + if response == QDialog.Rejected: |
307 | + return 'cancel' |
308 | + # Fallback |
309 | + if dialog.actionbutton != sendbutton: |
310 | + return 'cancel' |
311 | + if dialog.findChild(QRadioButton, 'reduced').isChecked(): |
312 | + return 'reduced' |
313 | + if dialog.findChild(QRadioButton, 'complete').isChecked(): |
314 | + return 'full' |
315 | + # Fallback |
316 | + return 'cancel' |
317 | + |
318 | + def ui_info_message(self, title, text): |
319 | + KMessageBox.information(None, i18n(text), i18n(title)) |
320 | + |
321 | + def ui_error_message(self, title, text): |
322 | + KMessageBox.information(None, i18n(text), i18n(title)) |
323 | + |
324 | + def ui_start_info_collection_progress(self): |
325 | + self.progress = ProgressDialog( |
326 | + i18n('Collecting Problem Information'), |
327 | + i18n('Collecting problem information'), |
328 | + i18n('The collected information can be sent to the developers ' |
329 | + 'to improve the application. This might take a few ' |
330 | + 'minutes.')) |
331 | + self.progress.set() |
332 | + self.progress.show() |
333 | + |
334 | + def ui_pulse_info_collection_progress(self): |
335 | + self.progress.set() |
336 | + KApplication.processEvents() |
337 | + |
338 | + def ui_stop_info_collection_progress(self): |
339 | + self.progress.hide() |
340 | + |
341 | + def ui_start_upload_progress(self): |
342 | + self.progress = ProgressDialog( |
343 | + i18n('Uploading Problem Information'), |
344 | + i18n('Uploading problem information'), |
345 | + i18n('The collected information is being sent to the bug ' |
346 | + 'tracking system. This might take a few minutes.')) |
347 | + self.progress.show() |
348 | + |
349 | + def ui_set_upload_progress(self, progress): |
350 | + if progress: |
351 | + self.progress.set(progress) |
352 | + else: |
353 | + self.progress.set() |
354 | + KApplication.processEvents() |
355 | + |
356 | + def ui_stop_upload_progress(self): |
357 | + self.progress.hide() |
358 | + |
359 | + def ui_question_yesno(self, text): |
360 | + response = KMessageBox.questionYesNoCancel(None, i18n(text), QString(), |
361 | + KStandardGuiItem.yes(), KStandardGuiItem.no(), |
362 | + KStandardGuiItem.cancel()) |
363 | + if response == KMessageBox.Yes: |
364 | + return True |
365 | + if response == KMessageBox.No: |
366 | + return False |
367 | + return None |
368 | + |
369 | + def ui_question_choice(self, text, options, multiple): |
370 | + ''' Show a question with predefined choices. |
371 | + |
372 | + @options is a list of strings to present. |
373 | + @multiple - if True, choices should be QCheckBoxes, if False then |
374 | + should be QRadioButtons. |
375 | + |
376 | + Return list of selected option indexes, or None if the user cancelled. |
377 | + If multiple is False, the list will always have one element. |
378 | + ''' |
379 | + |
380 | + dialog = ChoicesDialog(i18n("Apport"), text) |
381 | + |
382 | + b = None |
383 | + for option in options: |
384 | + if multiple: |
385 | + b = QCheckBox(option) |
386 | + else: |
387 | + b = QRadioButton(option) |
388 | + dialog.vbox_choices.insertWidget(0, b) |
389 | + |
390 | + response = dialog.exec_() |
391 | + |
392 | + if response == QDialog.Rejected: |
393 | + return 'cancel' |
394 | + |
395 | + response = [c for c in range(0, dialog.vbox_choices.count()) if \ |
396 | + dialog.vbox_choices.itemAt(c).widget().isChecked()] |
397 | + |
398 | + return response |
399 | + |
400 | + def ui_question_file(self, text): |
401 | + ''' Show a file selector dialog. |
402 | + |
403 | + Return path if the user selected a file, or None if cancelled. |
404 | + ''' |
405 | + |
406 | + response = QFileDialog.getOpenFileName(None, unicode(text, 'UTF-8')) |
407 | + if response.length() == 0: |
408 | + return None |
409 | + return str(response) |
410 | + |
411 | +if __name__ == '__main__': |
412 | + appName = "apport-kde" |
413 | + catalog = "apport-kde" |
414 | + programName = ki18n("Apport KDE") |
415 | + version = "1.0" |
416 | + description = ki18n("KDE 4 frontend for the apport crash report system") |
417 | + license = KAboutData.License_GPL |
418 | + copyright = ki18n("2009 Canonical Ltd.") |
419 | + text = KLocalizedString() |
420 | + homePage = "https://wiki.ubuntu.com/AutomatedProblemReports" |
421 | + bugEmail = "kubuntu-devel@lists.ubuntu.com" |
422 | + |
423 | + aboutData = KAboutData(appName, catalog, programName, version, description, |
424 | + license, copyright, text, homePage, bugEmail) |
425 | + |
426 | + aboutData.addAuthor(ki18n("Richard A. Johnson"), ki18n("Author")) |
427 | + aboutData.addAuthor(ki18n("Michael Hofmann"), ki18n("Original Qt4 Author")) |
428 | + |
429 | + KCmdLineArgs.init([""], aboutData) |
430 | + |
431 | + app = KApplication() |
432 | + app.setWindowIcon(KIcon("apport")) |
433 | + |
434 | + UserInterface = MainUserInterface() |
435 | + UserInterface.show() |
436 | + app.exec_() |
437 | |
438 | === added file 'kde/apport-kde-mime.desktop.in' |
439 | --- kde/apport-kde-mime.desktop.in 1970-01-01 00:00:00 +0000 |
440 | +++ kde/apport-kde-mime.desktop.in 2009-06-11 02:18:16 +0000 |
441 | @@ -0,0 +1,11 @@ |
442 | +[Desktop Entry] |
443 | +_Name=Report a problem... |
444 | +_Comment=Report a malfunction to the developers |
445 | +Exec=/usr/share/apport/apport-kde -c %f |
446 | +Icon=apport |
447 | +Terminal=false |
448 | +Type=Application |
449 | +MimeType=text/x-apport; |
450 | +Categories=KDE;Core;System; |
451 | +NoDisplay=true |
452 | +StartupNotify=true |
453 | |
454 | === added file 'kde/apport-kde-mimelnk.desktop.in' |
455 | --- kde/apport-kde-mimelnk.desktop.in 1970-01-01 00:00:00 +0000 |
456 | +++ kde/apport-kde-mimelnk.desktop.in 2009-06-11 02:18:16 +0000 |
457 | @@ -0,0 +1,9 @@ |
458 | +[Desktop Entry] |
459 | +# This is a deprecated method for KDE3 to make it recognize this MimeType |
460 | +Type=MimeType |
461 | +_Comment=Apport crash file |
462 | +Hidden=false |
463 | +Icon=apport |
464 | +# This must not have a trailing ";" for KDE3 |
465 | +MimeType=text/x-apport |
466 | +Patterns=*.crash |
467 | |
468 | === added file 'kde/apport-kde.desktop.in' |
469 | --- kde/apport-kde.desktop.in 1970-01-01 00:00:00 +0000 |
470 | +++ kde/apport-kde.desktop.in 2009-06-11 02:18:16 +0000 |
471 | @@ -0,0 +1,10 @@ |
472 | +[Desktop Entry] |
473 | +_Name=Report a problem... |
474 | +_Comment=Report a malfunction to the developers |
475 | +Exec=/usr/share/apport/apport-kde -f |
476 | +Icon=apport |
477 | +Terminal=false |
478 | +Type=Application |
479 | +Categories=KDE;System; |
480 | +OnlyShowIn=KDE; |
481 | +StartupNotify=true |
482 | |
483 | === added file 'kde/bugreport.ui' |
484 | --- kde/bugreport.ui 1970-01-01 00:00:00 +0000 |
485 | +++ kde/bugreport.ui 2009-06-11 02:18:16 +0000 |
486 | @@ -0,0 +1,125 @@ |
487 | +<?xml version="1.0" encoding="UTF-8"?> |
488 | +<ui version="4.0"> |
489 | + <class>CrashDialog</class> |
490 | + <widget class="QDialog" name="CrashDialog"> |
491 | + <property name="geometry"> |
492 | + <rect> |
493 | + <x>0</x> |
494 | + <y>0</y> |
495 | + <width>500</width> |
496 | + <height>371</height> |
497 | + </rect> |
498 | + </property> |
499 | + <property name="windowTitle"> |
500 | + <string>Dialog</string> |
501 | + </property> |
502 | + <layout class="QGridLayout" name="gridLayout_2"> |
503 | + <item row="0" column="0"> |
504 | + <widget class="QLabel" name="heading"> |
505 | + <property name="sizePolicy"> |
506 | + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> |
507 | + <horstretch>0</horstretch> |
508 | + <verstretch>0</verstretch> |
509 | + </sizepolicy> |
510 | + </property> |
511 | + <property name="text"> |
512 | + <string>heading</string> |
513 | + </property> |
514 | + </widget> |
515 | + </item> |
516 | + <item row="1" column="0"> |
517 | + <widget class="QLabel" name="text"> |
518 | + <property name="sizePolicy"> |
519 | + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> |
520 | + <horstretch>0</horstretch> |
521 | + <verstretch>0</verstretch> |
522 | + </sizepolicy> |
523 | + </property> |
524 | + <property name="text"> |
525 | + <string>text</string> |
526 | + </property> |
527 | + <property name="alignment"> |
528 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> |
529 | + </property> |
530 | + <property name="wordWrap"> |
531 | + <bool>true</bool> |
532 | + </property> |
533 | + </widget> |
534 | + </item> |
535 | + <item row="2" column="0"> |
536 | + <widget class="QGroupBox" name="options"> |
537 | + <property name="title"> |
538 | + <string/> |
539 | + </property> |
540 | + <layout class="QGridLayout" name="gridLayout"> |
541 | + <item row="0" column="0"> |
542 | + <widget class="QRadioButton" name="complete"> |
543 | + <property name="text"> |
544 | + <string>complete</string> |
545 | + </property> |
546 | + </widget> |
547 | + </item> |
548 | + <item row="1" column="0"> |
549 | + <widget class="QRadioButton" name="reduced"> |
550 | + <property name="text"> |
551 | + <string>reduced</string> |
552 | + </property> |
553 | + </widget> |
554 | + </item> |
555 | + </layout> |
556 | + </widget> |
557 | + </item> |
558 | + <item row="3" column="0"> |
559 | + <widget class="QTreeWidget" name="details"> |
560 | + <column> |
561 | + <property name="text"> |
562 | + <string notr="true">1</string> |
563 | + </property> |
564 | + </column> |
565 | + </widget> |
566 | + </item> |
567 | + <item row="4" column="0"> |
568 | + <widget class="QDialogButtonBox" name="buttons"> |
569 | + <property name="standardButtons"> |
570 | + <set>QDialogButtonBox::Close</set> |
571 | + </property> |
572 | + </widget> |
573 | + </item> |
574 | + </layout> |
575 | + </widget> |
576 | + <resources/> |
577 | + <connections> |
578 | + <connection> |
579 | + <sender>buttons</sender> |
580 | + <signal>accepted()</signal> |
581 | + <receiver>CrashDialog</receiver> |
582 | + <slot>accept()</slot> |
583 | + <hints> |
584 | + <hint type="sourcelabel"> |
585 | + <x>96</x> |
586 | + <y>343</y> |
587 | + </hint> |
588 | + <hint type="destinationlabel"> |
589 | + <x>249</x> |
590 | + <y>185</y> |
591 | + </hint> |
592 | + </hints> |
593 | + </connection> |
594 | + <connection> |
595 | + <sender>buttons</sender> |
596 | + <signal>rejected()</signal> |
597 | + <receiver>CrashDialog</receiver> |
598 | + <slot>reject()</slot> |
599 | + <hints> |
600 | + <hint type="sourcelabel"> |
601 | + <x>96</x> |
602 | + <y>343</y> |
603 | + </hint> |
604 | + <hint type="destinationlabel"> |
605 | + <x>249</x> |
606 | + <y>185</y> |
607 | + </hint> |
608 | + </hints> |
609 | + </connection> |
610 | + </connections> |
611 | +</ui> |
612 | |
613 | === added file 'kde/choices.ui' |
614 | --- kde/choices.ui 1970-01-01 00:00:00 +0000 |
615 | +++ kde/choices.ui 2009-06-11 02:18:16 +0000 |
616 | @@ -0,0 +1,95 @@ |
617 | +<?xml version="1.0" encoding="UTF-8"?> |
618 | +<ui version="4.0"> |
619 | + <class>DialogChoices</class> |
620 | + <widget class="QDialog" name="DialogChoices"> |
621 | + <property name="geometry"> |
622 | + <rect> |
623 | + <x>0</x> |
624 | + <y>0</y> |
625 | + <width>400</width> |
626 | + <height>182</height> |
627 | + </rect> |
628 | + </property> |
629 | + <property name="windowTitle"> |
630 | + <string>Dialog</string> |
631 | + </property> |
632 | + <layout class="QGridLayout" name="gridLayout_2"> |
633 | + <item row="0" column="0"> |
634 | + <widget class="QLabel" name="text"> |
635 | + <property name="sizePolicy"> |
636 | + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> |
637 | + <horstretch>0</horstretch> |
638 | + <verstretch>0</verstretch> |
639 | + </sizepolicy> |
640 | + </property> |
641 | + <property name="text"> |
642 | + <string>text</string> |
643 | + </property> |
644 | + <property name="alignment"> |
645 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> |
646 | + </property> |
647 | + <property name="wordWrap"> |
648 | + <bool>true</bool> |
649 | + </property> |
650 | + <property name="indent"> |
651 | + <number>1</number> |
652 | + </property> |
653 | + </widget> |
654 | + </item> |
655 | + <item row="1" column="0"> |
656 | + <widget class="QGroupBox" name="groupBox"> |
657 | + <property name="title"> |
658 | + <string/> |
659 | + </property> |
660 | + <layout class="QGridLayout" name="gridLayout"> |
661 | + <item row="0" column="0"> |
662 | + <layout class="QVBoxLayout" name="vbox_choices"/> |
663 | + </item> |
664 | + </layout> |
665 | + </widget> |
666 | + </item> |
667 | + <item row="2" column="0"> |
668 | + <widget class="QDialogButtonBox" name="buttons"> |
669 | + <property name="standardButtons"> |
670 | + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
671 | + </property> |
672 | + </widget> |
673 | + </item> |
674 | + </layout> |
675 | + </widget> |
676 | + <resources/> |
677 | + <connections> |
678 | + <connection> |
679 | + <sender>buttons</sender> |
680 | + <signal>accepted()</signal> |
681 | + <receiver>DialogChoices</receiver> |
682 | + <slot>accept()</slot> |
683 | + <hints> |
684 | + <hint type="sourcelabel"> |
685 | + <x>199</x> |
686 | + <y>164</y> |
687 | + </hint> |
688 | + <hint type="destinationlabel"> |
689 | + <x>199</x> |
690 | + <y>90</y> |
691 | + </hint> |
692 | + </hints> |
693 | + </connection> |
694 | + <connection> |
695 | + <sender>buttons</sender> |
696 | + <signal>rejected()</signal> |
697 | + <receiver>DialogChoices</receiver> |
698 | + <slot>reject()</slot> |
699 | + <hints> |
700 | + <hint type="sourcelabel"> |
701 | + <x>199</x> |
702 | + <y>164</y> |
703 | + </hint> |
704 | + <hint type="destinationlabel"> |
705 | + <x>199</x> |
706 | + <y>90</y> |
707 | + </hint> |
708 | + </hints> |
709 | + </connection> |
710 | + </connections> |
711 | +</ui> |
712 | |
713 | === added file 'kde/error.ui' |
714 | --- kde/error.ui 1970-01-01 00:00:00 +0000 |
715 | +++ kde/error.ui 2009-06-11 02:18:16 +0000 |
716 | @@ -0,0 +1,136 @@ |
717 | +<ui version="4.0" > |
718 | + <class>ErrorDialog</class> |
719 | + <widget class="QDialog" name="ErrorDialog" > |
720 | + <property name="geometry" > |
721 | + <rect> |
722 | + <x>0</x> |
723 | + <y>0</y> |
724 | + <width>270</width> |
725 | + <height>191</height> |
726 | + </rect> |
727 | + </property> |
728 | + <property name="windowTitle" > |
729 | + <string>Dialog</string> |
730 | + </property> |
731 | + <layout class="QGridLayout" > |
732 | + <property name="margin" > |
733 | + <number>9</number> |
734 | + </property> |
735 | + <property name="spacing" > |
736 | + <number>6</number> |
737 | + </property> |
738 | + <item row="2" column="1" > |
739 | + <widget class="QCheckBox" name="checker" > |
740 | + <property name="text" > |
741 | + <string>checker</string> |
742 | + </property> |
743 | + </widget> |
744 | + </item> |
745 | + <item rowspan="3" row="0" column="0" > |
746 | + <widget class="QLabel" name="icon" > |
747 | + <property name="sizePolicy" > |
748 | + <sizepolicy> |
749 | + <hsizetype>0</hsizetype> |
750 | + <vsizetype>1</vsizetype> |
751 | + <horstretch>0</horstretch> |
752 | + <verstretch>0</verstretch> |
753 | + </sizepolicy> |
754 | + </property> |
755 | + <property name="text" > |
756 | + <string/> |
757 | + </property> |
758 | + <property name="alignment" > |
759 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> |
760 | + </property> |
761 | + </widget> |
762 | + </item> |
763 | + <item row="0" column="1" > |
764 | + <widget class="QLabel" name="heading" > |
765 | + <property name="sizePolicy" > |
766 | + <sizepolicy> |
767 | + <hsizetype>1</hsizetype> |
768 | + <vsizetype>0</vsizetype> |
769 | + <horstretch>0</horstretch> |
770 | + <verstretch>0</verstretch> |
771 | + </sizepolicy> |
772 | + </property> |
773 | + <property name="text" > |
774 | + <string>heading</string> |
775 | + </property> |
776 | + <property name="indent" > |
777 | + <number>6</number> |
778 | + </property> |
779 | + </widget> |
780 | + </item> |
781 | + <item row="1" column="1" > |
782 | + <widget class="QLabel" name="text" > |
783 | + <property name="sizePolicy" > |
784 | + <sizepolicy> |
785 | + <hsizetype>5</hsizetype> |
786 | + <vsizetype>1</vsizetype> |
787 | + <horstretch>0</horstretch> |
788 | + <verstretch>0</verstretch> |
789 | + </sizepolicy> |
790 | + </property> |
791 | + <property name="text" > |
792 | + <string>text</string> |
793 | + </property> |
794 | + <property name="alignment" > |
795 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> |
796 | + </property> |
797 | + <property name="wordWrap" > |
798 | + <bool>true</bool> |
799 | + </property> |
800 | + <property name="indent" > |
801 | + <number>6</number> |
802 | + </property> |
803 | + </widget> |
804 | + </item> |
805 | + <item row="3" column="0" colspan="2" > |
806 | + <widget class="QDialogButtonBox" name="buttons" > |
807 | + <property name="orientation" > |
808 | + <enum>Qt::Horizontal</enum> |
809 | + </property> |
810 | + <property name="standardButtons" > |
811 | + <set>QDialogButtonBox::Close</set> |
812 | + </property> |
813 | + </widget> |
814 | + </item> |
815 | + </layout> |
816 | + </widget> |
817 | + <resources/> |
818 | + <connections> |
819 | + <connection> |
820 | + <sender>buttons</sender> |
821 | + <signal>accepted()</signal> |
822 | + <receiver>ErrorDialog</receiver> |
823 | + <slot>accept()</slot> |
824 | + <hints> |
825 | + <hint type="sourcelabel" > |
826 | + <x>248</x> |
827 | + <y>254</y> |
828 | + </hint> |
829 | + <hint type="destinationlabel" > |
830 | + <x>157</x> |
831 | + <y>274</y> |
832 | + </hint> |
833 | + </hints> |
834 | + </connection> |
835 | + <connection> |
836 | + <sender>buttons</sender> |
837 | + <signal>rejected()</signal> |
838 | + <receiver>ErrorDialog</receiver> |
839 | + <slot>reject()</slot> |
840 | + <hints> |
841 | + <hint type="sourcelabel" > |
842 | + <x>316</x> |
843 | + <y>260</y> |
844 | + </hint> |
845 | + <hint type="destinationlabel" > |
846 | + <x>286</x> |
847 | + <y>274</y> |
848 | + </hint> |
849 | + </hints> |
850 | + </connection> |
851 | + </connections> |
852 | +</ui> |
853 | |
854 | === added file 'kde/progress.ui' |
855 | --- kde/progress.ui 1970-01-01 00:00:00 +0000 |
856 | +++ kde/progress.ui 2009-06-11 02:18:16 +0000 |
857 | @@ -0,0 +1,115 @@ |
858 | +<ui version="4.0" > |
859 | + <class>ProgressDialog</class> |
860 | + <widget class="QDialog" name="ProgressDialog" > |
861 | + <property name="geometry" > |
862 | + <rect> |
863 | + <x>0</x> |
864 | + <y>0</y> |
865 | + <width>422</width> |
866 | + <height>191</height> |
867 | + </rect> |
868 | + </property> |
869 | + <property name="windowTitle" > |
870 | + <string>Dialog</string> |
871 | + </property> |
872 | + <layout class="QVBoxLayout" > |
873 | + <property name="margin" > |
874 | + <number>9</number> |
875 | + </property> |
876 | + <property name="spacing" > |
877 | + <number>6</number> |
878 | + </property> |
879 | + <item> |
880 | + <widget class="QLabel" name="heading" > |
881 | + <property name="sizePolicy" > |
882 | + <sizepolicy> |
883 | + <hsizetype>1</hsizetype> |
884 | + <vsizetype>0</vsizetype> |
885 | + <horstretch>0</horstretch> |
886 | + <verstretch>0</verstretch> |
887 | + </sizepolicy> |
888 | + </property> |
889 | + <property name="text" > |
890 | + <string>heading</string> |
891 | + </property> |
892 | + </widget> |
893 | + </item> |
894 | + <item> |
895 | + <widget class="QLabel" name="text" > |
896 | + <property name="sizePolicy" > |
897 | + <sizepolicy> |
898 | + <hsizetype>5</hsizetype> |
899 | + <vsizetype>1</vsizetype> |
900 | + <horstretch>0</horstretch> |
901 | + <verstretch>0</verstretch> |
902 | + </sizepolicy> |
903 | + </property> |
904 | + <property name="text" > |
905 | + <string>text</string> |
906 | + </property> |
907 | + <property name="alignment" > |
908 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> |
909 | + </property> |
910 | + <property name="wordWrap" > |
911 | + <bool>true</bool> |
912 | + </property> |
913 | + </widget> |
914 | + </item> |
915 | + <item> |
916 | + <widget class="QProgressBar" name="progress" > |
917 | + <property name="textVisible" > |
918 | + <bool>false</bool> |
919 | + </property> |
920 | + <property name="invertedAppearance" > |
921 | + <bool>false</bool> |
922 | + </property> |
923 | + </widget> |
924 | + </item> |
925 | + <item> |
926 | + <widget class="QDialogButtonBox" name="buttons" > |
927 | + <property name="orientation" > |
928 | + <enum>Qt::Horizontal</enum> |
929 | + </property> |
930 | + <property name="standardButtons" > |
931 | + <set>QDialogButtonBox::Cancel</set> |
932 | + </property> |
933 | + </widget> |
934 | + </item> |
935 | + </layout> |
936 | + </widget> |
937 | + <resources/> |
938 | + <connections> |
939 | + <connection> |
940 | + <sender>buttons</sender> |
941 | + <signal>accepted()</signal> |
942 | + <receiver>ProgressDialog</receiver> |
943 | + <slot>accept()</slot> |
944 | + <hints> |
945 | + <hint type="sourcelabel" > |
946 | + <x>248</x> |
947 | + <y>254</y> |
948 | + </hint> |
949 | + <hint type="destinationlabel" > |
950 | + <x>157</x> |
951 | + <y>274</y> |
952 | + </hint> |
953 | + </hints> |
954 | + </connection> |
955 | + <connection> |
956 | + <sender>buttons</sender> |
957 | + <signal>rejected()</signal> |
958 | + <receiver>ProgressDialog</receiver> |
959 | + <slot>reject()</slot> |
960 | + <hints> |
961 | + <hint type="sourcelabel" > |
962 | + <x>316</x> |
963 | + <y>260</y> |
964 | + </hint> |
965 | + <hint type="destinationlabel" > |
966 | + <x>286</x> |
967 | + <y>274</y> |
968 | + </hint> |
969 | + </hints> |
970 | + </connection> |
971 | + </connections> |
972 | +</ui> |
apport-kde allows better integration into the Kubuntu desktop than apport-qt does and fixes some of the inconsistencies that tend to occur with the PyQt4 version. This is done with PyKDE4.