Re: Another Patch (was Re: yet another new snapshot (again))

Chas Owens said:
Yeah, I was very supprised, of course it is a simple app and I have no
functionality since both the menu and the toolbar were created using the
Gnome::AppHelper functions.  I imagine the pain will get worse when I try to
insert text into the Gtk2::TextView or display the result set in a
Gtk2::TreeView instead of a Gtk::CList.

i just got the TextView portion of gtk-demo to work today.  pretty easy,
pretty straightforward.  using TreeView instead of CList is a porting
headache, but CList did rather suck.

i should have something available for the AppHelper stuff soon; i'm tackling
menus tomorrow, unless somebody beats me to it.

Is it available from some CVS?  I think I remember seeing something about it
being checked in parallel to the other Gtk2-Perl module somewhere.

right now, new-gtk2-perl is on a non-public CVS server for various reasons;
i'm posting snapshots from home at night.  we've been talking about importing
it under a different name on the gtk2-perl cvs repository.   but until it's on
sourceforge, you can just send me patches.

While we are speaking of faithfulness vs. easy, what is the general
consensus about adding some helper functions to Gtk2::TextView?  I really
don't like having to create Gtk2::TextIter objects just to get a dump of
everything in the widget, or replace everything, or insert, append, and
everything else I did with Gtk::Text with simple integer offsets.

[snipped example of cumbersome TextBuffer API]

well, instead of passing in pointers to uninitialized iters, the new bindings
*always* return a new iter (owned by the wrapper SV, auto-destroyed, all
that).  some functions return more than one as a list.

even without adding helpers, you ought to be able to do something like

    $text = $textbuffer->get_text ($textbuffer->get_bounds, FALSE);

and we could probably even let get_hidden_chars default to FALSE.

muppet <scott asofyet org>

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