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

List:       kde-commits
Subject:    extragear/utils/rsibreak/src
From:       Tom Albers <toma () kde ! org>
Date:       2010-09-30 1:26:19
Message-ID: 20100930012619.2702BAC891 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1181101 by toma:

Restart timers when someone presses the lock button.
BUG=225213


 M  +1 -1      rsitimer.cpp  
 M  +1 -47     rsiwidget.cpp  
 M  +0 -2      rsiwidget.h  


--- trunk/extragear/utils/rsibreak/src/rsitimer.cpp #1181100:1181101
@@ -49,7 +49,7 @@
         , m_suspended( false )
         , m_needRestart( false )
         , m_explicitDebug( false )
-        , m_pause_left( 0 ), m_relax_left( 0 )
+        , m_pause_left( 0 ), m_relax_left( 0 ), m_patience( 0 )
         , m_intervals( RSIGlobals::instance()->intervals() )
 {
 }
--- trunk/extragear/utils/rsibreak/src/rsiwidget.cpp #1181100:1181101
@@ -94,53 +94,6 @@
     delete RSIGlobals::instance();
 }
 
-QPixmap RSIObject::takeScreenshot( RSIDock* tray )
-{
-    // taken from Akregator http://lxr.kde.org/source/KDE/kdepim/akregator/src/trayicon.cpp#70
-    //     Copyright (C) 2004 Stanislav Karchebny <Stanislav.Karchebny@kdemail.net>
-
-    const QRect rect = tray->geometry();
-    const QPoint g = rect.topLeft();
-    int desktopWidth  = kapp->desktop()->width();
-    int desktopHeight = kapp->desktop()->height();
-    int tw = rect.width();
-    int th = rect.height();
-    int w = desktopWidth / 4;
-    int h = desktopHeight / 9;
-    int x = g.x() + tw/2 - w/2; // Center the rectange in the systray icon
-    int y = g.y() + th/2 - h/2;
-    if ( x < 0 )
-        x = 0; // Move the rectangle to stay in the desktop limits
-    if ( y < 0 )
-        y = 0;
-    if ( x + w > desktopWidth )
-        x = desktopWidth - w;
-    if ( y + h > desktopHeight )
-        y = desktopHeight - h;
-
-    // Grab the desktop and draw a circle around the icon:
-    QPixmap shot = QPixmap::grabWindow( QApplication::desktop()->winId(), x, y, w, h );
-    QPainter painter( &shot );
-    painter.setRenderHint( QPainter::Antialiasing );
-    const int MARGINS = 6;
-    const int WIDTH   = 3;
-    int ax = g.x() - x - MARGINS -1;
-    int ay = g.y() - y - MARGINS -1;
-    painter.setPen( QPen( Qt::red/*KApplication::palette().active().highlight()*/, WIDTH ) );
-    painter.drawArc( ax, ay, tw + 2*MARGINS, th + 2*MARGINS, 0, 16*360 );
-    painter.end();
-
-    // Paint the border
-    const int BORDER = 1;
-    QPixmap finalShot( w + 2*BORDER, h + 2*BORDER );
-    finalShot.fill( KApplication::palette().color( QPalette::Foreground ) );
-    painter.begin( &finalShot );
-    painter.drawPixmap( BORDER, BORDER, shot );
-    painter.end();
-    return finalShot;
-    // end taken....
-}
-
 void RSIObject::slotWelcome()
 {
     if ( KMessageBox::shouldBeShownContinue( "dont_show_welcome_again_for_001" ) ) {
@@ -167,6 +120,7 @@
 {
     kDebug();
     m_effect->deactivate();
+    m_timer->slotRestart();
 
     QDBusInterface lock( "org.freedesktop.ScreenSaver", "/ScreenSaver",
                          "org.freedesktop.ScreenSaver" );
--- trunk/extragear/utils/rsibreak/src/rsiwidget.h #1181100:1181101
@@ -62,8 +62,6 @@
         return m_timer;
     };
 
-    static QPixmap takeScreenshot( RSIDock* );
-
 private slots:
     void slotWelcome();
     void slotLock();
[prev in list] [next in list] [prev in thread] [next in thread] 

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