Commit 947b32b7 authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

updated added all the new tests

2003-11-15  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc gdk/gdk.def
            gtk/gtk.def gtk/makefile.msc.in : updated
	* tests/makefile.msc : added all the new tests

	* gtk/gtkfilefilter.c(finalize) : initialize filter
	from object not from itself

	* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
	modified as less as posible to have aworking implementation
	on win32. There maybe the desire to merge the unchanged pats into
	a common base class.
	Also implemented a simple glib based bookmark handling, which
	is currently missing in gtkfilesystemunix.[hc] but can be copied
	over there.
	* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h

	* gdk/win32/gdkwindow-win32.c : implement
	gdk_window_set_keep_above() and gdk_window_set_keep_below()

	* tests/testmerge.c : don't include unistd.h unconditionally,
	#define STDOUT_FILENO if it isn't defined

	* tests/testfilechooser.c : make it compile on win32
parent 9e831c8b
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
2003-11-15 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): If the window is
......
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
2003-11-15 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): If the window is
......
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
2003-11-15 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): If the window is
......
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
2003-11-15 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): If the window is
......
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
2003-11-15 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): If the window is
......
......@@ -42,7 +42,10 @@ PERL = perl
CFLAGS = -FImsvc_recommended_pragmas.h -I . -I .. \
$(GLIB_CFLAGS) $(PANGO_CFLAGS) -I ../gdk-pixbuf \
$(G_DEBUGGING) -DHAVE_CONFIG_H -DGDK_ENABLE_BROKEN -DGDK_VERSION=\"$(GTK_VER)\"
$(G_DEBUGGING) -DHAVE_CONFIG_H -DGDK_ENABLE_BROKEN \
-DGDK_VERSION=\"$(GTK_VER)\" \
-DG_LOG_DOMAIN=\"Gdk\"
EXTRALIBS = $(WTKIT)\lib\i386\wntab32x.lib $(GLIB_LIBS) \
..\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib \
$(PANGOWIN32_LIBS) $(INTL_LIBS)
......
......@@ -732,6 +732,12 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
private->state &= (~GDK_WINDOW_STATE_WITHDRAWN);
else
private->state |= GDK_WINDOW_STATE_WITHDRAWN;
if (GetWindowLong ((HWND)anid, GWL_EXSTYLE) & WS_EX_TOPMOST)
private->state |= GDK_WINDOW_STATE_ABOVE;
else
private->state &= (~GDK_WINDOW_STATE_ABOVE);
private->state &= (~GDK_WINDOW_STATE_BELOW);
private->depth = gdk_visual_get_system ()->depth;
_gdk_window_init_position (GDK_WINDOW (private));
......@@ -954,6 +960,19 @@ show_window_internal (GdkWindow *window,
old_active_window = GetActiveWindow ();
if (private->state & (GDK_WINDOW_STATE_BELOW | GDK_WINDOW_STATE_ABOVE))
{
DWORD exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
if (private->state & GDK_WINDOW_STATE_BELOW)
exstyle &= (~WS_EX_TOPMOST);
if (private->state & GDK_WINDOW_STATE_ABOVE)
exstyle |= WS_EX_TOPMOST;
if (!SetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE, exstyle))
WIN32_API_FAILED ("SetWindowLong");
}
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
gdk_window_fullscreen (window);
else if (private->state & GDK_WINDOW_STATE_MAXIMIZED)
......@@ -2702,6 +2721,46 @@ gdk_window_unfullscreen (GdkWindow *window)
}
}
void
gdk_window_set_keep_above (GdkWindow *window, gboolean setting)
{
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
if (GDK_WINDOW_IS_MAPPED (window))
{
if (!SetWindowPos(GDK_WINDOW_HWND (window), setting ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE))
WIN32_API_FAILED ("SetWindowPos");
}
else
gdk_synthesize_window_state (window,
setting ? GDK_WINDOW_STATE_BELOW : GDK_WINDOW_STATE_ABOVE,
setting ? GDK_WINDOW_STATE_ABOVE : 0);
}
void
gdk_window_set_keep_below (GdkWindow *window, gboolean setting)
{
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
if (GDK_WINDOW_IS_MAPPED (window))
{
if (!SetWindowPos(GDK_WINDOW_HWND (window), setting ? HWND_BOTTOM : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE))
WIN32_API_FAILED ("SetWindowPos");
}
else
gdk_synthesize_window_state (window,
setting ? GDK_WINDOW_STATE_ABOVE : GDK_WINDOW_STATE_BELOW,
setting ? GDK_WINDOW_STATE_BELOW : 0);
}
void
gdk_window_focus (GdkWindow *window,
guint32 timestamp)
......
This diff is collapsed.
......@@ -24,6 +24,9 @@
#ifdef G_OS_UNIX
#include "gtkfilesystemunix.h"
#endif
#ifdef G_OS_WIN32
#include "gtkfilesystemwin32.h"
#endif
#include "gtktypebuiltins.h"
struct _GtkFileChooserWidgetPrivate
......
......@@ -133,7 +133,7 @@ filter_rule_free (FilterRule *rule)
static void
gtk_file_filter_finalize (GObject *object)
{
GtkFileFilter *filter = GTK_FILE_FILTER (filter);
GtkFileFilter *filter = GTK_FILE_FILTER (object);
g_slist_foreach (filter->rules, (GFunc)filter_rule_free, NULL);
......
This diff is collapsed.
/* GTK - The GIMP Toolkit
* gtkfilesystemunix.h: Default implementation of GtkFileSystem for UNIX-like systems
* Copyright (C) 2003, Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_FILE_SYSTEM_UNIX_H__
#define __GTK_FILE_SYSTEM_UNIX_H__
#include <glib-object.h>
#include "gtkfilesystem.h"
G_BEGIN_DECLS
#define GTK_TYPE_FILE_SYSTEM_UNIX (gtk_file_system_unix_get_type ())
#define GTK_FILE_SYSTEM_UNIX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_SYSTEM_UNIX, GtkFileSystemUnix))
#define GTK_IS_FILE_SYSTEM_UNIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_SYSTEM_UNIX))
typedef struct _GtkFileSystemUnix GtkFileSystemUnix;
GtkFileSystem *gtk_file_system_unix_new (void);
GType gtk_file_system_unix_get_type (void);
G_END_DECLS
#endif /* __GTK_FILE_SYSTEM_UNIX_H__ */
......@@ -34,7 +34,8 @@ LDFLAGS = $(ATK_LIBS) /link /machine:ix86 $(LINKDEBUG)
DEFINES = $(G_DEBUGGING) -DGTK_DISABLE_COMPAT_H -DG_LOG_DOMAIN=\"Gtk\" -Dnear=xxnear \
-DPANGO_ENABLE_BACKEND \
-DGTK_VERSION=\"$(GTK_VER)\" -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
-DGTK_HOST=\"win32\"
-DGTK_HOST=\"win32\" \
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED
TOUCH = copy makefile.msc+nul
......@@ -58,6 +59,8 @@ gtk_OBJECTS = \
gtkaccellabel.obj \
gtkaccelmap.obj \
gtkaccessible.obj \
gtkaction.obj \
gtkactiongroup.obj \
gtkadjustment.obj \
gtkalignment.obj \
gtkarrow.obj \
......@@ -74,6 +77,9 @@ gtk_OBJECTS = \
gtkcellrenderertext.obj \
gtkcellrenderertoggle.obj \
gtkcellrendererpixbuf.obj \
gtkcellrendererseptext.obj \
gtkcellview.obj \
gtkcellviewmenuitem.obj \
gtkcheckbutton.obj \
gtkcheckmenuitem.obj \
gtkclipboard.obj \
......@@ -82,6 +88,8 @@ gtk_OBJECTS = \
gtkcolorsel.obj \
gtkcolorseldialog.obj \
gtkcombo.obj \
gtkcombobox.obj \
gtkcomboboxentry.obj \
gtkcontainer.obj \
gtkctree.obj \
gtkcurve.obj \
......@@ -93,7 +101,17 @@ gtk_OBJECTS = \
gtkentrycompletion.obj \
gtkeventbox.obj \
gtkexpander.obj \
gtkfilechooser.obj \
gtkfilechooserdefault.obj \
gtkfilechooserdialog.obj \
gtkfilechooserentry.obj \
gtkfilechooserutils.obj \
gtkfilechooserwidget.obj \
gtkfilefilter.obj \
gtkfilesel.obj \
gtkfilesystem.obj \
gtkfilesystemmodel.obj \
gtkfilesystemwin32.obj \
gtkfixed.obj \
gtkfontsel.obj \
gtkfontbutton.obj \
......@@ -147,6 +165,7 @@ gtk_OBJECTS = \
gtkpreview.obj \
gtkprogress.obj \
gtkprogressbar.obj \
gtkradioaction.obj \
gtkradiobutton.obj \
gtkradiotoolbutton.obj \
gtkradiomenuitem.obj \
......@@ -187,6 +206,7 @@ gtk_OBJECTS = \
gtktextview.obj \
gtkthemes.obj \
gtktipsquery.obj \
gtktoggleaction.obj \
gtktogglebutton.obj \
gtktoggletoolbutton.obj \
gtktoolbar.obj \
......@@ -207,6 +227,7 @@ gtk_OBJECTS = \
gtktreeviewcolumn.obj \
gtktypeutils.obj \
gtktypebuiltins.obj \
gtkuimanager.obj \
gtkvbbox.obj \
gtkvbox.obj \
gtkviewport.obj \
......@@ -264,6 +285,10 @@ gtk_public_h_sources = \
gtkenums.h \
gtkeventbox.h \
gtkexpander.h \
gtkfilechooser.h \
gtkfilechooserdialog.h \
gtkfilechooserwidget.h \
gtkfilefilter.h \
gtkfilesel.h \
gtkfixed.h \
gtkfontbutton.h \
......@@ -450,11 +475,14 @@ gtkmarshal.c : gtkmarshal.list
gtksignal.obj : gtksignal.c gtkmarshal.c gtkmarshal.h
$(CC) $(CFLAGS) -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" gtksignal.c
gtk.res : gtk.rc
rc -DBUILDNUMBER=0 -r -fo gtk.res gtk.rc
#
# Linking:
#
libgtk-win32-$(GTK_VER)-0.dll : $(gtk_OBJECTS) gtk.def
$(CC) $(CFLAGS) -LD -Fm -Fe$@ $(gtk_OBJECTS) \
libgtk-win32-$(GTK_VER)-0.dll : $(gtk_OBJECTS) gtk.def gtk.res
$(CC) $(CFLAGS) -LD -Fm -Fe$@ $(gtk_OBJECTS) gtk.res \
$(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) \
gdi32.lib user32.lib advapi32.lib wsock32.lib \
$(LDFLAGS) /implib:gtk-win32-$(GTK_VER).lib /def:gtk.def
......
......@@ -38,11 +38,22 @@ all : \
#
# Test programs:
#
TESTAPPS = testcalendar testdnd testgtk testinput testrgb testselection \
testtext testtextbuffer testsocket testsocket_child \
testtreeedit testtreeflow \
testtreecolumns testtreefocus testtreesort testtreeview treestoretest \
testthreads simple
TESTAPPS = \
testabi testactions \
testcalendar testcombo \
testdnd \
testfilechooser \
testgtk \
testicontheme testinput \
testmenus testmerge testmultidisplay testmultiscreen \
testrgb \
testselection \
testtext testtextbuffer testtoolbar \
testtreecolumns testtreeedit testtreeflow testtreefocus \
testtreesort testtreeview treestoretest \
testsocket testsocket_child \
testthreads \
simple
all-test-apps:
......@@ -65,8 +76,17 @@ EXTRA_OBJETCS = prop-editor.obj
EXTRA_OBJETCS = prop-editor.obj
!ENDIF
!IFDEF EXTRA_testtoolbar
EXTRA_OBJETCS = prop-editor.obj
!ENDIF
!IFDEF EXTRA_testfilechooser
EXTRA_OBJETCS = prop-editor.obj
EXTRA_LIBS = gdi32.lib user32.lib shell32.lib
!ENDIF
$(TESTAPP).exe : ../gtk/gtk-win32-$(GTK_VER).lib $(TESTAPP).obj
$(CC) $(CFLAGS) $(TESTAPP).obj $(EXTRA_OBJETCS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
$(CC) $(CFLAGS) $(TESTAPP).obj $(EXTRA_OBJETCS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(EXTRA_LIBS) $(LDFLAGS)
$(TESTAPP).obj : $(TESTAPP).c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"$(TESTAPP)\" $(TESTAPP).c
......
#include "config.h"
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#ifdef G_OS_WIN32
# define WIN32_MEAN_AND_LEAN
# include <windows.h> /* ExtractAssociatedIcon */
# include <io.h>
# define localtime_r(t,b) localtime(t)
# ifndef S_ISREG
# define S_ISREG(m) ((m) & _S_IFREG)
# endif
# include <gdk/win32/gdkwin32.h> /* gdk_win32_hdc_get */
#endif
#include "prop-editor.h"
static GtkWidget *preview_label;
......
#include "config.h"
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#ifndef STDOUT_FILENO
#define STDOUT_FILENO 1
#endif
struct { const gchar *filename; guint merge_id; } merge_ids[] = {
{ "merge-1.ui", 0 },
{ "merge-2.ui", 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment