diff options
Diffstat (limited to 'src/pageviewer.cpp')
-rw-r--r-- | src/pageviewer.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/pageviewer.cpp b/src/pageviewer.cpp index 64b3265..849c833 100644 --- a/src/pageviewer.cpp +++ b/src/pageviewer.cpp @@ -9,12 +9,12 @@ //#include "feediconmanager.h" #include "pageviewer.h" -#include <kaction.h> +#include <tdeaction.h> #include <kbookmarkmanager.h> -#include <khtml_settings.h> +#include <tdehtml_settings.h> #include <kiconloader.h> -#include <klocale.h> -#include <kpopupmenu.h> +#include <tdelocale.h> +#include <tdepopupmenu.h> #include <tqmetaobject.h> @@ -26,13 +26,13 @@ PageViewer::PageViewer(TQWidget *parent, const char *name) : Viewer(parent, name) { // this hack is necessary since the part looks for []HTML Settings] in - // KGlobal::config() by default, which is wrong when running in Kontact - KHTMLSettings* s = const_cast<KHTMLSettings*> (settings()); + // TDEGlobal::config() by default, which is wrong when running in Kontact + TDEHTMLSettings* s = const_cast<TDEHTMLSettings*> (settings()); //s->init(Settings::self()->config()); s->init(); //setXMLFile(locate("data", "akregator/pageviewer.rc"), true); - m_backAction = new KToolBarPopupAction(i18n("Back"), "back", 0, this, SLOT(slotBack()), actionCollection(), "pageviewer_back"); + m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, this, SLOT(slotBack()), actionCollection(), "pageviewer_back"); connect(m_backAction->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotBackAboutToShow())); @@ -40,17 +40,17 @@ PageViewer::PageViewer(TQWidget *parent, const char *name) this, SLOT(slotPopupActivated(int))); - m_forwardAction = new KToolBarPopupAction(i18n("Forward"), "forward", 0, this, SLOT(slotForward()), actionCollection(), "pageviewer_forward"); + m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, this, SLOT(slotForward()), actionCollection(), "pageviewer_forward"); connect(m_forwardAction->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotForwardAboutToShow())); connect(m_forwardAction->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotPopupActivated(int))); - m_reloadAction = new KAction(i18n("Reload"), "reload", 0, + m_reloadAction = new TDEAction(i18n("Reload"), "reload", 0, this, SLOT(slotReload()), actionCollection(), "pageviewer_reload"); - m_stopAction = new KAction(i18n("Stop"), "stop", 0, + m_stopAction = new TDEAction(i18n("Stop"), "stop", 0, this, SLOT(slotStop()), actionCollection(), "pageviewer_stop"); @@ -60,7 +60,7 @@ PageViewer::PageViewer(TQWidget *parent, const char *name) m_forwardAction->setEnabled(false); m_stopAction->setEnabled(false); - connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotStarted(KIO::Job* ))); + connect(this, SIGNAL(started(TDEIO::Job *)), this, SLOT(slotStarted(TDEIO::Job* ))); connect(this, SIGNAL(completed()), this, SLOT(slotCompleted())); connect(this, SIGNAL(canceled(const TQString &)), this, SLOT(slotCancelled(const TQString &))); @@ -101,7 +101,7 @@ void PageViewer::slotForward() void PageViewer::slotBackAboutToShow() { - KPopupMenu *popup = m_backAction->popupMenu(); + TDEPopupMenu *popup = m_backAction->popupMenu(); popup->clear(); if ( m_current == m_history.begin() ) @@ -127,7 +127,7 @@ void PageViewer::slotBackAboutToShow() void PageViewer::slotForwardAboutToShow() { - KPopupMenu *popup = m_forwardAction->popupMenu(); + TDEPopupMenu *popup = m_forwardAction->popupMenu(); popup->clear(); if ( m_current == m_history.fromLast() ) @@ -175,9 +175,9 @@ bool PageViewer::openURL(const KURL &url) /* TQString favicon = FeedIconManager::self()->iconLocation(url); if (!favicon.isEmpty()) - emit setTabIcon(TQPixmap(KGlobal::dirs()->findResource("cache", favicon+".png"))); + emit setTabIcon(TQPixmap(TDEGlobal::dirs()->findResource("cache", favicon+".png"))); else - emit setTabIcon(SmallIcon("html")); + emit setTabIcon(SmallIcon("text-html")); */ return true; } @@ -229,7 +229,7 @@ void PageViewer::addHistoryEntry(const KURL& url) } // Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp) -void PageViewer::slotStarted( KIO::Job * ) +void PageViewer::slotStarted( TDEIO::Job * ) { m_stopAction->setEnabled(true); } @@ -255,7 +255,7 @@ void PageViewer::slotSetCaption(const TQString& cap) { void PageViewer::slotPaletteOrFontChanged() { //kdDebug() << "PageViewer::slotPaletteOrFontChanged()" << endl; - // taken from KonqView (kdebase/konqueror/konq_view.cc) + // taken from KonqView (tdebase/konqueror/konq_view.cc) TQObject *obj = KParts::BrowserExtension::childObject(this); if ( !obj ) // not all views have a browser extension ! @@ -269,9 +269,9 @@ void PageViewer::slotPaletteOrFontChanged() obj->tqt_invoke(id, o); // this hack is necessary since the part looks for []HTML Settings] in - // KGlobal::config() by default, which is wrong when running in Kontact + // TDEGlobal::config() by default, which is wrong when running in Kontact // NOTE: when running in Kontact, immediate updating doesn't work - KHTMLSettings* s = const_cast<KHTMLSettings*> (settings()); + TDEHTMLSettings* s = const_cast<TDEHTMLSettings*> (settings()); //s->init(Settings::self()->config()); s->init(); } @@ -293,8 +293,8 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kur // if true show popup menu for link. Maybe that doesn't work properly when using frames bool isLink = kurl != Viewer::url(); -// KPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); - KPopupMenu popup(this->widget()); +// TDEPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); + TDEPopupMenu popup(this->widget()); // bool needSep = false; int idNewWindow = -2; @@ -302,16 +302,16 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kur { idNewWindow = popup.insertItem(SmallIcon("tab_new"),i18n("Open Link in New &Tab"), this, SLOT(slotOpenLinkInForegroundTab())); popup.setWhatsThis(idNewWindow, i18n("<b>Open Link in New Tab</b><p>Opens current link in a new tab.")); - popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser())); + popup.insertItem(SmallIcon("window-new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser())); popup.insertSeparator(); - KAction *savelinkas = action("savelinkas"); + TDEAction *savelinkas = action("savelinkas"); if (savelinkas) savelinkas->plug( &popup); - KAction* copylinkaddress = action("copylinkaddress"); + TDEAction* copylinkaddress = action("copylinkaddress"); if (copylinkaddress) { copylinkaddress->plug( &popup); @@ -330,8 +330,8 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kur action("viewer_copy")->plug(&popup); popup.insertSeparator(); - KAction* incFontAction = this->action("incFontSizes"); - KAction* decFontAction = this->action("decFontSizes"); + TDEAction* incFontAction = this->action("incFontSizes"); + TDEAction* decFontAction = this->action("decFontSizes"); if ( incFontAction && decFontAction ) { incFontAction->plug( &popup ); @@ -339,12 +339,12 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kur popup.insertSeparator(); } - popup.insertItem(SmallIcon("window_new"), i18n("Open Page in External Browser"), this, SLOT(slotOpenLinkInBrowser())); + popup.insertItem(SmallIcon("window-new"), i18n("Open Page in External Browser"), this, SLOT(slotOpenLinkInBrowser())); action("viewer_print")->plug(&popup); popup.insertSeparator(); - KAction *ac = action("setEncoding"); + TDEAction *ac = action("setEncoding"); if (ac) ac->plug(&popup); popup.insertItem(SmallIcon("bookmark_add"),i18n("Add to Konqueror Bookmarks"), this, SLOT(slotGlobalBookmarkArticle())); |