[git] Wincetools - branch, kdepimcetools, updated. 266e97af262f9fc3dd4f7d9bfbd7c0efadebbf0b

by Andreas Holzammer cvs at cvs.gnupg.org
Thu Feb 3 17:53:51 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  266e97af262f9fc3dd4f7d9bfbd7c0efadebbf0b (commit)
      from  8e14d6599a1d1a9a21a6f4c1a7f82cc55fcae369 (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 266e97af262f9fc3dd4f7d9bfbd7c0efadebbf0b
Author: Andreas Holzammer <andreas.holzammer at kdab.com>
Date:   Thu Feb 3 17:33:06 2011 +0100

    fix brining window in front

diff --git a/loader/splashscreen.cpp b/loader/splashscreen.cpp
index d6f3094..0e335e4 100644
--- a/loader/splashscreen.cpp
+++ b/loader/splashscreen.cpp
@@ -24,6 +24,22 @@ BOOL RotateTo270Degrees()
    return true;
 }
 
+bool endswith(const wchar_t *source, const wchar_t *endstr) {
+    size_t sourceLen;
+    size_t endstrLen;
+    wchar_t *startEnd;
+    sourceLen = wcslen(source);
+    endstrLen = wcslen(endstr);
+    if (sourceLen < endstrLen) {
+        return false;
+    }
+    startEnd = (wchar_t *)(source + (sourceLen - endstrLen));
+    if (wcscmp(startEnd, endstr) == 0) {
+        return true;
+    }
+    return false;
+}
+
 /* Restore a Window of a process based on the filename
  * of this process. With some special Case handling for
  * Kontact-Mobile
@@ -48,7 +64,11 @@ restore_existing_window( const wchar_t * filename )
     }
     TRACE("BASENAME of %S \n is : %S \n", filename, basename);
 
-    c = L'.';
+    if (endswith(filename, L"-real.exe")) {
+        c = L'-';
+    } else {
+        c = L'.';
+    }
 
     p = wcsrchr(filename, c);
     if (! p ) {

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

Summary of changes:
 loader/splashscreen.cpp |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)


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




More information about the Gnupg-commits mailing list