[git] Wincetools - branch, kdepimcetools, updated. 8ab1608b4c98ac0fe9f14070c574523df01d8f84

by Andreas Holzammer cvs at cvs.gnupg.org
Fri Jan 28 17:35:36 CET 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".

The branch, kdepimcetools has been updated
       via  8ab1608b4c98ac0fe9f14070c574523df01d8f84 (commit)
      from  78287e3f2742c170d89ddcb448cbe14506e7c0dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8ab1608b4c98ac0fe9f14070c574523df01d8f84
Author: Andreas Holzammer <andreas.holzammer at kdab.com>
Date:   Fri Jan 28 17:15:23 2011 +0100

    dont load the executables high anymore
    Because they fit into the process slot and then the system can do pageing

diff --git a/loader/himemce.c b/loader/himemce.c
index 6593b41..ba388b9 100644
--- a/loader/himemce.c
+++ b/loader/himemce.c
@@ -63,7 +63,6 @@ main (int argc, char *argv[])
   WCHAR *cmdline;
 
   BOOL ret;
-  int result = 0;
 
   SetCursor( LoadCursor( NULL, IDC_WAIT ) );
   app_name = get_app_name ();
@@ -74,12 +73,12 @@ main (int argc, char *argv[])
   /* Note that this does not spawn a new process, but just calls into
      the startup function of the app eventually, and returns with its
      exit code.  */
-  ret = MyCreateProcessW (app_name, cmdline, &result);
+  ret = CreateProcess (app_name, cmdline, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, NULL);
   if (! ret)
     {
       ERR ("starting %S failed: %i\n", app_name, GetLastError());
       return 1;
     }
 
-  return result;
+  return 0;
 }
diff --git a/loader/splashscreen.cpp b/loader/splashscreen.cpp
index 13342fd..d6f3094 100644
--- a/loader/splashscreen.cpp
+++ b/loader/splashscreen.cpp
@@ -2,10 +2,7 @@
 #include <aygshell.h>
 #include "himemce.h"
 
-// Global Bitmap variable
-HBITMAP hbm;
-
-const wchar_t *szTitle = L"Kontact Mobile";		// title bar text
+const wchar_t *szTitle = L"Kontact Touch";		// title bar text
 const wchar_t *szWindowClass = L"SplashScreen";	// main window class name
 
 //Prototype of the main function from the loader
@@ -27,75 +24,6 @@ BOOL RotateTo270Degrees()
    return true;
 }
 
-// Load Splashscreen from resource dll
-BOOL onCreate(
-   HWND hwnd)
-{
-  // Load Splashscreen dll
-  HINSTANCE hinst = LoadLibrary(L"splashscreen.dll");
-
-	if (!hinst) {
-		printf("failed to load splashscreen dll!\n");
-		return false;
-	}
-  hbm = LoadBitmap(hinst,MAKEINTRESOURCE(101));
-  
-  return true;
-}
-
-// Clean up
-void onDestroy(
-  HWND hwnd)
-{
-  DeleteObject(hbm);
-  
-  PostQuitMessage(0);
-}
-
-void onPaint(
-  HWND hwnd)
-{
-  PAINTSTRUCT ps;
-  HDC hdc = BeginPaint(hwnd,&ps);
-  
-  HDC hdcMem = CreateCompatibleDC(NULL);
-  SelectObject(hdcMem, hbm);
-
-  BITMAP bm;
-  GetObject(hbm,sizeof(bm),&bm);
-  
-  BitBlt(hdc,0,0,bm.bmWidth,bm.bmHeight,hdcMem,0,0,SRCCOPY);
-
-  DeleteDC(hdcMem);
-  
-  EndPaint(hwnd,&ps);
-}  
-
-
-LRESULT CALLBACK windowProc(
-  HWND hwnd,
-  UINT uMsg,
-  WPARAM wParam,
-  LPARAM lParam)
-{
-  switch(uMsg)
-  {
-  case WM_CREATE:
-    onCreate(hwnd);
-    break;
-  case WM_DESTROY:
-    onDestroy(hwnd);
-    break;
-  case WM_PAINT:
-	  onPaint(hwnd);
-	  break;
-  case WM_SETTINGCHANGE:
-    RotateTo270Degrees();
-    break;
-  }
-  return DefWindowProc(hwnd,uMsg,wParam,lParam);
-}  
-
 /* Restore a Window of a process based on the filename
  * of this process. With some special Case handling for
  * Kontact-Mobile
@@ -120,11 +48,11 @@ restore_existing_window( const wchar_t * filename )
     }
     TRACE("BASENAME of %S \n is : %S \n", filename, basename);
 
-    c = L'-';
+    c = L'.';
 
     p = wcsrchr(filename, c);
     if (! p ) {
-        TRACE("File extension -real.exe could not be found\n");
+        TRACE("File extension .exe could not be found\n");
         return false;
     }
     *p = L'\0';
@@ -157,22 +85,6 @@ restore_existing_window( const wchar_t * filename )
     return false;
 }
 
-void registerClass(
-  HINSTANCE hInstance)
-{
-  WNDCLASS wc = {
-    CS_NOCLOSE,
-    windowProc,
-    0,0,
-    hInstance,
-    NULL,
-    NULL,
-    (HBRUSH) GetStockObject(WHITE_BRUSH),
-    NULL,
-    szWindowClass
-  };
-  RegisterClass(&wc);
-}
 
 int WINAPI WinMain(
   HINSTANCE hInstance,
@@ -190,29 +102,12 @@ int WINAPI WinMain(
         return 0;
     }
 
-    // If the splashscreen window is already loaded just show it
+    // Show splashscreen
 	hwnd = FindWindow(szWindowClass, szTitle);	
   if (hwnd) { 
     ::ShowWindow( hwnd, SW_SHOW );
     SetForegroundWindow( hwnd );
     SHFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
-	} else {
-	  registerClass(hInstance);
-	  
-	  hwnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
-			0, 0, 0, 0, NULL, NULL, hInstance, NULL);
-      
-    SHFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
-
-    RECT rc;
-    // Next resize the main window to the size of the screen.
-    SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
-    MoveWindow(hwnd, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);
-
-    SetForegroundWindow(hwnd);
-
-	  ShowWindow(hwnd,nCmdShow);
-	  UpdateWindow(hwnd);
 	}
   
   //Call the loaders main function

-----------------------------------------------------------------------

Summary of changes:
 loader/himemce.c        |    5 +-
 loader/splashscreen.cpp |  113 ++---------------------------------------------
 2 files changed, 6 insertions(+), 112 deletions(-)


hooks/post-receive
-- 
UNNAMED PROJECT
http://git.gnupg.org




More information about the Gnupg-commits mailing list