From ff8f5f7a15f7433f4334c46f49a5233bef10d3e8 Mon Sep 17 00:00:00 2001 From: Elias Bachaalany Date: Sat, 7 Jan 2023 13:10:21 -0800 Subject: [PATCH 1/2] Removed obsolete flags from the Choose wrapper --- pywraps/py_kernwin_choose.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pywraps/py_kernwin_choose.py b/pywraps/py_kernwin_choose.py index 3ba0069..fdc9a25 100644 --- a/pywraps/py_kernwin_choose.py +++ b/pywraps/py_kernwin_choose.py @@ -103,18 +103,6 @@ class Choose(object): ALL_CHANGED = 1 SELECTION_CHANGED = 2 - # to construct `forbidden_cb` - CHOOSE_HAVE_INIT = 0x0001 - CHOOSE_HAVE_GETICON = 0x0002 - CHOOSE_HAVE_GETATTR = 0x0004 - CHOOSE_HAVE_INS = 0x0008 - CHOOSE_HAVE_DEL = 0x0010 - CHOOSE_HAVE_EDIT = 0x0020 - CHOOSE_HAVE_ENTER = 0x0040 - CHOOSE_HAVE_REFRESH = 0x0080 - CHOOSE_HAVE_SELECT = 0x0100 - CHOOSE_HAVE_ONCLOSE = 0x0200 - class UI_Hooks_Trampoline(UI_Hooks): def __init__(self, v): UI_Hooks.__init__(self) From db46e7cfc66f10ebf9a863068d9b4df55249feec Mon Sep 17 00:00:00 2001 From: Elias Bachaalany Date: Sat, 7 Jan 2023 13:18:16 -0800 Subject: [PATCH 2/2] Show the chooser when the script is launched It is a bit confusing for beginners when they run the script and nothing happens. Now, when the script is launched, it shows the chooser --- .../widgets/tabular_views/custom/chooser_with_folders.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/widgets/tabular_views/custom/chooser_with_folders.py b/examples/widgets/tabular_views/custom/chooser_with_folders.py index 4c4b615..686da79 100644 --- a/examples/widgets/tabular_views/custom/chooser_with_folders.py +++ b/examples/widgets/tabular_views/custom/chooser_with_folders.py @@ -270,3 +270,8 @@ class idapython_tree_view_t(base_idapython_tree_view_t): self.netnode.supset(idx, repl, SUPVAL_COL0_DATA_TAG) self._dump_items() return [ida_kernwin.Choose.ALL_CHANGED] + sel + +# ----------------------------------------------------------------------- +if __name__ == '__main__': + form = idapython_tree_view_t("idapython_tree_view_t test", 100) + form.Show()