summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-28 19:07:47 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-28 19:07:47 +0200
commitb71a1e3f03808450ad9b4474b2098e637e99e14e (patch)
treeef8eb56ccc602446a89a9e27fe1d526d2360aa31
parentModified urlbar colors to have just loading colors (diff)
downloadrekonq-b71a1e3f03808450ad9b4474b2098e637e99e14e.tar.xz
Faster Mainview load
-rw-r--r--src/mainview.cpp24
-rw-r--r--src/mainview.h2
2 files changed, 18 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() )
diff --git a/src/mainview.h b/src/mainview.h
index 5493d6ab..529b441d 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -158,6 +158,8 @@ private slots:
*/
void moveTab(int fromIndex, int toIndex);
+ void postLaunch();
+
private:
/**