[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/bindings/perlqt4/perl/plasma/examples/applets/analogclock
From:       Chris Michael Burel <chrisburel () gmail ! com>
Date:       2010-04-21 1:48:07
Message-ID: 20100421014807.829C1AC89E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1117052 by burel:

A couple fixes for the clock plasmoid.


 M  +3 -1      Clock.pm  
 M  +2 -8      ClockApplet.pm  


--- trunk/playground/bindings/perlqt4/perl/plasma/examples/applets/analogclock/Clock.pm \
#1117051:1117052 @@ -397,7 +397,9 @@
     this->{m_repaintCache} = RepaintNone;
 
     # paint caches and second hand
-    my $targetRect = $faceRect;
+    # We're going to modify this copy of the rect, so make a copy of it.  Just
+    # saying $targetRect = $faceRect won't copy it.
+    my $targetRect = Qt4::RectF( $faceRect );
     if ($targetRect->width() < $rect->width()) {
         $targetRect->moveLeft(($rect->width() - $targetRect->width()) / 2);
     }
--- trunk/playground/bindings/perlqt4/perl/plasma/examples/applets/analogclock/ClockApplet.pm \
#1117051:1117052 @@ -192,12 +192,6 @@
     this->setPassivePopup(1);
 }
 
-#ClockApplet::~ClockApplet()
-#{
-    #delete d->clipboardMenu;
-    #delete d;
-#}
-
 sub speakTime
 {
     my ($time) = @_;
@@ -514,7 +508,7 @@
     } else {
         #my $current = this->{d}->{selectedTimezones}->indexOf(currentTimezone());
         my @selectedTimezones = @{this->{d}->{selectedTimezones}};
-        my $current = grep{ $selectedTimezones[$_] eq this->currentTimezone() } ( \
0..$#selectedTimezones ); +        my ($current) = grep{ $selectedTimezones[$_] eq \
this->currentTimezone() } ( 0..$#selectedTimezones );  
         if ($event->delta() > 0) {
             my $previous = $current - 1;
@@ -525,7 +519,7 @@
             }
         } else {
             my $next = $current + 1;
-            if ($next > @{this->{d}->{selectedTimezones}} - 1) {
+            if ($next > @selectedTimezones - 1) {
                 $newTimezone = this->localTimezoneUntranslated();
             } else {
                 $newTimezone = this->{d}->{selectedTimezones}->[$next];


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic