summaryrefslogtreecommitdiffstats
path: root/src/tastymenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tastymenu.cpp')
-rw-r--r--src/tastymenu.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/tastymenu.cpp b/src/tastymenu.cpp
index 3dc3e7e..a581123 100644
--- a/src/tastymenu.cpp
+++ b/src/tastymenu.cpp
@@ -20,15 +20,15 @@
***************************************************************************/
-#include <kglobal.h>
-#include <klocale.h>
-#include <kconfig.h>
-#include <kapplication.h>
-#include <kmessagebox.h>
-#include <kconfigdialog.h>
-#include <kaboutdata.h>
-#include <kaboutapplication.h>
-#include <kpopupmenu.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
+#include <tdeconfig.h>
+#include <tdeapplication.h>
+#include <tdemessagebox.h>
+#include <tdeconfigdialog.h>
+#include <tdeaboutdata.h>
+#include <tdeaboutapplication.h>
+#include <tdepopupmenu.h>
#include <kkeydialog.h>
#include <kuser.h>
#include <kstandarddirs.h>
@@ -51,7 +51,7 @@ TastyMenu::TastyMenu(const TQString& configFile, Type type, int actions, TQWidge
prefSkel = new Prefs(kConfig);
prefSkel->readConfig();
- kickerConf = KGlobal::config();
+ kickerConf = TDEGlobal::config();
kickerConf->setGroup("buttons");
_showBigToolTip = kickerConf->readBoolEntry("EnableIconZoom", true);
@@ -80,12 +80,12 @@ TastyMenu::TastyMenu(const TQString& configFile, Type type, int actions, TQWidge
if( !_toolTipTitle.isEmpty() )
menuTip->setTitle(_toolTipTitle);
- if( height() >= KIcon::SizeMedium )
+ if( height() >= TDEIcon::SizeMedium )
button->setUsesBigPixmap(true);
else
button->setUsesBigPixmap(false);
- iconLoader = KGlobal::iconLoader();
+ iconLoader = TDEGlobal::iconLoader();
loadMenuButtonIcon();
@@ -108,7 +108,7 @@ TastyMenu::TastyMenu(const TQString& configFile, Type type, int actions, TQWidge
TastyMenu::~TastyMenu()
{
//delete prefSkel;
- KGlobal::locale()->removeCatalogue("tastymenu");
+ TDEGlobal::locale()->removeCatalogue("tastymenu");
}
void TastyMenu::loadMenuButtonIcon()
@@ -129,13 +129,13 @@ void TastyMenu::loadMenuButtonIcon()
else if(position() == pLeft || position() == pRight)
_iconsize = width();
- TQPixmap btnPixmap(iconLoader->loadIcon(_menuButtonIcon, KIcon::Panel, _iconsize));
+ TQPixmap btnPixmap(iconLoader->loadIcon(_menuButtonIcon, TDEIcon::Panel, _iconsize));
if( !btnPixmap.isNull() )
button->setIconSet(btnPixmap);
else
{
kdDebug() << "Failed to load custom icon" << endl;
- button->setIconSet(iconLoader->loadIcon("kmenu", KIcon::Panel, height()));
+ button->setIconSet(iconLoader->loadIcon("kmenu", TDEIcon::Panel, height()));
}
}
@@ -180,11 +180,11 @@ void TastyMenu::clickSlot()
void TastyMenu::about()
{
- KAboutData data("tastymenu",
+ TDEAboutData data("tastymenu",
I18N_NOOP("Tasty Menu"),
"1.0.6",
- I18N_NOOP("KMenu replacement"),
- KAboutData::License_LGPL_V2,
+ I18N_NOOP("TMenu replacement"),
+ TDEAboutData::License_LGPL_V2,
"(c) 2006-2007, Marco Martin",0,0,"[email protected]");
data.addAuthor("Marco Martin",
@@ -225,7 +225,7 @@ void TastyMenu::about()
data.addCredit("Oswald Buddenhagen and Stephan Kulow",
- I18N_NOOP("For the Switch user code from KDM"),
+ I18N_NOOP("For the Switch user code from TDM"),
data.addCredit("The whole KBFX team",
@@ -236,34 +236,34 @@ void TastyMenu::about()
I18N_NOOP("For some code taken from Amarok's statistics list view"),
- KIconLoader *iconLoader = KGlobal::iconLoader();
- data.setProgramLogo(iconLoader->loadIcon("kmenu", KIcon::Panel).convertToImage());
+ TDEIconLoader *iconLoader = TDEGlobal::iconLoader();
+ data.setProgramLogo(iconLoader->loadIcon("kmenu", TDEIcon::Panel).convertToImage());
- KAboutApplication dialog(&data);
+ TDEAboutApplication dialog(&data);
dialog.exec();
}
void TastyMenu::help()
{
- KApplication::kdeinitExec("khelpcenter", "help:/tastymenu");
+ TDEApplication::tdeinitExec("khelpcenter", "help:/tastymenu");
}
void TastyMenu::preferences()
{
- if(KConfigDialog::showDialog("settings"))
+ if(TDEConfigDialog::showDialog("settings"))
return;
Appearance *appearanceDialog = new Appearance(0, "appearance" );
Behaviour *behaviourDialog = new Behaviour(0, "behaviour" );
- KConfigDialog *dialog = new KConfigDialog(this, "settings", prefSkel,
+ TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", prefSkel,
KDialogBase::Tabbed,
- KConfigDialog::Default|
- KConfigDialog::Ok|
- KConfigDialog::Apply|
- KConfigDialog::Cancel );
+ TDEConfigDialog::Default|
+ TDEConfigDialog::Ok|
+ TDEConfigDialog::Apply|
+ TDEConfigDialog::Cancel );
dialog->addPage(appearanceDialog, i18n("Appearance"), "appearance" );
dialog->addPage(behaviourDialog, i18n("Behaviour"), "behaviour" );
connect( dialog, SIGNAL(settingsChanged()),
@@ -273,7 +273,7 @@ void TastyMenu::preferences()
void TastyMenu::setGlobalAccel( bool global )
{
- globalAccel = new KGlobalAccel(this);
+ globalAccel = new TDEGlobalAccel(this);
globalAccel->insert("Toggle Tasty Menu", i18n("Toggle Tasty Menu"),
i18n("Toggle Tasty Menu"),
0, 0, this, SLOT(clickSlot()));
@@ -284,14 +284,14 @@ void TastyMenu::setGlobalAccel( bool global )
if( global )
{
if( !kickerConf )
- kickerConf = KGlobal::config();
+ kickerConf = TDEGlobal::config();
kickerConf->setGroup("Global Shortcuts");
TQString kmenuShortcut = kickerConf->readEntry("Popup Launch Menu", "default(Alt+F1)");
if( kmenuShortcut=="none" )
return;
TQString tastyMenuShortcut = kickerConf->readEntry("Toggle Tasty Menu", "");
- KShortcut shortCutKey(tastyMenuShortcut);
+ TDEShortcut shortCutKey(tastyMenuShortcut);
kickerConf->writeEntry("Popup Launch Menu", "none");
kickerConf->writeEntry("Toggle Tasty Menu", kmenuShortcut);
kickerConf->sync();
@@ -300,7 +300,7 @@ void TastyMenu::setGlobalAccel( bool global )
else
{
if( !kickerConf )
- kickerConf = KGlobal::config();
+ kickerConf = TDEGlobal::config();
kickerConf->setGroup("Global Shortcuts");
kickerConf->deleteEntry("Popup Launch Menu");
kickerConf->sync();
@@ -396,7 +396,7 @@ void TastyMenu::resizeEvent(TQResizeEvent *e)
button->setFixedHeight(newHeight);
button->setFixedWidth(e->size().width());
- if( newHeight >= KIcon::SizeMedium )
+ if( newHeight >= TDEIcon::SizeMedium )
button->setUsesBigPixmap(true);
else
button->setUsesBigPixmap(false);
@@ -411,7 +411,7 @@ void TastyMenu::mousePressEvent(TQMouseEvent *e)
if(e->button()==RightButton)
{
- KPopupMenu menu(this);
+ TDEPopupMenu menu(this);
menu.insertTitle("Tasty Menu");
menu.insertItem(SmallIcon("kmenu"), i18n("&About"), 1);
@@ -484,7 +484,7 @@ extern "C"
{
KPanelApplet* init( TQWidget *parent, const TQString& configFile)
{
- KGlobal::locale()->insertCatalogue("tastymenu");
+ TDEGlobal::locale()->insertCatalogue("tastymenu");
return new TastyMenu(configFile, KPanelApplet::Normal,
KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences,
parent, "tastymenu");