~user-none/kdocker/EmbedContainer

« back to all changes in this revision

Viewing changes to src/trayitemmanager.cpp

  • Committer: John Schember
  • Date: 2009-09-27 12:59:53 UTC
  • Revision ID: john@nachtimwald.com-20090927125953-3ywuxh5s20rb68xz
Replace tr("KDocker") with qApp->applicationName().

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include <QByteArray>
 
22
#include <QCoreApplication>
22
23
#include <QList>
23
24
#include <QMessageBox>
24
25
#include <QSystemTrayIcon>
151
152
            case 'f':
152
153
                window = activeWindow(QX11Info::display());
153
154
                if (!window) {
154
 
                    QMessageBox::critical(0, tr("KDocker"), tr("Cannot dock the active window because no window has focus."));
 
155
                    QMessageBox::critical(0, qApp->applicationName(), tr("Cannot dock the active window because no window has focus."));
155
156
                    checkCount();
156
157
                    return;
157
158
                }
192
193
                else
193
194
                    window = (Window) atoi(optarg);
194
195
                if (!isValidWindowId(QX11Info::display(), window)) {
195
 
                    QMessageBox::critical(0, tr("KDocker"), tr("Invalid window id."));
 
196
                    QMessageBox::critical(0, qApp->applicationName(), tr("Invalid window id."));
196
197
                    checkCount();
197
198
                    return;
198
199
                }
244
245
 
245
246
void TrayItemManager::dockWindow(Window window, TrayItemSettings settings) {
246
247
    if (isWindowDocked(window)) {
247
 
        QMessageBox::information(0, tr("KDocker"), tr("This window is already docked.\nClick on system tray icon to toggle docking."));
 
248
        QMessageBox::information(0, qApp->applicationName(), tr("This window is already docked.\nClick on system tray icon to toggle docking."));
248
249
        checkCount();
249
250
        return;
250
251
    }
286
287
    Window window = selectWindow(QX11Info::display(), &error);
287
288
    if (!window) {
288
289
        if (error) {
289
 
            QMessageBox::critical(0, tr("KDocker"), tr(error));
 
290
            QMessageBox::critical(0, qApp->applicationName(), tr(error));
290
291
        }
291
292
        checkCount();
292
293
        return 0;
294
295
 
295
296
    if (checkNormality) {
296
297
        if (!isNormalWindow(QX11Info::display(), window)) {
297
 
            if (QMessageBox::warning(0, tr("KDocker"), tr("The window you are attempting to dock does not seem to be a normal window."), QMessageBox::Abort | QMessageBox::Ignore) == QMessageBox::Abort) {
 
298
            if (QMessageBox::warning(0, qApp->applicationName(), tr("The window you are attempting to dock does not seem to be a normal window."), QMessageBox::Abort | QMessageBox::Ignore) == QMessageBox::Abort) {
298
299
                checkCount();
299
300
                return 0;
300
301
            }