From 39500a10a6c3a1403a55c282b0a453bd663d4c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 2 Jul 2013 19:41:37 +0200 Subject: Initial TDE conversion --- kbiff/Makefile.am | 2 +- kbiff/kbiff.cpp | 24 ++++++++++++------------ kbiff/kbiffcodec.cpp | 2 +- kbiff/kbiffcodec.h | 2 +- kbiff/kbiffmonitor.cpp | 2 +- kbiff/main.cpp | 22 +++++++++++----------- kbiff/notify.cpp | 6 +++--- kbiff/setupdlg.cpp | 36 ++++++++++++++++++------------------ kbiff/setupdlg.h | 10 +++++----- kbiff/status.cpp | 4 ++-- 10 files changed, 55 insertions(+), 55 deletions(-) (limited to 'kbiff') diff --git a/kbiff/Makefile.am b/kbiff/Makefile.am index b2f6603..1013ca1 100644 --- a/kbiff/Makefile.am +++ b/kbiff/Makefile.am @@ -12,7 +12,7 @@ SUBDIRS = pics # you can add here more. This one gets installed bin_PROGRAMS = lib_LTLIBRARIES = -kdeinit_LTLIBRARIES = kbiff.la +tdeinit_LTLIBRARIES = kbiff.la # Which sources should be compiled for kbiff. kbiff_la_SOURCES = setupdlg.cpp kbiff.cpp main.cpp kbiffmonitor.cpp \ diff --git a/kbiff/kbiff.cpp b/kbiff/kbiff.cpp index a87b891..185a8f0 100644 --- a/kbiff/kbiff.cpp +++ b/kbiff/kbiff.cpp @@ -11,15 +11,15 @@ #include #include -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include "setupdlg.h" #include "notify.h" @@ -198,7 +198,7 @@ bool KBiff::isDocked() const void KBiff::readSessionConfig() { - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); config->setGroup("KBiff"); @@ -354,7 +354,7 @@ void KBiff::saveYourself() { if (sessions) { - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); config->setGroup("KBiff"); config->writeEntry("Profile", profile); @@ -454,7 +454,7 @@ void KBiff::displayPixmap() pixmap_name = info.dirPath() + "/" + filename; } } - TQString filename = KGlobal::iconLoader()->iconPath( pixmap_name, KIcon::User ); + TQString filename = TDEGlobal::iconLoader()->iconPath( pixmap_name, TDEIcon::User ); TQFileInfo file(filename); // at this point, we have the file to display. so display it @@ -542,8 +542,8 @@ void KBiff::haveNewMail(const int num, const TQString& the_mailbox) notify_dlg->show(); // half-hearted attempt to center this - int x_pos = (KApplication::desktop()->width() - notify_dlg->width()) / 2; - int y_pos = (KApplication::desktop()->height() - notify_dlg->height()) / 2; + int x_pos = (TDEApplication::desktop()->width() - notify_dlg->width()) / 2; + int y_pos = (TDEApplication::desktop()->height() - notify_dlg->height()) / 2; notify_dlg->move(x_pos, y_pos); } } @@ -720,7 +720,7 @@ void KBiff::start() /////////////////////////////////////////////////////////////////////////// void KBiff::popupMenu() { - KPopupMenu *popup = new KPopupMenu(0, "popup"); + TDEPopupMenu *popup = new TDEPopupMenu(0, "popup"); popup->insertTitle(kapp->miniIcon(), profile); // if secure, disable everything but exit diff --git a/kbiff/kbiffcodec.cpp b/kbiff/kbiffcodec.cpp index 7ecdd35..d603936 100644 --- a/kbiff/kbiffcodec.cpp +++ b/kbiff/kbiffcodec.cpp @@ -1,5 +1,5 @@ /* - This is taken from kdmcodec.h from kdelibs/kdecore in KDE 2.2 + This is taken from tdmcodec.h from tdelibs/tdecore in KDE 2.2 ------------------------------------------------------------- Copyright (C) 2000-2001 Dawit Alemayehu diff --git a/kbiff/kbiffcodec.h b/kbiff/kbiffcodec.h index db29576..af2d66a 100644 --- a/kbiff/kbiffcodec.h +++ b/kbiff/kbiffcodec.h @@ -1,5 +1,5 @@ /* - This is taken from kdmcodec.h from kdelibs/kdecore in KDE 2.2 + This is taken from tdmcodec.h from tdelibs/tdecore in KDE 2.2 ------------------------------------------------------------- Copyright (C) 2000-2001 Dawit Alemayehu diff --git a/kbiff/kbiffmonitor.cpp b/kbiff/kbiffmonitor.cpp index 3a7066e..041ccb1 100644 --- a/kbiff/kbiffmonitor.cpp +++ b/kbiff/kbiffmonitor.cpp @@ -8,7 +8,7 @@ #include "kbiffmonitor.h" #include "kbiffmonitor.moc" -#include +#include #include #ifndef __STRICT_ANSI__ diff --git a/kbiff/main.cpp b/kbiff/main.cpp index df91743..0739461 100644 --- a/kbiff/main.cpp +++ b/kbiff/main.cpp @@ -1,17 +1,17 @@ #include "kbiff.h" #include "version.h" -#include +#include #include -#include -#include -#include +#include +#include +#include #include "setupdlg.h" static const char *description = I18N_NOOP("Full featured mail notification utility."); -static KCmdLineOptions option[] = +static TDECmdLineOptions option[] = { { "secure", I18N_NOOP("Run in secure mode"), 0 }, { "profile ", I18N_NOOP("Use 'profile'"), 0 }, @@ -20,14 +20,14 @@ static KCmdLineOptions option[] = extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) { - KAboutData aboutData( "kbiff", I18N_NOOP("KBiff"), - kbiff_version, description, KAboutData::License_GPL, + TDEAboutData aboutData( "kbiff", I18N_NOOP("KBiff"), + kbiff_version, description, TDEAboutData::License_GPL, "(c) 1998-2008, Kurt Granroth"); aboutData.addAuthor("Kurt Granroth",0, "granroth@kde.org"); - KCmdLineArgs::init( argc, argv, &aboutData ); - KCmdLineArgs::addCmdLineOptions(option); + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions(option); - KApplication app; + TDEApplication app; KBiff kbiff(app.dcopClient()); KBiffSetup* setup = 0; bool is_secure = false; @@ -36,7 +36,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) app.setMainWidget(&kbiff); - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); is_secure = args->isSet("secure"); diff --git a/kbiff/notify.cpp b/kbiff/notify.cpp index 0f1de07..e933b34 100644 --- a/kbiff/notify.cpp +++ b/kbiff/notify.cpp @@ -14,11 +14,11 @@ #include #include -#include +#include #include -#include +#include #include -#include +#include KBiffNotify::KBiffNotify(TQWidget *parent_, const int num_new, const TQString& mailbx) diff --git a/kbiff/setupdlg.cpp b/kbiff/setupdlg.cpp index ff7300d..6797513 100644 --- a/kbiff/setupdlg.cpp +++ b/kbiff/setupdlg.cpp @@ -29,19 +29,19 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include "version.h" @@ -563,36 +563,36 @@ KBiffGeneralTab::KBiffGeneralTab(const TQString& profile_, TQWidget *parent_) // "stopped" pixmap button TQLabel* stopped_label = new TQLabel(i18n("&Stopped:"), icons_groupbox); - buttonStopped = new KIconButton(icons_groupbox); + buttonStopped = new TDEIconButton(icons_groupbox); buttonStopped->setFixedSize(50, 50); - buttonStopped->setIconType(KIcon::User, KIcon::Any, true); + buttonStopped->setIconType(TDEIcon::User, TDEIcon::Any, true); stopped_label->setBuddy(buttonStopped); // "no mailbox" pixmap button TQLabel* noconn_label = new TQLabel(i18n("No Mail&box:"), icons_groupbox); - buttonNoConn = new KIconButton(icons_groupbox); + buttonNoConn = new TDEIconButton(icons_groupbox); buttonNoConn->setFixedSize(50, 50); - buttonNoConn->setIconType(KIcon::User, KIcon::Any, true); + buttonNoConn->setIconType(TDEIcon::User, TDEIcon::Any, true); noconn_label->setBuddy(buttonNoConn); // "no mail" pixmap button TQLabel* nomail_label = new TQLabel(i18n("No M&ail:"), icons_groupbox); - buttonNoMail = new KIconButton(icons_groupbox); - buttonNoMail->setIconType(KIcon::User, KIcon::Any, true); + buttonNoMail = new TDEIconButton(icons_groupbox); + buttonNoMail->setIconType(TDEIcon::User, TDEIcon::Any, true); buttonNoMail->setFixedSize(50, 50); nomail_label->setBuddy(buttonNoMail); // "old mail" pixmap button TQLabel* oldmail_label = new TQLabel(i18n("O&ld Mail:"), icons_groupbox); - buttonOldMail = new KIconButton(icons_groupbox); - buttonOldMail->setIconType(KIcon::User, KIcon::Any, true); + buttonOldMail = new TDEIconButton(icons_groupbox); + buttonOldMail->setIconType(TDEIcon::User, TDEIcon::Any, true); buttonOldMail->setFixedSize(50, 50); oldmail_label->setBuddy(buttonOldMail); // "new mail" pixmap button TQLabel* newmail_label = new TQLabel(i18n("N&ew Mail:"), icons_groupbox); - buttonNewMail = new KIconButton(icons_groupbox); - buttonNewMail->setIconType(KIcon::User, KIcon::Any, true); + buttonNewMail = new TDEIconButton(icons_groupbox); + buttonNewMail->setIconType(TDEIcon::User, TDEIcon::Any, true); buttonNewMail->setFixedSize(50, 50); newmail_label->setBuddy(buttonNewMail); @@ -757,7 +757,7 @@ static TQString justIconName(const TQString& icon_name) return icon_name; // now we see if we can load based just on the basename - TQPixmap icon = KGlobal::iconLoader()->loadIcon( info.baseName(), KIcon::User ); + TQPixmap icon = TDEGlobal::iconLoader()->loadIcon( info.baseName(), TDEIcon::User ); // if it's null, then it's in a non-standard path so we must use an // absolute path. no need to go further @@ -766,8 +766,8 @@ static TQString justIconName(const TQString& icon_name) // now we know that the icon loader can find it.. but is it the same // one as the one the user picked? - if ( KGlobal::iconLoader()->iconPath( info.baseName(), KIcon::User ) != - KGlobal::iconLoader()->iconPath( icon_name, KIcon::User ) ) + if ( TDEGlobal::iconLoader()->iconPath( info.baseName(), TDEIcon::User ) != + TDEGlobal::iconLoader()->iconPath( icon_name, TDEIcon::User ) ) return icon_name; // FINALLY done! if we got this far, then we know that the icon diff --git a/kbiff/setupdlg.h b/kbiff/setupdlg.h index 107300a..cf30e52 100644 --- a/kbiff/setupdlg.h +++ b/kbiff/setupdlg.h @@ -132,11 +132,11 @@ private: TQCheckBox* checkNoSession; TQCheckBox* checkNoStartup; - KIconButton *buttonNoMail; - KIconButton *buttonOldMail; - KIconButton *buttonNewMail; - KIconButton *buttonNoConn; - KIconButton *buttonStopped; + TDEIconButton *buttonNoMail; + TDEIconButton *buttonOldMail; + TDEIconButton *buttonNewMail; + TDEIconButton *buttonNoConn; + TDEIconButton *buttonStopped; }; class KBiffNewMailTab : public TQWidget diff --git a/kbiff/status.cpp b/kbiff/status.cpp index a468a5a..f752898 100644 --- a/kbiff/status.cpp +++ b/kbiff/status.cpp @@ -9,7 +9,7 @@ #include "status.moc" #include -#include +#include #include #include @@ -77,7 +77,7 @@ void KBiffStatus::updateListView(const KBiffStatusList& list) void KBiffStatus::popup(const TQPoint& pos_) { - TQDesktopWidget *desktop = KApplication::desktop(); + TQDesktopWidget *desktop = TDEApplication::desktop(); int cx = pos_.x(), cy = pos_.y(); // for some reason, the width and height are incorrect until -- cgit v1.2.3