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
[...]
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).
Bigger slower is bad, more maintainable is good, but do we have enough widget wranglers (ie people who know enough about widgets and the boilerplate and semantics of them?
Cheers Lex
Thoughts, comments, else?
Cheers, Matthew Brush _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On 01/09/2012 03:02 AM, Lex Trotman wrote:
[...]
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).
Bigger slower is bad, more maintainable is good, but do we have enough widget wranglers (ie people who know enough about widgets and the boilerplate and semantics of them?
I guess so, at least in the sense that we already have a handful of existing widgets, we just can't use them in Glade currently, so we leave blank spots in Glade and hard-code packing and configuring them in whatever file they're used from (toolbar.c, prefs.c?).
Cheers, Matthew Brush
On 09/01/2012 00:56, Matthew Brush wrote:
- 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.
This would be really nice to have, I hate having to create wrapping labels manually whilst the other nearby labels can be done in Glade.
- GeanyObject, others?
Why would we need GeanyObject from Glade? It's a singleton.
- GeanyScintilla - Subclass of ScintillaObject, all functions in
sciwrappers moved to methods of this class. In future, could be combined
There was a GtkScintilla project IIRC that did this, but I don't think it's maintained now.
with GeanyEditor since both are somewhat redundant.
I think keeping the separation of scintilla utils and editor functions is a good idea (e.g. derive GeanyScintilla from a GtkScintilla class).
Anyway, that would be extremely disruptive to the plugin API.
Regards, Nick
On 01/09/2012 08:21 AM, Nick Treleaven wrote:
On 09/01/2012 00:56, Matthew Brush wrote:
- 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.
This would be really nice to have, I hate having to create wrapping labels manually whilst the other nearby labels can be done in Glade.
- GeanyObject, others?
Why would we need GeanyObject from Glade? It's a singleton.
Sorry, I should've put a ? after GeanyObject, not to imply it's necessarily a candidate, but rather to ask about it.
- GeanyScintilla - Subclass of ScintillaObject, all functions in
sciwrappers moved to methods of this class. In future, could be combined
There was a GtkScintilla project IIRC that did this, but I don't think it's maintained now.
Yeah, the developer of that (me), was ambitious and tried to wrap the whole massive Scintilla API, but for Geany I was thinking of just wrapping those parts we actually need/use (ex. what's in sciwrappers).
with GeanyEditor since both are somewhat redundant.
I think keeping the separation of scintilla utils and editor functions is a good idea (e.g. derive GeanyScintilla from a GtkScintilla class).
My thinking was they're both serve the same purpose, so having two separate "objects"/files with some functions in one part and some functions in another part seems a bit redundant/overlappy. For example, when I'm writing a plugin and need a function related to the editor widget, I first have to check editor.h and then check sciwrappers.h (then Scintilla docs if it's not found in Geany proper).
Anyway, that would be extremely disruptive to the plugin API.
Very true.
Cheers, Matthew Brush