summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainview.cpp13
-rw-r--r--src/previewimage.cpp2
-rw-r--r--src/settings_general.ui2
-rw-r--r--src/tabbar.cpp13
-rw-r--r--src/tabbar.h1
5 files changed, 26 insertions, 5 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 6d282e0c..0956e3ff 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -383,8 +383,15 @@ void MainView::slotCloneTab(int index)
index = currentIndex();
if (index < 0 || index >= count())
return;
- WebView *tab = newWebView();
- tab->setUrl(webView(index)->url());
+
+ WebView *tab = newWebView();
+ KUrl url = webView(index)->url();
+
+ // workaround against bug in webkit:
+ // only set url if it is not empty
+ // otherwise the current working directory will be used
+ if (!url.isEmpty())
+ tab->setUrl(url);
updateTabBar();
}
@@ -418,7 +425,7 @@ void MainView::slotCloseTab(int index)
hasFocus = tab->hasFocus();
//store close tab except homepage
- if (!tab->url().prettyUrl().startsWith("rekonq:") && !tab->url().isEmpty())
+ if (!tab->url().prettyUrl().startsWith( QLatin1String("rekonq:") ) && !tab->url().isEmpty())
{
QString title = tab->title();
QString url = tab->url().prettyUrl();
diff --git a/src/previewimage.cpp b/src/previewimage.cpp
index 99969893..df3a3471 100644
--- a/src/previewimage.cpp
+++ b/src/previewimage.cpp
@@ -167,7 +167,7 @@ void PreviewImage::snapFinished()
// update url (for added thumbs)
QStringList urls = ReKonfig::previewUrls();
- // stripTrailingSlash to be sure to get the same string for same adress
+ // stripTrailingSlash to be sure to get the same string for same address
urls.replace(m_index, ws->snapUrl().toString(QUrl::StripTrailingSlash));
names.replace(m_index, ws->snapTitle());
diff --git a/src/settings_general.ui b/src/settings_general.ui
index 5e16835d..4de3ce09 100644
--- a/src/settings_general.ui
+++ b/src/settings_general.ui
@@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
- <string>On Startup</string>
+ <string>Startup</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index bde1e63e..ac050191 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -268,6 +268,19 @@ void TabBar::leaveEvent(QEvent *event)
KTabBar::leaveEvent(event);
}
+void TabBar::mousePressEvent(QMouseEvent *event)
+{
+ // just close tab on middle mouse click
+ if (event->button() == Qt::MidButton)
+ {
+ int index = tabAt(event->pos());
+ emit closeTab(index);
+ return;
+ }
+
+ KTabBar::mousePressEvent(event);
+}
+
void TabBar::updateNewTabButton()
{
diff --git a/src/tabbar.h b/src/tabbar.h
index 580021c4..57b78628 100644
--- a/src/tabbar.h
+++ b/src/tabbar.h
@@ -79,6 +79,7 @@ protected:
virtual QSize tabSizeHint(int index) const;
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void leaveEvent(QEvent *event);
+ virtual void mousePressEvent(QMouseEvent *event);
private slots:
void cloneTab();