Version: 0.4.0 (using KDE 4.4.2) Compiler: gcc version 4.4.3 OS: Linux Installed from: Gentoo Packages I assigned a keyboard shortcut (Ctrl+W) to close tab. Whenever I trigger this shortcut, the first tab is closed but not the active tab. This basically renders the shortcut useless.
I can confirm this: ctrl+w in the latest git version of rekonq does *nothing*
Ditto, also using rekonq 0.4.0 but on Kubuntu
It works here. What about you, guys?
looks like it has been fixed, at least in Version 0.4.70 it works
after all it isn't fixed… It shows a completely strange behaviour, sometimes closing the first tab, sometimes closing the last tab. I'll try to find a way to reliably reproduce this bug…
Works fine for me in 4.90
Works fine for me too. Boris, could you verify it again with the 0.5 beta or git version
Hi, I tried version 4.90 and still have the same problem. It's really strange sometimes no tab closes at all and sometimes the first tab closes.
Same behaviour here with the latest git… Sometimes it does close a tab (even if it is a wrong one) sometimes it does not do anything. I'll try it again with a fresh rekonqrc, to see if it helps.
Hi, finally I was able to solve the problem, but it is still rather strange. As hinted by Panagiotis Papadopoulos, I removed Ctrl+W short for "close tab" from my rekonqrc and now, even with having a shortcut assigned, tabs close properly. There seems to be something wrong with the keyboard shortcut configuration in rekonq. For example, I assigned a shortcut to "close all other tabs", which freezes rekonq for a few seconds and than closes *all* tabs.
Understood problem :) Don't have a clue how properly fix it :( Spending this night fighting with..
commit d44c64e440e8d551d528eeafef97407c77cd420a Author: Andrea Diamantini <adjam7@gmail.com> Date: Fri Jun 4 02:38:35 2010 +0200 This should fix the Ctrl+w bug. Anyway, it really doesn't solve it: there is a corner case where the trick implemented doesn't work. We'll see if someone can fix also that.. BUG:233937 diff --git a/src/mainview.cpp b/src/mainview.cpp index 0b17ef2..166c1a1 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -413,9 +413,11 @@ void MainView::windowCloseRequested() void MainView::closeOtherTabs(int index) { - if (-1 == index) + if (index < 0) + index = currentIndex(); + if (index < 0 || index >= count()) return; - + for (int i = count() - 1; i > index; --i) { closeTab(i); @@ -430,7 +432,6 @@ void MainView::closeOtherTabs(int index) } -// When index is -1 index chooses the current tab void MainView::cloneTab(int index) { if (index < 0) diff --git a/src/mainview.h b/src/mainview.h index 636d37a..f0a1982 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -125,14 +125,17 @@ public slots: */ void newTab(); + // Indexed slots void cloneTab(int index = -1); void closeTab(int index = -1, bool del = true); - void closeOtherTabs(int index); + void closeOtherTabs(int index = -1); void reloadTab(int index = -1); + void detachTab(int index = -1); + void reloadAllTabs(); void nextTab(); void previousTab(); - void detachTab(int index = -1); + void openClosedTabs(); void openClosedTab(); void switchToTab(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5a0b256..dc1dc70 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -402,6 +402,7 @@ void MainWindow::setupActions() // ============================== Indexed Tab Actions ==================================== a = new KAction(KIcon("tab-close"), i18n("&Close Tab"), this); + a->setShortcuts( KStandardShortcut::close() ); actionCollection()->addAction(QL1S("close_tab"), a); connect(a, SIGNAL(triggered(bool)), m_view->tabBar(), SLOT(closeTab())); @@ -1094,13 +1095,6 @@ void MainWindow::keyPressEvent(QKeyEvent *event) return; } - // close current tab action - if ((event->modifiers() == Qt::ControlModifier) && event->key() == Qt::Key_W) - { - m_view->closeTab(m_view->currentIndex()); - return; - } - KMainWindow::keyPressEvent(event); } diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 94c5efb..09aa814 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -120,30 +120,35 @@ QSize TabBar::tabSizeHint(int index) const void TabBar::cloneTab() { emit cloneTab(m_actualIndex); + m_actualIndex = -1; } void TabBar::closeTab() { emit closeTab(m_actualIndex); + m_actualIndex = -1; } void TabBar::closeOtherTabs() { emit closeOtherTabs(m_actualIndex); + m_actualIndex = -1; } void TabBar::reloadTab() { emit reloadTab(m_actualIndex); + m_actualIndex = -1; } void TabBar::detachTab() { emit detachTab(m_actualIndex); + m_actualIndex = -1; }