OSDN Git Service

refactoring.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 4 Jul 2007 14:02:08 +0000 (14:02 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 4 Jul 2007 14:02:08 +0000 (14:02 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1988 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/mainwindow.cpp
kita/src/thread/threadtabwidget.cpp
kita/src/thread/threadtabwidget.h

index 2046261..3d64439 100644 (file)
@@ -433,9 +433,7 @@ void KitaMainWindow::slotOpenURLRequestExt(
     /* open 2ch thread */
     /* if usr1 == 1, open the thread with new tab. */
     if ( mimetype == "kita_open_2chthread" ) {
-        bool withNewTab = ( usr1 == 1 || usr1 == 2 );
-        bool byBackground = ( usr1 == 2 );
-        m_threadDock->slotShowThread( url, withNewTab, byBackground );
+        m_threadDock->slotShowThread( url );
         return ;
     }
 
@@ -447,7 +445,7 @@ void KitaMainWindow::slotOpenURLRequestExt(
 
     /* open thread with new thread tab */
     if ( Kita::DatManager::isThreadEnrolled( url ) ) {
-        m_threadDock->slotShowThread( url, true );
+        m_threadDock->slotShowThread( url );
         return ;
     }
 
@@ -474,7 +472,7 @@ void KitaMainWindow::slotURLLine()
 {
     KURL url = m_urlLine->text();
     KURL datURL = Kita::getDatURL( url );
-    m_threadDock->slotShowThread( datURL, true );
+    m_threadDock->slotShowThread( datURL );
 }
 
 //
index 92b7a29..c823522 100644 (file)
@@ -54,7 +54,7 @@ KitaThreadTabWidget::~KitaThreadTabWidget() {}
 
 
 /* show "Main thread" view */  /* public slots */
-void KitaThreadTabWidget::slotShowMainThread( const KURL& url, bool withNewTab, bool byBackground )
+void KitaThreadTabWidget::slotShowMainThread( const KURL& url )
 {
     QString refstr;
     KURL datURL = Kita::ParseMisc::parseURL( url, refstr );
@@ -92,9 +92,7 @@ void KitaThreadTabWidget::slotShowMainThread( const KURL& url, bool withNewTab,
 
         if ( newView ) {
             newView->showThread( datURL, jumpNum );
-            if ( ! byBackground ) {
-                showPage( newView );
-            }
+            showPage( newView );
         }
     }
 
@@ -520,11 +518,11 @@ KitaThreadTabWidget* KitaThreadDock::setupAsMainView()
 }
 
 /* public slot */
-void KitaThreadDock::slotShowThread( const KURL& url, bool withNewTab, bool byBackground )
+void KitaThreadDock::slotShowThread( const KURL& url )
 {
     showDock();
 
-    if ( m_threadTab ) m_threadTab->slotShowMainThread( url, withNewTab, byBackground );
+    if ( m_threadTab ) m_threadTab->slotShowMainThread( url );
 }
 
 /* show Thread Dock */ /* private slot */
index e095e35..62359a2 100644 (file)
@@ -27,7 +27,7 @@ public:
     ~KitaThreadTabWidget();
 
 public slots:
-    void slotShowMainThread( const KURL& datURL, bool withNewTab, bool byBackground );
+    void slotShowMainThread( const KURL& datURL );
     void slotCloseThreadTab( const KURL& url );
 
 private:
@@ -89,7 +89,7 @@ public:
     KitaThreadTabWidget* setupAsMainView();
 
 public slots:
-    void slotShowThread( const KURL& datURL, bool withNewTab, bool byBackground = false );
+    void slotShowThread( const KURL& datURL );
 
 private slots:
     void slotShowThreadDock();