[Geany-devel] public ui_setup_open_button_callback
dimitar.zhekov at xxxxx
Fri Apr 6 19:50:47 UTC 2012
On Thu, 05 Apr 2012 13:03:20 -0700
Matthew Brush <mbrush at codebrainz.ca> wrote:
> On 12-04-05 11:56 AM, Dimitar Zhekov wrote:
> > Hi,
> > Currently UIUtilsFuncs contain ui_path_box_new(), so a
> > file-chooser-dialog button can be created programatically in a plugin.
> > But there's no ui_setup_open_button_callback(), so it's impossible to
> > load such a button from a .glade file and setup it, as in Geany.
> > [...]
> IMO, all this path box stuff should be deprecated in favour of the
> widget provided by the toolkit (GtkFileChooserButton). [...]
GtkFileChooserButton does not support SAVE. Is there any way to
"choose" a non-existent file?..
> On the other hand, I also wouldn't be opposed to a proper implementation
> of a real custom GtkWidget subclass (ex. GeanyPathBox) that can be used
> in Glade and otherwise conveniently, since I tend to find the text box
> next to the button to be more user-friendly than the widget currently
> provided by the toolkit for this purpose.
Neither would I, but GtkFileChooserButton is 3000 lines with the header
Anyway, currently Geany has ui_path_box_new(), which is accessible
from plugins, and ui_setup_open_button_callback(), which is not. The
former is inconvinient for a .glade interface, and with 2+ selectors it
may be easier for to copy-paste the callback from, say, spellcheck,
and use it with builder widgets...
More information about the Devel