Re: Another Patch (was Re: yet another new snapshot (again))
- From: "muppet" <scott asofyet org>
- To: <gtk-perl-list gnome org>
- Subject: Re: Another Patch (was Re: yet another new snapshot (again))
- Date: Wed, 16 Apr 2003 14:12:41 -0400 (EDT)
Chas Owens said:
I took an old Gnome app from before I knew about Gtk::GladeXML and am
updating it to use Gtk2 and Gnome2. The transition was very minimal, with
rock!
the exception of the $app->create_menus. The helper functions from
Gnome::AppHelper do not appear to be implemented. I took a brief stab at
it, but I need to study XS more before I can do anything that big.
it was more than i wanted to do yesterday afternoon when it was so sunny
outside. ;-) actually, the menu helper stuff requires some callbacks that i
haven't looked into handling yet.
The only other thing I have noticed so far is that I could say
my $sw = Gtk::ScrolledWindow->new;
but now I have to say
my $sw = Gtk::ScrolledWindow->new(
Gtk2::Adjustment->new(0, 0, 99, 1, 10, 99),
Gtk2::Adjustment->new(0, 0, 99, 1, 10, 99)
);
you shouldn't have to create new adjustments there --- it will take undef.
the xs definition for that function is
GtkWidget *
gtk_scrolled_window_new (class, hadjustment, vadjustment)
SV * class
GtkAdjustment_ornull * hadjustment
GtkAdjustment_ornull * vadjustment
C_ARGS:
hadjustment, vadjustment
the _ornull means that you should be able to pass undef for that parameter
with no problems, e.g.:
$sw = Gtk2::ScrolledWindow->new (undef, undef);
as for supplying default parameters, i think that's already been changed that to
gtk_scrolled_window_new (class, hadjustment=NULL, vadjustment=NULL)
since last night's snapshot.
If you don't mind I am going
to go through the code and setup the defaults to match as closely to
Gtk-Perl-0.7008's defaults as I can get them.
use =NULL, not =0 (whoever put =0 in gtk-perl was very naughty). we might
also consider adding some pod that explains the differences.
i'm all for consolidating constructors and coming up with abbreviations and
default parameters for things, but have been implementing things "faithfully"
for now.
--
muppet <scott asofyet org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]