Esempio n. 1
0
    def _create_popup(self, instance):
        """ create popup layout """
        content = BoxLayout(orientation='vertical', spacing=5)
        self.popup = popup = Popup(title=self.title,
                                   content=content,
                                   size_hint=(0.95, 0.95))

        # create the filechooser
        uRoot, uName = split(self.value)
        uRoot = ReplaceVars(uRoot)
        self.textinput = textinput = FileBrowser(select_string     = ReplaceVars('$lvar(563)'), \
                                                 cancel_string     = ReplaceVars('$lvar(5009)'), \
                                                 libraries_string  = ReplaceVars('$lvar(5018)'), \
                                                 favorites_string  = ReplaceVars('$lvar(5019)'), \
                                                 computer_string   = ReplaceVars('$lvar(5020)'), \
                                                 location_string   = ReplaceVars('$lvar(5021)'), \
                                                 listview_string   = ReplaceVars('$lvar(5022)'), \
                                                 iconview_string   = ReplaceVars('$lvar(5023)'), \
                                                 path              = uRoot, dirselect=False, \
                                                 transition        = FadeTransition(), \
                                                 size_hint         = (1, 1), \
                                                 favorites         = [(Globals.oPathRoot.string, 'ORCA')], \
                                                 show_fileinput    = False, \
                                                 show_filterinput  = False \
                                                 )

        # construct the content
        content.add_widget(textinput)
        textinput.bind(on_success=self._validate, on_canceled=self._dismiss)

        # all done, open the popup !
        popup.open()
Esempio n. 2
0
    def show_load(self, *largs):

        alargs = {
            'select_string': ReplaceVars('$lvar(563)'),
            'cancel_string': ReplaceVars('$lvar(5009)'),
            'libraries_string': ReplaceVars('$lvar(5018)'),
            'favorites_string': ReplaceVars('$lvar(5019)'),
            'computer_string': ReplaceVars('$lvar(5020)'),
            'location_string': ReplaceVars('$lvar(5021)'),
            'listview_string': ReplaceVars('$lvar(5022)'),
            'iconview_string': ReplaceVars('$lvar(5023)'),
            'transition ': FadeTransition(),
            'size_hint': (1, 1),
            'favorites': [(Globals.oPathRoot.string, 'ORCA')],
            'show_fileinput': False,
            'show_filterinput': False,
            'dirselect': False,
            'path': Globals.oPathCodesets.string,
            'filters': [
                '*.xml',
            ]
        }
        #alargs['filters']=          ['CODESET_iTach_*.xml',]
        #alargs['filters']=           [self.MyFilter,]

        self.oContent = FileBrowser(**alargs)
        self.oContent.bind(on_success=self.load,
                           on_canceled=self.dismiss_popup)
        self._popup = Popup(title=ReplaceVars("$lvar(5027)"),
                            content=self.oContent,
                            size_hint=(1, 1))
        self._popup.open()