MCPcopy Index your code
hub / github.com/rawpython/remi / on_folder_item_selected

Method on_folder_item_selected

remi/gui.py:3850–3872  ·  view source on GitHub ↗

This event occurs when an element in the list is selected Returns the newly selected element of type FileFolderItem(or None if it was not selectable) and the list of selected elements of type str.

(self, folderitem)

Source from the content-addressed store, hash-verified

3848 @decorate_set_on_listener("(self, emitter, selected_item, selection_list)")
3849 @decorate_event
3850 def on_folder_item_selected(self, folderitem):
3851 """ This event occurs when an element in the list is selected
3852 Returns the newly selected element of type FileFolderItem(or None if it was not selectable)
3853 and the list of selected elements of type str.
3854 """
3855 if folderitem.isFolder and (not self.allow_folder_selection):
3856 folderitem.set_selected(False)
3857 self.on_folder_item_click(folderitem)
3858 return (None, self.selectionlist, )
3859
3860 if not self.multiple_selection:
3861 self.selectionlist = []
3862 for c in self.folderItems:
3863 c.set_selected(False)
3864 folderitem.set_selected(True)
3865 log.debug("FileFolderNavigator - on_folder_item_click")
3866 # when an item is clicked it is added to the file selection list
3867 f = os.path.join(self.pathEditor.get_text(), folderitem.get_text())
3868 if f in self.selectionlist:
3869 self.selectionlist.remove(f)
3870 else:
3871 self.selectionlist.append(f)
3872 return (folderitem, self.selectionlist, )
3873
3874 @decorate_set_on_listener("(self, emitter, clicked_item)")
3875 @decorate_event

Callers

nothing calls this directly

Calls 4

on_folder_item_clickMethod · 0.95
set_selectedMethod · 0.80
get_textMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected