diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-02-24 14:33:07 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-02-24 14:33:07 +0900 |
commit | 7fea3c42ee6179edaa3e9f36c794540ae73fcc95 (patch) | |
tree | 4cea28ad693ec218f0c17b4702fe6b01cb2fa79e /src | |
parent | 70194b269e22711c3bbbc18d339b69aab028371e (diff) | |
download | tdedocker-7fea3c42ee6179edaa3e9f36c794540ae73fcc95.tar.gz tdedocker-7fea3c42ee6179edaa3e9f36c794540ae73fcc95.zip |
Completed kdocker -> tdedocker renaming effort.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeL10n.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/customtraylabel.cpp | 24 | ||||
-rw-r--r-- | src/main.cpp | 8 | ||||
-rw-r--r-- | src/tdedocker.cpp (renamed from src/kdocker.cpp) | 44 | ||||
-rw-r--r-- | src/tdedocker.h (renamed from src/kdocker.h) | 6 | ||||
-rw-r--r-- | src/tdedocker.xpm (renamed from src/kdocker.xpm) | 2 | ||||
-rw-r--r-- | src/traylabelmgr.cpp | 24 |
8 files changed, 58 insertions, 58 deletions
diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt index fc3b369..3a6ef82 100644 --- a/src/CMakeL10n.txt +++ b/src/CMakeL10n.txt @@ -1,3 +1,3 @@ ##### create translation templates ############## -tde_l10n_create_template( "kdocker" ) +tde_l10n_create_template( "tdedocker" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4cf714f..02193f4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,12 +24,12 @@ link_directories( ) -##### kdocker ################################### +##### tdedocker ################################### -tde_add_executable( kdocker AUTOMOC +tde_add_executable( tdedocker AUTOMOC SOURCES customtraylabel.cpp - kdocker.cpp + tdedocker.cpp main.cpp qtraylabel.cpp trace.cpp diff --git a/src/customtraylabel.cpp b/src/customtraylabel.cpp index a657a89..e27dbba 100644 --- a/src/customtraylabel.cpp +++ b/src/customtraylabel.cpp @@ -36,7 +36,7 @@ #include "trace.h" #include "customtraylabel.h" #include "traylabelmgr.h" -#include "kdocker.h" +#include "tdedocker.h" CustomTrayLabel::CustomTrayLabel(Window w, TQWidget* p, const TQString& t) : TQTrayLabel(w, p, t), mUndockWhenDead(false) @@ -56,9 +56,9 @@ CustomTrayLabel::CustomTrayLabel(const TQStringList& argv, pid_t pid, */ void CustomTrayLabel::installMenu() { - //TQPixmap kdocker_png(TDEGlobal::iconLoader()->loadIcon("kdocker", TDEIcon::NoGroup, TDEIcon::SizeSmall)); - TQPixmap *kdocker_png = new TQPixmap("kdocker"); - setIcon(*kdocker_png); + //TQPixmap tdedocker_png(TDEGlobal::iconLoader()->loadIcon("tdedocker", TDEIcon::NoGroup, TDEIcon::SizeSmall)); + TQPixmap *tdedocker_png = new TQPixmap("tdedocker"); + setIcon(*tdedocker_png); TrayLabelMgr *tlMgr = TrayLabelMgr::instance(); mOptionsMenu = new TQPopupMenu(this); @@ -106,8 +106,8 @@ void CustomTrayLabel::installMenu() mSkipTaskbar->addTo(mOptionsMenu); mMainMenu = new TQPopupMenu(this); - mMainMenu->insertItem(TQIconSet(*kdocker_png), - i18n("About KDocker"), tlMgr, SLOT(about())); + mMainMenu->insertItem(TQIconSet(*tdedocker_png), + i18n("About TDEDocker"), tlMgr, SLOT(about())); mMainMenu->insertSeparator(); mMainMenu->insertItem(i18n("Options"), mOptionsMenu); mMainMenu->insertItem(i18n("Dock Another"), tlMgr, SLOT(dockAnother())); @@ -215,7 +215,7 @@ void CustomTrayLabel::setCustomIcon(void) if (icon.isNull()) return; // user cancelled if (!TQPixmap(icon).isNull()) break; TRACE("Attempting to set icon to %s", icon.latin1()); - TQMessageBox::critical(this, i18n("KDocker"), + TQMessageBox::critical(this, i18n("TDEDocker"), i18n("%1 is not a valid icon").arg(icon)); } @@ -226,7 +226,7 @@ void CustomTrayLabel::setCustomIcon(void) void CustomTrayLabel::slotSetBalloonTimeout(void) { bool ok; - int timeout = TQInputDialog::getInteger(i18n("KDocker"), + int timeout = TQInputDialog::getInteger(i18n("TDEDocker"), i18n("Enter balloon timeout (secs). 0 to disable ballooning"), balloonTimeout()/1000, 0, 60, 1, &ok); @@ -259,7 +259,7 @@ void CustomTrayLabel::slotSetLaunchOnStartup() } // Request user to provide file name himself - if (TQMessageBox::critical(NULL, i18n("KDocker"), + if (TQMessageBox::critical(NULL, i18n("TDEDocker"), i18n("\"%1\" is not a valid executable " "or was not found in your $PATH").arg(app), i18n("Select program"), i18n("Cancel")) == 1) @@ -331,8 +331,8 @@ void CustomTrayLabel::processDead(void) { /* * This is a ugly hack but worth every but of ugliness IMO ;). - * Lets say, an instance of xmms, already exists. You type kdocker xmms. - * KDocker launches xmms. xmms cowardly exists seeing its previous instance. + * Lets say, an instance of xmms, already exists. You type tdedocker xmms. + * TDEDocker launches xmms. xmms cowardly exists seeing its previous instance. * Wouldnt it be nice now to dock the previous instance of xmms automatically. * This is more common than you think (think of session restoration) */ @@ -356,7 +356,7 @@ bool CustomTrayLabel::canDockWindow(Window w) void CustomTrayLabel::dropEvent(TQDropEvent *) { - TQMessageBox::information(NULL, "KDocker", + TQMessageBox::information(NULL, "TDEDocker", 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")); } diff --git a/src/main.cpp b/src/main.cpp index d1e0a38..1cd955e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,7 @@ #include <tdelocale.h> #include <tqdir.h> -#include "kdocker.h" +#include "tdedocker.h" #include "traylabelmgr.h" #include "trace.h" #include <X11/Xlib.h> @@ -36,12 +36,12 @@ static void sighandler(int sig) { if (sig == SIGUSR1) { - DUMP_TRACE(TQDir::homeDirPath() + "/kdocker.trace"); + DUMP_TRACE(TQDir::homeDirPath() + "/tdedocker.trace"); return; } tqDebug("%s", i18n("Caught signal %1. Cleaning up.").arg(sig).local8Bit().data()); - ((KDocker *)tqApp)->trayLabelMgr()->undockAll(); + ((TDEDocker *)tqApp)->trayLabelMgr()->undockAll(); } int main(int argc, char *argv[]) @@ -52,6 +52,6 @@ int main(int argc, char *argv[]) signal(SIGINT, sighandler); signal(SIGUSR1, sighandler); - KDocker app(argc, argv); + TDEDocker app(argc, argv); return app.exec(); } diff --git a/src/kdocker.cpp b/src/tdedocker.cpp index 2df7eb6..2b404c7 100644 --- a/src/kdocker.cpp +++ b/src/tdedocker.cpp @@ -17,7 +17,7 @@ * USA. */ -// $Id: kdocker.cpp,v 1.24 2005/02/04 10:25:46 cs19713 Exp $ +// $Id: tdedocker.cpp,v 1.24 2005/02/04 10:25:46 cs19713 Exp $ #include <tqsessionmanager.h> #include <tqdir.h> @@ -31,7 +31,7 @@ #include "trace.h" #include "traylabelmgr.h" -#include "kdocker.h" +#include "tdedocker.h" #include <sys/types.h> #include <sys/stat.h> @@ -39,10 +39,10 @@ #include <stdio.h> #include <stdlib.h> -// #define TMPFILE_PREFIX TQString("/tmp/kdocker.") -#define TMPFILE_PREFIX TQDir::homeDirPath() + "/.kdocker." +// #define TMPFILE_PREFIX TQString("/tmp/tdedocker.") +#define TMPFILE_PREFIX TQDir::homeDirPath() + "/.tdedocker." -KDocker::KDocker(int& argc, char** argv) +TDEDocker::TDEDocker(int& argc, char** argv) :TQApplication(argc, argv), mTrayLabelMgr(0) { INIT_TRACE(); @@ -63,17 +63,17 @@ KDocker::KDocker(int& argc, char** argv) * Detect and transfer control to previous instance (if one exists) * _KDOCKER_RUNNING is a X Selection. We start out by trying to locate the * selection owner. If someone else owns it, transfer control to that - * instance of KDocker + * instance of TDEDocker */ Display *display = TQPaintDevice::x11AppDisplay(); - Atom kdocker = XInternAtom(display, "_KDOCKER_RUNNING", False); - Window prev_instance = XGetSelectionOwner(display, kdocker); + Atom tdedocker = XInternAtom(display, "_KDOCKER_RUNNING", False); + Window prev_instance = XGetSelectionOwner(display, tdedocker); if (prev_instance == None) { mSelectionOwner = XCreateSimpleWindow(display, tqt_xrootwin(), 1, 1, 1, 1, 1, 1, 1); - XSetSelectionOwner(display, kdocker, mSelectionOwner, CurrentTime); + XSetSelectionOwner(display, tdedocker, mSelectionOwner, CurrentTime); TRACE("Selection owner set to 0x%x", (unsigned) mSelectionOwner); mTrayLabelMgr = TrayLabelMgr::instance(); } @@ -81,18 +81,18 @@ KDocker::KDocker(int& argc, char** argv) notifyPreviousInstance(prev_instance); // does not return } -void KDocker::printVersion(void) +void TDEDocker::printVersion(void) { tqDebug("TQt: %s", tqVersion()); - tqDebug("KDocker: %s", KDOCKER_APP_VERSION); + tqDebug("TDEDocker: %s", KDOCKER_APP_VERSION); } // Prints the CLI arguments. Does not return -void KDocker::printUsage(char optopt) +void TDEDocker::printUsage(char optopt) { - if (optopt != 'h') tqDebug("%s", i18n("kdocker: invalid option -- %1").arg(optopt).local8Bit().data()); + if (optopt != 'h') tqDebug("%s", i18n("tdedocker: invalid option -- %1").arg(optopt).local8Bit().data()); - tqDebug("%s", i18n("Usage: KDocker [options] command\n").local8Bit().data()); + tqDebug("%s", i18n("Usage: TDEDocker [options] command\n").local8Bit().data()); tqDebug("%s", i18n("Docks any application into the system tray\n").local8Bit().data()); tqDebug("%s", i18n("command \tCommand to execute\n").local8Bit().data()); tqDebug("%s", i18n("Options").local8Bit().data()); @@ -115,10 +115,10 @@ void KDocker::printUsage(char optopt) tqDebug("%s", i18n("NOTE: Use -d for all startup scripts.\n").local8Bit().data()); tqDebug("%s", i18n("Bugs and wishes to gramakri@uiuc.edu").local8Bit().data()); - tqDebug("%s", i18n("Project information at http://kdocker.sourceforge.net").local8Bit().data()); + tqDebug("%s", i18n("Project information at http://tdedocker.sourceforge.net").local8Bit().data()); } -void KDocker::notifyPreviousInstance(Window prevInstance) +void TDEDocker::notifyPreviousInstance(Window prevInstance) { Display *display = TQPaintDevice::x11AppDisplay(); @@ -130,7 +130,7 @@ void KDocker::notifyPreviousInstance(Window prevInstance) TQTextStream s(&f); /* - * Its normal to use KDocker in startup scripts. We could be getting restored + * Its normal to use TDEDocker in startup scripts. We could be getting restored * from a session at the same time. So, if we were getting restored and * another instance already exists, send across the session id. Remember, qt * strips out all the arguments that it understands. So need to do it by hand. @@ -166,11 +166,11 @@ void KDocker::notifyPreviousInstance(Window prevInstance) * The X11 Event filter called by TQt. Look out for ClientMessage events from * our new instance */ -bool KDocker::x11EventFilter(XEvent * event) +bool TDEDocker::x11EventFilter(XEvent * event) { if (event->type == ClientMessage) { - // look for requests from a new instance of kdocker + // look for requests from a new instance of tdedocker XClientMessageEvent *client = (XClientMessageEvent *) event; if (!(client->message_type == 0x220679 && client->data.l[0] == 0xBABE)) return FALSE; @@ -210,7 +210,7 @@ bool KDocker::x11EventFilter(XEvent * event) /* * XSMP Support */ -void KDocker::saveState(TQSessionManager &sm) +void TDEDocker::saveState(TQSessionManager &sm) { TQString sf = mTrayLabelMgr->saveSession(); @@ -225,9 +225,9 @@ void KDocker::saveState(TQSessionManager &sm) sm.setRestartCommand(restart_command); TRACE("SessionFile=%s AppName=%s", sf.latin1(), this->argv()[0]); - DUMP_TRACE(TQDir::homeDirPath() + "/kdocker.trace"); + DUMP_TRACE(TQDir::homeDirPath() + "/tdedocker.trace"); // sm.setRestartCommand(applicationFilePath()); } -#include "kdocker.moc" +#include "tdedocker.moc" diff --git a/src/kdocker.h b/src/tdedocker.h index ecfdbb7..46d0e13 100644 --- a/src/kdocker.h +++ b/src/tdedocker.h @@ -17,7 +17,7 @@ * USA. */ -// $Id: kdocker.h,v 1.11 2005/02/09 03:32:26 cs19713 Exp $ +// $Id: tdedocker.h,v 1.11 2005/02/09 03:32:26 cs19713 Exp $ #ifndef _KDOCKER_H #define _KDOCKER_H @@ -29,12 +29,12 @@ class TrayLabelMgr; -class KDocker : public TQApplication +class TDEDocker : public TQApplication { Q_OBJECT public: - KDocker(int& argc, char** argv); + TDEDocker(int& argc, char** argv); TrayLabelMgr *trayLabelMgr(void) { return mTrayLabelMgr; } diff --git a/src/kdocker.xpm b/src/tdedocker.xpm index 63fb2fa..314c220 100644 --- a/src/kdocker.xpm +++ b/src/tdedocker.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * kdocker_xpm[] = { +static char * tdedocker_xpm[] = { "24 24 277 2", " c None", ". c #0080FF", diff --git a/src/traylabelmgr.cpp b/src/traylabelmgr.cpp index c24034d..40c8231 100644 --- a/src/traylabelmgr.cpp +++ b/src/traylabelmgr.cpp @@ -62,10 +62,10 @@ TrayLabelMgr::~TrayLabelMgr() void TrayLabelMgr::about(void) { - if (TQMessageBox::information(NULL, i18n("About KDocker"), + if (TQMessageBox::information(NULL, i18n("About TDEDocker"), i18n("Bugs/wishes to Girish Ramakrishnan (gramakri@uiuc.edu)\n" "English translation by Girish (gramakri@uiuc.edu)\n\n" - "http://kdocker.sourceforge.net for updates"), + "http://tdedocker.sourceforge.net for updates"), TQString::null, SHOW_TRACE_TEXT) == 1) SHOW_TRACE(); } @@ -91,7 +91,7 @@ void TrayLabelMgr::startup(void) return; } - if (TQMessageBox::warning(NULL, i18n("KDocker"), + if (TQMessageBox::warning(NULL, i18n("TDEDocker"), i18n(state == SysTrayAbsent ? "No system tray found" : "System tray appears to be hidden"), TQMessageBox::Abort, TQMessageBox::Ignore) == TQMessageBox::Abort) @@ -182,7 +182,7 @@ bool TrayLabelMgr::processCommand(int argc, char** argv) if (argc < 1) return false; - // Restore session (See the comments in KDocker::notifyPreviousInstance() + // Restore session (See the comments in TDEDocker::notifyPreviousInstance() if (qstrcmp(argv[1], "-session") == 0) { TRACE("Restoring session %s (new instance request)", argv[2]); @@ -288,7 +288,7 @@ TQTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality) if ((w = selectWindow(TQPaintDevice::x11AppDisplay(), &err)) == None) { - if (err) TQMessageBox::critical(NULL, i18n("KDocker"), i18n(err)); + if (err) TQMessageBox::critical(NULL, i18n("TDEDocker"), i18n(err)); return NULL; } } @@ -299,7 +299,7 @@ TQTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality) * Abort should be the only option here really. "Ignore" is provided here * for the curious user who wants to screw himself very badly */ - if (TQMessageBox::warning(NULL, i18n("KDocker"), + if (TQMessageBox::warning(NULL, i18n("TDEDocker"), i18n("The window you are attempting to dock does not seem to be a" " normal window."), TQMessageBox::Abort, TQMessageBox::Ignore) == TQMessageBox::Abort) @@ -310,7 +310,7 @@ TQTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality) TRACE("0x%x is not docked", (unsigned) w); - TQMessageBox::message(i18n("KDocker"), + TQMessageBox::message(i18n("TDEDocker"), i18n("This window is already docked.\n" "Click on system tray icon to toggle docking.")); return NULL; @@ -360,7 +360,7 @@ TQTrayLabel *TrayLabelMgr::dockApplication(char *argv[]) if (pid == -1) { - TQMessageBox::critical(NULL, "KDocker", + TQMessageBox::critical(NULL, "TDEDocker", i18n("Failed to fork: %1").arg(strerror(errno))); return NULL; } @@ -427,7 +427,7 @@ void TrayLabelMgr::notifySysTrayAbsence() if (state == SysTrayPresent) return; // So sweet of the systray to come back so soon - if (TQMessageBox::warning(NULL, i18n("KDocker"), + if (TQMessageBox::warning(NULL, i18n("TDEDocker"), i18n("The System tray was hidden or removed"), i18n("Undock All"), i18n("Ignore")) == 0) undockAll(); @@ -438,7 +438,7 @@ void TrayLabelMgr::notifySysTrayAbsence() */ bool TrayLabelMgr::restoreSession(const TQString& sessionId) { - TQString session_file = "kdocker_" + sessionId; + TQString session_file = "tdedocker_" + sessionId; TQSettings settings; settings.beginGroup(TQString("/" + session_file)); @@ -451,7 +451,7 @@ bool TrayLabelMgr::restoreSession(const TQString& sessionId) if (pname.isEmpty()) break; if (settings.readBoolEntry("/LaunchOnStartup")) { - TQStringList args("kdocker"); + TQStringList args("tdedocker"); args += TQStringList::split(" ", pname); TRACE("Triggering AutoLaunch"); if (!processCommand(args)) continue; @@ -469,7 +469,7 @@ bool TrayLabelMgr::restoreSession(const TQString& sessionId) TQString TrayLabelMgr::saveSession(void) { - TQString session_file = "kdocker_" + tqApp->sessionId(); + TQString session_file = "tdedocker_" + tqApp->sessionId(); TQSettings settings; settings.beginGroup(TQString("/" + session_file)); |