missing action and uimanager - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


missing action and uimanager

fisherkingfisherking Posts: 7Member
I am in middle of develop a new file manager in python, for Linux and I have some problem with the uimanager (add_ui_from_file) and missing action.

The thought behind the file manager is that is should be build on modules. These modules are dynamical loaded into the program during run-time and auto-generates the menu. The problem with this is that there is no guaranty that the menu looks the same, withing a submenu, each time the program is started (or new modules are loaded or old reloaded). To solve this I choose to implement semi-dynamic menus. The UI is stored to a file, where the user can modify and relocate the menu-items. This file is then read by the read_ui_from_file-method. Ok, this works ... almost.
(now to the real problem)

When a module is removed, it is not removed from the
UI definition and the menuitem, along with its action, is stored to the file. The next time the program is started the action is missing and a gtkWarning is given. The menus after the missing action menu-item, is never loaded. Is there anyway to ignore these warnings and just skip the missing-action part and just not load that item, or is there anyway to clean the UI definition?

Sign In or Register to comment.