~freinhard/update-notifier-kde/respect-exitcodes

« back to all changes in this revision

Viewing changes to update-notifier-kde.py

  • Committer: Jonathan Riddell
  • Date: 2009-02-12 16:18:36 UTC
  • Revision ID: jriddell@canonical.com-20090212161836-qg5zxv2fphfjbfhk
show notification once completed

Show diffs side-by-side

added added

removed removed

Lines of Context:
370
370
 
371
371
    def showCodecTray(self, application):
372
372
        """ when the dbus interface is called, prompt user to install """
 
373
        self.application = application
373
374
        toolTip = i18nc("%1 is application name", "%1 recommends installing packages for extra multimedia functionality.", application)
374
375
        self.codecsTray.setToolTip(toolTip)
375
376
        self.codecsTray.show()
376
 
        KNotification.event("Updates", toolTip, KIcon("system-software-update").pixmap(QSize(22,22)))
 
377
        KNotification.event("Restricted", toolTip, KIcon("system-software-update").pixmap(QSize(22,22)))
377
378
 
378
379
    def codecsActivated(self):
379
380
        """ user wants to install, show dialogue and install """
416
417
                        toInstall = toInstall + unicode(item.toolTip()) + " "
417
418
                        
418
419
                #KProcess.startDetached("/usr/lib/kde4/libexec/kdesu", ["install-package --install " + toInstall])
419
 
                process = KProcess()
420
 
                process.setProgram("/usr/lib/kde4/libexec/kdesu", ["install-package --install " + toInstall])
421
 
                self.connect(process, SIGNAL("finished(int, QProcess::ExitStatus)", self.processFinished)
422
 
                process.start()
 
420
                self.process = KProcess()
 
421
                self.process.setProgram("/usr/lib/kde4/libexec/kdesu", ["install-package --install " + toInstall])
 
422
                self.connect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"), self.processFinished)
 
423
                self.process.start()
423
424
 
424
425
    def processFinished(self, exitCode, exitStatus):
425
 
        print "processFinished"
 
426
        KNotification.event("Restricted", i18n("You will need to restart %1 to use the new functionality", self.application), KIcon("system-software-update").pixmap(QSize(22,22)))
426
427
 
427
428
class DBusInterface(dbus.service.Object):
428
429
    def __init__(self, ui):