Remove references to GTK2 and fix info page
authorRicardo Mones <ricardo@mones.org>
Sun, 11 Nov 2018 13:56:12 +0000 (14:56 +0100)
committerRicardo Mones <ricardo@mones.org>
Sun, 11 Nov 2018 13:56:12 +0000 (14:56 +0100)
At least temporarily: documentation┬╣ says GET_VERSION_INFO is available
but don't really know whether {major|minor|micro}_version functions are
available in version 0.034.

┬╣ https://metacpan.org/pod/Gtk3

clawsker

index 6b5ff7d..21415e8 100755 (executable)
--- a/clawsker
+++ b/clawsker
@@ -2330,9 +2330,9 @@ sub new_info_page() {
         'glib' => 'Perl-GLib',
         'glib-r' => _('GLib runtime'),
         'glib-b' => _('GLib built'),
-        'gtk2' => 'Perl-GTK2',
-        'gtk2-r' => _('GTK2 runtime'),
-        'gtk2-b' => _('GTK2 built'),
+        'gtk' => 'Perl-GTK3',
+        'gtk-r' => _('GTK3 runtime'),
+        'gtk-b' => _('GTK3 built'),
     );
     my $row = 0;
     foreach (sort keys %$v) {
@@ -2377,10 +2377,10 @@ sub get_toolkit_versions {
         $versions{'glib-r'} = join('.',
             &Glib::major_version, &Glib::minor_version, &Glib::micro_version);
     }
-    $versions{'gtk2'} = $Gtk3::VERSION;
-    if ($Gtk3::VERSION >= 1.040) {
-        $versions{'gtk2-b'} = join('.', Gtk3->GET_VERSION_INFO);
-        $versions{'gtk2-r'} = join('.',
+    $versions{'gtk'} = $Gtk3::VERSION;
+    if ($Gtk3::VERSION >= 0.034) {
+        $versions{'gtk-b'} = join('.', &Gtk3::GET_VERSION_INFO);
+        $versions{'gtk-r'} = join('.',
             &Gtk3::major_version, &Gtk3::minor_version, &Gtk3::micro_version);
     }
     return \%versions;
@@ -2399,13 +2399,13 @@ sub print_version() {
         print _("Perl-GLib version {glibv}.", glibv => $v->{'glib'});
     }
     print "\n";
-    if ($v->{'gtk2-b'}) {
-        print _("Perl-GTK2 version {gtkv}, built for {gtkb}, running with {gtkr}.",
-                gtkv => $v->{'gtk2'},
-                gtkb => $v->{'gtk2-b'},
-                gtkr => $v->{'gtk2-r'});
+    if ($v->{'gtk-b'}) {
+        print _("Perl-GTK3 version {gtkv}, built for {gtkb}, running with {gtkr}.",
+                gtkv => $v->{'gtk'},
+                gtkb => $v->{'gtk-b'},
+                gtkr => $v->{'gtk-r'});
     } else {
-        print _("Perl-GTK2 version {gtkv}.", gtkv => $v->{'gtk2'});
+        print _("Perl-GTK3 version {gtkv}.", gtkv => $v->{'gtk'});
     }
     print "\n";
     my $clawsver = ($CLAWSV eq "") ?