diff options
Diffstat (limited to 'src/customtraylabel.cpp')
| -rw-r--r-- | src/customtraylabel.cpp | 49 | 
1 files changed, 26 insertions, 23 deletions
| diff --git a/src/customtraylabel.cpp b/src/customtraylabel.cpp index aca36e1..8683c96 100644 --- a/src/customtraylabel.cpp +++ b/src/customtraylabel.cpp @@ -29,6 +29,9 @@  #include <qsize.h>  #include <stdlib.h> +#include <kglobal.h> +#include <klocale.h> +  #include "trace.h"  #include "customtraylabel.h"  #include "traylabelmgr.h" @@ -59,44 +62,44 @@ void CustomTrayLabel::installMenu()    TrayLabelMgr *tlMgr = TrayLabelMgr::instance();    mOptionsMenu = new QPopupMenu(this); -  mSessionManagement = new QAction(tr("Dock when session restored"), 0, this); +  mSessionManagement = new QAction(i18n("Dock when session restored"), 0, this);    mSessionManagement->setToggleAction(true);    connect(mSessionManagement, SIGNAL(toggled(bool)),            this, SLOT(enableSessionManagement(bool)));    mSessionManagement->addTo(mOptionsMenu); -  mAutoLaunch = new QAction(tr("Launch on startup"), 0, this); +  mAutoLaunch = new QAction(i18n("Launch on startup"), 0, this);  	mAutoLaunch->setToggleAction(true);    connect(mAutoLaunch, SIGNAL(activated()),             this, SLOT(slotSetLaunchOnStartup()));    mAutoLaunch->addTo(mOptionsMenu); -  mOptionsMenu->insertItem(tr("Set Icon"), this, SLOT(setCustomIcon())); +  mOptionsMenu->insertItem(i18n("Set Icon"), this, SLOT(setCustomIcon())); -  mBalloonTimeout = new QAction(tr("Set balloon timeout"), 0, this); +  mBalloonTimeout = new QAction(i18n("Set balloon timeout"), 0, this);    connect(mBalloonTimeout, SIGNAL(activated()),   	        this, SLOT(slotSetBalloonTimeout()));    mBalloonTimeout->addTo(mOptionsMenu); -  mDockWhenObscured = new QAction(tr("Dock when obscured"), 0, this); +  mDockWhenObscured = new QAction(i18n("Dock when obscured"), 0, this);    mDockWhenObscured->setToggleAction(true);    connect(mDockWhenObscured, SIGNAL(toggled(bool)),            this, SLOT(setDockWhenObscured(bool)));    mDockWhenObscured->addTo(mOptionsMenu); -  mDockWhenMinimized = new QAction(tr("Dock when minimized"), 0, this); +  mDockWhenMinimized = new QAction(i18n("Dock when minimized"), 0, this);    mDockWhenMinimized->setToggleAction(true);    connect(mDockWhenMinimized, SIGNAL(toggled(bool)),            this, SLOT(setDockWhenMinimized(bool)));    mDockWhenMinimized->addTo(mOptionsMenu); -  mDockWhenFocusLost = new QAction(tr("Dock when focus lost"), 0, this); +  mDockWhenFocusLost = new QAction(i18n("Dock when focus lost"), 0, this);  	mDockWhenFocusLost->setToggleAction(true);  	connect(mDockWhenFocusLost, SIGNAL(toggled(bool)),  					this, SLOT(setDockWhenFocusLost(bool)));  	mDockWhenFocusLost->addTo(mOptionsMenu); -  mSkipTaskbar = new QAction(tr("Skip taskbar"), 0, this); +  mSkipTaskbar = new QAction(i18n("Skip taskbar"), 0, this);    mSkipTaskbar->setToggleAction(true);    connect(mSkipTaskbar, SIGNAL(toggled(bool)),             this, SLOT(setSkipTaskbar(bool))); @@ -104,17 +107,17 @@ void CustomTrayLabel::installMenu()    mMainMenu = new QPopupMenu(this);    mMainMenu->insertItem(QIconSet(kdocker_png), -                        tr("About KDocker"), tlMgr, SLOT(about())); +                        i18n("About KDocker"), tlMgr, SLOT(about()));    mMainMenu->insertSeparator(); -  mMainMenu->insertItem(tr("Options"), mOptionsMenu); -  mMainMenu->insertItem(tr("Dock Another"), tlMgr, SLOT(dockAnother())); -  mMainMenu->insertItem(tr("Undock All"), tlMgr, SLOT(undockAll())); +  mMainMenu->insertItem(i18n("Options"), mOptionsMenu); +  mMainMenu->insertItem(i18n("Dock Another"), tlMgr, SLOT(dockAnother())); +  mMainMenu->insertItem(i18n("Undock All"), tlMgr, SLOT(undockAll()));    mMainMenu->insertSeparator();    mShowId = mMainMenu->insertItem(QString("Show/Hide [untitled]"),                                     this, SLOT(toggleShow())); -  mMainMenu->insertItem(QString(tr("Undock")), this, SLOT(undock())); -  mMainMenu->insertItem(QString(tr("Close")), this, SLOT(close())); +  mMainMenu->insertItem(QString(i18n("Undock")), this, SLOT(undock())); +  mMainMenu->insertItem(QString(i18n("Close")), this, SLOT(close()));    connect(mMainMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu())); @@ -212,8 +215,8 @@ void CustomTrayLabel::setCustomIcon(void)      if (icon.isNull()) return;     // user cancelled      if (!QPixmap(icon).isNull()) break;      TRACE("Attempting to set icon to %s", icon.latin1()); -    QMessageBox::critical(this, tr("KDocker"),  -                          tr("%1 is not a valid icon").arg(icon)); +    QMessageBox::critical(this, i18n("KDocker"),  +                          i18n("%1 is not a valid icon").arg(icon));    }    setTrayIcon(icon); @@ -223,8 +226,8 @@ void CustomTrayLabel::setCustomIcon(void)  void CustomTrayLabel::slotSetBalloonTimeout(void)  {    bool ok; -  int timeout = QInputDialog::getInteger(tr("KDocker"),  -      tr("Enter balloon timeout (secs). 0 to disable ballooning"),  +  int timeout = QInputDialog::getInteger(i18n("KDocker"),  +      i18n("Enter balloon timeout (secs). 0 to disable ballooning"),   			balloonTimeout()/1000, 0, 60, 1, &ok);    if (!ok) return; @@ -256,10 +259,10 @@ void CustomTrayLabel::slotSetLaunchOnStartup()      }      // Request user to provide file name himself -    if (QMessageBox::critical(NULL, tr("KDocker"), -        tr("\"%1\" is not a valid executable " +    if (QMessageBox::critical(NULL, i18n("KDocker"), +        i18n("\"%1\" is not a valid executable "  	  	    "or was not found in your $PATH").arg(app), -        tr("Select program"), tr("Cancel")) == 1)  +        i18n("Select program"), i18n("Cancel")) == 1)       {        mAutoLaunch->setOn(false);        return; // cancelled @@ -280,7 +283,7 @@ void CustomTrayLabel::updateMenu(void)  {    QString title = appClass(); // + "(" + appTitle() + ")";    mMainMenu->changeItem(mShowId, QIconSet(*pixmap()), -      QString((isWithdrawn() ? tr("Show %1") : tr("Hide %1")).arg(title))); +      QString((isWithdrawn() ? i18n("Show %1") : i18n("Hide %1")).arg(title)));  }  void CustomTrayLabel::mapEvent(void) @@ -354,7 +357,7 @@ bool CustomTrayLabel::canDockWindow(Window w)  void CustomTrayLabel::dropEvent(QDropEvent *)  {    QMessageBox::information(NULL, "KDocker",  -    tr("You cannot drop an item into the tray icon. Drop it on the window\n" +    i18n("You cannot drop an item into the tray icon. Drop it on the window\n"         "that is brought in front when you hover the item over the tray icon"));  } | 
