Don't use hardcoded DEMOCODEDIR on Windows.

2003-09-25  Tor Lillqvist  <tml@iki.fi>

	* demos/gtk-demo/main.c: Don't use hardcoded DEMOCODEDIR on Windows.

2003-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (handle_wm_paint): New
	function. Code split out from gdk_event_translate(). Needed
	because gdk_event_get_graphics_expose() couldn't do anything
	sensible otherwise. (Not that I think graphics exposes work anyway
	in gdk/win32, but at least now the code could work.)

	(gdk_event_get_graphics_expose): Call handle_wm_paint() instead of
	gdk_event_translate(), which couldn't have worked as it doesn't
	take any pre-allocated GdkEvent parameter any longer.

	(gdk_event_translate): Handle WM_MOUSEACTIVATE: Don't let
	GDK_WINDOW_TEMP windows be activated. (#122578, John Ehresman)
This commit is contained in:
Tor Lillqvist
2003-09-25 18:48:06 +00:00
committed by Tor Lillqvist
parent 97f1b098af
commit 4a2de86c44
7 changed files with 240 additions and 106 deletions

View File

@ -28,6 +28,31 @@ struct _CallbackData
GtkTreePath *path;
};
#ifdef G_OS_WIN32
#undef DEMOCODEDIR
static char *
get_democodedir (void)
{
static char *result = NULL;
if (result == NULL)
{
result = g_win32_get_package_installation_directory (NULL, NULL);
if (result == NULL)
result = "unknown-location";
result = g_strconcat (result, "\\share\\gtk-2.0\\demo", NULL);
}
return result;
}
#define DEMOCODEDIR get_democodedir ()
#endif
/**
* demo_find_file:
* @base: base filename