gtk/gtkmain.c Use the new

2001-01-18  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkmain.c
	* gtk/gtkrc.c: (Win32) Use the new
	g_win32_get_package_installation_(sub)directory() functions.

	* config.h.win32.in: New file.

	* config.h.win32: Removed.

	* configure.in: Output config.h.win32.

	* Makefile.am: Add it to EXTRA_DIST.

	* gtk/gtk.def: Update.

2001-01-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
	Eliminate redraws when input-only windows are shown or
	hidden. Thanks to jpe@archaeopteryx.com.

2001-01-18  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-io.c (get_libdir): (Win32) Use the new
	g_win32_get_package_installation_subdirectory() function.
	(gtk_win32_get_installation_directory): Remove this then.
This commit is contained in:
Tor Lillqvist 2001-01-17 22:26:19 +00:00 committed by Tor Lillqvist
parent 18fb9bcd53
commit 576ef7f29a
16 changed files with 209 additions and 98 deletions

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -1,3 +1,19 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.c
* gtk/gtkrc.c: (Win32) Use the new
g_win32_get_package_installation_(sub)directory() functions.
* config.h.win32.in: New file.
* config.h.win32: Removed.
* configure.in: Output config.h.win32.
* Makefile.am: Add it to EXTRA_DIST.
* gtk/gtk.def: Update.
Wed Jan 17 16:22:54 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c (gtk_label_size_request): Set the
@ -81,7 +97,12 @@ Mon Jan 8 11:58:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
>>>>>>> 1.1676
2001-01-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
Eliminate redraws when input-only windows are shown or
hidden. Thanks to jpe@archaeopteryx.com.
Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
* docs/faq/gtk-faq.sgml: FAQ update:

View File

@ -19,6 +19,7 @@ EXTRA_DIST = \
README.cvs-commits \
README.win32 \
README.nanox \
config.h.win32 \
intl/libgettext.h \
intl/po2tbl.sed.in \
po/README.tools \

4
config.h.win32 → config.h.win32.in Executable file → Normal file
View File

@ -1,4 +1,4 @@
/* config.h.win32. Handcrafted for Microsoft C and gcc -mno-cygwin */
/* config.h.win32. Handcrafted for Microsoft C or mingw */
#if ! (defined(_MSC_VER) || defined(__GNUC__))
#error Unrecognized Win32 compiler, edit config.h.win32 by hand
@ -198,4 +198,4 @@
/* #undef HAVE_SIGSETJMP */
#define GETTEXT_PACKAGE "gtk20"
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"

View File

@ -1142,6 +1142,7 @@ AC_PATH_PROG(SGML2HTML, sgml2html, no)
AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno)
AC_OUTPUT([
config.h.win32
gtk+.spec
docs/gtk-config.1
Makefile

View File

@ -1,3 +1,9 @@
2001-01-18 Tor Lillqvist <tml@iki.fi>
* gdk-pixbuf-io.c (get_libdir): (Win32) Use the new
g_win32_get_package_installation_subdirectory() function.
(gtk_win32_get_installation_directory): Remove this then.
2001-01-01 Havoc Pennington <hp@redhat.com>
* Makefile.am (libgdk_pixbuf_1_3_la_LDFLAGS): add

View File

@ -215,55 +215,17 @@ pixbuf_module_symbol (GModule *module, const char *module_name, const char *symb
#ifdef G_OS_WIN32
/* What would be the right place for this function? Also
* gtk needs this function (to find the gtkrc and themes).
* But it seems stupid for the gdk-pixbuf DLL to depend
* on the gtk DLL. Should it be in the gdk DLL? Or should we
* have a small static library at the top gtk+ level?
*/
static gchar *
gtk_win32_get_installation_directory (void)
{
static gboolean been_here = FALSE;
static gchar gtk_installation_dir[200];
gchar win_dir[100];
HKEY reg_key = NULL;
DWORD type;
DWORD nbytes = sizeof (gtk_installation_dir);
if (been_here)
return gtk_installation_dir;
been_here = TRUE;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\GNU\\GTk+", 0,
KEY_QUERY_VALUE, &reg_key) != ERROR_SUCCESS
|| RegQueryValueEx (reg_key, "InstallationDirectory", 0,
&type, gtk_installation_dir, &nbytes) != ERROR_SUCCESS
|| type != REG_SZ)
{
/* Uh oh. Use hard-coded %WinDir%\gtk+ value */
GetWindowsDirectory (win_dir, sizeof (win_dir));
sprintf (gtk_installation_dir, "%s\\gtk+", win_dir);
}
if (reg_key != NULL)
RegCloseKey (reg_key);
return gtk_installation_dir;
}
static char *
get_libdir (void)
{
static char *libdir = NULL;
if (libdir == NULL)
libdir = g_strdup_printf (gtk_win32_get_installation_directory (),
G_DIR_SEPARATOR_S,
"loaders",
NULL);
libdir = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE,
g_strdup_printf ("gdk_pixbug-%d.%d.dll",
GDK_PIXBUF_MAJOR, GDK_PIXBUF_MINOR),
"loaders");
return libdir;
}

View File

