Detecting cancellation of xbmcgui.Dialog().browse() ?
#6
Thanks, but I dont think theres a way around this, The only solution I can think of is that if the root directory is detected as the choosen directory, to then show a select dialog with two choices.
I only need this for 2, maybe 3 different operations, all based around creating files, rather than deleting. When editing a file the root dir isnt chosen, so again, only needed for creating. 
Thanks for you response and help. Smile

Just in case, anyone else stumbles upon this, the only thing I could think was this, itll do for now.

python:

def createInRootOrCancel(self, action):
    option = dialog.select('Choose Option', ['Create {} In Root Directory'.format(action), 'Cancel Operation'])
    return True if option is 0 else False

#=====================#

def createNewFile(self):
    self.dir_path = dialog.browse(0, 'Select Location', '', 'files', False, False, home_path)
   
    if self.dir_path == home_path:
        if not self.createInRootOrCancel('File'): return

    kb = xbmc.Keyboard('', 'Enter New File Name And Extension')
    kb.doModal()
Reply


Messages In This Thread
RE: Detecting cancellation of xbmcgui.Dialog().browse() ? - by nazarja - 2020-03-19, 02:31
Logout Mark Read Team Forum Stats Members Help
Detecting cancellation of xbmcgui.Dialog().browse() ?0