[Glade-users] Building menu systems



On Sat, May 23, 2009 at 8:43 AM, Yan Seiner <yan at seiner.com> wrote:
Tristan Van Berkom wrote:

On Fri, May 22, 2009 at 11:42 AM, Yan Seiner <yan at seiner.com> wrote:


This is not strictly a glade question, but I am using glade and I need
some ideas on how best to proceed.


Well Im not reading a question here, Id just have to agree
with you, if your dataset could be in the 10,000s and over
then your menus should be built on the fly (i.e. each submenu
built when the parent menu item is activated).


I guess I was hoping to get some guidance on how to deal with menus that
big. ?For now I'm going to implement this as bash scripts + gtkdialog, but
that's really slow.

Well if you were to do it in code, you would create your
toplevel menus, and listen to an activate signal on the
toplevel menu items... in that signal you would programatically
create and popup its submenu (and make sure its destroyed
after being displayed).

Depending on how often your data changes and how long
it takes to update, you may want to hold an internal structure
for your menus with the minimal information needed to build menus,
or if your data acquisition is always fast, then you can query
the information needed to build that submenu on the fly every
time.

Cheers,
        -Tristan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]