diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:06:45 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:06:45 +0100 |
commit | 88b7febc2393324ee14940c1c41a8ddc342c35f6 (patch) | |
tree | b9a917fd3a40988e6e0134490f5357e5335c1c70 /sessionapplet | |
parent | 2ee99ab520931c5efe91123c85ba10064a45e95d (diff) | |
download | tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.tar.gz tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'sessionapplet')
-rw-r--r-- | sessionapplet/Makefile.am | 2 | ||||
-rw-r--r-- | sessionapplet/dmctl.cpp | 22 | ||||
-rw-r--r-- | sessionapplet/dmctl.h | 10 | ||||
-rw-r--r-- | sessionapplet/usermanager.cpp | 28 | ||||
-rw-r--r-- | sessionapplet/usermanager.desktop | 4 | ||||
-rw-r--r-- | sessionapplet/usermanager.h | 4 |
6 files changed, 35 insertions, 35 deletions
diff --git a/sessionapplet/Makefile.am b/sessionapplet/Makefile.am index 4472c36..322517d 100644 --- a/sessionapplet/Makefile.am +++ b/sessionapplet/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = usermanager_panelapplet.la usermanager_panelapplet_la_SOURCES = usermanager.cpp dmctl.cpp usermanager_panelapplet_la_LDFLAGS = -module -avoid-version $(all_libraries) -usermanager_panelapplet_la_LIBADD = $(LIB_KDEUI) +usermanager_panelapplet_la_LIBADD = $(LIB_TDEUI) usermanager_DATA = usermanager.desktop usermanagerdir = $(kde_datadir)/kicker/applets diff --git a/sessionapplet/dmctl.cpp b/sessionapplet/dmctl.cpp index eb7fc7c..788f537 100644 --- a/sessionapplet/dmctl.cpp +++ b/sessionapplet/dmctl.cpp @@ -21,7 +21,7 @@ #ifdef Q_WS_X11 -#include <klocale.h> +#include <tdelocale.h> #include <dcopclient.h> #include <sys/types.h> @@ -91,16 +91,16 @@ DM::exec( const char *cmd ) } /** - * Execute a KDM remote control command. + * Execute a TDM remote control command. * @param cmd the command to execute. FIXME: undocumented yet. * @param ret the result buffer. * @return result: * @li If true, the command was successfully executed. * @p ret might contain addional results. * @li If false and @p ret is empty, a communication error occurred - * (most probably KDM is not running). + * (most probably TDM is not running). * @li If false and @p ret is non-empty, it contains the error message - * from KDM. + * from TDM. */ bool DM::exec( const char *cmd, TQCString &buf ) @@ -157,24 +157,24 @@ DM::canShutdown() } void -DM::shutdown( KApplication::ShutdownType shutdownType, - KApplication::ShutdownMode shutdownMode, +DM::shutdown( TDEApplication::ShutdownType shutdownType, + TDEApplication::ShutdownMode shutdownMode, const TQString &bootOption ) { if (!bootOption.isEmpty() && DMType != NewKDM) return; - if (shutdownType != KApplication::ShutdownTypeNone) { + if (shutdownType != TDEApplication::ShutdownTypeNone) { TQCString cmd( "shutdown\t" ); - cmd.append( shutdownType == KApplication::ShutdownTypeReboot ? + cmd.append( shutdownType == TDEApplication::ShutdownTypeReboot ? "reboot\t" : "halt\t" ); if (!bootOption.isNull()) cmd.append( "=" ).append( bootOption.local8Bit() ).append( "\t" ); - cmd.append( shutdownMode == KApplication::ShutdownModeInteractive ? + cmd.append( shutdownMode == TDEApplication::ShutdownModeInteractive ? "ask\n" : - shutdownMode == KApplication::ShutdownModeForceNow ? + shutdownMode == TDEApplication::ShutdownModeForceNow ? "forcenow\n" : - shutdownMode == KApplication::ShutdownModeTryNow ? + shutdownMode == TDEApplication::ShutdownModeTryNow ? "trynow\n" : "schedule\n" ); exec( cmd.data() ); } diff --git a/sessionapplet/dmctl.h b/sessionapplet/dmctl.h index a8328d2..f8ce2c2 100644 --- a/sessionapplet/dmctl.h +++ b/sessionapplet/dmctl.h @@ -21,7 +21,7 @@ #ifndef DMCTL_H #define DMCTL_H -#include <kapplication.h> +#include <tdeapplication.h> struct SessEnt { TQString display, from, user, session; @@ -40,8 +40,8 @@ public: ~DM(); bool canShutdown(); - void shutdown( KApplication::ShutdownType shutdownType, - KApplication::ShutdownMode shutdownMode, + void shutdown( TDEApplication::ShutdownType shutdownType, + TDEApplication::ShutdownMode shutdownMode, const TQString &bootOption = TQString::null ); void setLock( bool on ); @@ -70,8 +70,8 @@ public: DM() {} bool canShutdown() { return false; } - void shutdown( KApplication::ShutdownType shutdownType, - KApplication::ShutdownMode shutdownMode, + void shutdown( TDEApplication::ShutdownType shutdownType, + TDEApplication::ShutdownMode shutdownMode, const TQString &bootOption = TQString::null ) {} void setLock( bool ) {} diff --git a/sessionapplet/usermanager.cpp b/sessionapplet/usermanager.cpp index 107d9b8..01c05d8 100644 --- a/sessionapplet/usermanager.cpp +++ b/sessionapplet/usermanager.cpp @@ -19,25 +19,25 @@ ***************************************************************************/ #include <stdlib.h> -#include <kmenubar.h> +#include <tdemenubar.h> // #include <tqlabel.h> #include <tqlayout.h> #include <tqpopupmenu.h> #include <dcopclient.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kiconloader.h> -#include <klocale.h> -#include <kconfig.h> +#include <tdelocale.h> +#include <tdeconfig.h> #include <ksimpleconfig.h> -#include <kapplication.h> -#include <kdeversion.h> -#include <kmessagebox.h> +#include <tdeapplication.h> +#include <tdeversion.h> +#include <tdemessagebox.h> #include <kservice.h> #include <kstandarddirs.h> #include "dmctl.h" #include "usermanager.h" -#define _ICONSET_(i) KGlobal::iconLoader()->loadIconSet(i, KIcon::Small, 0, false) +#define _ICONSET_(i) TDEGlobal::iconLoader()->loadIconSet(i, TDEIcon::Small, 0, false) UserManager::UserManager(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) @@ -66,7 +66,7 @@ UserManager::UserManager(const TQString& configFile, Type type, int actions, TQW // languages langPopup = new TQPopupMenu(this); - KConfigBase *config = KGlobal::config(); + TDEConfigBase *config = TDEGlobal::config(); config->setGroup("Locale"); langList = config->readListEntry ("Language", ':'); // TQString flag( locate( "locale", TQString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) ); @@ -123,14 +123,14 @@ void UserManager::logout() void UserManager::slotPopulateLanguages() { langPopup->clear(); - KConfig *config = new KConfig("kdeglobals"); + TDEConfig *config = new TDEConfig("kdeglobals"); config->setGroup("Locale"); langList = config->readListEntry ("Language", ':'); int i = 0; for ( TQStringList::ConstIterator it = langList.begin(); it != langList.end(); ++it ) { - KConfig entry(locate( "locale", TQString::fromLatin1( "%1/entry.desktop" ).arg(*it) )); + TDEConfig entry(locate( "locale", TQString::fromLatin1( "%1/entry.desktop" ).arg(*it) )); entry.setGroup("KCM Locale"); TQString name = entry.readEntry("Name", i18n("without name")); @@ -147,7 +147,7 @@ void UserManager::slotLanguageActivated( int i ) return; // no change, no action menu->changeItem ( 1, '[' + langList[i].section('_',0,0) + ']'/**langPopup->pixmap(i)*/ ); // langLabel->setPixmap(*langPopup->pixmap(i)); - KConfig *config = new KConfig("kdeglobals"); + TDEConfig *config = new TDEConfig("kdeglobals"); config->setGroup("Locale"); TQString tmp = langList[i]; langList.remove(langList.at(i)); @@ -193,7 +193,7 @@ void UserManager::slotPopulateSessions() } // save sessionPopup->insertSeparator(); - KConfig ksmserver("ksmserverrc", false, false); + TDEConfig ksmserver("ksmserverrc", false, false); ksmserver.setGroup("General"); if (ksmserver.readEntry( "loginMode" ) == "restoreSavedSession") { @@ -275,7 +275,7 @@ extern "C" { KPanelApplet* init( TQWidget *parent, const TQString& configFile) { - KGlobal::locale()->insertCatalogue("usermanager"); + TDEGlobal::locale()->insertCatalogue("usermanager"); return new UserManager(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "usermanager"); } } diff --git a/sessionapplet/usermanager.desktop b/sessionapplet/usermanager.desktop index 31c61cf..51dc8a2 100644 --- a/sessionapplet/usermanager.desktop +++ b/sessionapplet/usermanager.desktop @@ -4,5 +4,5 @@ Comment=Session Control, Lock, Logout, Change Name=SessionManager Name[xx]=xxSessionManagerxx Icon=fork -X-KDE-Library=usermanager_panelapplet -X-KDE-UniqueApplet = true +X-TDE-Library=usermanager_panelapplet +X-TDE-UniqueApplet = true diff --git a/sessionapplet/usermanager.h b/sessionapplet/usermanager.h index 80357ec..4767d4f 100644 --- a/sessionapplet/usermanager.h +++ b/sessionapplet/usermanager.h @@ -30,7 +30,7 @@ #include <tqstring.h> #include <tqiconset.h> #include <tqstringlist.h> -#include <kconfig.h> +#include <tdeconfig.h> class KMenuBar; class TQPopunMenu; @@ -63,7 +63,7 @@ protected: void doNewSession(bool lock_); private: - KConfig *ksConfig; + TDEConfig *ksConfig; TQWidget *mainView; KMenuBar *menu; TQPopupMenu *sessionPopup; |