#include "libkita/thread.h"
#include "libkita/favoritethreads.h"
+#include "libkita/kita_misc.h"
#include <qdragobject.h>
#include <qtextcodec.h>
connect( m_threadView, SIGNAL( bookmarked( const Kita::Thread*, bool ) ),
SLOT( bookmark( const Kita::Thread*, bool ) ) );
+ connect( m_urlLine, SIGNAL( returnPressed() ),
+ SLOT( slotUrlLine() ) );
+
QPopupMenu* popup = static_cast<QPopupMenu *>( factory() ->container( "window", this ) );
connect( popup, SIGNAL( aboutToShow() ),
SLOT( windowMenuAboutToShow() ) );
void KitaMainWindow::slotUrlLine()
{
- kdDebug() << __func__;
+ QString text = m_urlLine->text();
+ QString datURL = Kita::threadToDat( text );
+ m_threadView->showThread( datURL );
}
void KitaMainWindow::writeConfig( KConfig* config )
setTabToolTip( currentPage(), thread->name() );
}
+void KitaThreadTabWidget::showThread( const QString& datURL, bool withNewTab )
+{
+ Kita::Thread* thread = Kita::Thread::getByURL( datURL );
+ if ( withNewTab ) {
+ showThreadWithNewTab( thread );
+ } else {
+ showThread( thread );
+ }
+}
+
KitaThreadView* KitaThreadTabWidget::createView()
{
KLibFactory * factory = KLibLoader::self() ->factory( "libkitapart" );
public slots:
void showThread( const Kita::Thread* thread );
+ void showThread( const QString& datURL, bool withNewTab = false );
void showThreadWithNewTab( const Kita::Thread* thread ); // ad-hoc
void deleteView( KitaThreadView* );