summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorShaneeb Kamran <shaneebster@gmail.com>2009-09-21 00:06:39 +0600
committerShaneeb Kamran <shaneebster@gmail.com>2009-09-21 00:06:39 +0600
commita57d19624df8d86d4327b4498bb3b4446227040f (patch)
tree6ad1dbca022d98154cda352ad91961ead129c23e /src/tabbar.cpp
parentcreate function fix (diff)
downloadrekonq-a57d19624df8d86d4327b4498bb3b4446227040f.tar.xz
Fixed problem with the add tab button of tab bar
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index d676af55..3f3faabc 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -73,7 +73,18 @@ TabBar::~TabBar()
void TabBar::postLaunch()
{
- m_addTabButton->setDefaultAction(Application::instance()->mainWindow()->actionByName("new_tab"));
+ // Find the correct MainWindow of this tab button
+ MainWindowList list = Application::instance()->mainWindowList();
+ MainWindow *window;
+ foreach (window, list)
+ {
+ if (window->isAncestorOf(this))
+ {
+ m_addTabButton->setDefaultAction(window->actionByName("new_tab"));
+ break;
+ }
+ }
+
m_addTabButton->setAutoRaise(true);
m_addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_addTabButton->show();