Skip to content

Commit

Permalink
Import of SREZIC/Tk-804.031_503 from CPAN.
Browse files Browse the repository at this point in the history
gitpan-cpan-distribution: Tk
gitpan-cpan-version:      804.031_503
gitpan-cpan-path:         SREZIC/Tk-804.031_503.tar.gz
gitpan-cpan-author:       SREZIC
gitpan-cpan-maturity:     developer
  • Loading branch information
eserte authored and Gitpan committed Oct 26, 2014
1 parent b3edde1 commit b8fae3f
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 9 deletions.
10 changes: 10 additions & 0 deletions Changes
@@ -1,3 +1,13 @@
Tk-804.031_503 release (2013-12-07)
----------------------

Fixes
Regain compatibility for perl < 5.8.9
(SvIV_nomg is not available with earlier perls).

Tests
wm-time.t more robust against GNOME Shell slowness.

Tk-804.031_502 release (2013-12-01)
----------------------

Expand Down
4 changes: 2 additions & 2 deletions Event/Event.pm
@@ -1,8 +1,8 @@
package Tk::Event;
use vars qw($VERSION $XS_VERSION @EXPORT_OK);
END { CleanupGlue() }
$VERSION = '4.029';
$XS_VERSION = '804.031_502';
$VERSION = '4.030';
$XS_VERSION = '804.031_503';
$XS_VERSION =~ s{_}{};
use base qw(Exporter);
use XSLoader;
Expand Down
2 changes: 1 addition & 1 deletion META.yml
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Tk
version: 804.031502
version: 804.031503
abstract: Tk - a Graphical User Interface Toolkit
author:
- nick@ing-simmons.net (Nick Ing-Simmons)
Expand Down
2 changes: 1 addition & 1 deletion Tk.pm
Expand Up @@ -71,7 +71,7 @@ $Tk::CHANGE = 'git-controlled';
# is created, $VERSION is checked by bootstrap
$Tk::version = '8.4';
$Tk::patchLevel = '8.4';
$Tk::VERSION = '804.031_502';
$Tk::VERSION = '804.031_503';
$Tk::VERSION =~ s{_}{};
$Tk::XS_VERSION = $Tk::VERSION;
$Tk::strictMotif = 0;
Expand Down
4 changes: 4 additions & 0 deletions myConfig
Expand Up @@ -234,6 +234,10 @@ if ($] > 5.013002) # SvNV_nomg available
{
$define{'HAS_SVNV_NOMG'} = 1;
}
if ($] >= 5.009001 || ($] >= 5.008009 && $] < 5.009)) # SvIV_nomg available
{
$define{'HAS_SVIV_NOMG'} = 1;
}

if (!$IsWin32)
{
Expand Down
4 changes: 4 additions & 0 deletions objGlue.c
Expand Up @@ -1526,7 +1526,11 @@ Tcl_ObjMagic(Tcl_Obj *obj,int add)
iv->type = type;
if (iv->type == &tclIntType)
{
#ifdef HAS_SVIV_NOMG
iv->internalRep.longValue = SvIV_nomg(obj);
#else
iv->internalRep.longValue = SvIV(obj);
#endif
}
else if (iv->type == &tclDoubleType)
{
Expand Down
2 changes: 1 addition & 1 deletion pod/composite.pod
Expand Up @@ -10,7 +10,7 @@ Tk::composite - Defining a new composite widget class

package Tk::MyNewWidget;

use Tk:widgets qw/ list of Tk widgets /;
use Tk::widgets qw/ list of Tk widgets /;
use base qw/ Tk::Frame /; # or Tk::Toplevel

Construct Tk::Widget 'MyNewWidget';
Expand Down
21 changes: 17 additions & 4 deletions t/wm-time.t
Expand Up @@ -3,14 +3,29 @@


use strict;
use FindBin;
use lib "$FindBin::RealBin";

use Tk;
use Test::More;

use TkTest qw(wm_info);

# Win32 gets one <visibility> event on toplevel and one on content (as expected)
# UNIX/X is more complex, as windows overlap (deliberately)
our $tests = 6;
our $expect = 0;
plan 'no_plan'; # $tests for fast connections, $tests-1 for slow connections

my $mw = new MainWindow;

my %wm_info = wm_info($mw);
my $wm_name = $wm_info{name};

my $initial_ok_delay = 0.4;
# GNOME Shell is sometimes slow
my $ok_delay = $wm_name eq 'GNOME Shell' ? 1.0 : 0.5;

my $event = '<Map>';
my $why;
my $start;
Expand All @@ -24,8 +39,6 @@ sub begin
diag "Start $why $expect";
}

my $mw = new MainWindow;

# First setup timers to kill the script in case of timeouts
$mw->after(5*1000, sub { diag "This test script takes longer than usual... it will maybe be killed in some seconds." });
$mw->after(30*1000, sub { diag "Killing main window."; $mw->destroy });
Expand Down Expand Up @@ -63,14 +76,14 @@ sub mapped
my $now = Tk::timeofday();
my $delay = $now - $start;
diag sprintf "%s $why %.3g $expect\n",$w->PathName,$delay;
if ($state eq 'initial' && $delay > 0.4)
if ($state eq 'initial' && $delay > $initial_ok_delay)
{
$skip_slow_connection = 1;
return;
}
if ($expect-- > 0)
{
cmp_ok($delay, "<", 0.5, $why);
cmp_ok($delay, "<", $ok_delay, $why);
}
}

Expand Down

0 comments on commit b8fae3f

Please sign in to comment.