Migration from Gtk2 to Gtk3



hi all,

2015 I've developed a RAD library SimpleGtk2 based on Fixed container
(http://thomasfunk.github.io/SimpleGtk2/files/SimpleGtk2-pm.html).

Nowadays Gtk2 is removed from much Linux distributions and I am forced
to migrate to Gtk3.

As I saw the most are identically except parts like pango. In my old code
I used

    my $pango_scale = Gtk2::Pango->scale();

Changing to Gtk3

    my $pango_scale = Gtk3::Pango->scale();

ends up in

    Can't locate object method "scale" via package "Gtk3::Pango"

Searching via Google brought me to https://metacpan.org/pod/Gtk3 under
Porting from Gtk2 to Gtk3:

| The Gtk2::Pango compatibility wrapper was not carried over; simply use
| the namespace "Pango" everywhere. It gets set up automatically when
| loading Gtk3.

Doing this

    use Pango;
    ...

    my $pango_scale = Pango->scale();

throws the error

    Can't locate object method "scale" via package "Pango"

What I also not found are the constants like PANGO_SCALE or
PANGO_SCALE_X_LARGE.

Any suggestions?

Thanks in advance,
Thomas Funk

--
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."   --   
Albert Einstein



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