def selectWithinSystemTarballDialog(self, filename):
     win = KFileDialog('.', '', self, 'SystemTarball', True)
     win.setURL(KURL('tar://%s' % filename))
     win.connect(win, SIGNAL('okClicked()'), self.newTemplateSelected)
     win.tarball_filename = filename
     win.show()
     self._dialog = win
Exemple #2
0
 def fileSelected(self):
     filesel = self._dialog
     filename = str(filesel.selectedFile())
     print filename
     filesel.close()
     filesel = KFileDialog('.', '', self, 'SystemTarball', True)
     url = 'tar://%s' % filename
     filesel.setURL(KURL(url))
     filesel.connect(filesel, SIGNAL('okClicked()'),
                     self.newTemplateSelected)
     filesel.show()
     self._dialog = filesel
Exemple #3
0
def openComposer(to='', cc='', bcc='', subject='', message=''):
    interfaces = [('kmail', 'default'), ('kontact', 'KMailIface')]

    client = DCOPClient()
    client.attach()

    done = False
    for app, part in interfaces:
        obj = DCOPObj(app, client, part)
        try:
            obj.openComposer(to, cc, bcc, qstr(subject), qstr(message), False,
                             KURL())
            done = True
            break
        except TypeError:
            pass

    return done
Exemple #4
0
 def openFile(self, file):
     from os.path import abspath
     self.part.openURL(KURL("file://%s" % abspath(file)))
     self.editedFile = abspath(file)