From 45ec8db85e02c40d68ef4e3b146917d2115fe825 Mon Sep 17 00:00:00 2001 From: Ivan Ilin Date: Mon, 19 Dec 2011 19:14:25 +0200 Subject: [PATCH] Sankore 427 --- src/core/UBApplicationController.cpp | 6 ++++-- src/web/UBWebController.cpp | 4 +++- src/web/browser/WBBrowserWindow.cpp | 10 ++++------ src/web/browser/WBTabWidget.cpp | 1 - src/web/browser/WBTabWidget.h | 8 +++++--- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index efece366..6550c56a 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -368,7 +368,7 @@ void UBApplicationController::showInternet() if (UBSettings::settings()->webUseExternalBrowser->get().toBool()) { showDesktop(true); - UBApplication::webController->show(UBWebController::WebBrowser); + UBApplication::webController->show(UBWebController::WebBrowser); // really no have emit mainModeChanged here ? potential problem with virtual keyboard ? } else @@ -460,6 +460,7 @@ void UBApplicationController::showTutorial() UBApplication::boardController->hide(); } + // it's needed not to duplicate webbrowser search in web mode. If I've breaked smbd's code let Ivan know UBApplication::webController->show(UBWebController::Tutorial); mMainWindow->webToolBar->hide(); @@ -488,7 +489,8 @@ void UBApplicationController::showSankoreEditor() UBApplication::boardController->hide(); } - UBApplication::webController->show(UBWebController::Paraschool); +// it's needed not to duplicate webbrowser search in web mode. If I've breaked smbd's code let Ivan know + UBApplication::webController->show(UBWebController::Paraschool); mMainWindow->webToolBar->hide(); mMainWindow->boardToolBar->hide(); diff --git a/src/web/UBWebController.cpp b/src/web/UBWebController.cpp index 08c5e8ab..436397b3 100644 --- a/src/web/UBWebController.cpp +++ b/src/web/UBWebController.cpp @@ -148,6 +148,8 @@ void UBWebController::webBrowserInstance() (*mCurrentWebBrowser)->tabWidget()->tabBar()->show(); (*mCurrentWebBrowser)->tabWidget()->lineEdits()->show(); +// (*mCurrentWebBrowser)->tabWidget()->tabBar()->hide(); +// (*mCurrentWebBrowser)->tabWidget()->lineEdits()->hide(); } UBApplication::applicationController->setMirrorSourceWidget((*mCurrentWebBrowser)->paintWidget()); @@ -192,7 +194,7 @@ void UBWebController::tutorialWebInstance() else { mCurrentWebBrowser = &mWebBrowserList[Tutorial]; - mToolsCurrentPalette = &mToolsPaletteList[Tutorial]; +// mToolsCurrentPalette = &mToolsPaletteList[Tutorial]; // mKeyboardCurrentPalette = &mKeyboardPaletteList[Tutorial]; mToolsPalettePositionned = &mToolsPalettePositionnedList[Tutorial]; if (!(*mCurrentWebBrowser)) diff --git a/src/web/browser/WBBrowserWindow.cpp b/src/web/browser/WBBrowserWindow.cpp index f87178e9..14f96f09 100644 --- a/src/web/browser/WBBrowserWindow.cpp +++ b/src/web/browser/WBBrowserWindow.cpp @@ -97,11 +97,11 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi defaultSettings->setAttribute(QWebSettings::PluginsEnabled, true); setupMenu(); -// if(!isViewerWebInstance) + if(!isViewerWebInstance) setupToolBar(); -// else{ -// setupToolBarForTutorial(); -// } + else{ + setupToolBarForTutorial(); + } QVBoxLayout *layout = new QVBoxLayout; layout->setSpacing(0); @@ -205,8 +205,6 @@ void WBBrowserWindow::setupToolBar() connect(mSearchToolBar, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&))); mChaseWidget = new WBChaseWidget(this); - mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mChaseWidget); - mWebToolBar->insertSeparator(mUniboardMainWindow->actionWebBigger); connect(mUniboardMainWindow->actionHome, SIGNAL(triggered()), this , SLOT(slotHome())); diff --git a/src/web/browser/WBTabWidget.cpp b/src/web/browser/WBTabWidget.cpp index 70b3b1d2..2d610a1f 100644 --- a/src/web/browser/WBTabWidget.cpp +++ b/src/web/browser/WBTabWidget.cpp @@ -251,7 +251,6 @@ WBTabWidget::WBTabWidget(QWidget *parent) mLineEdits->setMinimumWidth(200); QSizePolicy spolicy = mLineEdits->sizePolicy(); mLineEdits->setSizePolicy(QSizePolicy::Maximum, spolicy.verticalPolicy()); - } void WBTabWidget::clear() diff --git a/src/web/browser/WBTabWidget.h b/src/web/browser/WBTabWidget.h index ccc90517..4e7874b2 100644 --- a/src/web/browser/WBTabWidget.h +++ b/src/web/browser/WBTabWidget.h @@ -138,7 +138,7 @@ class WBWebActionMapper : public QObject */ class WBTabWidget : public QTabWidget { - Q_OBJECT; + Q_OBJECT signals: // tab widget signals @@ -171,8 +171,10 @@ class WBTabWidget : public QTabWidget QByteArray saveState() const; bool restoreState(const QByteArray &state); - WBTabBar* tabBar() { return mTabBar; }; - QStackedWidget* lineEdits() { return mLineEdits; }; + WBTabBar* tabBar() { return mTabBar; } + QStackedWidget* lineEdits() { return mLineEdits; } + + void setLineEditStackVisible(bool visible) {mLineEdits->setVisible(visible);mLineEdits->hide();} protected: void mouseDoubleClickEvent(QMouseEvent *event); void contextMenuEvent(QContextMenuEvent *event);