summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-01-07 17:09:53 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-01-07 17:09:53 +0100
commit0f11df2f16d30ed5edcd0db1f129078bd02338c5 (patch)
treee899a642fb194828905674adee17cde2d598884e /src
parentNew rekonq site (diff)
downloadrekonq-0f11df2f16d30ed5edcd0db1f129078bd02338c5.tar.xz
Removed setFocus from lineEdit->currentWebview so that people can switch
trough tabs with CTRL tabbing
Diffstat (limited to 'src')
-rw-r--r--src/history.h2
-rw-r--r--src/mainwindow.cpp35
-rw-r--r--src/rekonqui.rc3
-rw-r--r--src/tabwidget.cpp28
4 files changed, 21 insertions, 47 deletions
diff --git a/src/history.h b/src/history.h
index 4fac8cd6..f3813855 100644
--- a/src/history.h
+++ b/src/history.h
@@ -130,7 +130,7 @@ private:
};
-// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------------------------------------------
class HistoryModel : public QAbstractTableModel
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 3e0d71fa..d99ccd46 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -138,32 +138,15 @@ void MainWindow::setupActions()
KStandardAction::home( this, SLOT( slotHome() ), actionCollection() );
KStandardAction::preferences( this, SLOT( slotPreferences() ), actionCollection() );
- a = KStandardAction::redisplay( this, 0, actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Reload );
-
- a = KStandardAction::back( this, 0, actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Back );
-
- a = KStandardAction::forward( this, 0, actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Forward );
-
- a = KStandardAction::undo( this , 0 , actionCollection() );
- m_tabWidget->addWebAction( a , QWebPage::Undo );
-
- a = KStandardAction::redo( this , 0 , actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Redo );
-
- a = KStandardAction::cut( this , 0 , actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Cut );
-
- a = KStandardAction::copy( this , 0 , actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Copy );
-
- a = KStandardAction::paste( this , 0 , actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::Paste );
-
- a = KStandardAction::selectAll( this , 0 , actionCollection() );
- m_tabWidget->addWebAction( a, QWebPage::SelectEndOfDocument );
+ m_tabWidget->addWebAction( KStandardAction::redisplay( this, 0, actionCollection() ) , QWebPage::Reload );
+ m_tabWidget->addWebAction( KStandardAction::back( this, 0, actionCollection() ) , QWebPage::Back );
+ m_tabWidget->addWebAction( KStandardAction::forward( this, 0, actionCollection() ) , QWebPage::Forward );
+ m_tabWidget->addWebAction( KStandardAction::undo( this , 0 , actionCollection() ) , QWebPage::Undo );
+ m_tabWidget->addWebAction( KStandardAction::redo( this , 0 , actionCollection() ) , QWebPage::Redo );
+ m_tabWidget->addWebAction( KStandardAction::cut( this , 0 , actionCollection() ) , QWebPage::Cut );
+ m_tabWidget->addWebAction( KStandardAction::copy( this , 0 , actionCollection() ) , QWebPage::Copy );
+ m_tabWidget->addWebAction( KStandardAction::paste( this , 0 , actionCollection() ) , QWebPage::Paste );
+ m_tabWidget->addWebAction( KStandardAction::selectAll( this , 0 , actionCollection() ) , QWebPage::SelectEndOfDocument );
// stop reload Action
m_stopReload = new KAction( KIcon("view-refresh"), i18n("reload"), this );
diff --git a/src/rekonqui.rc b/src/rekonqui.rc
index a7ab8cfb..ef566c23 100644
--- a/src/rekonqui.rc
+++ b/src/rekonqui.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="rekonq" version="1">
+<kpartgui name="rekonq" version="8">
<MenuBar>
<!-- ============ FILE menu =========== -->
<Menu name="file" noMerge="1"><text>&amp;File</text>
@@ -63,7 +63,6 @@
<Action name="options_configure_toolbars"/>
<Action name="options_configure"/>
</Menu>
-
</MenuBar>
<!-- ============ Main ToolBar =========== -->
diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp
index 3a26266b..4af3ef60 100644
--- a/src/tabwidget.cpp
+++ b/src/tabwidget.cpp
@@ -295,8 +295,7 @@ void TabWidget::clear()
void TabWidget::moveTab(int fromIndex, int toIndex)
{
- disconnect(this, SIGNAL(currentChanged(int)),
- this, SLOT(currentChanged(int)));
+ disconnect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
QWidget *tabWidget = widget(fromIndex);
QIcon icon = tabIcon(fromIndex);
@@ -343,20 +342,14 @@ void TabWidget::currentChanged(int index)
WebView *oldWebView = this->webView(m_lineEdits->currentIndex());
if (oldWebView)
{
- disconnect(oldWebView, SIGNAL(statusBarMessage(const QString&)),
- this, SIGNAL(showStatusBarMessage(const QString&)));
- disconnect(oldWebView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
- this, SIGNAL(linkHovered(const QString&)));
- disconnect(oldWebView, SIGNAL(loadProgress(int)),
- this, SIGNAL(loadProgress(int)));
+ disconnect(oldWebView, SIGNAL(statusBarMessage(const QString&)), this, SIGNAL(showStatusBarMessage(const QString&)));
+ disconnect(oldWebView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), this, SIGNAL(linkHovered(const QString&)));
+ disconnect(oldWebView, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int)));
}
- connect(webView, SIGNAL(statusBarMessage(const QString&)),
- this, SIGNAL(showStatusBarMessage(const QString&)));
- connect(webView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
- this, SIGNAL(linkHovered(const QString&)));
- connect(webView, SIGNAL(loadProgress(int)),
- this, SIGNAL(loadProgress(int)));
+ connect(webView, SIGNAL(statusBarMessage(const QString&)), this, SIGNAL(showStatusBarMessage(const QString&)));
+ connect(webView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), this, SIGNAL(linkHovered(const QString&)));
+ connect(webView, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int)));
for (int i = 0; i < m_actions.count(); ++i)
{
@@ -367,10 +360,9 @@ void TabWidget::currentChanged(int index)
m_lineEdits->setCurrentIndex(index);
emit loadProgress(webView->progress());
emit showStatusBarMessage(webView->lastStatusBarText());
- if (webView->url().isEmpty())
- m_lineEdits->currentWidget()->setFocus();
- else
- webView->setFocus();
+
+ // set focus to the current webview
+ webView->setFocus();
}