summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2003-09-25 18:48:06 +0000
committerTor Lillqvist <tml@src.gnome.org>2003-09-25 18:48:06 +0000
commit4a2de86c44b264d69e69da92b92957024a1e2c56 (patch)
treea47121117906c01914cd94906b686a393a3be2aa /demos
parent97f1b098afb946d9883b12cb9d5c8d50735836fd (diff)
downloadgdk-pixbuf-4a2de86c44b264d69e69da92b92957024a1e2c56.tar.gz
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)
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index d0acf2733..422abdb08 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -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