[Gloucs] Details From The Talk On Monotone And Glade/Perl/Gtk2 GUIs

Anthony Edward Cooper aecooper at coosoft.plus.com
Thu Jan 17 11:43:53 GMT 2008


    Hi Barbie,

Sorry for not responding sooner. Yes that's exactly right. The trouble 
was that like most things you do it once at the beginning and completely 
forget subsequently.

Some top tips though:

- Save often, it is easy to get in a mess and there is no undo.
- When using a widget, unless it is unique or fairly simple, just check 
the GTK2 reference manual to see if it is depreciated. Some Gnome 
dialogs are, as these have now been superseded by GTK2.
- Hook up a callback to the main window's destroy event so as to call 
Gtk2->main_quit();
- Use the main window's delete event cb to stop the main window quitting 
if you wish...
- If you want tooltips on widgets that don't support tooltips (like 
labels) then reparent them to an event window.
- Always provide support for searching tree views, if you don't then 
your app will crash if someone tries to do a search.... I suspect a bug 
with GTK2, but this is trivial to do...
- Gtk2->events_pending() and Gtk2->main_iteration() can be used to 
update the display when inside a busy processing loop (so as to avoid 
the use of threads).

    The source to mtn-browse can be found here:

        
http://viewmtn.angrygoats.net/branch/changes/net.venge.monotone.contrib.mtn-browse

    This contains some useful code ripe for copying! :-)

    Happy hacking :-)

    Tony.
-

Barbie wrote:
> Ignore my last mail, I've found the problem. However, for the benefit of
> anyone getting stuck in the same way, once a new project has been
> selected, you need to click the "window" icon (first icon) from either
> the Gtk+ Basic or Gnome palatte listings. This will then open up a new
> design area and away you go :)
>
> I also discovered an interesting Glade tutorial:
>
> http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html
>
> Cheers,
> Barbie.
>   




More information about the gloucs mailing list