OSDN Git Service

remove alwaysUseTab
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Tue, 3 Jul 2007 13:48:44 +0000 (13:48 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Tue, 3 Jul 2007 13:48:44 +0000 (13:48 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1984 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/board/boardtabwidget.cpp
kita/src/board/boardtabwidget.h
kita/src/mainwindow.cpp

index 8e31a43..9b647dc 100644 (file)
@@ -41,23 +41,12 @@ KitaBoardTabWidget::~KitaBoardTabWidget()
 {}
 
 /* public slots */
-void KitaBoardTabWidget::loadBoard( const KURL& boardURL, bool withNewTab )
+void KitaBoardTabWidget::loadBoard( const KURL& boardURL )
 {
     KitaBoardView * view = findView( boardURL );
     QString boardName = Kita::BoardManager::boardName( boardURL );
     if ( !view ) {
-
-        if ( count() == 1 || withNewTab ) view = createView( boardName );
-        else {
-
-            QWidget* w = currentPage();
-            /* currentPage is FavoriteListView. */
-            if ( !isSubjectView( w ) ) w = page( count() - 2 );
-
-            view = static_cast< KitaBoardView *>( w );
-            view->init();
-            setTabLabel( view, boardName );
-        }
+        view = createView( boardName );
     }
 
     if ( view ) {
index a0541a9..9d074d2 100644 (file)
@@ -28,7 +28,7 @@ public:
     ~KitaBoardTabWidget();
 
 public slots:
-    void loadBoard( const KURL&, bool withNewTab = false );
+    void loadBoard( const KURL& );
 
 private:
     KitaBoardView* createView( QString label );
index 4e13bb7..0171686 100644 (file)
@@ -428,8 +428,7 @@ void KitaMainWindow::slotOpenURLRequestExt(
     /* open 2ch board */
     /* if usr1 == 1, open the board with new tab. */
     if ( mimetype == "kita_open_2chboard" ) {
-        bool withNewTab = ( usr1 == 1 );
-        m_boardTab->loadBoard( url, withNewTab );
+        m_boardTab->loadBoard( url );
         return ;
     }