[Geany-devel] Adding some Glade widgets
Matthew Brush
mbrush at xxxxx
Mon Jan 9 00:56:25 UTC 2012
Hi,
I was wondering about making a Glade XML catalog for Geany widgets,
existing and some new ones, so they can be used through the Glade GUI.
Some possible widgets for the catalog include:
Existing:
=========
- GeanyWrapLabel - Nice little existing GtkWidget that fixes broken
GtkLabel text wrapping in GTK+ 2. Should work fine in a glade catalog
and should even fix wrapping of labels in Glade.
- GeanyEntryAction - Existing helper class for adding an entry
(find/goto I guess) to a toolbar, should work fine in a glade catalog.
- GeanyMenuButtonAction - Existing helper class for adding a button to a
toolbar. I didn't look too much where it's used, but should be fine in a
Glade catalog.
- GeanyObject, others?
Done with functions in UI Utils file (ie. could be little widgets)
==================================================================
- GeanyPathBox - A GtkEntry and GtkButton in a GtkHBox (so it would be a
GtkBox subclass). The entry has a clear icon to the right (and so could
be a subclass of the next widget I'll mention). The button has a
GtkImage packed inside and could be improved by more tightly packing the
image in the button (like is done in notebook.c for the tab close
button). An alternative to this is to switch to GtkFileChooserButton,
but I'm not personally convinced that it's any better than the existing
path boxes like there is now.
- GeanyClearableEntry - A GtkEntry subclass which has a clear icon
packed into the secondary icon position. When the icon is clicked the
text of the entry is set to "" (cleared). This is used all over.
- Probably other stuff?
Entirely New (future/long term)
===============================
- GeanyScintilla - Subclass of ScintillaObject, all functions in
sciwrappers moved to methods of this class. In future, could be combined
with GeanyEditor since both are somewhat redundant.
There's probably other ones too. But anyway I thought I'd ask about it
since it'd be useful for working in Glade to have "first class widgets"
to add from the catalog and would make Geany's code a little more clean
and modular (if not bigger/slightly slower).
Thoughts, comments, else?
Cheers,
Matthew Brush
More information about the Devel
mailing list