コード例 #1
0
ファイル: ondemandstep.py プロジェクト: sharky93/flumotion
    def _showFileSelector(self, response_cb, path, directoryOnly=False):
        def deleteEvent(fs, event):
            pass

        fs = FileSelectorDialog(self.wizard.window,
                                self.wizard.getAdminModel())

        fs.connect('response', response_cb)
        fs.connect('delete-event', deleteEvent)
        fs.selector.setWorkerName(self.model.worker)
        fs.selector.setOnlyDirectoriesMode(directoryOnly)
        fs.setDirectory(path)
        fs.show_all()
コード例 #2
0
ファイル: ondemandstep.py プロジェクト: ylatuya/Flumotion
    def _showFileSelector(self, response_cb, path, directoryOnly=False):

        def deleteEvent(fs, event):
            pass

        fs = FileSelectorDialog(self.wizard.window,
                                self.wizard.getAdminModel())

        fs.connect('response', response_cb)
        fs.connect('delete-event', deleteEvent)
        fs.selector.setWorkerName(self.model.worker)
        fs.selector.setOnlyDirectoriesMode(directoryOnly)
        fs.setDirectory(path)
        fs.show_all()
コード例 #3
0
ファイル: diskersteps.py プロジェクト: zaheerm/Flumotion
    def _select(self):
        def response(fs, response):
            fs.hide()
            if response == gtk.RESPONSE_OK:
                self.model.properties.directory = fs.getFilename()
                self._proxy.update("directory")

        def deleteEvent(fs, event):
            pass

        fs = FileSelectorDialog(self.wizard.window, self.wizard.getAdminModel())
        fs.connect("response", response)
        fs.connect("delete-event", deleteEvent)
        fs.selector.setWorkerName(self.model.worker)
        fs.setDirectory(self.model.properties.directory)
        fs.show_all()
コード例 #4
0
ファイル: wizard_gtk.py プロジェクト: sharky93/flumotion
    def on_select_logfile_clicked(self, button):
        def response(fs, response):
            fs.hide()
            if response == gtk.RESPONSE_OK:
                filename = os.path.join(fs.getFilename(), 'access.log')
                self.model.properties.logfile = filename
                self._proxy.update('logfile')

        fs = FileSelectorDialog(self.wizard.window,
                                self.wizard.getAdminModel())

        fs.connect('response', response)
        fs.selector.setOnlyDirectoriesMode(True)
        fs.selector.setWorkerName(self.model.component.worker)
        directory = os.path.dirname(self.model.properties.logfile)
        fs.setDirectory(directory)
        fs.show_all()
コード例 #5
0
    def _select(self):
        def response(fs, response):
            fs.hide()
            if response == gtk.RESPONSE_OK:
                self.model.properties.directory = fs.getFilename()
                self._proxy.update('directory')

        def deleteEvent(fs, event):
            pass

        fs = FileSelectorDialog(self.wizard.window,
                                self.wizard.getAdminModel())
        fs.connect('response', response)
        fs.connect('delete-event', deleteEvent)
        fs.selector.setWorkerName(self.model.worker)
        fs.setDirectory(self.model.properties.directory)
        fs.show_all()
コード例 #6
0
ファイル: wizard_gtk.py プロジェクト: ApsOps/flumotion-orig
    def on_select_logfile_clicked(self, button):

        def response(fs, response):
            fs.hide()
            if response == gtk.RESPONSE_OK:
                filename = os.path.join(fs.getFilename(), 'access.log')
                self.model.properties.logfile = filename
                self._proxy.update('logfile')

        fs = FileSelectorDialog(self.wizard.window,
                                self.wizard.getAdminModel())

        fs.connect('response', response)
        fs.selector.setOnlyDirectoriesMode(True)
        fs.selector.setWorkerName(self.model.component.worker)
        directory = os.path.dirname(self.model.properties.logfile)
        fs.setDirectory(directory)
        fs.show_all()
コード例 #7
0
ファイル: wizard_gtk.py プロジェクト: sharky93/flumotion
    def _showFileSelector(self, response_cb, location):

        def deleteEvent(fs, event):
            pass

        fs = FileSelectorDialog(self.wizard.window,
                                self.wizard.getAdminModel())

        fs.connect('response', response_cb)
        fs.connect('delete-event', deleteEvent)
        fs.selector.setWorkerName(self.model.worker)
        fs.selector.setOnlyDirectoriesMode(False)
        if location:
            directory = os.path.dirname(location)
        else:
            directory = '/'
        fs.selector.setDirectory(directory)
        fs.show_all()