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 /starter | |
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 'starter')
-rw-r--r-- | starter/Makefile.am | 2 | ||||
-rw-r--r-- | starter/config.ui | 2 | ||||
-rw-r--r-- | starter/linkconfig.ui | 2 | ||||
-rw-r--r-- | starter/menu.cpp | 108 | ||||
-rw-r--r-- | starter/menu.h | 14 | ||||
-rw-r--r-- | starter/starter.cpp | 42 | ||||
-rw-r--r-- | starter/starter.desktop | 4 | ||||
-rw-r--r-- | starter/starter.h | 10 |
8 files changed, 92 insertions, 92 deletions
diff --git a/starter/Makefile.am b/starter/Makefile.am index 6fee0e8..bf43641 100644 --- a/starter/Makefile.am +++ b/starter/Makefile.am @@ -6,7 +6,7 @@ lib_LTLIBRARIES = libbaghirastarter.la libbaghirastarter_la_SOURCES = baghiralinkdrag.cpp menu.cpp starter.cpp starterconfig.ui starterhelp.ui config.ui help.ui linkconfig.ui starteriface.skel libbaghirastarter_la_LDFLAGS = -module -avoid-version $(all_libraries) -libbaghirastarter_la_LIBADD = -lXtst $(LIB_KDEUI) +libbaghirastarter_la_LIBADD = -lXtst $(LIB_TDEUI) starter_DATA = starter.desktop starterdir = $(kde_datadir)/kicker/applets diff --git a/starter/config.ui b/starter/config.ui index 6fb994d..279974e 100644 --- a/starter/config.ui +++ b/starter/config.ui @@ -176,7 +176,7 @@ <cstring>genericName</cstring> </property> </widget> - <widget class="KIconButton" row="0" column="2" rowspan="2" colspan="1"> + <widget class="TDEIconButton" row="0" column="2" rowspan="2" colspan="1"> <property name="name"> <cstring>iconButton</cstring> </property> diff --git a/starter/linkconfig.ui b/starter/linkconfig.ui index 8f949f6..4da1c42 100644 --- a/starter/linkconfig.ui +++ b/starter/linkconfig.ui @@ -80,7 +80,7 @@ </widget> </hbox> </widget> - <widget class="KIconButton" row="0" column="1"> + <widget class="TDEIconButton" row="0" column="1"> <property name="name"> <cstring>icon</cstring> </property> 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()); diff --git a/starter/menu.h b/starter/menu.h index c858a07..98a6e63 100644 --- a/starter/menu.h +++ b/starter/menu.h @@ -19,7 +19,7 @@ #include <kservicegroup.h> #include "mykey.h" -class KIconLoader; +class TDEIconLoader; class TQPaintEvent; class TQMouseEvent; class TQEvent; @@ -27,7 +27,7 @@ class TQPixmap; class TQVBoxLayout; class TQComboBox; class StartMenuButton; -class KConfig; +class TDEConfig; class LinkConfig; class Panel : public TQWidget//TQScrollView @@ -42,7 +42,7 @@ public: void setOrientation ( Orientation o ); // void addItem ( TQWidget *w ); StartMenuButton* addIcon ( TQString icon, TQString title, TQString command, TQPoint pt = TQPoint(-1,-1) ); - void save(KConfig* config); + void save(TDEConfig* config); void repositionIcon ( StartMenuButton* bt, TQPoint pt ); void ensureVisible(TQRect & rect); void reloadIcons(int size); @@ -176,7 +176,7 @@ signals: void executed(); }; -class KPopupMenu; +class TDEPopupMenu; class ConfigDialog; class HelpDialog; @@ -210,21 +210,21 @@ public slots: protected: TQStringList categories; int favItemAmount; - void save(KConfig* config); + void save(TDEConfig* config); void mouseReleaseEvent ( TQMouseEvent * e ); void windowActivationChange ( bool oldActive ); private: void init(); void insertGroup(KServiceGroup *g, TQStringList & captions, TQStringList & paths); KServiceGroup::Ptr m_root; - KIconLoader *m_iconLoader; + TDEIconLoader *m_iconLoader; TQLabel *infoLabel; TQVBoxLayout * infoLayout; TQVBoxLayout * m_VLayout; TQFrame * m_widget; bool newbie; TQStringList neewbieApps; - KPopupMenu *m_popup; + TDEPopupMenu *m_popup; bool popupBlocked_; int _size; typedef TQSortedList<StartMenuEntry> StartMenuEntryList; diff --git a/starter/starter.cpp b/starter/starter.cpp index d7e8d83..e411b77 100644 --- a/starter/starter.cpp +++ b/starter/starter.cpp @@ -2,12 +2,12 @@ #include <tqcombobox.h> #include <tqcursor.h> #include <tqdesktopwidget.h> -#include <kglobal.h> -#include <klocale.h> -#include <kconfig.h> -#include <kmessagebox.h> -#include <kapplication.h> -# include <kpopupmenu.h> +#include <tdeglobal.h> +#include <tdelocale.h> +#include <tdeconfig.h> +#include <tdemessagebox.h> +#include <tdeapplication.h> +# include <tdepopupmenu.h> #include <tqimage.h> #include <tqfile.h> #include <tqlabel.h> @@ -38,14 +38,14 @@ starter::starter(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : DCOPObject("StarterIface"), KPanelApplet(configFile, type, actions, parent, name) { - configPopup = new KPopupMenu(this); + configPopup = new TDEPopupMenu(this); popupBlocked = false; mainView = new TQLabel(this); configDialog = new StarterConfig(this); TQRect desktop = TQDesktopWidget().availableGeometry( configDialog ); configDialog->move((desktop.width() - configDialog->width())/2, (desktop.height() - configDialog->height())/2); - KConfig config("bStarter", false, false); + TDEConfig config("bStarter", false, false); config.setGroup("Settings"); configDialog->buttonShortcut->setEnabled(false); configDialog->BaseURL->setURL(config.readEntry("BaseImage", "" )); @@ -79,7 +79,7 @@ starter::starter(const TQString& configFile, Type type, int actions, TQWidget *p //--- connect(configDialog->categoryList, SIGNAL(highlighted(int)), this, SLOT(activateShortcutButton(int))); - connect(configDialog->buttonShortcut, SIGNAL(capturedShortcut (const KShortcut &)), this, SLOT(addShortcut(const KShortcut &))); + connect(configDialog->buttonShortcut, SIGNAL(capturedShortcut (const TDEShortcut &)), this, SLOT(addShortcut(const TDEShortcut &))); connect(configDialog->categoryList, SIGNAL(highlighted ( const TQString & )), this, SLOT(updateShortcutButton(const TQString &))); connect(configDialog->buttonOk, SIGNAL(clicked()), this, SLOT(updateSettings())); StarterHelp *helpDialog = new StarterHelp(configDialog); @@ -102,7 +102,7 @@ void starter::activateShortcutButton(int i) configDialog->buttonShortcut->setEnabled(bool(i)); } -void starter::addShortcut(const KShortcut &cut) +void starter::addShortcut(const TDEShortcut &cut) { // in case of empty shortcut, remove the entry from the list and return if (!short(cut.keyCodeQt())) @@ -114,7 +114,7 @@ void starter::addShortcut(const KShortcut &cut) shortcutList.remove(it); break; } - configDialog->buttonShortcut->setShortcut(KShortcut::null(), false); + configDialog->buttonShortcut->setShortcut(TDEShortcut::null(), false); return; } // generate MyKey @@ -162,11 +162,11 @@ void starter::updateShortcutButton(const TQString & category) { TQKeyEvent qke( TQEvent::KeyPress, it.key().key(), 0, it.key().modFlags()); KKey kkey(&qke); - KShortcut ksc(kkey); + TDEShortcut ksc(kkey); configDialog->buttonShortcut->setShortcut(ksc, false); return; } - configDialog->buttonShortcut->setShortcut(KShortcut::null(), false); + configDialog->buttonShortcut->setShortcut(TDEShortcut::null(), false); } starter::~starter() @@ -176,7 +176,7 @@ starter::~starter() void starter::updateSettings() { startMenu->updateShortcuts(shortcutList); - KConfig *config = new KConfig("bStarter", false, false); + TDEConfig *config = new TDEConfig("bStarter", false, false); config->setGroup("Settings"); config->writeEntry("BaseImage", configDialog->BaseURL->url()); config->writeEntry("HoverImage", configDialog->HoverURL->url()); @@ -222,12 +222,12 @@ void starter::updateSettings() void starter::reloadImages() { - KIconLoader* iLoader = KGlobal::iconLoader(); + TDEIconLoader* iLoader = TDEGlobal::iconLoader(); TQString pth; if (_VALID_(BaseURL)) pth = configDialog->BaseURL->url(); else - pth = iLoader->iconPath("bStarter", KIcon::Small, true); + pth = iLoader->iconPath("bStarter", TDEIcon::Small, true); if (pth) pixmap = TQImage(pth); if (!pth || pixmap.isNull()) @@ -239,7 +239,7 @@ void starter::reloadImages() if (_VALID_(HoverURL)) pth = configDialog->HoverURL->url(); else - pth = iLoader->iconPath("bStarter_hover", KIcon::Small, true); + pth = iLoader->iconPath("bStarter_hover", TDEIcon::Small, true); if (pth) hoverPixmap = TQImage(pth); if (!pth || hoverPixmap.isNull()) @@ -251,7 +251,7 @@ void starter::reloadImages() if (_VALID_(DownURL)) pth = configDialog->DownURL->url(); else - pth = iLoader->iconPath("bStarter_down", KIcon::Small, true); + pth = iLoader->iconPath("bStarter_down", TDEIcon::Small, true); if (pth) downPixmap = TQImage(pth); if (!pth || downPixmap.isNull()) @@ -281,12 +281,12 @@ void starter::resizeEvent ( TQResizeEvent *rev ) void starter::configureMenu() { - KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); + TDEApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); } void starter::preferences() { - KApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); + TDEApplication::startServiceByDesktopName("kmenuedit", TQStringList(), 0, 0, 0, "", true); } int starter::widthForHeight(int height) const @@ -475,7 +475,7 @@ extern "C" { KPanelApplet* init( TQWidget *parent, const TQString& configFile) { - KGlobal::locale()->insertCatalogue("starter"); + TDEGlobal::locale()->insertCatalogue("starter"); return new starter(configFile, KPanelApplet::Normal, KPanelApplet::Preferences, parent, "baghirastarter"); diff --git a/starter/starter.desktop b/starter/starter.desktop index cfc27dc..01f1fde 100644 --- a/starter/starter.desktop +++ b/starter/starter.desktop @@ -2,6 +2,6 @@ Encoding=UTF-8 Name=Baghira Starter Icon=bStarter -X-KDE-Library=libbaghirastarter -X-KDE-UniqueApplet=true +X-TDE-Library=libbaghirastarter +X-TDE-UniqueApplet=true diff --git a/starter/starter.h b/starter/starter.h index 0175ea4..52352b6 100644 --- a/starter/starter.h +++ b/starter/starter.h @@ -11,14 +11,14 @@ #include <tqstring.h> #include <tqpixmap.h> // #include <tqpainter.h> -#include <kconfig.h> -#include <kshortcut.h> +#include <tdeconfig.h> +#include <tdeshortcut.h> #include "starteriface.h" #include "mykey.h" class DCOPClient; class TQLabel; -class KPopupMenu; +class TDEPopupMenu; class StartMenu; class StarterConfig; @@ -49,7 +49,7 @@ private: TQLabel *mainView; // TQPainter m_painter; DCOPClient *client; - KPopupMenu *configPopup; + TDEPopupMenu *configPopup; StartMenu *startMenu; TQPixmap pixmap; TQPixmap hoverPixmap; @@ -58,7 +58,7 @@ private: typedef TQMap<MyKey,TQString> ShortcutList; ShortcutList shortcutList; private slots: - void addShortcut(const KShortcut&); + void addShortcut(const TDEShortcut&); void updateShortcutButton(const TQString&); void configureMenu(); void reloadImages(); |