So far, Apport package hooks were limited to collecting data from the local system. However, a lot of debugging recipes and standard bug triage ping pong involves asking the reporter further questions which need reponses from a human. This can range from a very simple information message box “Now, please plug in the camera which is not detected” until a complex decision tree based on the symptoms the user sees.
As discussed at UDS Barcelona, Apport will grow this functionality in Karmic. A first preview is available in my PPA. The GUI looks horrible, but the API for hooks won’t change any more, so you can now begin to develop your interactive hooks.
Example:
import apport.hookutils
def add_info(report, ui):
apport.hookutils.attach_alsa(report)
ui.information('Now playing test sound...')
report['AplayOut'] = apport.hookutils.command_output(['aplay',
'/usr/share/sounds/question.wav'])
response = ui.yesno('Did you hear the sound?')
if response == None: # user cancelled
raise StopIteration
report['SoundAudible'] = str(response)
Please see the package-hooks.txt documentation for details.
I implemented all currently existing UI functions (information, yes/no question, file selector, multiple choice dialog) for GTK and CLI, and all except the multiple choice dialog for Qt. Anyone willing to hack on an implementation of ui_question_choice() similar to what the GTK frontend is doing?
Update:I merged Richard Johnson’s branch (thanks!) and uploaded a new package into my PPA. apport-qt is now fully functional.
#1 by David Edmundson on 2009/06/08 - 21:59
Zitieren
Hey,
I’m a KDE developer in my free time, and if all goes well I should finish my current project within a week, and need something else to keep me busy.
I’d be interested in helping out, I’ve not hacked on anything Ubuntu specific before, it might help towards my dream of Canonical hiring me
.
I’ve had a few patches of KDE changes with patches in Dolphin, Dragon Player and a KRunner runner. As well as some KDE-python applications from scratch of my own (see http://www.sharpley.org.uk/page/software)
If you want me to help out, drop me an email.
Regards
Dave
Pingback: Helpful kodak digital cameras Sources | Digital Cameras
Pingback: nixternal » Interrogation with Apport hooks - Qt Included
#2 by martinpitt on 2009/06/09 - 08:24
Zitieren
Nixternal created a branch today, thank you!
https://code.launchpad.net/~nixternal/apport/interactive-hooks
Pingback: Instant Vivitar Digital Cameras Info And Tips | Digital Cameras
Pingback: Additional DXG Digital Cameras Information, Up to the Minute | Digital Cameras
Pingback: The Latest Info On Rokinon Digital Cameras | Digital Cameras
Pingback: Cobra Digital Cameras Free helpful Knowledgebase | Digital Cameras