r1546 - packages/libtk-pod-perl/branches/upstream/current
Carlo Segre
segre-guest at costa.debian.org
Sat Nov 19 16:50:09 UTC 2005
Author: segre-guest
Date: 2005-11-19 16:50:08 +0000 (Sat, 19 Nov 2005)
New Revision: 1546
Modified:
packages/libtk-pod-perl/branches/upstream/current/Changes
packages/libtk-pod-perl/branches/upstream/current/MANIFEST
packages/libtk-pod-perl/branches/upstream/current/META.yml
packages/libtk-pod-perl/branches/upstream/current/Makefile.PL
packages/libtk-pod-perl/branches/upstream/current/Pod.pm
packages/libtk-pod-perl/branches/upstream/current/README
Log:
Load /tmp/tmp.epuoi3/libtk-pod-perl-0.9931 into
packages/libtk-pod-perl/branches/upstream/current.
Modified: packages/libtk-pod-perl/branches/upstream/current/Changes
===================================================================
--- packages/libtk-pod-perl/branches/upstream/current/Changes 2005-11-19 16:47:33 UTC (rev 1545)
+++ packages/libtk-pod-perl/branches/upstream/current/Changes 2005-11-19 16:50:08 UTC (rev 1546)
@@ -1,5 +1,9 @@
History for Tk::Pod
+version 0.9931
+ o Tk::ToolBar menu icon support also for Tk800
+ (very experimental!)
+
version 0.9930
o fixing zoom function problems on some X11 servers
o changed About dialog
Modified: packages/libtk-pod-perl/branches/upstream/current/MANIFEST
===================================================================
--- packages/libtk-pod-perl/branches/upstream/current/MANIFEST 2005-11-19 16:47:33 UTC (rev 1545)
+++ packages/libtk-pod-perl/branches/upstream/current/MANIFEST 2005-11-19 16:50:08 UTC (rev 1546)
@@ -24,4 +24,4 @@
t/more.t
tkmore
tkpod
-META.yml Module meta-data (added by MakeMaker)
+META.yml
Modified: packages/libtk-pod-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libtk-pod-perl/branches/upstream/current/META.yml 2005-11-19 16:47:33 UTC (rev 1545)
+++ packages/libtk-pod-perl/branches/upstream/current/META.yml 2005-11-19 16:50:08 UTC (rev 1546)
@@ -1,16 +1,15 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Tk-Pod
-version: 0.9928
+version: 0.9931
version_from:
installdirs: site
requires:
File::Temp: 0
- Pod::Simple: 0
- Tk: 800.004
-recommends:
+ Pod::Simple: 2.05
Text::English: 0
+ Tk: 800.004
Tk::HistEntry: 0.4
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.21_01
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: packages/libtk-pod-perl/branches/upstream/current/Makefile.PL
===================================================================
--- packages/libtk-pod-perl/branches/upstream/current/Makefile.PL 2005-11-19 16:47:33 UTC (rev 1545)
+++ packages/libtk-pod-perl/branches/upstream/current/Makefile.PL 2005-11-19 16:50:08 UTC (rev 1546)
@@ -2,8 +2,9 @@
use ExtUtils::MakeMaker;
-$DIST_VERSION = "0.9930";
-if (defined $ENV{USER} && $ENV{USER} eq 'eserte') {
+$DIST_VERSION = "0.9931";
+$is_devel_host = defined $ENV{USER} && $ENV{USER} eq 'eserte' && $^O =~ /bsd/i && -f "../../perl.release.mk";
+if ($is_devel_host) {
open(P, "Pod.pm") or die "Can't open Pod.pm: $!";
SEARCH_FOR_DIST_VERSION: {
while(<P>) {
@@ -16,6 +17,12 @@
}
die "Cannot find DIST_VERSION definition in Pod.pm";
}
+
+ require YAML;
+ my $meta = YAML::LoadFile("META.yml");
+ if ($meta->{version} ne $DIST_VERSION) {
+ die "Please fix version in META.yml!\n";
+ }
}
WriteMakefile(
@@ -44,7 +51,7 @@
EOF
- if (defined $ENV{USER} && $ENV{USER} eq 'eserte' && $^O =~ /bsd/i && -f "../../perl.release.mk") {
+ if ($is_devel_host) {
$postamble .= <<'EOF';
.include "../../perl.release.mk"
Modified: packages/libtk-pod-perl/branches/upstream/current/Pod.pm
===================================================================
--- packages/libtk-pod-perl/branches/upstream/current/Pod.pm 2005-11-19 16:47:33 UTC (rev 1545)
+++ packages/libtk-pod-perl/branches/upstream/current/Pod.pm 2005-11-19 16:50:08 UTC (rev 1546)
@@ -4,8 +4,8 @@
use Tk::Toplevel;
use vars qw($VERSION $DIST_VERSION @ISA);
-$VERSION = sprintf("%d.%02d", q$Revision: 5.6 $ =~ /(\d+)\.(\d+)/);
-$DIST_VERSION = "0.9930";
+$VERSION = sprintf("%d.%02d", q$Revision: 5.7 $ =~ /(\d+)\.(\d+)/);
+$DIST_VERSION = "0.9931";
@ISA = qw(Tk::Toplevel);
@@ -51,21 +51,58 @@
# XXX Maybe there should be a way to turn this off, as the extra
# icons might be memory consuming...
my $compound = sub { () };
- if ($Tk::VERSION >= 804 && eval { require Tk::ToolBar; 1 }) {
- $w->ToolBar->destroy;
+ if ($Tk::VERSION >= 800 && eval { require Tk::ToolBar; 1 }) {
+ $w->ToolBar->destroy; # hack to load images
if (!$Tk::Pod::empty_image_16) { # XXX multiple MainWindows?
$Tk::Pod::empty_image_16 = $w->MainWindow->Photo(-data => <<EOF);
R0lGODlhEAAQAIAAAP///////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgABACwA
AAAAEAAQAAACDoyPqcvtD6OctNqLsz4FADs=
EOF
}
- $compound = sub {
- if (@_) {
- (-image => $_[0] . "16", -compound => "left");
- } else {
- (-image => $Tk::Pod::empty_image_16, -compound => "left");
+ if ($Tk::VERSION >= 804) {
+ # Tk804 has native menu item compounds
+ $compound = sub {
+ my($text, $image) = @_;
+ if ($image) {
+ ($text, -image => $image . "16", -compound => "left");
+ } else {
+ ($text, -image => $Tk::Pod::empty_image_16, -compound => "left");
+ }
+ };
+ } elsif (eval { require Tk::Compound; 1 }) {
+ # For Tk800 we have to create our own compounds using Tk::Compund
+ # get the default font (taken from bbbike):
+ my $std_font = $w->optionGet('font', 'Font');
+ if (!defined $std_font || $std_font eq '') {
+ my $l = $w->Label;
+ $std_font = $l->cget(-font);
+ $l->destroy;
}
- };
+ my %std_font = $w->fontActual($std_font);
+ # create an underlined font which matches the default font
+ my $underline_font = join(" ", map { "{" . $std_font{$_} . "}" } qw(-family -size -weight -slant));
+ $underline_font .= " overstrike" if $std_font{-overstrike};
+ $underline_font .= " underline";
+ $compound = sub {
+ my($text, $image) = @_;
+ my $c = $w->MainWindow->Compound; # XXX multiple MainWindows?
+ if ($image) {
+ $c->Image(-image => $image."16");
+ } else {
+ $c->Image(-image => $Tk::Pod::empty_image_16);
+ }
+ $c->Space(-width => 4);
+ my($text_before, $underlined_text, $text_after) = $text =~ /^(.*)~(.)(.*)/;
+ if (defined $underlined_text) {
+ $c->Text(-text => $text_before) if $text_before ne "";
+ $c->Text(-text => $underlined_text, -font => $underline_font);
+ $c->Text(-text => $text_after) if $text_after ne "";
+ } else {
+ $c->Text(-text => $text);
+ }
+ ($text, -image => $c);
+ };
+ }
}
my $menuitems =
@@ -73,41 +110,41 @@
[Cascade => '~File', -menuitems =>
[
- [Button => '~Open File...', '-accelerator' => 'F3',
+ [Button => $compound->('~Open File...', "fileopen"),
+ '-accelerator' => 'F3',
'-command' => ['openfile',$w],
- $compound->("fileopen"),
],
- [Button => 'Open ~by Name...', '-accelerator' => 'Ctrl+O',
+ [Button => $compound->('Open ~by Name...'),
+ '-accelerator' => 'Ctrl+O',
'-command' => ['openpod',$w,$p],
- $compound->(),
],
- [Button => '~New Window...', '-accelerator' => 'Ctrl+N',
+ [Button => $compound->('~New Window...'),
+ '-accelerator' => 'Ctrl+N',
'-command' => ['newwindow',$w,$p],
- $compound->(),
],
- [Button => '~Reload', '-accelerator' => 'Ctrl+R',
+ [Button => $compound->('~Reload', "actreload"),
+ '-accelerator' => 'Ctrl+R',
'-command' => ['reload',$p],
- $compound->("actreload"),
],
- [Button => '~Edit', '-command' => ['edit',$p],
- $compound->("edit"),
+ [Button => $compound->('~Edit', "edit"),
+ '-command' => ['edit',$p],
],
- [Button => 'Edit with p~tked', '-command' => ['edit',$p,'ptked'],
- $compound->(),
+ [Button => $compound->('Edit with p~tked'),
+ '-command' => ['edit',$p,'ptked'],
],
- [Button => '~Print'. ($p->PrintHasDialog ? '...' : ''),
- '-accelerator' => 'Ctrl+P', '-command' => ['Print',$p],
- $compound->("fileprint"),
+ [Button => $compound->('~Print'. ($p->PrintHasDialog ? '...' : ''), "fileprint"),
+ '-accelerator' => 'Ctrl+P',
+ '-command' => ['Print',$p],
],
[Separator => ""],
- [Button => '~Close', '-accelerator' => 'Ctrl+W',
+ [Button => $compound->('~Close', "fileclose"),
+ '-accelerator' => 'Ctrl+W',
'-command' => ['quit',$w],
- $compound->("fileclose"),
],
($exitbutton
- ? [Button => 'E~xit', '-accelerator' => 'Ctrl+Q',
+ ? [Button => $compound->('E~xit', "actexit"),
+ '-accelerator' => 'Ctrl+Q',
'-command' => sub { $p->MainWindow->destroy },
- $compound->("actexit"),
]
: ()
),
@@ -116,73 +153,73 @@
[Cascade => '~View', -menuitems =>
[
- [Checkbutton => '~Pod Tree', -variable => \$w->{Tree_on},
+ [Checkbutton => $compound->('~Pod Tree'),
+ '-variable' => \$w->{Tree_on},
'-command' => sub { $w->tree($w->{Tree_on}) },
- $compound->(),
],
'-',
- [Button => "Zoom ~in", '-accelerator' => 'Ctrl++',
- -command => [$w, 'zoom_in'],
- $compound->("viewmag+"),
+ [Button => $compound->("Zoom ~in", "viewmag+"),
+ '-accelerator' => 'Ctrl++',
+ '-command' => [$w, 'zoom_in'],
],
- [Button => "~Normal", -command => [$w, 'zoom_normal'],
- $compound->(),
+ [Button => $compound->("~Normal"),
+ '-command' => [$w, 'zoom_normal'],
],
- [Button => "Zoom ~out", '-accelerator' => 'Ctrl+-',
- -command => [$w, 'zoom_out'],
- $compound->("viewmag-"),
+ [Button => $compound->("Zoom ~out", "viewmag-"),
+ '-accelerator' => 'Ctrl+-',
+ '-command' => [$w, 'zoom_out'],
],
]
],
[Cascade => '~Search', -menuitems =>
[
- [Button => '~Search',
- '-accelerator' => '/', '-command' => ['Search', $p, 'Next'],
- $compound->("viewmag"),
+ [Button => $compound->('~Search', "viewmag"),
+ '-accelerator' => '/',
+ '-command' => ['Search', $p, 'Next'],
],
- [Button => 'Search ~backwards',
- '-accelerator' => '?', '-command' => ['Search', $p, 'Prev'],
- $compound->(),
+ [Button => $compound->('Search ~backwards'),
+ '-accelerator' => '?',
+ '-command' => ['Search', $p, 'Prev'],
],
- [Button => '~Repeat search',
- '-accelerator' => 'n', '-command' => ['ShowMatch', $p, 'Next'],
- $compound->(),
+ [Button => $compound->('~Repeat search'),
+ '-accelerator' => 'n',
+ '-command' => ['ShowMatch', $p, 'Next'],
],
- [Button => 'R~epeat backwards',
- '-accelerator' => 'N', '-command' => ['ShowMatch', $p, 'Prev'],
- $compound->(),
+ [Button => $compound->('R~epeat backwards'),
+ '-accelerator' => 'N',
+ '-command' => ['ShowMatch', $p, 'Prev'],
],
- [Checkbutton => '~Case sensitive', -variable => \$searchcase,
+ [Checkbutton => $compound->('~Case sensitive'),
+ '-variable' => \$searchcase,
'-command' => sub { $p->configure(-searchcase => $searchcase) },
- $compound->(),
],
[Separator => ""],
- [Button => 'Search ~full text', '-command' => ['SearchFullText', $p],
- $compound->("filefind"),
+ [Button => $compound->('Search ~full text', "filefind"),
+ '-command' => ['SearchFullText', $p],
],
- [Button => 'Search FA~Q', '-command' => ['SearchFAQ', $w, $p],
- $compound->(),
+ [Button => $compound->('Search FA~Q'),
+ '-command' => ['SearchFAQ', $w, $p],
],
]
],
[Cascade => 'H~istory', -menuitems =>
[
- [Button => '~Back', '-accelerator' => 'Alt-Left',
+ [Button => $compound->('~Back', "navback"),
+ '-accelerator' => 'Alt-Left',
'-command' => ['history_move', $p, -1],
- $compound->("navback"),
],
- [Button => '~Forward', '-accelerator' => 'Alt-Right',
+ [Button => $compound->('~Forward', "navforward"),
+ '-accelerator' => 'Alt-Right',
'-command' => ['history_move', $p, +1],
- $compound->("navforward"),
],
- [Button => '~View', '-command' => ['history_view', $p],
- $compound->(),
+ [Button => $compound->('~View'),
+ '-command' => ['history_view', $p],
],
'-',
- [Button => 'Clear cache', '-command' => ['clear_cache', $p],
- $compound->(),
+ [Button => $compound->('Clear cache'),
+ '-command' => ['clear_cache', $p],
],
]
],
Modified: packages/libtk-pod-perl/branches/upstream/current/README
===================================================================
--- packages/libtk-pod-perl/branches/upstream/current/README 2005-11-19 16:47:33 UTC (rev 1545)
+++ packages/libtk-pod-perl/branches/upstream/current/README 2005-11-19 16:50:08 UTC (rev 1546)
@@ -24,6 +24,10 @@
bindings
o Tree view of available Pods
+If Tk::ToolBar is installed, then tkpod may use the Tk::ToolBar icons
+for the menus. This works both in Tk804 with native compounds and in
+Tk800 using Tk::Compound.
+
The original Tk::Pod module was written by Nick Ing-Simmons
<nik at tiuk.ti.com>. Former maintainer was Achim Bohnet. Current
maintainer is Slaven Rezic <slaven at rezic.de>. Pod::Simple support is
More information about the Pkg-perl-cvs-commits
mailing list