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

List:       kde-commits
Subject:    Re: kdereview/ksynaptics
From:       Lukáš_Tinkl <lukas () kde ! org>
Date:       2005-10-20 10:32:59
Message-ID: 200510201233.00651.lukas () kde ! org
[Download RAW message or body]

Dne čt. 20. říjen 2005 8:22 Stefan Kombrink napsal(a):
> SVN commit 472194 by katakombi:
>
> applying patch from Andrea to enable/disable the pad via a global
> accelerator CCMAIL: andrea.dieni@alice.it

>  Stefan Kombrink (katakombi@web.de)
> --- trunk/kdereview/ksynaptics/src/syndock.cpp #472193:472194
> @@ -25,6 +25,7 @@
>  #include <kpopupmenu.h>
>
>  #include <qstring.h>
> +#include <qwidget.h>
>  #include <qpixmap.h>
>  #include <qaction.h>
>  #include <qpopupmenu.h>
> @@ -33,10 +34,11 @@
>
>  SynDock::SynDock( QWidget *parent, const char *name )
>
>      : KSystemTray( parent, name )
>
> -{
> +{
> +  // TODO set a tool tip
>    m_dockPixmapEnabled = KSystemTray::loadIcon( "ksynaptics" );
>    m_dockPixmapDisabled = KSystemTray::loadIcon( "syndockdisabled" );
> -
> +
>    setPixmap( m_dockPixmapEnabled );
>
>    m_syndaemonProc = new KProcess();
> @@ -53,12 +55,18 @@
>      kdDebug() << "launched syndaemon process" << endl;
>
>    QAction *enableDisable =
> -    new QAction( i18n( "Disable touch pad temporarily" ), QKeySequence(
> tr( "Ctrl+Alt+D" ) ), this ); +    new QAction( i18n( "Disable touch pad
> temporarily" ), QKeySequence( tr( "Ctrl+Alt+P" ) ), this );

This is KDE code, don't use tr(); also it's better to use KAction here

> +
> +  QString accelStr = i18n( (m_toggle_pad->shortcut( "Toggle Pad"
> )).toString().ascii() ); +
> +  QString msgStr =
> +	yesNo? i18n( "Touch pad disabled! <br>Press " ) + accelStr + i18n( " to
> enable it again..." ): +	       i18n( "Touch pad enabled! <br>Press " ) +
> accelStr + i18n( " to disable it again..." ); +
> +  showPopup( msgStr, yesNo? m_dockPixmapDisabled:m_dockPixmapEnabled );

... and never construct such horrible word puzzles!

-- 
Lukáš Tinkl <lukas@kde.org>
KDE developer


I get up each morning, gather my wits. Pick up the paper, read the obits. If 
I'm not there I know I'm not dead. So I eat a good breakfast and go back to 
bed.

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

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