@ -816,8 +816,18 @@ gdk_window_show (GdkWindow *window)
}
else
{
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
{
SetWindowPos(GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0,
SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOMOVE | SWP_NOSIZE);
}
else
{
GdkWindow *parent = private->parent;
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
if (parent == gdk_parent_root)
SetForegroundWindow (GDK_WINDOW_HWND (window));
BringWindowToTop (GDK_WINDOW_HWND (window));
#if 0
@ -825,6 +835,7 @@ gdk_window_show (GdkWindow *window)
#endif
}
}
}
}
void
@ -844,8 +855,16 @@ gdk_window_hide (GdkWindow *window)
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
ShowOwnedPopups (GDK_WINDOW_HWND (window), FALSE);
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
{
SetWindowPos(GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0,
SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
}
else
{
ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE);
}
}
}
void

View File

@ -1555,7 +1555,6 @@ EXPORTS
gtk_widget_unparent
gtk_widget_unrealize
gtk_widget_unref
gtk_win32_get_installation_directory
gtk_window_activate_default
gtk_window_activate_focus
gtk_window_add_accel_group

View File

@ -406,12 +406,10 @@ gtk_init_check (int *argc,
# endif
# else /* !G_OS_WIN32 */
{
/* GTk+ locale dir is %WinDir%\gtk+\locale */
bindtextdomain (GETTEXT_PACKAGE,
g_strconcat (gtk_win32_get_installation_directory (),
G_DIR_SEPARATOR_S,
"locale",
NULL));
g_win32_get_package_installation_subdirectory (GETTEXT_PACKAGE,
g_strdup_printf ("gtk-%d.%d.dll", GTK_MAJOR_VERSION, GTK_MINOR_VERSION),
"locale"));
}
#endif
#endif

View File

@ -51,6 +51,7 @@
#include <glib.h>
#include "gdkconfig.h"
#include "gtkcompat.h"
#include "gtkrc.h"
#include "gtkbindings.h"
#include "gtkthemes.h"
@ -58,7 +59,6 @@
#include "gtkiconfactory.h"
#ifdef G_OS_WIN32
#include <windows.h> /* For GetWindowsDirectory */
#include <io.h>
#endif
@ -268,45 +268,23 @@ static GtkImageLoader image_loader = NULL;
#ifdef G_OS_WIN32
gchar *
gtk_win32_get_installation_directory (void)
static gchar *
get_gtk_dll_name (void)
{
static gboolean been_here = FALSE;
static gchar gtk_installation_dir[200];
gchar win_dir[100];
HKEY reg_key = NULL;
DWORD type;
DWORD nbytes = sizeof (gtk_installation_dir);
static gchar *gtk_dll = NULL;
if (been_here)
return gtk_installation_dir;
if (!gtk_dll)
gtk_dll = g_strdup_printf ("gtk-%d.%d.dll", GTK_MAJOR_VERSION, GTK_MINOR_VERSION);
been_here = TRUE;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\GNU\\GTk+", 0,
KEY_QUERY_VALUE, &reg_key) != ERROR_SUCCESS
|| RegQueryValueEx (reg_key, "InstallationDirectory", 0,
&type, gtk_installation_dir, &nbytes) != ERROR_SUCCESS
|| type != REG_SZ)
{
/* Uh oh. Use the old hard-coded %WinDir%\GTk+ value */
GetWindowsDirectory (win_dir, sizeof (win_dir));
sprintf (gtk_installation_dir, "%s\\gtk+", win_dir);
}
if (reg_key != NULL)
RegCloseKey (reg_key);
return gtk_installation_dir;
return gtk_dll;
}
static gchar *
get_themes_directory (void)
{
static gchar themes_dir[200];
sprintf (themes_dir, "%s\\themes", gtk_win32_get_installation_directory ());
return themes_dir;
return g_win32_get_package_installation_subdirectory (GETTEXT_PACKAGE,
get_gtk_dll_name (),
"themes");
}
#endif
@ -358,7 +336,7 @@ gtk_rc_get_im_module_file (void)
#ifndef G_OS_WIN32
result = g_strdup (GTK_SYSCONFDIR G_DIR_SEPARATOR_S "gtk-2.0" G_DIR_SEPARATOR_S "gtk.immodules");
#else
result = g_strdup_printf ("%s\\gtk.immodules", gtk_win32_get_installation_directory ());
result = g_strdup_printf ("%s\\gtk.immodules", g_win32_get_package_installation_directory (GETTEXT_PACKAGE, get_gtk_dll_name ()));
#endif
}
@ -462,7 +440,7 @@ gtk_rc_add_initial_default_files (void)
#ifndef G_OS_WIN32
str = g_strdup (GTK_SYSCONFDIR G_DIR_SEPARATOR_S "gtk-2.0" G_DIR_SEPARATOR_S "gtkrc");
#else
str = g_strdup_printf ("%s\\gtkrc", gtk_win32_get_installation_directory ());
str = g_strdup_printf ("%s\\gtkrc", g_win32_get_package_installation_directory (GETTEXT_PACKAGE, get_gtk_dll_name ()));
#endif
gtk_rc_add_default_file (str);