Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/17/head
Michele Calgaro 1 month ago
parent e949d4975f
commit 29ef1ba2f1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -65,7 +65,7 @@
</para>
</chapter><!-- introduction -->
<chapter id="using-kapp">
<chapter id="using-tdeApp">
<title>Benutzen von &kmyapplication;</title>
<sect1 id="using-mainwindow">
<title>Hauptfenster</title>
@ -95,7 +95,7 @@
<listitem><para>Rechter Mausknopf - Zeigt das Kontextmenü</para></listitem>
</itemizedlist>
</sect1>
</chapter><!-- using-kapp -->
</chapter><!-- using-tdeApp -->
<chapter id="command-line">
<title>Kommandozeile</title>

@ -65,7 +65,7 @@
</para>
</chapter><!-- introduction -->
<chapter id="using-kapp">
<chapter id="using-tdeApp">
<title>Using &kmyapplication;</title>
<sect1 id="using-mainwindow">
<title>Main Window</title>
@ -95,7 +95,7 @@
<listitem><para>Right mouse button - show context menu</para></listitem>
</itemizedlist>
</sect1>
</chapter><!-- using-kapp -->
</chapter><!-- using-tdeApp -->
<chapter id="command-line">
<title>Command Line</title>

@ -72,7 +72,7 @@ bool Action::endSession(const TDEApplication::ShutdownType type, const Type acti
_totalExit = true;
if (
!kapp->requestShutDown(
!tdeApp->requestShutDown(
TDEApplication::ShutdownConfirmNo,
type,
TDEApplication::ShutdownModeForceNow
@ -402,7 +402,7 @@ bool Action::lockScreen() {
if (kshutdown_screen_number)
kdesktop.sprintf("kdesktop-screen-%d", kshutdown_screen_number);
if (!kapp->dcopClient()->send(kdesktop, "KScreensaverIface", "lock()", "")) {
if (!tdeApp->dcopClient()->send(kdesktop, "KScreensaverIface", "lock()", "")) {
KMessageBox::error(0, i18n("kdesktop: DCOP call failed!"));
return false; // error

@ -89,7 +89,7 @@ public:
/**
* Ends current session.
* This function is a wrapper for the @c kapp->requestShutDown().
* This function is a wrapper for the @c tdeApp->requestShutDown().
* @param type A shut down type
* @param action An action to execute
* @return @c true if successful; otherwise @c false

@ -46,13 +46,13 @@ bool Confirmation::confirm(const Action::Type action, const TQString &delay)
/*
TQWidget *background = new TQWidget(0, "TQWidget::background", TQt::WType_Popup);
background->setBackgroundMode(TQt::NoBackground);
background->setGeometry(kapp->desktop()->geometry());
background->setGeometry(tdeApp->desktop()->geometry());
// Take screenshot - based on the aKregator's TrayIcon::takeScreenshot() (trayicon.cpp)
// and "ksmserver/shutdown.cpp".
TQPixmap shot = TQPixmap::grabWindow(
tqt_xrootwin(),
0, 0, // x, y
kapp->desktop()->width(), kapp->desktop()->height()
tdeApp->desktop()->width(), tdeApp->desktop()->height()
);
TQImage shotImage = shot.convertToImage();
KImageEffect::flatten(shotImage, TQt::green, TQt::black);
@ -79,7 +79,7 @@ bool Confirmation::confirm(const Action::Type action, const TQString &delay)
.arg(ks_actions->getName(action))
.arg(selectedTime);
kapp->dcopClient()->suspend();
tdeApp->dcopClient()->suspend();
bool result = (KMessageBox::createKMessageBox(
dialog,
@ -91,7 +91,7 @@ bool Confirmation::confirm(const Action::Type action, const TQString &delay)
KMessageBox::Notify
) == KDialogBase::Yes);
kapp->dcopClient()->resume();
tdeApp->dcopClient()->resume();
return result;
}

@ -41,7 +41,7 @@ Links::Links(TQWidget *parent)
{
setSpacing(5);
int alignment = AlignVCenter;
alignment |= kapp->reverseLayout() ? AlignLeft : AlignRight;
alignment |= tdeApp->reverseLayout() ? AlignLeft : AlignRight;
// location
@ -63,7 +63,7 @@ Links::Links(TQWidget *parent)
l_type->setAlignment(alignment);
cb_type = new TQComboBox(w_type, "TQComboBox::cb_type");
cb_type->setFocusPolicy(StrongFocus);
cb_type->insertItem(kapp->miniIcon(), "KShutDown");
cb_type->insertItem(tdeApp->miniIcon(), "KShutDown");
// NOTE: slotAddRemoveLink()
cb_type->insertItem(SmallIcon("system-log-out"), i18n("Standard Logout Dialog"));

@ -117,8 +117,8 @@ private:
int KShutDownApplication::newInstance()
{
// autostart
if (kapp->isRestored()) {
TDEConfig *config = kapp->config();
if (tdeApp->isRestored()) {
TDEConfig *config = tdeApp->config();
config->setGroup("KShutDown");
if (!config->readBoolEntry("Autostart", false)) {
quit();
@ -133,7 +133,7 @@ int KShutDownApplication::newInstance()
// create main window (only one)
if (!ks_main) {
(void)new MMainWindow();
kapp->setMainWidget(ks_main);
tdeApp->setMainWidget(ks_main);
connect(
this, TQ_SIGNAL(aboutToQuit()),
ks_main, TQ_SLOT(deleteLater()));
@ -155,7 +155,7 @@ int KShutDownApplication::newInstance()
// gui mode
if ((retval == Mode_Visible) || (retval == Mode_Hidden)) {
if ((retval == Mode_Visible) && (!kapp->isRestored() || doShow)) {
if ((retval == Mode_Visible) && (!tdeApp->isRestored() || doShow)) {
ks_main->show();
if (doRaise)
ks_main->makeVisible();
@ -269,7 +269,7 @@ int KShutDownApplication::doProcessArgs(const TDECmdLineArgs *args) {
// standard logout dialog
if (args->isSet("standard")) {
kapp->requestShutDown(
tdeApp->requestShutDown(
TDEApplication::ShutdownConfirmYes,
TDEApplication::ShutdownTypeDefault,
TDEApplication::ShutdownModeDefault

@ -95,7 +95,7 @@ TQString MiscUtils::formatDateTime(const TQDateTime &dt)
bool MiscUtils::isRestricted(const TQString &key)
{
return !kapp->authorize("kshutdown_" + key);
return !tdeApp->authorize("kshutdown_" + key);
}
void MiscUtils::notifyUser(const int secs)
@ -210,7 +210,7 @@ bool MiscUtils::runShellCommand(const TQString &command, const TDEProcess::RunMo
}
void MiscUtils::setAutostart(const bool yes) {
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup("KShutDown");
config->writeEntry("Autostart", yes);
}

@ -67,7 +67,7 @@ MMainWindow::MMainWindow()
_delayType(DelayType_Now)
{
_instance = this;
connect(kapp, TQ_SIGNAL(aboutToQuit()), TQ_SLOT(slotAboutToQuit()));
connect(tdeApp, TQ_SIGNAL(aboutToQuit()), TQ_SLOT(slotAboutToQuit()));
// init date/time
dt_end = TQDateTime();
@ -83,11 +83,11 @@ MMainWindow::MMainWindow()
initMainMenu();
// init DCOP
DCOPClient *client = kapp->dcopClient();
client->registerAs(kapp->name(), false);
DCOPClient *client = tdeApp->dcopClient();
client->registerAs(tdeApp->name(), false);
client->setDefaultObject(objId()); // KShutdownIface
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup("Extras");
TQString extrasCommand = config->readEntry("Command", TQString::null);
TQString extrasDescription = config->readEntry("Description", TQString::null);
@ -123,7 +123,7 @@ MMainWindow::MMainWindow()
MMainWindow::~MMainWindow()
{
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup("Extras");
config->writeEntry("Command", ks_extras->fileToExecute());
config->writeEntry("Description", ks_extras->getActionDescription());
@ -891,7 +891,7 @@ void MMainWindow::slotUpdateTimeInfo()
bool MMainWindow::queryClose()
{
// exit
if (ks_actions->totalExit() || kapp->sessionSaving())
if (ks_actions->totalExit() || tdeApp->sessionSaving())
return true;
// MSystemTray::Always

@ -95,7 +95,7 @@ void ProgressBar::mousePressEvent(TQMouseEvent *e) {
// TODO: 2.0: size configuration
// show popup menu
TDEPopupMenu *popup = new TDEPopupMenu(this);
popup->insertTitle(kapp->miniIcon(), "KShutDown");
popup->insertTitle(tdeApp->miniIcon(), "KShutDown");
popup->insertItem(i18n("Hide"), this, TQ_SLOT(hide()));
popup->insertTitle("Position");
int topPositionItem = popup->insertItem(i18n("Top"), this, TQ_SLOT(slotSetTopPosition()));

@ -182,7 +182,7 @@ void SystemConfig::slotExecuted(TQListViewItem *item)
if (item == _shutdownAllowItem)
{
kapp->invokeBrowser("http://doc.gwos.org/index.php/NonRootShutdown");
tdeApp->invokeBrowser("http://doc.gwos.org/index.php/NonRootShutdown");
return;
}

@ -104,9 +104,9 @@ Lockout::Lockout(const TQString& configFile, TQWidget *parent)
config->setGroup("kshutdownlockout");
_transparent = config->readBoolEntry("Transparent", true);
*/
if (!kapp->dcopClient()->isAttached())
kapp->dcopClient()->attach();
connect(kapp, TQ_SIGNAL(iconChanged(int)), TQ_SLOT(slotIconChanged()));
if (!tdeApp->dcopClient()->isAttached())
tdeApp->dcopClient()->attach();
connect(tdeApp, TQ_SIGNAL(iconChanged(int)), TQ_SLOT(slotIconChanged()));
TQToolTip::add(
this,
@ -135,7 +135,7 @@ int Lockout::widthForHeight(int/* height*/) const
// private
void Lockout::callKShutDown(const TQCString &function) {
DCOPClient *client = kapp->dcopClient();
DCOPClient *client = tdeApp->dcopClient();
if (!client->isApplicationRegistered("kshutdown")) {
// run KShutDown
TDEProcess *p = new TDEProcess();

Loading…
Cancel
Save