Mercurial > libervia-desktop-kivy
diff cagou/core/behaviors.py @ 491:203755bbe0fe
massive refactoring from camelCase -> snake_case. See backend commit log for more details
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 08 Apr 2023 13:44:32 +0200 |
parents | 3c9ba4a694ef |
children |
line wrap: on
line diff
--- a/cagou/core/behaviors.py Sat Apr 08 13:34:55 2023 +0200 +++ b/cagou/core/behaviors.py Sat Apr 08 13:44:32 2023 +0200 @@ -34,7 +34,7 @@ main_wid attribute must be set to the class inheriting from TouchMenuBehavior do_item_action is the method called on simple click - getMenuChoices must return a list of menus for long press + get_menu_choices must return a list of menus for long press menus there are dict as expected by ModernMenu (translated text, index and callback) """ @@ -63,7 +63,7 @@ self.main_wid.open_menu(self, touch) del touch.ud['menu_timeout'] - def getMenuChoices(self): + def get_menu_choices(self): """return choice adapted to selected item @return (list[dict]): choices ad expected by ModernMenu @@ -108,7 +108,7 @@ return self.clear_menu() pos = self.to_widget(*touch.pos) - choices = item.getMenuChoices() + choices = item.get_menu_choices() if not choices: return self.menu = TouchMenu(choices=choices,