← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2469: first make windows then display them on startup

 

------------------------------------------------------------
revno: 2469
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Wed 2011-03-23 22:25:17 +0100
message:
  first make windows then display them on startup
modified:
  changelog.txt
  win32/MainWindow.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt	2011-03-18 21:48:06 +0000
+++ changelog.txt	2011-03-23 21:25:17 +0000
@@ -11,6 +11,7 @@
 * [L#710359] Add finished downloads log (emtee)
 * Save and restore the current directory of file lists (poy)
 * Move file list status bar buttons to the toolbar (poy)
+* Faster startup with many tabs
 
 -- 0.782 2011-03-05 --
 * Prevent a remote crash triggered via malformed user commands (poy)

=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2011-03-23 20:26:21 +0000
+++ win32/MainWindow.cpp	2011-03-23 21:25:17 +0000
@@ -174,13 +174,15 @@
 
 	callAsync(std::bind(&MainWindow::parseCommandLine, this, tstring(::GetCommandLine())));
 
-	int cmdShow = dwt::Application::instance().getCmdShow();
-	::ShowWindow(handle(), (cmdShow == SW_SHOWDEFAULT || cmdShow == SW_SHOWNORMAL) ? SETTING(MAIN_WINDOW_STATE) : cmdShow);
-	if(cmdShow == SW_MINIMIZE || cmdShow == SW_SHOWMINIMIZED || cmdShow == SW_SHOWMINNOACTIVE)
-		handleMinimized();
+	callAsync([this] {
+		int cmdShow = dwt::Application::instance().getCmdShow();
+		::ShowWindow(GCC_WTF->handle(), (cmdShow == SW_SHOWDEFAULT || cmdShow == SW_SHOWNORMAL) ? SETTING(MAIN_WINDOW_STATE) : cmdShow);
+		if(cmdShow == SW_MINIMIZE || cmdShow == SW_SHOWMINIMIZED || cmdShow == SW_SHOWMINNOACTIVE)
+			handleMinimized();
+	});
 
 	if(SETTING(NICK).empty()) {
-		callAsync([this]() {
+		callAsync([this] {
 			SystemFrame::openWindow(getTabView(), false, false);
 
 			WinUtil::help(this, IDH_GET_STARTED);
@@ -210,6 +212,7 @@
 		cs.location = dwt::Rectangle(pos_x, pos_y, size_x, size_y);
 	}
 
+	cs.style &= ~WS_VISIBLE;
 	cs.exStyle |= WS_EX_APPWINDOW;
 	if (ResourceManager::getInstance()->isRTL())
 		cs.exStyle |= WS_EX_RTLREADING;