[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.3.1-164-g37f8b9d
by Andre Heinecke
cvs at cvs.gnupg.org
Mon Jul 11 18:11:59 CEST 2016
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 "GnuPG for Windows".
The branch, master has been updated
via 37f8b9d67e30e70c1f52b43d8ab66445c0b872e4 (commit)
via 9b0dfd008cc443de4024d7e25d5d3494cec02f92 (commit)
from 348dc61f54ac312d39e175892a10681732e83114 (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 37f8b9d67e30e70c1f52b43d8ab66445c0b872e4
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Mon Jul 11 18:09:42 2016 +0200
Ensure the slideshow is stopped on plugin detach
* src/g4wihelp.c (DllMain): Stop slideshow on detach.
* src/inst-final.nsi (SEC_final): Do not stop slideshow.
--
If the g4wihelp is detached but the timer / windowmessages are
not stopped our timer would trigger an access violation.
This fixes crashes during installation if the g4wihelp is detached
before the slide_stop was called from SEC_final.
diff --git a/src/g4wihelp.c b/src/g4wihelp.c
index dd2bc83..3fc742e 100644
--- a/src/g4wihelp.c
+++ b/src/g4wihelp.c
@@ -40,6 +40,8 @@ static HWND g_hwndParent; /* Handle of parent window or NULL. */
static HBITMAP g_hbm; /* Handle of the splash image. */
static int sleepint; /* Milliseconds to show the spals image. */
+void
+slide_stop(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop);
/* Standard entry point for DLLs. */
int WINAPI
@@ -47,6 +49,8 @@ DllMain (HANDLE hinst, DWORD reason, LPVOID reserved)
{
if (reason == DLL_PROCESS_ATTACH)
g_hInstance = hinst;
+ else if (reason == DLL_PROCESS_DETACH)
+ slide_stop(NULL, 0, NULL, NULL);
return TRUE;
}
diff --git a/src/inst-final.nsi b/src/inst-final.nsi
index 191bc95..5758cfc 100644
--- a/src/inst-final.nsi
+++ b/src/inst-final.nsi
@@ -23,8 +23,4 @@ Section "-final" SEC_final
# Set outpath back so that the Finish page gets what it expects.
SetOutPath "$INSTDIR"
-
- # Stop the slideshow
- g4wihelp::slide_stop
-
SectionEnd
commit 9b0dfd008cc443de4024d7e25d5d3494cec02f92
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Mon Jul 11 18:08:42 2016 +0200
Fix warnings in slideshow by using an int timerid
* src/slideshow.cpp(timerid): Use an int constant instead of
a pointer to a string literal.
--
Fixes compiler warnings, both should work.
diff --git a/src/slideshow.cpp b/src/slideshow.cpp
index 0c0bfe5..932097e 100644
--- a/src/slideshow.cpp
+++ b/src/slideshow.cpp
@@ -56,6 +56,8 @@
#include "exdll.h"
#include <initguid.h>
+static unsigned int timerid = 0xBEEF;
+
#ifndef _countof
#define _countof(A) (sizeof(A)/sizeof((A)[0]))
#endif
@@ -117,7 +119,7 @@ static LRESULT CALLBACK slide_WndProc(HWND, UINT, WPARAM, LPARAM);
static void
slide_abort(bool stayAuto = false)
{
- KillTimer(g_hWnd, 'XFBN');
+ KillTimer(g_hWnd, timerid);
if (!stayAuto)
{
if (lpPrevWndFunc != NULL && IsWindow(g_hWnd))
@@ -218,13 +220,13 @@ slide_NewImage(LPCTSTR imgPath, LPCTSTR caption, int duration)
g_step = _countof(SCA_Steps);
InvalidateRect(g_hWnd, NULL, FALSE); // no duration => force a WM_PAINT for immediate draw of picture
if (g_autoNext && g_autoDelay)
- SetTimer(g_hWnd, 'XFBN', g_autoDelay, NULL);
+ SetTimer(g_hWnd, timerid, g_autoDelay, NULL);
}
else
{
g_step = 0;
- slide_WndProc(g_hWnd, WM_TIMER, 'XFBN', 0); // first iteration right now
- SetTimer(g_hWnd, 'XFBN', duration/_countof(SCA_Steps), NULL);
+ slide_WndProc(g_hWnd, WM_TIMER, timerid, 0); // first iteration right now
+ SetTimer(g_hWnd, timerid, duration/_countof(SCA_Steps), NULL);
}
}
@@ -292,7 +294,7 @@ static LRESULT CALLBACK slide_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
switch (uMsg)
{
case WM_TIMER:
- if (wParam == 'XFBN')
+ if (wParam == timerid)
{
if (g_step == _countof(SCA_Steps))
{
@@ -310,9 +312,9 @@ static LRESULT CALLBACK slide_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
if (g_step == _countof(SCA_Steps))
{
if (g_autoNext && g_autoDelay)
- SetTimer(hWnd, 'XFBN', g_autoDelay, NULL);
+ SetTimer(hWnd, timerid, g_autoDelay, NULL);
else
- KillTimer(hWnd, 'XFBN');
+ KillTimer(hWnd, timerid);
}
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
src/g4wihelp.c | 4 ++++
src/inst-final.nsi | 4 ----
src/slideshow.cpp | 16 +++++++++-------
3 files changed, 13 insertions(+), 11 deletions(-)
hooks/post-receive
--
GnuPG for Windows
http://git.gnupg.org
More information about the Gpg4win-commits
mailing list