summaryrefslogtreecommitdiffstats
path: root/starter/menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'starter/menu.cpp')
-rw-r--r--starter/menu.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/starter/menu.cpp b/starter/menu.cpp
index 5e33a71..cae0206 100644
--- a/starter/menu.cpp
+++ b/starter/menu.cpp
@@ -2,7 +2,7 @@
#include <tqcursor.h>
#include <tqdatetime.h>
#include <tqdir.h>
-#include <kpopupmenu.h>
+#include <tdepopupmenu.h>
#include <tqobjectlist.h>
#include <tqpainter.h>
#include <tqptrlist.h>
@@ -10,31 +10,31 @@
#include <tqstringlist.h>
#include <tqvbox.h>
#include <dcopclient.h>
-#include <kapplication.h>
-#include <kconfig.h>
+#include <tdeapplication.h>
+#include <tdeconfig.h>
#include <kcombobox.h>
-#include <kdeversion.h>
+#include <tdeversion.h>
#include <kurl.h>
-#include <kfileitem.h>
+#include <tdefileitem.h>
#include <kicondialog.h>
#include <kiconloader.h>
#include <kkeybutton.h>
-#include <klistbox.h>
-#include <klocale.h>
-#include <kmessagebox.h>
+#include <tdelistbox.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
#include <kpixmapeffect.h>
#include <kprocess.h>
#include <kurifilter.h>
#include <kurl.h>
#include <krun.h>
#include <kservice.h>
-#include <kshortcut.h>
+#include <tdeshortcut.h>
#include <ksqueezedtextlabel.h>
#include <kstandarddirs.h>
-#include <ksycocaentry.h>
+#include <tdesycocaentry.h>
#include <ktextedit.h>
#include <kurlrequester.h>
-#include <kwin.h>
+#include <twin.h>
//WARNING: THIS IS NOT PORTABLE!
// #include <X11/Xlib.h>
// #include <X11/Xatom.h>
@@ -63,7 +63,7 @@
static TQColor commentColor;
static TQColor infoColor;
-static KConfig *config;
+static TDEConfig *config;
static bool useKTTS;
@@ -92,8 +92,8 @@ StartMenuButton::StartMenuButton( int size, TQString icon, TQString title, TQStr
{
setBackgroundOrigin(TQWidget::ParentOrigin);
int bigSize = _BIGSIZE_(size);
- m_pix = KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size);
- m_hoverPix = KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, bigSize);
+ m_pix = TDEGlobal::iconLoader()->loadIcon(icon, TDEIcon::Desktop, size);
+ m_hoverPix = TDEGlobal::iconLoader()->loadIcon(icon, TDEIcon::Desktop, bigSize);
m_pixmapLabel = new TQLabel(this, name);
m_pixmapLabel->setPixmap(m_pix);
m_pixmapLabel->setBackgroundOrigin(TQWidget::AncestorOrigin);
@@ -143,8 +143,8 @@ void StartMenuButton::reloadIcon(int size)
if (m_orientation == Status)
setFixedSize(bigSize+2,bigSize+2);
m_pixmapLabel->setFixedSize(bigSize+2,bigSize+2);
- m_pix = KGlobal::iconLoader()->loadIcon(m_icon, KIcon::Desktop, size);
- m_hoverPix = KGlobal::iconLoader()->loadIcon(m_icon, KIcon::Desktop, bigSize);
+ m_pix = TDEGlobal::iconLoader()->loadIcon(m_icon, TDEIcon::Desktop, size);
+ m_hoverPix = TDEGlobal::iconLoader()->loadIcon(m_icon, TDEIcon::Desktop, bigSize);
m_pixmapLabel->setPixmap(m_pix);
}
@@ -247,8 +247,8 @@ void StartMenuButton::edit()
m_icon = ((Panel*)parentWidget())->linkConfigDialog->icon->icon();
m_title = ((Panel*)parentWidget())->linkConfigDialog->title->text();
int bigSize = _BIGSIZE_(((Panel*)parentWidget())->_size);
- m_pix = KGlobal::iconLoader()->loadIcon(m_icon, KIcon::Desktop, ((Panel*)parentWidget())->_size);
- m_hoverPix = KGlobal::iconLoader()->loadIcon(m_icon, KIcon::Desktop, bigSize);
+ m_pix = TDEGlobal::iconLoader()->loadIcon(m_icon, TDEIcon::Desktop, ((Panel*)parentWidget())->_size);
+ m_hoverPix = TDEGlobal::iconLoader()->loadIcon(m_icon, TDEIcon::Desktop, bigSize);
m_pixmapLabel->setPixmap(m_pix);
if (m_orientation == Horizontal || m_orientation == Vertical)
m_titleLabel->setText("<qt><b>" + m_title + "</b></qt>");
@@ -337,8 +337,8 @@ StartMenuEntry::StartMenuEntry(KService * service, TQString relPath, int size, b
m_service = service;
exec = m_service->exec();
display = false;
- m_pix = m_service->pixmap( KIcon::Desktop, size );
- m_hoverPix = m_service->pixmap( KIcon::Desktop, bigSize );
+ m_pix = m_service->pixmap( TDEIcon::Desktop, size );
+ m_hoverPix = m_service->pixmap( TDEIcon::Desktop, bigSize );
m_titleLabel = new TQLabel("<qt><h3>" + m_service->name() + "</h3></qt>", this);
m_titleLabel->setTextFormat( TQt::RichText );
m_commentLabel = new TQLabel(m_service->comment(), this);
@@ -366,8 +366,8 @@ void StartMenuEntry::reloadIcon(int size)
{
int bigSize = _BIGSIZE_(size);
m_pixmapLabel->setFixedSize(bigSize+2,bigSize+2);
- m_pix = m_service->pixmap( KIcon::Desktop, size );
- m_hoverPix = m_service->pixmap( KIcon::Desktop, bigSize );
+ m_pix = m_service->pixmap( TDEIcon::Desktop, size );
+ m_hoverPix = m_service->pixmap( TDEIcon::Desktop, bigSize );
m_pixmapLabel->setPixmap(m_pix);
}
@@ -494,26 +494,26 @@ void StartMenuEntry::focusInEvent ( TQFocusEvent * )
TQString text = i18n("for TTS output, telling which item is focussed (keyboard) and than reads the comment", "%1 focussed. %2").arg(m_titleLabel->text()).arg(m_commentLabel->text());
emit sayText(text);
}
- setPaletteBackgroundColor(KGlobalSettings::highlightColor());
- m_commentLabel->setPaletteBackgroundColor(KGlobalSettings::highlightColor());
- setPaletteForegroundColor(KGlobalSettings::highlightedTextColor());
- m_commentLabel->setPaletteForegroundColor(KGlobalSettings::highlightedTextColor());
+ setPaletteBackgroundColor(TDEGlobalSettings::highlightColor());
+ m_commentLabel->setPaletteBackgroundColor(TDEGlobalSettings::highlightColor());
+ setPaletteForegroundColor(TDEGlobalSettings::highlightedTextColor());
+ m_commentLabel->setPaletteForegroundColor(TDEGlobalSettings::highlightedTextColor());
}
void StartMenuEntry::focusOutEvent ( TQFocusEvent * )
{
emit unhovered();
isCurrent = false;
- setPaletteBackgroundColor(KGlobalSettings::baseColor());
- m_commentLabel->setPaletteBackgroundColor(KGlobalSettings::baseColor());
+ setPaletteBackgroundColor(TDEGlobalSettings::baseColor());
+ m_commentLabel->setPaletteBackgroundColor(TDEGlobalSettings::baseColor());
if (hasMouse())
{
- setPaletteForegroundColor(KGlobalSettings::highlightColor());
- m_commentLabel->setPaletteForegroundColor(KGlobalSettings::highlightColor());
+ setPaletteForegroundColor(TDEGlobalSettings::highlightColor());
+ m_commentLabel->setPaletteForegroundColor(TDEGlobalSettings::highlightColor());
}
else
{
- setPaletteForegroundColor(KGlobalSettings::textColor());
+ setPaletteForegroundColor(TDEGlobalSettings::textColor());
m_commentLabel->setPaletteForegroundColor(commentColor);
}
}
@@ -528,8 +528,8 @@ void StartMenuEntry::enterEvent( TQEvent * )
}
if (!isCurrent)
{
- setPaletteForegroundColor(KGlobalSettings::highlightColor());
- m_commentLabel->setPaletteForegroundColor(KGlobalSettings::highlightColor());
+ setPaletteForegroundColor(TDEGlobalSettings::highlightColor());
+ m_commentLabel->setPaletteForegroundColor(TDEGlobalSettings::highlightColor());
}
m_pixmapLabel->setPixmap(m_hoverPix);
}
@@ -539,7 +539,7 @@ void StartMenuEntry::leaveEvent( TQEvent * )
emit unhovered();
if (!isCurrent)
{
- setPaletteForegroundColor(KGlobalSettings::textColor());
+ setPaletteForegroundColor(TDEGlobalSettings::textColor());
m_commentLabel->setPaletteForegroundColor(commentColor);
}
m_pixmapLabel->setPixmap(m_pix);
@@ -550,7 +550,7 @@ void StartMenuEntry::execute()
usage++;
lastUse = TQDate::currentDate();
rank = 8 + usage;
- KApplication::startServiceByDesktopPath(m_service->desktopEntryPath(), TQStringList(), 0, 0, 0, "", true);
+ TDEApplication::startServiceByDesktopPath(m_service->desktopEntryPath(), TQStringList(), 0, 0, 0, "", true);
emit executed();
}
@@ -558,7 +558,7 @@ Panel::Panel(int size, TQWidget * parent, const char * name) : TQWidget(parent,
{
linkConfigDialog = new LinkConfig();
setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
-// setPaletteBackgroundColor(KGlobalSettings::highlightColor());
+// setPaletteBackgroundColor(TDEGlobalSettings::highlightColor());
setAcceptDrops(true);
config->setGroup("Panel");
TQStringList commands = config->readListEntry("Commands", '§');
@@ -582,7 +582,7 @@ Panel::Panel(int size, TQWidget * parent, const char * name) : TQWidget(parent,
}
}
-void Panel::save(KConfig *config)
+void Panel::save(TDEConfig *config)
{
config->setGroup("Panel");
TQObjectList *kids = const_cast<TQObjectList*>(children());
@@ -1087,7 +1087,7 @@ AppList::AppList(int size, TQWidget * parent) : TQScrollView(parent), _size(size
connect (((TQObject*)configDialog_->buttonCancel), SIGNAL(clicked()), this, SLOT(unblockPopup()));
m_widget = new TQFrame(viewport());
m_widget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
- m_widget->setPaletteBackgroundColor(KGlobalSettings::baseColor());
+ m_widget->setPaletteBackgroundColor(TDEGlobalSettings::baseColor());
addChild(m_widget,0,0);
setResizePolicy(TQScrollView::AutoOneFit);
m_widget->show();
@@ -1097,8 +1097,8 @@ AppList::AppList(int size, TQWidget * parent) : TQScrollView(parent), _size(size
infoLabel->setTextFormat( TQt::RichText );
infoLayout->addWidget(infoLabel);
m_VLayout = new TQVBoxLayout(infoLayout);
- m_iconLoader = KGlobal::iconLoader();
- m_popup = new KPopupMenu(this);
+ m_iconLoader = TDEGlobal::iconLoader();
+ m_popup = new TDEPopupMenu(this);
m_popup->insertItem(i18n("Edit Entry"), this, SLOT(editDialog()));
m_popup->insertItem(i18n("Remove Entry"), this, SLOT(removeEntry()));
m_popup->insertSeparator();
@@ -1149,7 +1149,7 @@ void AppList::addDialog()
configDialog_->startAsUser->setChecked( false );
configDialog_->username->clear();
configDialog_->workingDir->clear();
- configDialog_->shortcut->setShortcut(KShortcut::null(), false);
+ configDialog_->shortcut->setShortcut(TDEShortcut::null(), false);
configDialog_->setCaption ( i18n("New Entry") );
((TQWidget*)(configDialog_->extendedGroup))->hide();
@@ -1250,7 +1250,7 @@ void AppList::editEntry()
sme->lastUse = lu;
sme->usage = u;
sme->rank = 8 + u - lu.daysTo(TQDate::currentDate());
- if (!config) config = new KConfig("bStarter", false, false);
+ if (!config) config = new TDEConfig("bStarter", false, false);
config->setGroup("Statistics");
sme->saveStats();
delete config;
@@ -1262,7 +1262,7 @@ void AppList::editEntry()
void AppList::writeEntry(TQString path, bool hidden )
{
- KConfig *config = new KConfig(path);
+ TDEConfig *config = new TDEConfig(path);
config->setDesktopGroup();
if (!configDialog_->description->text().isEmpty())
@@ -1297,9 +1297,9 @@ void AppList::writeEntry(TQString path, bool hidden )
config->writeEntry("Type", "Application");
if (configDialog_->startAsUser->isChecked())
{
- config->writeEntry("X-KDE-SubstituteUID", true);
+ config->writeEntry("X-TDE-SubstituteUID", true);
if (!configDialog_->username->text().isEmpty())
- config->writeEntry("X-KDE-Username", configDialog_->username->text());
+ config->writeEntry("X-TDE-Username", configDialog_->username->text());
}
delete config;
@@ -1364,14 +1364,14 @@ void AppList::init()
insertGroup(m_root, captions, paths);
paths.sort();
configDialog_->category->insertStringList(paths);
- configDialog_->category->completionObject()->setCompletionMode( KGlobalSettings::CompletionPopupAuto );
+ configDialog_->category->completionObject()->setCompletionMode( TDEGlobalSettings::CompletionPopupAuto );
configDialog_->category->completionObject()->insertItems(paths);
// if (config) { delete config; config = 0L; }
sort();
reset();
}
-void AppList::save(KConfig *config)
+void AppList::save(TDEConfig *config)
{
config->setGroup("Statistics");
TQPtrListIterator<StartMenuEntry> it(entryList);
@@ -1714,7 +1714,7 @@ StartMenu::StartMenu( int size, TQWidget * parent, WFlags f ) : TQWidget(parent,
{
m_panelPos = StartMenu::Nowhere;
panelLayout = new TQGridLayout ( this, 3, 3 );
- config = new KConfig("bStarter", true, false);
+ config = new TDEConfig("bStarter", true, false);
config->setGroup("Shell");
history = config->readListEntry("History");
config->setGroup("Settings");
@@ -1722,8 +1722,8 @@ StartMenu::StartMenu( int size, TQWidget * parent, WFlags f ) : TQWidget(parent,
m_spokenText = 0;
_filterData = new KURIFilterData();
int r,g,b,r2,g2,b2;
- KGlobalSettings::baseColor().getRgb(&r,&g,&b);
- KGlobalSettings::textColor().getRgb(&r2,&g2,&b2);
+ TDEGlobalSettings::baseColor().getRgb(&r,&g,&b);
+ TDEGlobalSettings::textColor().getRgb(&r2,&g2,&b2);
commentColor.setRgb((r+r2)/2,(g+g2)/2,(b+b2)/2);
infoColor.setRgb((3*r+r2)/4,(3*g+g2)/4,(3*b+b2)/4);
currentHistoryItem = history.end();
@@ -1732,7 +1732,7 @@ StartMenu::StartMenu( int size, TQWidget * parent, WFlags f ) : TQWidget(parent,
TQHBoxLayout *headerLayout = new TQHBoxLayout(header, 5, 3);
userButton = new StartMenuButton(_size, "folder_home", TQString(getenv("USER")), "~", StartMenuButton::Status, header, "_B_ALI_HEADER");
headerLayout->addWidget(userButton);
- header->setPaletteBackgroundColor(KGlobalSettings::highlightColor());
+ header->setPaletteBackgroundColor(TDEGlobalSettings::highlightColor());
connect (userButton, SIGNAL(pressed(const TQString &)), this, SLOT(execute(const TQString &)));
connect (userButton, SIGNAL(pressed(const TQString &)), this, SLOT(close()));
TQBoxLayout *mainLayout = new TQVBoxLayout();
@@ -1754,7 +1754,7 @@ StartMenu::StartMenu( int size, TQWidget * parent, WFlags f ) : TQWidget(parent,
categoryCombo->setEditable ( true );
categoryCombo->setInsertionPolicy(TQComboBox::NoInsertion);
searchLine->installEventFilter(this);
- searchLine->setCompletionMode(KGlobalSettings::CompletionAuto);
+ searchLine->setCompletionMode(TDEGlobalSettings::CompletionAuto);
config->setGroup("Shortcuts");
// read shortcuts...
TQStringList cuts = config->readListEntry ("Shortcuts", ',');
@@ -1813,7 +1813,7 @@ StartMenu::StartMenu( int size, TQWidget * parent, WFlags f ) : TQWidget(parent,
void StartMenu::save()
{
- config = new KConfig("bStarter", false, false);
+ config = new TDEConfig("bStarter", false, false);
config->setGroup("Shell");
TQStringList lst;
for ( TQStringList::Iterator it = history.begin(); it != history.end(); ++it )
@@ -2050,7 +2050,7 @@ void StartMenu::execute(const TQString& command)
_filterData->setData( command.stripWhiteSpace() );
TQStringList filters;
- filters << "kurisearchfilter" << "kshorturifilter";
+ filters << "kurisearchfilter" << "tdeshorturifilter";
KURIFilter::self()->filterURI( *(_filterData), filters );
TQString cmd = (_filterData->uri().isLocalFile() ? _filterData->uri().path():_filterData->uri().url());