summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index cbfd418b..e4958919 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -61,10 +61,13 @@ MainView::MainView(QWidget *parent)
, m_urlBars(new StackedUrlBar(this))
, m_tabBar(new TabBar(this))
{
+ // setting tabbar
setTabBar(m_tabBar);
-
+
+ // loading pixmap path
m_loadingGitPath = KStandardDirs::locate("appdata" , "pics/loading.gif");
+ // connecting tabbar signals
connect(m_tabBar, SIGNAL(closeTab(int)), this, SLOT(slotCloseTab(int)));
connect(m_tabBar, SIGNAL(cloneTab(int)), this, SLOT(slotCloneTab(int)));
connect(m_tabBar, SIGNAL(closeOtherTabs(int)), this, SLOT(slotCloseOtherTabs(int)));
@@ -72,19 +75,14 @@ MainView::MainView(QWidget *parent)
connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(slotReloadAllTabs()));
connect(m_tabBar, SIGNAL(tabMoved(int,int)), this, SLOT(moveTab(int,int)));
- // Recently Closed Tab Action
- connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu()));
- connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
- m_recentlyClosedTabsAction = new KAction(i18n("Recently Closed Tabs"), this);
- m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
- m_recentlyClosedTabsAction->setEnabled(false);
-
// --
connect(this, SIGNAL(loadUrlPage(const KUrl &)), this, SLOT(loadUrlInCurrentTab(const KUrl &)));
connect(this, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentChanged(int)));
setTabsClosable(true);
connect(m_tabBar, SIGNAL(tabCloseRequested(int)), this, SLOT(slotCloseTab(int)));
+
+ QTimer::singleShot(0, this, SLOT(postLaunch()));
}
@@ -93,6 +91,16 @@ MainView::~MainView()
}
+void MainView::postLaunch()
+{
+ // Recently Closed Tab Action
+ connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu()));
+ connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
+ m_recentlyClosedTabsAction = new KAction(i18n("Recently Closed Tabs"), this);
+ m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
+ m_recentlyClosedTabsAction->setEnabled(false);
+}
+
void MainView::showTabBar()
{
if ( ReKonfig::alwaysShowTabBar() )