Compare commits

...

459 Commits

Author SHA1 Message Date
Kristian Rietveld 6efdc2c552 ==== Released 2.0.9 ====
Wed Nov 20 20:35:14 2002  Kristian Rietveld  <kris@gtk.org>

        * ==== Released 2.0.9 ====

        * configure.in: Version 2.0.9, interface, binary age 9.

        * NEWS: updated.
2002-11-20 20:57:47 +00:00
Kristian Rietveld 22ac220190 Merged treeview fixes from HEAD.
Wed Nov 20 19:42:57 2002  Kristian Rietveld  <kris@gtk.org>

        Merged treeview fixes from HEAD.

        * gtk/gtkrbtree.c (gtk_rbtree_reorder_sort_func): return a value
        in the range of [-1, 1] instead [0, 1],
        (gtk_rbtree_reorder_invert_func): ditto,
        This makes treeview reordering working on platforms as FreeBSD and
        solaris, thanks go to Heiner Eichmann for finding this out and
        sending in a patch (#98251).

        * gtk/gtktreestore.c (node_free): only free the data list if
        node->data is not NULL,
        (gtk_tree_store_remove): free the data list from the node if
        needed. (#94728, pointed out by Peter Bloomfield).

        * gtk/gtktreeview.c (gtk_tree_view_remove_column): stop editing
        and set the edited_column to NULL if edited_column is set.
        (#91288, modified patch from Josh Parsons).

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
        only _set_text if celltext->text is not NULL. (#97815, reported
        and testcase provided by Vitaly Tishkov).

        * gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
        also update the anchor_path, makes behaviour consistent with the
        other selection modification functions. (#96801, reported and
        testcase provided by Vitaly Tishkov).
2002-11-20 18:44:32 +00:00
Tor Lillqvist 952d3f505b Fix by Arnaud Charlet (#98983):
2002-11-20  Tor Lillqvist  <tml@iki.fi>

	Fix by Arnaud Charlet (#98983):

	* gtk+/gdk/win32/gdkwindow-win32.c
	(gdk_window_get_frame_extents): Fix typo in setting y.
2002-11-20 02:28:33 +00:00
Tor Lillqvist ca353b7fa2 Yes, my change on 2002-11-14 to gdkpixmap-win32.c:gdk_pixmap_new() broke
2002-11-19  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_new): Yes, my change
	on 2002-11-14 to gdkpixmap-win32.c:gdk_pixmap_new() broke
	palettized (256-colour) display slightly: For some reason
	GdkWindowObject::depth of GDK_INPUT_ONLY windows now needs to
	be set to the visual's depth, even if the X11 backend sets it
	to zero. Otherwise, on a palettized display, gdk_pixmap_new()
	when called from gdk_window_begin_paint_region() would get
	zero from gdk_drawable_get_depth(), and fail.
2002-11-19 03:24:30 +00:00
Christophe Merlet 8d16cc8c49 Updated French translation. 2002-11-17 15:49:35 +00:00
Dmitry Mastrukov 6c043829a9 be.po: Updated Belarusian translation from Belarusian team <i18n@mova.org>. 2002-11-17 04:14:13 +00:00
Tor Lillqvist 0daf22bbd1 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c
2002-11-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkdrawable-win32.c (generic_draw): Don't check if
	MaskBlt() is present in gdi32.dll, it is, even on Win9x. It just
	always returns failure on Win9x. Instead, call MaskBlt() only if
	we are on NT/2k/XP.
2002-11-15 23:21:51 +00:00
Christophe Merlet 4cc60fd507 Updated French translation. 2002-11-15 14:47:33 +00:00
Tor Lillqvist d6a421f195 Start implementing all fill styles (i.e. tiled, stippled, and opaque
2002-11-14  Tor Lillqvist  <tml@iki.fi>

	Start implementing all fill styles (i.e. tiled, stippled, and
	opaque stippled in addition to the plain solid style) in the Win32
	backend in an elegant and generic way. For now only did the
	draw_rectangle() and draw_glyphs() methods. The rest will
	follow. Previously some of the drawing methods implemented opaque
	stippling, but not tiles or non-opaque stippling.

	Seems to work fine, now the check marks show up in check buttons,
	the stippled background and stippled text in gtk-demo's Text
	Widget look as they should, and GtkText's line wrap arrow shows
	correctly instead of an ugly rectangle.

	The implementation does do a lot of pixmap handling and blitting
	back and forth, especially on Win9x. But performance is hopefully
	not an issue. I don't think many applications do a lot of tiled or
	stippled drawing.

	* gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that
	calls a GDI function and prints a warning if it failed. Also
	API_CALL for non-GDI calls. Cleans all the the if (!BlaBla())
	WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written
	GDI_CALL (BlaBla, ()).

	* gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places.

	(generic_draw): New function that handles all the blitting
	necessary to implement tiles and stipples. A function that
	actually draws stuff is passed as a parameter to
	generic_draw(). If the fill style is solid, it is called
	directly, to draw on the destination drawable. Otherwise it is
	called to draw on a temporary mask bitmap, which then is used in
	blitting operations. The tiles and/or stipples are rendered into
	another temporary pixmap. If MaskBlt() is available (on NT/2k/XP),
	it is used, otherwise a sequence of BitBlt() is used to do the
	final composition onto the destination drawable.

	(draw_tiles_lowlevel, draw_tiles): Some renaming and code
	reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable().

	(rop2_to_rop3): Instead of bitblt_wrapper, this function does the
	binary->ternary rop mapping.

	(draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs,
	gdk_win32_draw_glyphs): Split functionality into two functions,
	with generic_draw() doing its magic inbetween.

	* gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it
	was ifdeffed out and wouldn't have done anything even if
	enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't
	have any effect any more anyway after all the changes GTK+ has
	gone through in the last years. Remove some #if 0 code.

	* gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field
	to NULL in case a GC is copied while it has a Windows DC active.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc.
	Add mask_blt that points to MaskBlt() if available.

	* gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc
	option. Check if MaskBlt() is available. If there is a
	PRETEND_WIN9X envvar, set windows_version as if on Win9x.

	* gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new,
	gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't
	used or exported. Make a bit more like the X11 version. Hopefully
	I didn't break the fragile palettized display ("pseudocolor")
	code.
2002-11-15 00:20:02 +00:00
Christopher James Lahey 9e99955f55 Ref the colormap returned from gdk_colormap_lookup.
2002-11-13  Christopher James Lahey  <clahey@ximian.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref
	the colormap returned from gdk_colormap_lookup.
2002-11-13 22:51:25 +00:00
Tor Lillqvist 09b07f3434 New function. Translates the GC's current binary raster op (rop2) to the
2002-11-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (bitblt_wrapper): New
	function. Translates the GC's current binary raster op (rop2) to
	the appropriate ternary raster op and calls BitBlt(). Previously
	used SRCCOPY always.
	(blit_from_pixmap, blit_inside_window, blit_from_window): Use
	bitblt_wrapper().

	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkmain-win32.c:: Various debugging output improvements.

	* gdk/win32/gdkgc-win32.c (predraw_set_foreground): Check whether
	tile/stipple origins are valid when calling SetBrushOrgEx().
	(gdk_win32_hdc_get): Ifdef out code that tries to handle the
	stipple by converting it into a region, and combining the clip
	region with that. A stipple shouldn't work like that, it should
	replicate in x and y directions. Stipples will have to be handled
	elsewhere.

	* gdk/win32/gdkmain-win32.c: (gdk_win32_gcvalues_mask_to_string,
	gdk_win32_rop2_to_string): New debugging functions.
	(gdk_win32_print_dc): Print also DC's rop2 and text color.

	* gdk/win32/gdkprivate-win32.h: Declare new functions.
2002-11-13 21:28:19 +00:00
Tor Lillqvist f8de71ef6f More work on the Win32 backend. The scrolling problem diagnosis from
2002-11-12  Tor Lillqvist  <tml@iki.fi>

	More work on the Win32 backend. The scrolling problem diagnosis
	from 2002-11-07 was wrong, even if the cure happened to work. The
	problems were not caused by a lack of WM_PAINT messages while
	scrolling. The real issue was that SetWindowPos() and
	ScrollWindowEx() don't blit those parts of the window they think
	are invalid. As we didn't keep Windows's update region in synch
	with GDK's, Windows thought those areas that in fact had been
	updated were invalid. Calling ValidateRgn() in
	_gdk_windowing_window_queue_antiexpose() seems to be an elegant
	and efficient solution, removing from Windows's update region
	those areas we are about to repaint proactively.

	In some cases garbage leftover values were used for the clip
	origin in GdkGCWin32. This showed up as odd blank areas around the
	pixmaps included in the Text Widget in gtk-demo.

	Having the clip region either as a GdkRegion or a HRGN in
	GdkGCWin32 was unnecessary, it's better to just use a HRGN.

	The translation and antiexpose queue handling in
	gdkgeometry-win32.c seems unnecessary (and not implementable in
	the same way as on X11 anyway, no serial numbers) on Windows,
	ifdeffed out.

	All of testgtk and gtk-demo except "big windows" now seem to work
	pretty well.

	Bug #79720 should be fixed now.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate) In WM_PAINT
	handler: Don't check for empty update rect. When we get a
	WM_PAINT, the update region isn't empty. And if it for some
	strange reason is, that will be handled later anyway. Don't leak
	hrgn.

	* gdk/win32/gdkgc-win32.c:  Set clip origins to zero
	when appropriate.

	(gdk_gc_copy): Increase refcount on colormap if present.

	(gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple,
	combine it with clip region after selecting into the DC.

	(_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region.

	(_gdk_win3_gdkregion_to_hrgn): New function, code snippet
	extracted from gdk_win32_hdc_get().

	* gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue
	handling.

	(gdk_window_copy_area_scroll): Increase clipRect to avoid
	ScrollWindowEx() not scrolling pixels it thinks are invalid.
	Don't call UpdateWindow().

	(_gdk_window_move_resize_child): Don't call UpdateWindow().

	(gdk_window_premove, gdk_window_postmove,
	gdk_window_clip_changed): Add debugging output.

	(_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn()
	on the region.

	(_gdk_window_process_expose): No use for the serial number
	parameter now. Instead of a rectangle, take a region parameter, as
	Windows gives us one in WM_PAINT.

	* gdk/win32/gdkmain-win32.c (gdk_win32_rect_to_string,
	gdk_win32_gdkrectangle_to_string, gdk_win32_gdkregion_to_string):
	New debugging functions.

	* gdk/win32/*.c: Use above functions.

	* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory
	leak, free list after use.

	* gdk/win32/gdkprivate-win32.h: Drop the clip_region field from
	GdkGCWin32. Only use the HRGN hcliprgn. Declare new functions.

	* gdk/win32/rc/gdk.rc.in: Update copyright year.
2002-11-12 04:41:30 +00:00
Vincent van Adrighem d17b2fae5b Dutch translation updated by Tino Meinen.
2002-11-11 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Tino Meinen.
2002-11-11 16:17:29 +00:00
Matthias Clasen c1a16ec063 Don't start a drag on double click. (#98189)
* gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start
	a drag on double click.  (#98189)
2002-11-10 22:42:40 +00:00
Daniel Yacob dcbacacfd4 Adding am to LINGUAS_ALL list. 2002-11-10 02:47:51 +00:00
Dmitry Mastrukov cdb6103689 ru.po: Updated Russian translation. 2002-11-09 07:24:47 +00:00
Dmitry Mastrukov b6a15f21e2 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2002-11-09 07:22:40 +00:00
Dmitry Mastrukov 4329dc904a be.po: Updated Belarusian translation from Belarusian team <i18n@infonet.by>. 2002-11-09 05:42:54 +00:00
Owen Taylor e72974371a ==== Released 2.0.8 ====
Fri Nov  8 14:44:43 2002  Owen Taylor  <otaylor@redhat.com>

        * ==== Released 2.0.8 ====

        * configure.in: Version 2.0.8, interface, binary age 8.

        * NEWS: Updated.
2002-11-08 21:31:30 +00:00
Owen Taylor 055e32ece3 Escape invalid filename before printing it out, since it isn't a valid
Thu Nov  7 18:09:42 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (open_new_dir): Escape invalid
        filename before printing it out, since it isn't
        a valid UTF-8 string. (#94676)
2002-11-07 23:24:52 +00:00
Tor Lillqvist 4b5ca53b32 Call UpdateWindow() after scrolling or moving/resizing the window. This
2002-11-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgeometry-win32.c (gdk_window_copy_area_scroll,
	_gdk_window_move_resize_child): Call UpdateWindow() after
	scrolling or moving/resizing the window. This causes a WM_PAINT
	message to be sent to the window procedure. Improves scrolling a
	lot, for instance in testgtk's "scrolled windows" dialog or
	gtk-demo's "Text Widget".

	Without calling UpdateWindow(), Windows generates a WM_PAINT only
	when there is no other message in the queue. Thus, while you keep
	moving the scrollbar slider and generating mouse messages, no
	WM_PAINT messages are sent.
2002-11-07 22:58:42 +00:00
Owen Taylor b407d73073 Don't try to use render if we can't get a picture for the drawable. (Fixes
Thu Nov  7 17:18:06 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf):
        Don't try to use render if we can't get a picture for
        the drawable. (Fixes #97220, reported by
        Jamie Zawinski)

        * gtk/gtkimage.c: Force requisition calculation
        when we get a expose prior to size_request().
        (#91711, reported by Sven Neumann, debugging
        help from Matthias Clasen, Soeren Sandmann)
2002-11-07 22:39:56 +00:00
Owen Taylor 9061e6eceb Back out last change, should have gone in on HEAD.
Thu Nov  7 14:59:43 2002  Owen Taylor  <otaylor@redhat.com>

        * tests/testcalendar.c: Back out last change, should have gone in
        on HEAD.
2002-11-07 20:01:06 +00:00
Owen Taylor 85051bd972 Use g_date_strftime(), fixing #74745. (Alper Ersoy)
Thu Nov  7 14:51:31 2002  Owen Taylor  <otaylor@redhat.com>

        * tests/testcalendar.c (calendar_date_to_string):
        Use g_date_strftime(), fixing #74745. (Alper Ersoy)
2002-11-07 19:54:42 +00:00
Owen Taylor cfc4004862 Fix trailing semicolon on macro, clean up a bit.
Wed Nov  6 15:19:53 2002  Owen Taylor  <otaylor@redhat.com>

        * io-gif.c (CHECK_LZW_SP): Fix trailing semicolon on macro,
        clean up a bit.
2002-11-06 20:25:54 +00:00
Simos Xenitellis 8e5a93108b Updated Greek translation 2002-11-06 17:48:01 +00:00
Owen Taylor 9cb0020230 Fix LZWP_SP typo. (#97758, Akira Tagoh)
Tue Nov  5 14:03:08 2002  Owen Taylor  <otaylor@redhat.com>

        * io-gif.c: Fix LZWP_SP typo. (#97758, Akira Tagoh)
2002-11-05 19:08:15 +00:00
Simos Xenitellis 2dbb188a5e Updated Greek translation 2002-11-05 15:21:37 +00:00
Daniel Yacob d600a38627 tweak. 2002-11-05 05:17:18 +00:00
Owen Taylor 908364e30d ==== Released 2.0.7 ====
Mon Nov  4 16:55:37 2002  Owen Taylor  <otaylor@redhat.com>

        * ==== Released 2.0.7 ====

        * configure.in: Version 2.0.7, interface, binary 7.

        * NEWS: Updates.
2002-11-04 22:52:41 +00:00
Kjartan Maraas 650ade3e2d Updated Norwegian (bokml) translation.
2002-11-04  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-11-04 22:27:50 +00:00
Stanislav Visnovsky 45e74e7742 Updated Slovak translation.
2002-11-04  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-11-04 17:16:02 +00:00
Sven Neumann 981f7c3269 removed redundant code that did nothing, caused a compiler warning and is
2002-11-04  Sven Neumann  <sven@gimp.org>

	* io-bmp.c (DecodeHeader): removed redundant code that did nothing,
	caused a compiler warning and is also not in the HEAD branch.
2002-11-04 11:08:23 +00:00
Takayuki KUSANO ff92fd244a Updated Japanese translation.
* ja.po: Updated Japanese translation.
2002-11-04 03:20:10 +00:00
Tor Lillqvist 57d5b11d24 Lots of changes to the Win32 backend:
2002-11-03  Tor Lillqvist  <tml@iki.fi>

	Lots of changes to the Win32 backend:

	One big improvement is that scrolling of windows with background
	pixmaps now works much better. (This can be seen in for instance
	testgtk's "text" test.) Blitting inside a window
	(gdk_draw_drawable) also works much better now (can also seen in
	the "text" test).

	Another major change is we don't (try to) do guffaw scrolling as
	there is no static window gravity on Windows. Guffaw scrolling
	would be unnecessary anyway, as there is the ScrollWindow()
	API. This improves the behaviour of the Text Widget demo in
	gtk-demo a lot. But I have no idea how the lack of static win
	gravity should be handled in other places where the X11 code uses
	it. Especially _gdk_window_move_resize_child().

	Big windows still don't work correctly, I assume.
l
	Another vague area is the translate_queue. I don't think the queue
	items actually ever gets used, at least not in the code as of now.

	There is still some problem in expose handling. By moving an
	obscuring window back and forth over testgtk's main window, for
	instance, every now and then you typically get narrow vertical or
	horizontal strips of pixels that haven't been properly redrawn
	after being exposed. A fencepost error somewhere?

	* gdk/win32/gdkevents-win32.c: Cast known GdkWindowObjects
	directly instead of using GDK_WINDOW_OBJECT(). Remove unused
	latin_locale_loaded variable.

	(_gdk_win32_get_next_tick): New function. Used to make sure
	timestamps of events are always increasing, both in events
	generated from the window procedure and in events gotten via
	PeekMessage(). Not sure whether this is actually useful, but it
	seemed as a good idea.

	(real_window_procedure): Don't use a local GdkEventPrivate
	variable. Don't attempt any compression of configure or expose
	events here, handled elsewhere.

	(erase_background): Accumulate window offsets when traversing up
	the parent chain for GDK_PARENT_RELATIVE_BG, in order to get
	correct alignment of background pixmaps. Don't fill with
	BLACK_BRUSH if GDK_NO_BG.

	(gdk_event_get_graphics_expose): A bit more verbose debugging output.

	(gdk_event_translate): Use _gdk_win32_get_next_tick(). In the
	WM_PAINT handler, call GetUpdateRgn() before calling BeginPaint()
	and EndPaint() (which empty the update region).

	* gdk/win32/gdkdnd-win32.c
	* gdk/win32/gdkinput-win32.c:
	Use _gdk_win32_get_next_tick().

	* gdk/win32/gdkfont-win32.c: Use %p to print HFONTs.

	(gdk_text_size): Remove, unused.

	* gdk/win32/gdkgeometry-win32.c
	(_gdk_windowing_window_queue_antiexpose): Always return FALSE for
	now, until figured out whether antiexposes actually can work on
	Win32.

	(gdk_window_copy_area_scroll): Scroll also children with the
	ScrollWindowEx() call. No need to call gdk_window_move() on the
	children.

	(gdk_window_scroll): Don't do guffaw scrolling.

	(gdk_window_compute_position): Fix typo, used win32_y where x was
	intended.

	(gdk_window_queue_append): Use GetTickCount() for serial number,
	not GetMessageTime(), which can be very far back.

	* gdk/win32/gdkwindow-win32.c (gdk_window_gravity_works): Remove,
	we know that there is no such thing on Windows.

	(gdk_window_set_static_bit_gravity,
	gdk_window_set_static_win_gravity): Ditto, remove, they didn't do
	anything anyway.

	(_gdk_windowing_window_init, gdk_window_foreign_new): Call
	_gdk_window_init_position() like in the X11 backend.

	(gdk_window_reparent): Don't call the now nonexistent
	gdk_window_set_static_win_gravity(). No idea what should be done
	instead.

	(gdk_window_get_geometry): The returned x and y should be relative
	to parent. Used to be always zero..

	(gdk_window_set_static_gravities): Return FALSE if trying to set
	static gravity.

	* gdk/win32/gdkdrawable-win32.c (_gdk_win32_draw_tiles):
	Rewrite. Make static. Must take tile origin parameters, too.

	(gdk_win32_draw_rectangle): Pass the tile/stipple origin to
	_gdk_win32_draw_tiles(). Remove #if 0 code.

	(blit_inside_window): Don't call ScrollDC(), that didn't work at
	all like I thought. A simple call to BitBlt() is enough.

	* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string,
	gdk_win32_print_paletteentries, gdk_win32_print_system_palette,
	gdk_win32_print_hpalette)
	* gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description)
	* gdk/win32/gdkevents-win32.c (gdk_win32_message_name):
	Move all debugging helper functions to gdkmain-win32.c.

	* gdk/win32/gdkmain-win32.c: (gdk_win32_lbstyle_to_string,
	gdk_win32_pstype_to_string, gdk_win32_psstyle_to_string,
	gdk_win32_psendcap_to_string, gdk_win32_psjoin_to_string): New
	debugging functions.

	(static_printf): Helper function for the above. sprintfs into a
	static circular buffer, return value should be used "soon".

	* gdk/win32/gdkgc-win32.c: Use above debugging functions.

	* gdk/win32/gdkprivate-win32.h: Declare new functions, remove
	obsoleted ones.
2002-11-03 22:55:08 +00:00
Kristian Rietveld fe87e35ac8 Bah, and of course I broke something ...
Sun Nov  3 21:26:20 2002  Kristian Rietveld  <kris@gtk.org>

        Bah, and of course I broke something ...

        * gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach): fix
        up the mess I caused with my commit of Oct 23 fixing #50263, things
        should be fine now.
2002-11-03 20:16:37 +00:00
Owen Taylor f794cb4259 Remove check for winsock.h since it might show up on Linux+Wine. Instead
Sun Nov  3 13:03:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c configure.in: Remove check for
        winsock.h since it might show up on Linux+Wine.
        Instead just conditionalize of G_OS_WIN32.
        (#97396, Gaute Lindkvist)
2002-11-03 18:18:31 +00:00
Dmitry Mastrukov a89315e38e be.po: Updated Belarusian translation from Belarusian team <i18n@infonet.by>. 2002-11-03 04:41:23 +00:00
Daniel Yacob ca9070915a tweak. 2002-11-03 04:39:58 +00:00
Kristian Rietveld a2de78cfea check if width isn't zero instead of calc_width ...
Sun Nov  3 01:27:40 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size):
        check if width isn't zero instead of calc_width ...
2002-11-03 00:13:07 +00:00
Kristian Rietveld 6a6f059c99 Merge fest from HEAD, note that only a selection of bug fixes on HEAD got
Sun Nov  3 01:22:01 2002  Kristian Rietveld  <kris@gtk.org>

        Merge fest from HEAD, note that only a selection of bug fixes on
        HEAD got committed to stable.

        #94868, reported and testcase provided by Daniel Elstner.
        * gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
        free anchor if applicable.

        #92014, fixed with help of detailed traces from Morten Welinder.
        * gtk/gtkliststore.c (gtk_list_store_remove_silently): free the
        actual link after the node has been removed.

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
        free the cell_list and the child if it exists.

        #85858, #85859, #85860, #85872, reported by David L. Cooper II.
        * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
        s/guint/GtkCellRendererState/.

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
        ditto.

        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
        (gtk_cell_renderer_toggle_activate): ditto.

        * gtk/gtkliststore.c (gtk_list_store_get_flags): a
        s/guint/GtkTreeModelFlags/ on the return type.

        #93629, fixes a really evil GtkTreeModelSort bug. Reported and
        testcase by Hans Petter Jansson.
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
        are swapping two rows (re-insertion on row_changed), also *emit*
        a rows_reordered signal. oops.

        #96851, reported by Jorn Baayen.
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_model): remove
        the second ref command on the child_model, we only have to ref it
        once here. (#96851, reported by Jorn Baayen).

        #50263, reported by Havoc Pennington.
        * gtk/gtktreeselection.c (model_changed): new function,
        (gtk_tree_selection_selected_foreach): monitor changes in the model,
        bail out if the model has been changed from the foreach func.
2002-11-03 00:10:23 +00:00
Daniel Yacob 5f15e342f9 Updated Amharic translation. 2002-11-02 05:28:58 +00:00
Changwoo Ryu 4465f7aabd Updated Korean translation.
2002-11-02  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.
2002-11-02 03:37:34 +00:00
Christian Neumair 0a86c2230e Updated German translation. 2002-11-01 14:49:54 +00:00
Matthias Clasen 6f97292648 The label is "Folders" now, not "Directories". (#97224, Vitaly Tishkov)
* gtk/tmpl/gtkfilesel.sgml: The label is "Folders" now, not
	"Directories".  (#97224, Vitaly Tishkov)
2002-10-31 23:42:39 +00:00
Matthias Clasen 188b3d5f38 use GTK_SELECTION_SINGLE, not GTK_SELECT_SINGLE. (#96516, Erik Grinaker)
* gtk/tree_widget.sgml (select): use GTK_SELECTION_SINGLE, not
	GTK_SELECT_SINGLE.  (#96516, Erik Grinaker)
2002-10-31 23:35:35 +00:00
German Poo-Caaman~o 360c357f8f Updated spanish translation by Juan Manual Garcia Molina
2002-10-30  German Poo-Caaman~o <gpoo@ubiobio.cl>

	* es.po: Updated spanish translation by Juan Manual Garcia Molina
			<juanma_gm@wanadoo.es>
2002-10-31 01:19:46 +00:00
Yuri Syrota 574f875146 Updated Ukrainian translation 2002-10-30 19:01:54 +00:00
Yuri Syrota aeeaede190 Updated Ukrainian translation 2002-10-30 15:18:46 +00:00
Yuri Syrota f4b56d140c Updated Ukrainian translation 2002-10-30 15:11:22 +00:00
Daniel Yacob bfe6864c03 tweaks. 2002-10-29 14:16:52 +00:00
Pablo Saratxaga 866096d039 fixed syntax error 2002-10-29 13:55:57 +00:00
Tor Lillqvist 71737f4d14 Don't call GetWindowLong for GWL_EXSTYLE, the extended window style wasn't
2002-10-28  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
	gdk_window_set_functions): Don't call GetWindowLong for
	GWL_EXSTYLE, the extended window style wasn't used or
	changed. After setting the window style with SetWindowLong, call
	SetWindowPos with the SWP_FRAMECHANGED flag for the window to
	actually be updated, as Platform SDK docs say one should. (#95812,
	huzheng)
2002-10-28 20:41:47 +00:00
Peteris Krisjanis 34579a11b3 2002-10-28 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation 2002-10-28 15:07:30 +00:00
Peteris Krisjanis a9a49698fc 2002-10-28 Peteris Krisjanis <peteris.krisjanis@os.lv> * lv.po: Updated Latvian translation 2002-10-28 14:52:28 +00:00
Yanko Kaneti 8188594b73 Updated Bulgarian translation.
2002-10-27  Yanko Kaneti <yaneti@declera.com>

        * bg.po: Updated Bulgarian translation.
2002-10-27 11:22:45 +00:00
Ole Laursen 3582604c0e Updated Danish translation.
2002-10-26  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-10-26 20:23:36 +00:00
Daniel Yacob f1867cd355 Adding (for real this time) Amharic translation. 2002-10-26 13:06:48 +00:00
Jordi Mallach 62fdaec47e Updated Catalan translation. 2002-10-25 14:09:39 +00:00
Stanislav Brabec 864fd11cdf Updated Czech translation from Michal Bukovjan <bukm@centrum.cz>.
2002-10-25  Stanislav Brabec  <sbrabec@suse.cz>

	* cs.po: Updated Czech translation from Michal Bukovjan
	<bukm@centrum.cz>.
2002-10-25 12:12:25 +00:00
Dmitry Mastrukov dd219a5112 be.po: Added Belorusian (be) translation to ALL_LINGUAS 2002-10-25 10:13:14 +00:00
Dmitry Mastrukov eb9862f889 be.po: Added Belorusian translation from Ales Nyakhaychyk <i18n@infonet.by>. 2002-10-25 10:09:38 +00:00
Daniel Yacob e17b6d1a2e Adding Amharic Translation. 2002-10-25 01:12:52 +00:00
Pablo Saratxaga b14fb3091a Updated Vietnamese file 2002-10-24 10:38:17 +00:00
Christian Rose 552a69bc1e Updated Swedish translation.
2002-10-23  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-10-23 12:08:25 +00:00
Owen Taylor 09e8356f96 When popping up the list without any selected items, hack the focus on the
Tue Oct 22 20:02:22 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcombo.c: When popping up the list without
        any selected items, hack the focus on the list to
        avoid triggering a bug in GtkList when clicking
        on focused-but-not-selected items (#86700,
        Zimler Attila, Matthias Clasen) and to keep
        GtkWindow from selecting the first item.
2002-10-23 00:51:06 +00:00
Matthias Clasen 4b25e80f50 Check for stack overflow throughout. (#91808, Elliot Lee)
* io-gif.c (lzw_read_byte): Check for stack overflow throughout.
	(#91808, Elliot Lee)
2002-10-22 22:45:35 +00:00
Owen Taylor 35211e0e34 Include config.h (#96441, Morten Welinder)
Tue Oct 22 15:13:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimmulticontext.c: Include config.h
        (#96441, Morten Welinder)
2002-10-22 19:16:51 +00:00
Owen Taylor 0ffc25735f When compiling our on fnmatch.c, #define fnmatch _gtk_fnmatch (#92890,
Tue Oct 22 15:03:41 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/fnmatch.h: When compiling our on fnmatch.c,
        #define fnmatch _gtk_fnmatch (#92890, Jacob Berkman)
2002-10-22 19:08:13 +00:00
Owen Taylor 27683d3c57 Return "" for entry->invisible_char == 0, otherwise N copies of
Mon Oct 21 14:04:39 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c (gtk_entry_get_public_chars): Return
        "" for entry->invisible_char == 0, otherwise N copies
        of entry->invisible_char. (#95486, Vitaly Tishkov)

        * gtk/gtkentry.c: Fix a bunch of places where entry->text
        instead of layout->text was being used for computation
        of offsets/indices in the layout. Using layout->text
        is necessary because when the entry is invisible, it
        doesn't correspond to entry->text.
2002-10-21 19:04:30 +00:00
Simos Xenitellis 1216a77dd3 Updated Greek translation 2002-10-16 13:40:16 +00:00
Duarte Loreto 2d2ad5b7a8 Updated Portuguese translation.
2002-10-16  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2002-10-15 23:42:57 +00:00
Kjartan Maraas b5b6495c40 Updated Norwegian (bokml) translation.
2002-10-15  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-10-15 20:19:11 +00:00
Dmitry Mastrukov 18383df52d ru.po: Updated Russian translation. 2002-10-15 10:27:36 +00:00
Manish Singh 9c44dfb07c use GTK_IS_RADIO_MENU_ITEM instead of comparing the type directly. This
Sat Oct 12 15:28:06 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkitemfactory.c: use GTK_IS_RADIO_MENU_ITEM instead
        of comparing the type directly. This handles possible subclasses
        too. (Recommended by Tim Janik)
2002-10-12 22:44:03 +00:00
Gil Osher 91dc02591a *** empty log message *** 2002-10-12 22:10:58 +00:00
Owen Taylor 94b2571215 Privately export _gtk_scrolled_window_get_scrollbar_spacing().
Thu Oct 10 14:35:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkscrolledwindow.[ch]: Privately export
        _gtk_scrolled_window_get_scrollbar_spacing().

        * gtk/gtkcombo.c: Properly account from scrollbar
        spacing when computing the size of the popup window.
        (#84955, Marco Pesenti Gritti)
2002-10-10 18:45:45 +00:00
Stanislav Brabec d9c56a2daa Fix bug ID. 2002-10-09 15:35:18 +00:00
Stanislav Brabec 4261d83c9f Added support for hungarian characters (addition to bug #91258). Only via
2002-10-09  Stanislav Brabec  <sbrabec@suse.cz>

	* gtk/gtkimcontextsimple.c: Added support for hungarian characters
	(addition to bug #91258). Only via dead keys, because compose key
	combinations in X are erratic.
2002-10-09 14:14:43 +00:00
Owen Taylor 9017c02a76 Patch from Takuro Ashie to fix updating of open_ims list. (#95150)
Tue Oct  8 09:41:43 2002  Owen Taylor  <otaylor@redhat.com>

        * Patch from Takuro Ashie to fix updating of open_ims
        list. (#95150)
2002-10-08 13:50:42 +00:00
Peteris Krisjanis 585a031032 2002-10-08 Peteris Krisjanis <peteris.krisjanis@os.lv> * lv.po: Updated Latvian translation by Artis Trops <hornet@navigators.lv> 2002-10-08 11:31:10 +00:00
Peteris Krisjanis 5987ee1302 2002-10-08 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation by Artis Trops <hornet@navigators.lv> 2002-10-08 11:30:52 +00:00
Owen Taylor 4117e38789 Fix a conflict indicator 2002-10-07 20:17:15 +00:00
Owen Taylor e3e93f6362 Fix infinite loop from last change.
Mon Oct  7 15:52:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
        loop from last change.
2002-10-07 20:16:56 +00:00
jacob berkman f01fdf1ba8 fix build
2002-10-07  jacob berkman  <jacob@ximian.com>

	* gdk/x11/gdkkeys-x11.c (update_keymaps): fix build
2002-10-07 18:38:30 +00:00
Owen Taylor e2a7d8519b Clean up the handling of clearing transient state settings, fixing bug
Mon Oct  7 12:40:39 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_move_resize): Clean
        up the handling of clearing transient state
        settings, fixing bug #95026, reported by Jami
        Pekannen.
2002-10-07 16:51:36 +00:00
Owen Taylor dc61c7e769 If Mode_switch is used for a known modifier like Mod1, assume it won't be
Mon Oct  7 11:45:17 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch
        is used for a known modifier like Mod1, assume it won't
        be used to switch group. (#94841, problem reported by
        Szekeres Istvan)
2002-10-07 16:05:56 +00:00
Owen Taylor 2a8da05d05 Patch from Shivram U <shivaram.upadhyayula@wipro.com>
Fri Oct  4 14:49:04 2002  Owen Taylor  <otaylor@redhat.com>

        Patch from Shivram U <shivaram.upadhyayula@wipro.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Increased the keycount to
        (max_keycode - min_keycode) + 1 from (max_keycode - min_keycode).
        (update_keymaps), (gdk_keymap_get_entries_for_keyval) looping through
        less than or equal to max_keycode. (#79184)
2002-10-04 18:55:37 +00:00
Owen Taylor 6c827aef8a Fix memory leak. (#94399)
Thu Oct  3 18:25:57 2002  Owen Taylor  <otaylor@redhat.com>

        * io-jpeg.c (gdk_pixbuf__jpeg_image_save):
        Fix memory leak. (#94399)
2002-10-03 22:32:33 +00:00
Owen Taylor 746d28a9dd Patch from Andy Wingo to always escape ? to avoid accidentally generating
Tue Oct  1 17:35:43 2002  Owen Taylor  <otaylor@redhat.com>

        * gdkpixdata.c: Patch from Andy Wingo to always
        escape ? to avoid accidentally generating trigraphs
        in the output (#94631)
2002-10-01 21:42:39 +00:00
Stanislav Brabec b04368dba1 Fixed alphabetical order (bug #91258).
2002-10-01  Stanislav Brabec  <sbrabec@suse.cz>

	* gtk/gtkimcontextsimple.c: Fixed alphabetical order (bug #91258).
2002-10-01 10:20:46 +00:00
Vincent van Adrighem 11167a98bd Dutch translation updated by Tino Meinen.
2002-10-01 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Dutch translation updated by Tino Meinen.
2002-10-01 07:19:18 +00:00
Owen Taylor 7de7ba548f Initialize ->parsed field. (#94536, patch from Sebastian Ritau. Maybe
Mon Sep 30 14:46:49 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkbindings.c (gtk_binding_set_new): Initialize
        ->parsed field. (#94536, patch from Sebastian Ritau. Maybe
        fixes #87411?)
2002-09-30 19:05:20 +00:00
Stanislav Brabec fb1a0b7d62 Completed ISO-8859-2 characters support (#93421), fixed cacute, umacron,
2002-09-30  Stanislav Brabec  <sbrabec@suse.cz>

	* gtk/gtkimcontextsimple.c: Completed ISO-8859-2 characters
	support (#93421), fixed cacute, umacron, completed dead_key+space
	convention.
2002-09-30 16:39:21 +00:00
Pablo Saratxaga d083357669 updated Vietnamese file 2002-09-30 09:13:56 +00:00
Stanislav Brabec 8da809253a Updated Czech translation from Michal Bukovjan <bukm@centrum.cz>.
2002-09-30  Stanislav Brabec  <sbrabec@suse.cz>

	* cs.po: Updated Czech translation from Michal Bukovjan
	<bukm@centrum.cz>.
2002-09-30 08:33:53 +00:00
Manish Singh c4d17a42df use #defines instead of enum for GtkFundamentalType compat, to prevent
Sun Sep 29 12:59:42 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtktypeutils.h: use #defines instead of enum for
        GtkFundamentalType compat, to prevent 64-bit vs. 32-bit
        confusion (#90400)
2002-09-29 20:04:42 +00:00
Yanko Kaneti 3a0e00aa1f Updated Bulgarian translation.
2002-09-29  Yanko Kaneti <yaneti@declera.com>

        * bg.po: Updated Bulgarian translation.
2002-09-29 17:56:25 +00:00
Christian Neumair 7c1a21d928 Updated German translation. 2002-09-29 16:27:31 +00:00
Chyla Zbigniew abe51903b7 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-09-29 11:36:12 +00:00
Tor Lillqvist 5a7f184e57 Instead of forcing -fnative-struct into CFLAGS when using gcc for Win32,
2002-09-29  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Instead of forcing -fnative-struct into CFLAGS
	when using gcc for Win32, check for gcc version 3.x which uses
	-mms-bitfields instead. Also check if either of these switches is
	actually available at all, and warn if not. Thanks to Soren
	Andersen for the inspiration. (#93965)
2002-09-29 00:18:24 +00:00
Hasbullah Bin Pit f7c32f0e6d Updated Malay Translation.
2002-09-28  Hasbullah Bin Pit <sebol@ikhlas.com>

        * ms.po: Updated Malay Translation.
2002-09-28 17:12:28 +00:00
Ole Laursen 757e9830ff Updated Danish translation.
2002-09-28  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-09-28 16:16:47 +00:00
Kjartan Maraas 7feb206d02 Updated Norwegian (bokml) translation.
2002-09-28  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-09-28 09:39:43 +00:00
Tor Lillqvist 04719c5da6 Don't use .type on Cygwin, either (#91597, Masahiro Sakai).
2002-09-28  Tor Lillqvist  <tml@iki.fi>

	* pixops/*.S: Don't use .type on Cygwin, either (#91597, Masahiro
	Sakai).
2002-09-28 02:48:17 +00:00
Christian Rose a645b473ba Updated Swedish translation.
2002-09-28  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-09-28 02:00:19 +00:00
Jordi Mallach 13633e0d89 Updated Catalan translation. 2002-09-27 23:20:39 +00:00
Matthias Clasen d6a45265a4 Make drawing to the root window work. (#89492) Changes to support depth 8
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init): Make
	drawing to the root window work.  (#89492)
	* gdk/gdkrgb.c (gdk_rgb_try_colormap):
	(gdk_rgb_create_info):
	(gdk_rgb_select_conv):
	(gdk_draw_gray_image):
	(gdk_rgb_cmap_get_info): Changes to support depth 8 StaticColor
	visuals.  (#81631)
	(gdk_rgb_cmap_free): Don't loop forever.
2002-09-27 23:03:05 +00:00
Owen Taylor ea2eef7bd4 ri Sep 27 18:14:00 2002 Owen Taylor <otaylor@redhat.com>
(#91249, Thomas Leonard)

        * gtk/gtkselection.c (gtk_selection_convert): Initialize
        idle time to 0.

        * gtk/gtkselection.c: Up idle timeout to 5 minutes
        from 5 seconds.
2002-09-27 22:55:12 +00:00
Federico Mena Quintero 0075b342e9 Free the context if we cannot allocate the HeaderBuf.
2002-09-27  Federico Mena Quintero  <federico@ximian.com>

	* io-ico.c (gdk_pixbuf__ico_image_begin_load): Free the context if
	we cannot allocate the HeaderBuf.
2002-09-27 22:07:41 +00:00
Owen Taylor 1c39be5abb Patch from J. Ali Harlow to avoid generating gtk.immodules when
Fri Sep 27 17:40:47 2002  Owen Taylor  <otaylor@redhat.com>
        * modules/input/Makefile.am: Patch from J. Ali Harlow
        to avoid generating gtk.immodules when cross-compiling.
        (#87774)
2002-09-27 22:00:48 +00:00
Federico Mena Quintero 1dfa0ef23b Fix the update region notification to handle top-to-bottom and
2002-09-27  Federico Mena Quintero  <federico@ximian.com>

	* io-bmp.c (OneLine): Fix the update region notification to handle
	top-to-bottom and bottom-to-top BMPs correctly.
2002-09-27 21:40:35 +00:00
Owen Taylor 7c0ed9ea8a Fix some signed/unsigned warnings. (#85863, David L. Cooper II)
Fri Sep 27 17:23:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorsel.c: Fix some signed/unsigned warnings.
        (#85863, David L. Cooper II)
2002-09-27 21:26:07 +00:00
Owen Taylor f91a9055ff Replaced instances where strlen (label->label) is used to get a byte code
Fri Sep 27 16:23:49 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtklabel.c : Replaced instances where strlen (label->label) is
        used to get a byte code with strlen (label->text) as label->text
        contains the actual display text, while label->label contains
        markup / mnemonics. (#92683, Patch from Shivram U
        <shivaram.upadhyayula@wipro.com>, with some additions.)

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal):
        Fix a leftover, now incorrect comment.
2002-09-27 20:51:23 +00:00
Owen Taylor 5ad5e9aa62 Handle the case where the first page isn't visible. (#90336, bug tracked
Fri Sep 27 16:15:11 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtknotebook.c (gtk_notebook_get_event_window_position):
        Handle the case where the first page isn't visible.
        (#90336, bug tracked down by Chema Celorio)
2002-09-27 20:19:28 +00:00
Owen Taylor 2f6eea91c6 Change accelerator from C_ut to Cu_t. (#82747, Paolo Maggi)
Fri Sep 27 15:57:15 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstock.c (builtin_items): Change accelerator
        from C_ut to Cu_t. (#82747, Paolo Maggi)
2002-09-27 19:59:34 +00:00
Owen Taylor a3a972d4fd Reset the animation iter on unrealize as well as unmap. (#94336)
Fri Sep 27 15:27:45 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkimage.c (gtk_image_unrealize): Reset the
        animation iter on unrealize as well as unmap.
        (#94336)

        * gtk/gtkprogressbar.c: Back out change that should
        have been applied on HEAD.
2002-09-27 19:52:48 +00:00
Christian Neumair 5a23ae1fcb Updated German translation. 2002-09-27 12:57:19 +00:00
Jordi Mallach d8d9bf88af Updated Catalan translation. 2002-09-27 11:08:41 +00:00
Federico Mena Quintero e4b64fdcfc Merged the CMYK changes from HEAD.
2002-09-25  Federico Mena Quintero  <federico@ximian.com>

	* io-jpeg.c: Merged the CMYK changes from HEAD.
2002-09-26 02:14:43 +00:00
Owen Taylor 6fea756129 Don't turn a value of "" into NULL. (#94157, Vitaly Tishkov)
Wed Sep 25 08:16:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't
        turn a value of "" into NULL. (#94157, Vitaly Tishkov)
2002-09-25 12:22:12 +00:00
Manish Singh 433a163a1f check if last_selected is valid before doing a strcmp on it, which may
Tue Sep 24 23:43:10 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkfilesel.c: check if last_selected is valid before doing
        a strcmp on it, which may happen if selections happen programmatically
        instead of through the UI (#86566)
2002-09-25 06:50:03 +00:00
Manish Singh 05137fb63d preserve ordering from gtk_tree_selection_foreach when returning filenames
Tue Sep 24 23:09:19 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
        when returning filenames for gtk_file_selection_get_selections
        (#86567)
2002-09-25 06:12:15 +00:00
German Poo-Caaman~o 5197f0c19d Fixed bug #93072 by Juan Manual Garcia Molina <juanma_gm@wanadoo.es>
2002-09-24  German Poo-Caaman~o <gpoo@ubiobio.cl>

	* es.po: Fixed bug #93072 by Juan Manual Garcia Molina
			<juanma_gm@wanadoo.es>
2002-09-24 16:05:55 +00:00
Owen Taylor 1da89e3efc Add the gxid_* files to EXTRA_DIST (#90511, Zenith Lau)
Tue Sep 24 06:39:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/Makefile.am: Add the gxid_* files to
        EXTRA_DIST (#90511, Zenith Lau)
2002-09-24 10:45:37 +00:00
Owen Taylor 871b511660 Remove the check for editable. (Reported by Brent Fox)
Thu Aug  8 16:58:22 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_real_change_value):
        Remove the check for editable. (Reported by Brent Fox)
2002-09-24 10:31:49 +00:00
Owen Taylor 51420fcc03 Fixes to GtkIMContextSimple compose table for us-intl keyboards (Red Hat
Tue Sep 24 05:12:14 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontextsimple.c: Fixes to GtkIMContextSimple
        compose table for us-intl keyboards (Red Hat bugzilla
        #70995, Alexandre Oliva)
2002-09-24 09:13:42 +00:00
Owen Taylor 8e33776188 Use 'signed int' not 'gint' for signed bitfields. (#93020, Vitaly Tishkov)
Mon Sep 23 14:58:04 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkhandlebox.h gtk/gtktextbtree.[ch]:
        Use 'signed int' not 'gint' for signed bitfields.
        (#93020, Vitaly Tishkov)

        * gtk/gtktextlayout.h gtk/gtktextbtree.[ch]:
        Fix some 'gint' bitfields that should have been
        unsigned.
2002-09-23 19:10:37 +00:00
Owen Taylor f9e2c279e3 Patch from Joshua N Pritikin to fix problem where signal connection wasn't
Mon Sep 23 12:12:48 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkspinbutton.c: Patch from Joshua N Pritikin to
        fix problem where signal connection wasn't removed
        from adjustment on finalize. (#93962)
2002-09-23 16:14:36 +00:00
Owen Taylor 441acdaec2 Set the IM context client window to NULL, not to the window that is about
Fri Sep 20 18:01:26 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkentry.c (gtk_entry_unrealize): Set the IM
        context client  window to NULL, not to the window that
        is about to be destroyed. (#88231)
2002-09-23 16:12:06 +00:00
Kwok-Koon Cheung 8eae55ec10 Updated traditional Chinese translation from Ben Wu <hpwu@redhat.com> 2002-09-23 07:23:37 +00:00
Pablo Saratxaga 0d9115e303 updated Vietnamese file 2002-09-22 18:40:56 +00:00
Tor Lillqvist 74ce92f524 Silence a gcc warning, use %p to print a HKL.
2002-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init_check): Silence a
	gcc warning, use %p to print a HKL.
2002-09-21 18:52:39 +00:00
Tor Lillqvist 8d49bd81d6 Umm, no. Retract the code addition by Florent Duguet to WM_PAINT
handling. For me, window update has bugs with that code snippet in
there.
2002-09-21 18:48:50 +00:00
Tor Lillqvist b0e90d1858 WM_SYSKEYDOWN, WM_SYSKEYUP: Need to handle F10 specially here in order to
2002-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	WM_SYSKEYDOWN, WM_SYSKEYUP: Need to handle F10 specially here in
	order to be able to handle it normally in the application. Set
	ignore_wm_char also always when handling WM_SYSKEY{DOWN,UP}, this
	way we can generate GDK events also for Alt-Fn keys, for instance.
	WM_PAINT: If window is visible, call gdk_window_process_updates().
	This fixes bugs in window updates, says Florent Duguet.
2002-09-21 18:30:08 +00:00
Tor Lillqvist 14fdea7c4f Copy from X11 backend. The old version mishandled consecutive newlines.
2002-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkselection-win32.c (sanitize_utf8): Copy from X11
	backend. The old version mishandled consecutive newlines.
2002-09-21 12:54:16 +00:00
Tor Lillqvist a85841e827 Remove obsolete mention of gtk-engines and Pixmap theme engine on Win32.
2002-09-21  Tor Lillqvist  <tml@iki.fi>

	* tests/testgtkrc: Remove obsolete mention of gtk-engines and
	Pixmap theme engine on Win32.
2002-09-21 05:06:32 +00:00
Tor Lillqvist b5fbd51495 On Win32, look explicitly for LANG, LC_ALL and LC_CTYPE, and if not found,
2002-09-20  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkmain.c (gtk_get_default_language): On Win32, look
	explicitly for LANG, LC_ALL and LC_CTYPE, and if not found, use
	g_win32_getlocale(). The setlocale() in msvcrt.dll would return a
	locale name in the form Swedish_Finland for sv_FI.
2002-09-19 23:19:24 +00:00
Gil Osher a3c4bfba73 First version by Gil Osher. Some basic fixes and translations. 2002-09-19 12:52:58 +00:00
Gil Osher dfbd07cb46 First version bt Gil Osher. Some basic fixes and translations. 2002-09-17 13:25:17 +00:00
Matthias Clasen a71eb3f768 line-wrap all images to avoid problems with line-length-limited compilers.
* test-images.h: line-wrap all images to avoid problems with
	line-length-limited compilers.  (#90662)
2002-09-16 21:45:15 +00:00
Pablo Saratxaga c80bca65f0 updated Vietnamese file 2002-09-16 15:27:23 +00:00
Tor Lillqvist 4f4dad93f0 Delete leftover declarations of the obsolete Win32-only functions
2002-09-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkfont.h: Delete leftover declarations of the obsolete
	Win32-only functions gdk_font_full_name_get() and
	gdk_font_full_name_free().

	* gdk/gdk.def: Delete from here, too.

	* gdk/win32/gdkfont-win32.c (logfont_to_xlfd,
	gdk_font_full_name_get, gdk_font_full_name_free): Delete
	implementation, and helper functions.

	(pattern_match, InnerEnumFontFamExProc, EnumFontFamExProc,
	gdk_font_list_new, gdk_font_list_free): Delete unused functions.

	(gdk_text_width, gdk_text_width_wc) Instead of code duplication,
	let gdk_text_extents() and gdk_text_extents_wc() do the job.

	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
	Don't use the above removed functions in debugging output.
2002-09-15 21:57:07 +00:00
Tor Lillqvist aa9d95a1d1 Use correct function name in warning messages.
2002-09-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkinput-win32.c (gdk_input_wintab_init): Use correct
	function name in warning messages.
2002-09-15 21:37:47 +00:00
Andras Timar 0202b6aaef Updated Hungarian translation.
2002-09-14  Andras Timar  <timar@gnome.hu>

        * hu.po: Updated Hungarian translation.
2002-09-14 17:23:10 +00:00
Sven Neumann 981b10dd24 fixed my latest change.
2002-09-14  Sven Neumann  <sven@gimp.org>

	* gdk/gdkpixbuf-drawable.c: fixed my latest change.
2002-09-14 17:11:12 +00:00
Sven Neumann c2698fbc8e use the most significant bits of the GdkColor components (#89703).
2002-09-13  Sven Neumann  <sven@gimp.org>

	* gdk/gdkpixbuf-drawable.c: use the most significant bits of the
	GdkColor components (#89703).
2002-09-13 16:11:22 +00:00
Jonathan Blandford 8f4b598071 free the root list.
Tue Sep 10 15:39:42 2002  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkliststore.c (gtk_list_store_finalize): free the root
        list.

        * gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
        nodes.
2002-09-10 21:04:02 +00:00
Hidetoshi Tajima 42da415403 put source module name(fix for last commit). 2002-09-10 18:37:55 +00:00
Hidetoshi Tajima 8c5556808b (gtk_im_context_xim_get_ic, gtk_im_with_preedit,
gtk_im_without_preeedit): filter key release events only when
	input methods ask for (#81759)
2002-09-10 18:09:03 +00:00
Owen Taylor 218b29cf59 Take focus mode into account when tracking FocusIn/Out events, so we don't
Tue Sep 10 09:29:00 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
        focus mode into account when tracking FocusIn/Out events,
        so we don't get confused by focus changes while a
        keyboard grab is in effect. (Probably fixes #90563)
2002-09-10 13:45:45 +00:00
Yanko Kaneti 343aaa612a "Translate" "default:LTR" correctly. ..doh..
2002-09-09  Yanko Kaneti <yaneti@declera.com>

        * bg.po: "Translate" "default:LTR" correctly. ..doh..
2002-09-09 23:57:02 +00:00
Shivram U 52c4bda3e9 If the end iter is also a part of the selection, then we are in the
Mon Sep  9 16:16:25 2002  Shivram U  <shivaram.upadhyayula@wipro.com>

	* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter
	is also a part of the selection, then we are in the selection.
	(#92768)
2002-09-09 10:24:40 +00:00
Tor Lillqvist 1c60e7ba45 Actually commit a change I thought I had committed already:
2002-09-08  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Add AM_CONDITIONAL calls also in the non-x11
	branch. Otherwise we get "conditional \"$1\" was never defined.
	Usually this means the macro was only invoked conditionally."
	errors when running configure if using automake 1.6a. Yeah, I know
	that autogen.sh says to use automake 1.4, but on Win32 I more or
	less have to use the bleeding edge. I think.

Fix an earlier ChangeLog entry to include the file name:

2002-08-31  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkfilesel.c: Include <sys/cygwin.h on Cygwin, for
2002-09-08 07:44:48 +00:00
Soeren Sandmann fe86606062 call gtk_widget_ensure_style() before reading "button_relief". Fixes
Sat Sep  7 21:24:55 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoolbar.c (get_button_relief): call
	gtk_widget_ensure_style() before reading "button_relief". Fixes
	(#92741).
2002-09-07 22:34:02 +00:00
Owen Taylor 95a1a84cb4 Only set gc->colormap if it isn't already set. (Alex Larsson, #90632)
Fri Sep  6 15:35:01 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/gdkgc.c (gdk_gc_new_with_values): Only set
        gc->colormap if it isn't already set. (Alex Larsson,
        #90632)
2002-09-06 19:36:21 +00:00
Owen Taylor a5dbedacc4 ri Sep 6 12:41:16 2002 Owen Taylor <otaylor@redhat.com>
* modules/input/gtkimcontextxim.c: Pass the actual input
        keycode to XIM, rather than the result of backconverting
        the keysym. Fixes the <> input problem! (#74922)

        * gtk/gtkimmodule.c: Fix bug where GTK_IM_MODULE environment
        variable couldn't be used to force the input method to
        the default input method.
2002-09-06 16:49:01 +00:00
jacob berkman b2b1f5e8ba run automake-1.4 when checking version, not automake
2002-09-05  jacob berkman  <jacob@ximian.com>

	* autogen.sh: run automake-1.4 when checking version, not automake
2002-09-05 19:59:11 +00:00
Tor Lillqvist 5da99208c6 Use HWND_NOTOPMOST instead of HWND_TOPMOST. Suggested by Florent Duguet.
2002-09-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_transient_for):
	Use HWND_NOTOPMOST instead of HWND_TOPMOST. Suggested by Florent
	Duguet.
2002-09-04 21:46:26 +00:00
Tor Lillqvist 3b7138fb49 Fix braino, actually do check each char, not just the first one, when
2002-09-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Fix braino,
	actually do check each char, not just the first one, when looping
	through the text looking to insert CR in front of each LF. Bug
	noticed and fix provided by Florent Duguet.
2002-09-04 21:15:38 +00:00
Stanislav Brabec 6707e385b7 Updated Czech translation. 2002-09-03 09:05:06 +00:00
Peteris Krisjanis 03e3a60c39 2002-09-02 Peteris Krisjanis <peteris.krisjanis@os.lv> * lv.po: Updated Latvian translation 2002-09-02 18:54:05 +00:00
Peteris Krisjanis 31c1c86f48 2002-09-02 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation 2002-09-02 18:53:28 +00:00
Takayuki KUSANO d06b2f19d5 Updated Japanese translation.
* ja.po: Updated Japanese translation.
2002-09-01 00:49:11 +00:00
Tor Lillqvist b6d93de016 On Cygwin, open /dev/windows instead of using the magic G_WIN32_MSG_HANDLE
2002-08-31  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (_gdk_events_init): On Cygwin, open
	/dev/windows instead of using the magic G_WIN32_MSG_HANDLE fd that
	is implemented (in GLib) only on native Win32. (#91683, Masahiro
	Sakai)
2002-08-31 18:17:09 +00:00
Tor Lillqvist c0c79f82f5 Use cygwin_conv_to_posix_path(). (gtk_file_selection_dir_activate): Call
2002-08-31  Tor Lillqvist  <tml@iki.fi>

	* Include <sys/cygwin.h on Cygwin, for cygwin_conv_to_posix_path().
	(translate_win32_path, get_real_filename): Use
	cygwin_conv_to_posix_path().
	(gtk_file_selection_dir_activate): Call get_real_filename() here,
	too. (#91843, Masahiro Sakai)
2002-08-31 17:56:42 +00:00
Peteris Krisjanis 6802957a0c 2002-08-30 Peteris Krisjanis <peteris.krisjanis@os.lv> * lv.po: Updated Latvian translation by Artis Trops 2002-08-30 12:40:51 +00:00
Peteris Krisjanis 3f029fc402 2002-08-30 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation by Artis Trops 2002-08-30 12:39:57 +00:00
Naba Kumar 0dbd180a16 Added hindi translation (hi) in ALL_LINGUS. Added new hindi translation.
* configure.in: Added hindi translation (hi) in ALL_LINGUS.
    * po/hi.po: Added new hindi translation.
2002-08-28 15:29:29 +00:00
German Poo-Caaman~o 5302da5ff5 Updated Spanish translation by Juan Manuel Garca Molina
2002-08-27  German Poo-Caaman~o <gpoo@ubiobio.cl>

	* es.po: Updated Spanish translation by Juan Manuel Garca Molina
	<juanma_gm@wanadoo.es>
2002-08-27 18:49:50 +00:00
Tor Lillqvist 99e112a7a4 Use MAX_PATH (from windef.h) insted of _MAX_PATH (from stdlib.h in mingw
2002-08-26  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use MAX_PATH
	(from windef.h) insted of _MAX_PATH (from stdlib.h in mingw and
	MSVC, but not there in Cygwin) (#91681, Masahiro Sakai).
2002-08-26 20:05:22 +00:00
Tor Lillqvist f1b5dac5ac Don't include <winsock.h> on Cygwin (#91654, Masahiro Sakai).
2002-08-25  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkfilesel.c: Don't include <winsock.h> on Cygwin (#91654,
	Masahiro Sakai).
2002-08-25 20:29:31 +00:00
Tor Lillqvist 8a747e4449 Compile gtk_init_abi_check and gtk_init_check_abi_check when on
2002-08-25  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkmain.c: Compile gtk_init_abi_check and
	gtk_init_check_abi_check when on G_PLATFORM_WIN32, not just on
	G_OS_WIN32, to match gtkmain.h (#91649, Masahiro Sakai).
	(check_sizeof_GtkWindow, check_sizeof_GtkBox): Mention the
	-mms-bitfields swicth in addition to -fnative-struct.

	* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
	defines for struct packing checks use sizeof() on stuff from
	these. (#84211, Andreas Holzmann)
2002-08-25 19:33:30 +00:00
Roozbeh Pournader d583224137 Updated Persian translation. 2002-08-25 08:58:29 +00:00
Tor Lillqvist 772f13a3e2 Add gtk_win32res_lo. (#87101, J. Ali Harlow)
2002-08-25  Tor Lillqvist  <tml@iki.fi>

	* gtk/Makefile.am (libgtk_win32_2_0_la_DEPENDENCIES): Add
	gtk_win32res_lo. (#87101, J. Ali Harlow)

	* gdk-pixbuf/Makefile.am (libgdk_pixbuf_2_0_la_DEPENDENCIES): Add
	gdk_pixbuf_win32res_lo. (#87101, J. Ali Harlow)
2002-08-24 22:58:24 +00:00
Tor Lillqvist e4613b06b9 Let the system handle Alt-Space, too. Thanks to Tim Evans (#91477).
2002-08-24  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Let the
	system handle Alt-Space, too. Thanks to Tim Evans (#91477).
2002-08-24 20:23:58 +00:00
Stanislav Brabec cc084c1518 cs.po: Updated Czech translation from Michal Bukovjan <bukm@centrum.cz>. 2002-08-24 12:29:32 +00:00
Roozbeh Pournader d9bf1f407a Updated Persian translation 2002-08-23 21:26:54 +00:00
Roozbeh Pournader 70325ffeb0 Update Persian translation. 2002-08-23 20:10:07 +00:00
Matthias Clasen 96862220d3 Plug a memory leak. (#91422, Sven Neumann)
* io-png.c (gdk_pixbuf__png_image_save): Plug a memory
	leak.  (#91422, Sven Neumann)
2002-08-22 21:32:41 +00:00
Tor Lillqvist 3fee1b835f Add AM_CONDITIONAL calls also in the non-x11 branch. Otherwise we get
2002-08-21  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Add AM_CONDITIONAL calls also in the non-x11
	branch. Otherwise we get "conditional \"$1\" was never defined.
	Usually this means the macro was only invoked conditionally."
	errors when running configure if using automake 1.6a. Yeah, I know
	that autogen.sh says to use automake 1.4, but on Win32 I more or
	less have to use the bleeding edge. I think.

	* gdk/win32/gdkdrawable-win32.c
	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkmain-win32.c: Some spacing and indentation cleanup.

	* gdk/win32/gdkdrawable-win32.c (render_line_horizontal,
	render_line_vertical): Return TRUE.

	* gdk/win32/gdkevents-win32.c (_gdk_events_init): Search if the
	system has some input locale identifier that uses a Latin
	keyboard. This is needed to be able to get the virtual-key code
	for the latin characters corresponding to ASCII control
	characters. If no such keyboard is present, try to load one
	then. Will this upset users with no wish to ever use a Latin-based
	keyboard layout?

	(vk_from_char): Convert all ASCII control chars to the
	corresponding uppercase char before calling VkKeyScanEx(). Idea by
	Florent Duguet. Makes Control-C work again. To make it hopefully
	work like I think it should on non-Latin keyboards, too, use
	latin_locale when looking for the corresponding keycode.

	* gdk/win32/gdkgeometry-win32.c: Add GDK_NOTE debugging output
	to some functions, related to moving and resizing and expose
	and antiexpose queue processing. Use %p to output HWNDs.

	* gdk/win32/gdkkeys-win32.c (print_keysym_tab): Factor out
	debugging output to new function.

	* gdk/win32/gdkwindow-win32.c (gdk_window_resize,
	gdk_window_move_resize): Make more like X11 versions. Set
	resize_count similarily. Not that I have any idea what this is
	supposed to do.

	Fix for #81831 by Tim Evans:

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't call
	_gdk_event_button_generate() here, it would append the double- or
	triple-click events too early, before the single-click event.

	(real_window_procedure): If we got a single-click event, call
	_gdk_event_button_generate() to perhaps append the double- or
	triple-click event after that.

	Tentative fix for #79720 based on code by Florent Duguet:

	* gdk/win32/gdkgeometry-win32 (gdk_window_queue_append): New
	static function. Checks length of translate_queue, calls
	_gdk_window_process_expose() if length is >= 128. Then appends
	to translate_queue.
	(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
	Call gdk_window_queue_append().

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
	Set image->windowing_data to NULL, unref the image.

	Merge from gtk-1-3-win32-production branch:

	* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
	NULL before trying to propagate to it, and return FALSE in that
	case. (If parent is NULL, we are handling gdk_parent_root, and
	probably should have noticed that and bailed out earlier. But
	better late than never.)

	* gdk/win32/gdkinput-win32.c (gdk_input_init): Use
	GetSystemMetrics (SM_C[XY]SCREEN) instead of
	gdk_screen_{width,height}().

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Don't
	use return value from GlobalSize() as length of string when
	calling MultiByteToWideChar(). Pass -1 instead (zero-terminated
	string). Thanks to Iwasa Kazmi.
2002-08-22 05:42:04 +00:00
Peteris Krisjanis 3b8e32e309 2002-08-20 Peteris Krisjanis <peteris.krisjanis@os.lv> *lv.po: Updated Latvian translation. 2002-08-20 17:21:07 +00:00
Peteris Krisjanis f1b2404f13 2002-08-20 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation. 2002-08-20 17:20:40 +00:00
Padraig O'Briain e0637869c0 Use gtk_entry_set_positions() to update current_pos and selection_bound so
* gtk/gtkentry.c (gtk_entry_real_delete_text): Use
gtk_entry_set_positions() to update current_pos and selection_bound
so notifications are emitted (#90548)
2002-08-19 14:42:07 +00:00
Havoc Pennington 28dd23beb6 hardcode aclocal-1.4/automake-1.4 so that users with both automake 1.6 and
2002-08-18  Havoc Pennington  <hp@pobox.com>

	* autogen.sh: hardcode aclocal-1.4/automake-1.4 so that users with
	both automake 1.6 and 1.4 installed get the right automake. Means
	compilation from CVS will now require the latest automake 1.4
	release, or manually creating symlinks called "automake-1.4" and
	"aclocal-1.4"
2002-08-18 22:21:45 +00:00
Isam Bayazidi 70e9ffa6ff Arabic Trans 2002-08-18 10:21:17 +00:00
Simos Xenitellis f621767dc3 Updated Greek translation 2002-08-17 17:01:30 +00:00
Christophe Merlet 143e8cf48d Updated French translation. 2002-08-15 09:36:39 +00:00
Christian Meyer cff5ffc5ca Fixed some typos and mnemonics. 2002-08-14 15:29:11 +00:00
Padraig O'Briain dc257f4003 Move focus to children, if they exist, after GtkTextView is focused.
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-14 08:14:07 +00:00
Gustavo Noronha Silva 84222a1a1a translation update 2002-08-13 19:50:36 +00:00
Pablo Gonzalo del Campo eae0dee702 Fixed a couple of spanish mistyped strings
2002-08-07 Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Fixed a couple of spanish mistyped strings
2002-08-08 00:58:44 +00:00
Christian Neumair 65e35529b1 Updated German translation. 2002-08-07 13:44:48 +00:00
Christian Rose e3a98c525b Fixed Swedish translation.
2002-08-07  Christian Rose  <menthos@menthos.com>

	* sv.po: Fixed Swedish translation.
2002-08-06 23:47:24 +00:00
jacob berkman c07ed89395 link gdk-pixbuf-xlib against x libs (bug #83442)
2002-08-06  jacob berkman  <jacob@ximian.com>

	* configure.in: link gdk-pixbuf-xlib against x libs (bug #83442)
2002-08-06 14:07:47 +00:00
Havoc Pennington cae2bd114f Apply patch from Gustavo Giraldez for bug #78513
2002-07-24  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktextview.c: Apply patch from Gustavo
	Giraldez for bug #78513
2002-08-06 04:21:13 +00:00
Owen Taylor af9dc2e105 When overriding LDFLAGS, include @LDFLAGS@, otherwise LDFLAGS the users
Mon Aug  5 17:01:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
        include @LDFLAGS@, otherwise LDFLAGS the users passes
        to configure don't get used. (#89946, Noah Levitt,
        Albert Chin)

        * gdk/linux-fb/Makefile.am: Remove LDFLAGS setting.
2002-08-05 21:10:27 +00:00
Duarte Loreto 684afa1353 Updated Portuguese translation.
2002-08-05  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2002-08-05 01:21:22 +00:00
Christian Rose d24163028e Merged Sun changes that made sense.
2002-08-05  Christian Rose  <menthos@menthos.com>

	* sv.po: Merged Sun changes that made sense.
2002-08-04 22:58:57 +00:00
Gediminas Paulauskas 2d6203c0a3 revert 2002-08-02 23:00:25 +00:00
Gediminas Paulauskas b0f0c30f1b prototypes with no parameters must be defined as (void), not ()
2002-08-02  Gediminas Paulauskas <menesis@delfi.lt>

	* gtkitemfactory.h: prototypes with no parameters must be
	defined as (void), not ()
2002-08-02 21:58:55 +00:00
Sven Neumann 65e58f5db1 trivial changes to some debug code so it compiles with VERBOSE being
2002-08-01  Sven Neumann  <sven@gimp.org>

	* gdk/gdkrgb.c: trivial changes to some debug code so it compiles
	with VERBOSE being defined.
2002-08-01 18:21:28 +00:00
Changwoo Ryu a8acc04415 Updated Korean translation. Fixes bug #85906.
* ko.po: Updated Korean translation.  Fixes bug #85906.
2002-08-01 12:40:51 +00:00
Owen Taylor 749a1639cc Released 2.0.6
Wed Jul 31 16:42:03 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 2.0.6

        * configure.in: 2.0.6, binary, interface age 6.
        Require GLib version 2.0.6.

        * NEWS: Updated
2002-07-31 22:19:53 +00:00
Sven Neumann cec2b23e6b Fix wrong number of parameters in call to escape_string().
2002-07-31  Sven Neumann  <sven@gimp.org>

	* gtk/queryimmodules.c (print_escaped): Fix wrong number of
	parameters in call to escape_string().
2002-07-31 18:40:23 +00:00
Owen Taylor f361d10ca1 Avoid using g_strescape(), since it mangles UTF-8, (#89479, Yao Zhang.)
Wed Jul 31 12:50:51 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/queryimmodules.c: Avoid using g_strescape(),
        since it mangles UTF-8, (#89479, Yao Zhang.)
2002-07-31 16:55:28 +00:00
Sven Neumann ff76a7c353 free the result of gdk_pixdata_serialize() (bug #89411).
2002-07-31  Sven Neumann  <sven@gimp.org>

	* gdk-pixdata.c (gdk_pixdata_to_csource): free the result of
	gdk_pixdata_serialize() (bug #89411).
2002-07-31 08:14:55 +00:00
Owen Taylor 5582c1f311 Handle inverted ranges correctly (#85436, fix from Norihiro UMEDA)
Tue Jul 30 19:09:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrange.c (gtk_range_scroll_event): Handle
        inverted ranges correctly (#85436, fix from
        Norihiro UMEDA)
2002-07-30 23:18:04 +00:00
Owen Taylor 37a25985d1 Fix bug in the selection mode option menus which were setting the wrong
Tue Jul 30 16:36:53 2002  Owen Taylor  <otaylor@redhat.com>

        * tests/testgtk.c: Fix bug in the selection mode option
        menus which were setting the wrong values.
        (#85763, Manuel Op de Coul)
2002-07-30 20:43:25 +00:00
Owen Taylor 82b355f5a8 Honor GDK_PIXBUF_CSOURCE from configure.in when cross-compiling. (#87099,
Tue Jul 30 15:39:06 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/Makefile.am: Honor GDK_PIXBUF_CSOURCE from
        configure.in when cross-compiling. (#87099,
        J. Ali Harlow)
2002-07-30 20:00:28 +00:00
Owen Taylor c5e483055c Fix some warnings by adding casts to PixopsInterpType. (#85839, David L.
Mon Jul 29 23:06:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixbuf-scale.c: Fix some warnings by adding
        casts to PixopsInterpType. (#85839, David L. Cooper, II.)
2002-07-30 03:09:04 +00:00
Owen Taylor b0f8c022a3 Fix up the example program a bit. (#88814, Johnson Wong)
Mon Jul 29 22:36:06 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/tmpl/gtkfilesel.sgml: Fix up the example program
        a bit. (#88814, Johnson Wong)
2002-07-30 02:40:07 +00:00
Owen Taylor f29f8665fd Unset gtk-im-surrounding-info object data again. (Fix from Yao Zhang,
Mon Jul 29 16:42:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontext.c (gtk_im_context_real_get_surrounding):
        Unset gtk-im-surrounding-info object data again.
        (Fix from Yao Zhang, #86811)
2002-07-29 21:04:29 +00:00
Owen Taylor 071ba60b6e Replace uses of grep \(A\|B\) ... with egrep (A|B). (#84872, Arnaud
Fri Jul 26 17:59:06 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Replace uses of grep \(A\|B\) ... with
        egrep (A|B). (#84872, Arnaud Charlet)
2002-07-26 22:19:17 +00:00
Kristian Rietveld d9d3beb099 return FALSE, (gtk_tree_store_finalize): use g_node_traverse instead of
Fri Jul 26 21:39:21 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (node_free): return FALSE,
        (gtk_tree_store_finalize): use g_node_traverse instead of
        g_node_children_foreach, so the whole tree will be freed (#88854,
        patch from Emmanuel Briot).
2002-07-26 19:37:53 +00:00
Kristian Rietveld f85c1d6f26 fix some memleaks, (#84426, patch from Matthias Clasen).
Fri Jul 26 21:24:03 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_button_press): fix some memleaks,
        (#84426, patch from Matthias Clasen).
2002-07-26 19:16:49 +00:00
Kristian Rietveld e71cac0e1a _iter_children check shouldn't be in g_return_return_val_if_fail (pointed
Fri Jul 26 17:11:25 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): _iter_children
        check shouldn't be in g_return_return_val_if_fail (pointed out by
        Josh Green, #88997),
        (gtk_tree_view_set_model): call _gtk_tree_view_column_unset_model
        for each column when we unset the model (part of #82484),
        (gtk_tree_view_get_cell_area): return if we ran out of tree or
        if we got an invalid path (#82376).

        * gtk/gtktreeprivate.h: add _gtk_tree_view_column_unset_model.

        * gtk/gtktreeviewcolumn.c: implement _gtk_tree_view_column_unset_model
        which disconnects the sort_column_changed_signal (part of #82484).

        * gtk/gtkliststore.c (gtk_list_store_insert): append row if the
        given postion is off the end of the tree (#85813).

        * gtk/gtkentry.c (gtk_cell_editable_key_press_event): let's use
        2-space indent, commit changes if up/down keys has been pressed,
        this overrides the focus key foo so the user won't be surprised
        (#84665).
2002-07-26 18:12:28 +00:00
Changwoo Ryu 28235d58b4 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-07-26 18:10:22 +00:00
Matthias Clasen 0bc92be1c2 Use gdk_rgb_convert_4, not gdk_rgb_convert_8 for depth 4, bpp 8,
* gdk/gdkrgb.c (gdk_rgb_select_conv): Use gdk_rgb_convert_4,
	not gdk_rgb_convert_8 for depth 4, bpp 8, PseudoColor visuals.
	(#88697)
2002-07-25 20:30:00 +00:00
Owen Taylor 398405fdac When a menubar is up, use F10 to cycle menubars, not Control-Tab (#87159,
Thu Jul 25 14:14:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
        menubars, not Control-Tab (#87159, Calum Benson. Patch from
        Padraig O'Briain.)

        * gtk/gtkmenubar.c: When cycling menu bars, cancel
        after the last instead of wrapping around.
2002-07-25 18:18:37 +00:00
Owen Taylor 658c98d77a [ Patch from Padraig O'Briain, #87904 ]
Thu Jul 25 11:57:57 2002  Owen Taylor  <otaylor@redhat.com>

        [ Patch from Padraig O'Briain, #87904 ]

        * gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
        use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
        g_signal new.

        * gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
        Always focus the widget, even when we are activating
        as well.
2002-07-25 16:09:26 +00:00
Dmitry Mastrukov a672bb715a ru.po: Updated Russian translation with help from SUN G11n <gnome_int_l10n@ireland.sun.com>. 2002-07-25 04:45:48 +00:00
Owen Taylor 2042a08ab0 ed Jul 24 16:43:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c docs/references/tmpl/gtkrc.sgml: Don't use
        GTK_RC_FILES, since it causes problems with what KDE (etc.)
        does to customize GTK+ themes, use GTK2_RC_FILES instead. (#88987)
2002-07-24 20:52:22 +00:00
Stanislav Visnovsky 9e38c2e5ec Updated Slovak translation.
2002-07-24  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-07-24 12:59:22 +00:00
Yanko Kaneti dd0f5b6567 Updated Bulgarian translation.
2002-07-23  Yanko Kaneti <yaneti@declera.com>

        * bg.po: Updated Bulgarian translation.
2002-07-23 11:56:09 +00:00
Jordi Mallach 69c615fcb1 Updated Catalan translation. 2002-07-22 11:02:31 +00:00
Changwoo Ryu 643006f533 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-07-21 12:33:50 +00:00
Christophe Merlet f2bfc7d2c7 Updated French translation. 2002-07-21 10:02:54 +00:00
Kjartan Maraas 7904d1d663 Update slightly 2002-07-20 23:16:36 +00:00
Ole Laursen 25dc1c37fe Updated Danish translation.
2002-07-19  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-07-19 21:25:39 +00:00
Takayuki KUSANO fbbc6bb79b Updated Japanese translation.
* ja.po: Updated Japanese translation.
2002-07-19 14:55:43 +00:00
Chyla Zbigniew ca4cc77b50 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-07-19 14:03:25 +00:00
Dmitry Mastrukov b096092530 ru.po: Updated Russian translation. 2002-07-18 17:39:09 +00:00
Christian Rose 09ffe845d9 Updated Swedish translation.
2002-07-17  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-07-17 08:42:09 +00:00
Matthias Clasen 57c4adc842 Support for compressed ras images (#84994):
* io-ras.c (RAS2State): Error on unsupported ras variations.
	(OneLine8): Fix colormap indexing.
	(OneLine): Call updated_func with proper region.
	(DoCompressed): New function, handles compressed ras data.
	(gdk_pixbuf__ras_image_load_increment): Handle compressed ras
	images.
2002-07-16 17:31:23 +00:00
Sven Neumann e7fd4ff587 fixed the example code (return TRUE from the expose_event handler).
2002-07-16  Sven Neumann  <sven@gimp.org>

	* gdk/tmpl/rgb.sgml: fixed the example code (return TRUE from the
	expose_event handler).
2002-07-16 17:21:02 +00:00
Federico Mena Quintero 5b6c1d4f92 Fixed the LSB -> MSB case. Fixes #79463.
2002-07-16  Federico Mena Quintero  <federico@ximian.com>

	* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
	Fixes #79463.
2002-07-16 17:14:26 +00:00
Ole Laursen 73ffaf1b0d Updated Danish translation.
2002-07-13  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-07-13 12:49:44 +00:00
Pablo Saratxaga 31a101fb95 updated Vietnamese file 2002-07-12 14:59:00 +00:00
Peteris Krisjanis 58f1891795 *configure.in - (ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
*configure.in - (ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11 05:30:01 +00:00
Peteris Krisjanis f4d3373525 (ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
(ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11 05:29:38 +00:00
Peteris Krisjanis 3b8378fb2f lv.po (added) - Added Latvian translation.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
* lv.po (added) - Added Latvian translation.
2002-07-11 05:28:28 +00:00
Peteris Krisjanis 1b44a18767 Added Latvian translation.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
Added Latvian translation.
2002-07-11 05:27:37 +00:00
jacob berkman 8cfb7a3a7f activate the menu item so old apps work properly
2002-07-10  jacob berkman  <jacob@ximian.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_scroll_event): activate the
	menu item so old apps work properly
2002-07-10 18:46:34 +00:00
Owen Taylor 2c67a17bc5 Fix some cases where signal connection IDs where being assigned to guint
Wed Jul 10 14:27:14 2002  Owen Taylor  <otaylor@redhat.com>

        * modules/input/gtkimcontextxim.c gtk/gtkcolorsel.c
        gtk/gtkdialog.c gtk/gtktextbtree.c: Fix some cases
        where signal connection IDs where being assigned to
        guint rather than gulong. (part of #87281, Shivram U)
2002-07-10 18:30:41 +00:00
Jordi Mallach c1dc8eed15 Updated Catalan translation. 2002-07-10 16:49:31 +00:00
Kjartan Maraas f1e4445bce Updated Norwegian (bokml) translation.
2002-07-10  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-07-10 10:48:03 +00:00
Dmitry Mastrukov c4f5ad3a0f ru.po: Updated Russian translation. 2002-07-10 04:41:25 +00:00
Changwoo Ryu e067c2a9c4 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-07-09 10:56:49 +00:00
Chyla Zbigniew 609b29d2a8 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-07-08 10:30:30 +00:00
Christophe Fergeau 45664bc0f6 Updated French translation 2002-07-07 12:10:01 +00:00
Matthias Clasen 6ee45ace1b Correct computation of image height. (OneLine): Correct update
* io-ico.c (DecodeHeader): Correct computation of image height.
	(OneLine): Correct update notification.
2002-07-06 23:55:47 +00:00
Christian Rose 5f425b9f27 Updated Swedish translation.
2002-07-06  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-07-06 19:50:19 +00:00
Christophe Fergeau 2fe21816cc Updated French translation 2002-07-06 11:39:41 +00:00
Matthias Clasen adc808729b Handle global_error == NULL better. (tiff_image_parse): Don't trust
* io-tiff.c (tiff_set_error): Handle global_error == NULL
	better.
	(tiff_image_parse): Don't trust TIFFRGBAImageBegin to set
	the "put" routine.  (Fixes #87384)
	(gdk_pixbuf__tiff_image_stop_load): Don't call TIFFClose too
	early.
2002-07-06 08:55:20 +00:00
Owen Taylor 94946ec0e4 Add an extra parameter to _gtk_menu_item_select_first() to allow us to
Fri Jul  5 20:18:23 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.[ch] gtk/gtkmenubar.c gtk/gtkmenuitem.c
        gtk/gtkentry.c gtk/gtktextview.c: Add an extra parameter
        to _gtk_menu_item_select_first() to allow us to choose
        whether we want to select the first item predictably
        or to select the first sensitive item. Fixes problem
        with insensitive menu items and keynav. (#85796,
        reported by Bill Haneman and others.)
2002-07-06 00:24:28 +00:00
Jonathan Blandford b8c0aff312 fix warning. (gtk_tree_view_search_iter): fix warning, #85884
Fri Jul  5 02:50:24 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning.
	(gtk_tree_view_search_iter): fix warning, #85884

	* gtk/gtktreestore.c (gtk_tree_store_get_flags): change return
	value to GtkTreeModelFlags to fix compiler warning, #85883

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change
	return value to GtkTreeModelFlags to fix compiler warning, #85882

	* gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler
	warning, #85881
2002-07-05 06:56:08 +00:00
Kristian Rietveld bf033cc8e6 also update ->tail after sorting.
Thu Jul  4 19:49:08 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkliststore.c (gtk_list_store_sort): also update ->tail after
        sorting.
2002-07-04 17:39:57 +00:00
Matthias Clasen 81ecb7e80a New function to avoid crashes on unchecked reallocs. (DecodeHeader,
* io-bmp.c (grow_buffer): New function to avoid crashes
	on unchecked reallocs.
	(DecodeHeader, DecodeColormap, decode_bitmasks,
	DoCompressed): Use grow_buffer instead of g_realloc
	throughout. Change signatures where necessary to pass the
	errors up.  (#85448)
	(OneLine16): Fix loading of 16bpp BI_RGB bmps.  (#86286)
2002-07-02 17:51:27 +00:00
Stanislav Visnovsky 87943c865c Updated Slovak translation.
2002-07-02  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-07-02 15:05:50 +00:00
Jonathan Blandford 582a76843a only validate the visible area if we've ever been requisitioned.
Tue Jul  2 00:33:26 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (validate_visible_area): only validate the
	visible area if we've ever been requisitioned.
2002-07-02 04:34:48 +00:00
Jonathan Blandford e44ece4e36 sync up white space/variable names to match tree_store equiv.
Mon Jul  1 17:04:09 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkliststore.c (gtk_list_store_real_set_value): sync up
	white space/variable names to match tree_store equiv.

	* gtk/gtktreestore.c (gtk_tree_store_real_set_value): sort if we
	set the value.
2002-07-01 21:15:26 +00:00
Bill Haneman 60baed1179 Fix for gdk_pixbuf_xlib_get_from_drawable, to handle root window drawable. 2002-07-01 13:42:07 +00:00
Pablo Saratxaga 1457497c10 updated Vietnamese file 2002-06-30 22:09:24 +00:00
Sven Neumann 3a259d847d converted a Tab to spaces.
2002-06-28  Sven Neumann  <sven@gimp.org>

	* gdk-pixbuf-csource.c (print_blurb): converted a Tab to spaces.
2002-06-28 14:15:43 +00:00
Changwoo Ryu 9aff7ba8e5 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-06-21 06:59:20 +00:00
Yanko Kaneti 0d37ee8e59 Added Bulgarian (bg).
2002-06-18  Yanko Kaneti <yaneti@declera.com>

   * configure.in: (ALL_LINGUAS) Added Bulgarian (bg).

po/

   * bg.po (added): Bulgarian translation by
   Borislav Aleksandrov <B.Aleksandrov@cnsys.bg>.
2002-06-18 20:20:20 +00:00
Pablo Saratxaga ab237e4a09 updated Vietnamese file 2002-06-18 13:59:26 +00:00
Ole Laursen 549ed2d785 Updated Danish translation.
2002-06-17  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-06-17 21:20:19 +00:00
Vincent van Adrighem 09065c7696 Dutch translation updated by Tino Meinen.
2002-06-16 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
        * nl.po: Dutch translation updated by Tino Meinen.
2002-06-16 22:42:34 +00:00
Kjartan Maraas 39c59caa9d Update 2002-06-16 18:56:53 +00:00
Owen Taylor f7d4be45ff fix bugzilla references 2002-06-16 13:48:28 +00:00
Carlos Perello Marin f84c758861 Updated Spanish translation.
2002-06-16  Carlos Perello Marin <carlos@gnome-db.org>

	* es.po: Updated Spanish translation.
2002-06-16 13:03:21 +00:00
Owen Taylor 9af4e2c2c1 at Jun 15 23:21:24 2002 Owen Taylor <otaylor@redhat.com>
* Released 2.0.5

        * configure.in: Version 2.0.5, binary, interface age 5.

        * NEWS: Updated.
2002-06-16 05:37:12 +00:00
Owen Taylor 387cbde678 Remove conflict indicators 2002-06-16 03:59:29 +00:00
Owen Taylor 9e783527b3 Actually use the UTF-8 filename, so we actually fix #83386.
Sat Jun 15 23:53:03 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (gtk_file_selection_set_filename):
        Actually use the UTF-8 filename, so we actually
        fix #83386.

        * tests/testgtk.c: Remember the directory as a
        test of gtk_file_selection_set_filename().
2002-06-16 03:59:06 +00:00
Owen Taylor 472348534f at Jun 15 23:05:19 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
        Fix backwards asssertion. (#85434)
2002-06-16 03:12:36 +00:00
Duarte Loreto 35fbd14600 Updated Portuguese translation.
2002-06-16  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2002-06-16 00:49:19 +00:00
James M. Cape a66732b586 Notify about "background-full-height-set", not "bg_full_height_set".
Sat Jun 15 16:10:00 2002  James M. Cape <jcape@ignore-your.tv>

	* gtk/gtktexttag.c (gtk_text_tag_set_property):
	Notify about "background-full-height-set", not
	"bg_full_height_set".
2002-06-15 21:10:59 +00:00
Andraz Tori cf694bc246 Updated Slovenian translation 2002-06-15 15:56:23 +00:00
Owen Taylor e3585dacce Released 2.0.4.
Fri Jun 14 12:50:21 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 2.0.4.

        * configure.in: 2.0.3, interface, binary age 4.

        * gtk/gtktreeselection.c gtk/gtktreeview.c gtk/gtkwindow.c
          gtk/gtkrc.c: Some doc SGML fixes.
2002-06-14 21:07:12 +00:00
Jonathan Blandford 2696fbc98f Fix bug #84268, where validate_rows sometimes didn't remove itself
Fri Jun 14 15:41:50 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c: Fix bug #84268, where validate_rows sometimes
	didn't remove itself correctly.  Thanks to Dave Camp for the fix.
2002-06-14 19:43:16 +00:00
Jonathan Blandford 1dc1b2c93f disconnect_by_func instead of disconnect_by_data. Someone else could use
Fri Jun 14 15:09:11 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_adjustments):
	disconnect_by_func instead of disconnect_by_data.  Someone else
	could use the same data as us.

	* gtk/gtktreeview.c (do_validate_rows): update the adjustment
	immediately after we update the size.  Fixes some scroll_to bugs.
	(validate_visible_area): ditto
2002-06-14 19:20:32 +00:00
Takayuki KUSANO 1d7f1372d0 Updated 2002-06-14 18:54:48 +00:00
Takayuki KUSANO ec0e05525f Updated Japanese translation.
* ja.po: Updated Japanese translation.
2002-06-14 17:13:50 +00:00
Owen Taylor 9c8d313f38 Ignore state change events for windows that aren't our toplevels. (#84482,
Fri Jun 14 10:31:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed):
        Ignore state change events for windows that aren't
        our toplevels. (#84482, Thomas Leonard)
2002-06-14 14:34:22 +00:00
Owen Taylor bf4292b24c Add missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). (Report of
Fri Jun 14 10:00:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkwindow.c (gdk_window_update_idle): Add
        missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE().
        (Report of non-thread-safety from Nicholas Allen)

        * gtk/gtkmain.c (rewrite_events_translate): Fix sign
        problem with coordinate translation. (Fix from
        Robin Lu, #85229)
2002-06-14 14:15:32 +00:00
Chyla Zbigniew ceea5ef8fe Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-06-14 08:24:47 +00:00
Owen Taylor 56bc856b71 Fix type names for GtkIconSet, GtkIconSource, GtkSelectionData, GtkBorder,
Thu Jun 13 19:41:56 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkiconfactory.c gtk/gtkselection.c gtk/gtkstyle.c
        gtk/gtktextiter.c gtk/gtktexttag.c gtk/gtktreemodel.c
        gtk/gtkwidget.c: Fix type names for GtkIconSet,
        GtkIconSource, GtkSelectionData, GtkBorder, GtkTextIter,
        GtkTextAttributes, GtkTreePath, GtkTreeIter,
        GtkRequisition, which were all registered as GtkType*.
        (#84634, James Henstridge; patch from Jonathan Blandford.)

        * NEWS: Updates.
2002-06-13 23:45:32 +00:00
Owen Taylor 31be1165be hu Jun 13 18:48:14 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c: Make work
        gdk_colormap_sync() work for DirectColor visuals
        as well. Fill in the ->colors array in
        gdk_screen_get_system_colormap () for DirectColor visuals.
        (#81954, Based on a patch from shivaram.upadhyayula@wipro.com)
2002-06-13 22:53:08 +00:00
Owen Taylor 36446419a3 Fix problem where when no alpha was involved, we scaled rather than
Thu Jun 13 18:11:11 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Fix problem where when no alpha was
        involved, we scaled rather than composited, but then
        went ahead and composited anyways. (#76958, Patch
        from Matthias Clasen) Needs to be merged to GNOME
        1.4 gdk-pixbuf.
2002-06-13 22:11:41 +00:00
Owen Taylor dafcd60b6c Add the obsolete CUA cut/copy/paste bindings. (#79078)
Thu Jun 13 17:50:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c gtk/gtkentry.c: Add the obsolete
        CUA cut/copy/paste bindings. (#79078)

        * gtk/gtktextview.c gtk/gtkentry.c: Make <Shift>BackSpace
        a synonym for for Backspace. (#80302, Jeff Waugh)
2002-06-13 22:06:17 +00:00
Owen Taylor 0c27054e73 Ignore all client events that were sent to a window that we don't know
Thu Jun 13 15:02:49 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c: Ignore all client events that
        were sent to a window that we don't know about or
        to a foreign window. (#81543, Young-Ho, Cha)
2002-06-13 19:36:14 +00:00
Jordi Mallach 8c5d2437f7 Updated Catalan translation. 2002-06-13 17:30:58 +00:00
Christian Rose 57fbd241ff Remove po/desk.pl and po/update.pl.
2002-06-13  Christian Rose  <menthos@menthos.com>

	* Makefile.am (EXTRA_DIST): Remove po/desk.pl and
	po/update.pl.
2002-06-13 16:35:30 +00:00
Owen Taylor 610a91de25 Fix so that the encoding of the filename is handled properly in the case
Thu Jun 13 12:24:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (gtk_file_selection_set_filename):
        Fix so that the encoding of the filename is handled
        properly in the case of non-UTF-8 filesystems;
        document the encoding. (#83386, Sebastian Ritau)

        * gtk/gtkfilesel.c (filenames_drag_get): Remove
        debug printf. Fix UTF-8 / filename encoding
        confusion.
2002-06-13 16:32:45 +00:00
Owen Taylor 138d13b2a4 Don't return a positive status unless there is a text target in the drag.
Thu Jun 13 12:01:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c (gtk_entry_drag_motion): Don't return
        a positive status unless there is a text target in
        the drag. (#83386, Thomas Leonard.)
2002-06-13 16:04:10 +00:00
jacob berkman 4d8116d641 remove po/README.tools
2002-06-13  jacob berkman  <jacob@ximian.com>

	* Makefile.am (EXTRA_DIST): remove po/README.tools
2002-06-13 15:58:26 +00:00
Owen Taylor 432d618f51 Save the initial grab time, use that when changing the pointer. (#83052,
Thu Jun 13 11:36:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Save
        the initial grab time, use that when changing the
        pointer. (#83052, help from Dave Camp tracking it down.)
2002-06-13 15:56:35 +00:00
Kristian Rietveld ca8c78aecf traverse all nodes, not just the leafs (pointed out by Josh Parsons)
Thu Jun 13 16:36:40 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (gtk_tree_store_finalize): traverse all nodes,
        not just the leafs (pointed out by Josh Parsons)
2002-06-13 14:28:04 +00:00
Christian Rose 5fc9179fce Removed. These are obsoleted by intltool. Updated Swedish translation.
2002-06-13  Christian Rose  <menthos@menthos.com>

	* desk.pl, update.pl, update.sh, README.tools: Removed. These are
	obsoleted by intltool.
	* sv.po: Updated Swedish translation.
2002-06-13 07:04:44 +00:00
Havoc Pennington 7e9215c616 check that pango has Xft2 support, instead of checking whether Xft2
2002-06-12  Havoc Pennington  <hp@redhat.com>

	* configure.in: check that pango has Xft2 support, instead of
	checking whether Xft2 exists.
2002-06-12 22:29:10 +00:00
Owen Taylor 51d3f7330c Add an informative g_warning() when the entry has lost a focus-out-event.
Wed Jun 12 17:46:53 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c (blink_cb): Add an informative
        g_warning() when the entry has lost a focus-out-event.
        (#78305, Michel Selten)
2002-06-12 21:47:59 +00:00
Owen Taylor dfbb9d64b5 Check to see if the menu item is selectable before setting
Wed Jun 12 17:31:15 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item):
        Check to see if the menu item is selectable before
        setting menu_shell->active_menu_item. This hopefully
        will keep gail from getting confused.
        (#84115, Remus Draica)
2002-06-12 21:32:12 +00:00
Owen Taylor f0032274a8 Fix bug where if CENTER_ON_PARENT was set, but there was no parent,
Wed Jun 12 17:13:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug
        where if CENTER_ON_PARENT was set, but there was
        no parent, GDK_HINT_POS would be set, resulting
        in a dialog at 0,0. (#83479, Havoc Pennington)
2002-06-12 21:19:13 +00:00
Owen Taylor f7b6505060 When fetching the menubars for the window for F10 handling, only add
Wed Jun 12 16:34:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenubar.c: When fetching the menubars for
        the window for F10 handling, only add viewable menu
        bars. (Apparently, people sometimes put menu bars
        in notebook pages!) (Tim Janik, #82627)
2002-06-12 20:42:23 +00:00
Owen Taylor e4d9682836 Clamp size of child to at least 1x1. (#82431, Boris Shingarov.)
Wed Jun 12 16:21:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
        Clamp size of child to at least 1x1. (#82431,
        Boris Shingarov.)
2002-06-12 20:23:21 +00:00
Owen Taylor c994d518a8 Handle 0 increment, to fix division-by-zero problem. (#82816, George
Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
        0 increment, to fix division-by-zero problem.
        (#82816, George Lebl.)
2002-06-12 19:42:36 +00:00
Owen Taylor a8ebb5a029 ed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
        Fix memory leak. (Patch from Matthias Clasen, #84926)

        * gtk/gtkrange.c (gtk_range_init): Initialize
        mouse_x, mouse_y to -1,-1. (#84871, Garrett Lesage)
2002-06-12 19:37:29 +00:00
Owen Taylor bd67c09866 Allow NULL for widget path or class path as documented. (#83150, Sergey
Wed Jun 12 15:08:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c (gtk_rc_get_style_by_paths): Allow
        NULL for widget path or class path as documented.
        (#83150, Sergey Kuzminov)
2002-06-12 19:08:46 +00:00
Owen Taylor cac66b0176 Fix ZWJ => ZWN typo. (#83092, Tino Meinen)
Wed Jun 12 15:02:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextutil.c: Fix ZWJ => ZWN typo.
        (#83092, Tino Meinen)
2002-06-12 19:01:46 +00:00
Owen Taylor 18d5d86346 Fix some problems with case statements for checking for omitted deps.
Wed Jun 12 14:41:43 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Fix some problems with case statements
        for checking for omitted deps. (#84202, Jacob Berkman.)

        * configure.in: Remove USE_X11R6_XIM checks since we
        no longer use them.
2002-06-12 18:48:27 +00:00
Owen Taylor 8ed5317593 ed Jun 12 14:18:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Add compose sequences
        of dead_acute + c/C => C WITH CEDDILLA.
        (Nano Golveia, #83492)
2002-06-12 18:22:12 +00:00
Federico Mena Quintero f2167ac6fe New functions to fetch 32 or 16-bit little-endian values starting at a
2002-06-07  Federico Mena Quintero  <federico@ximian.com>

	* io-bmp.c (lsb_32):
	(lsb_16): New functions to fetch 32 or 16-bit little-endian values
	starting at a specific memory location.  We do this instead of
	GINT32_FROM_LE() as the latter is simply dereferences a cast,
	which doesn't work on platforms with alignment requirements.
	Fixes #84083.
2002-06-10 16:56:42 +00:00
Daniel Elstner 09d622339a Remove duplicated message. Although it was commented, my gettext (0.11.2)
2002-06-10  Daniel Elstner  <daniel.elstner@gmx.net>

* pt_BR.po: Remove duplicated message.  Although it was commented, my gettext (0.11.2) didn't like it.
2002-06-10 13:53:04 +00:00
Gustavo Noronha Silva d922c751d5 updating translation... I used pt.po to "bootstrap" the missing
messages and reviewed most of them
2002-06-10 03:27:37 +00:00
Matthias Clasen 529b689a35 Don't leak child_anchor_table. (#84425)
* gtk/gtktextbtree.c (_gtk_text_btree_unref): Don't leak
	child_anchor_table.  (#84425)

	* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't leak
	one_display_cache.  (#84424)
2002-06-09 20:37:18 +00:00
Andraz Tori 50ad2bb2e7 Updated Slovenian translation 2002-06-09 19:49:01 +00:00
Christophe Merlet 70b686742c Updated French translation. 2002-06-08 17:34:08 +00:00
Jonathan Blandford 0c0f6961cb Fix sizing bug.
Fri Jun  7 23:11:42 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): Fix sizing
	bug.

	* docs/reference/gtk/tmpl/gtkbutton.sgml: Remove ^M's.
2002-06-08 06:14:59 +00:00
Matthias Clasen 55fcbecc93 New function, split off from gtk_tree_view_column_clear_attributes.
* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_clear_attributes_by_info): New function,
	split off from gtk_tree_view_column_clear_attributes.
	(gtk_tree_view_column_clear_attributes):
	(gtk_tree_view_column_finalize):  Call the new function, avoid
	recalculating the info from the renderer.  (#84413)

	* gtk/gtktextview.c (text_view_child_new_anchored): Initialize
	vc->type in order to avoid a later UMR.  (#84415)
2002-06-07 21:59:55 +00:00
Andraz Tori 8dedc77abd Updated Slovenian translation 2002-06-07 19:50:36 +00:00
Matthias Clasen 45fe0becc7 Set hardware_keycode for KeyRelease events. (#84305)
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Set
	hardware_keycode for KeyRelease events.  (#84305)
2002-06-06 21:01:34 +00:00
Tivo Leedjrv 5530d73ca0 Fixed previous error.
2002-06-06  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Fixed previous error.
2002-06-06 19:19:27 +00:00
jacob berkman e80f1861d0 revert previous commit as it yields "invalid multibyte sequence" errors
2002-06-06  jacob berkman  <jacob@ximian.com>

	* et.po: revert previous commit as it yields "invalid multibyte
	sequence" errors
2002-06-06 18:38:01 +00:00
Owen Taylor c7fab5a23d Don't redraw when the area is completely above the visible area.
Thu May 23 15:44:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c (changed_handler): Don't redraw
        when the area is completely above the visible area.
2002-06-06 15:45:02 +00:00
Kristian Rietveld 8aea6870a7 don't leak the GArray (figured out by Matthias Clasen, fixes #82026).
Thu Jun  6 17:34:00 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkrbtree.c (_gtk_rbtree_reorder): don't leak the GArray
        (figured out by Matthias Clasen, fixes #82026).
2002-06-06 15:25:33 +00:00
Tivo Leedjrv f677652d7d Fix.
2002-06-06  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Fix.
2002-06-06 15:09:57 +00:00
Dmitry Mastrukov a27ca7142b ru.po: Updated Russian translation. 2002-06-06 03:53:40 +00:00
Vincent van Adrighem 8ee4f373fe Dutch translation updated.
2002-06-04 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Dutch translation updated.
2002-06-04 21:57:49 +00:00
Owen Taylor 1a53f723c4 If we have xft .pc file, use that when checking for Xft/Xrender. (Still
Tue Jun  4 17:39:34 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: If we have xft .pc file, use that
        when checking for Xft/Xrender. (Still need to separate
        out HAVE_XFT, HAVE_RENDER)

        * configure.in: Make sure Xft cflags come before X cflags.
2002-06-04 21:53:22 +00:00
Hasbullah Bin Pit 6c1036e9e9 Updated Malay Translation.
2002-06-04  Hasbullah Bin Pit <sebol@ikhlas.com>

* ms.po: Updated Malay Translation.
2002-06-04 20:25:56 +00:00
Tivo Leedjrv bfa5cea589 Updated Estonian translation.
2002-06-04  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Updated Estonian translation.
2002-06-04 17:29:23 +00:00
Chyla Zbigniew 2d3fabf22f Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-06-04 17:15:22 +00:00
Daniel Elstner 9d432c2f96 Really fix #83796: Revert jrb's last patch, and move the second if-clause
2002-06-04  Daniel Elstner  <daniel.elstner@gmx.net>

* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render): Really fix #83796: Revert jrb's last patch, and move the second if-clause into the fist one's else-branch.  This is also what the other cell renderers do.
2002-06-04 16:06:39 +00:00
George Lebl cd20b58e1b update
Mon Jun 03 16:41:45 2002  George Lebl <jirka@5z.com>

	* cs.po: update
2002-06-03 23:31:36 +00:00
Federico Mena Quintero 057bccc78e Fix the MSB -> MSB case. Fixes #79190.
2002-06-03  Federico Mena Quintero  <federico@ximian.com>

	* gdk/gdkpixbuf-drawable.c (rgb565msb): Fix the MSB -> MSB case.
	Fixes #79190.
2002-06-03 17:38:49 +00:00
Jordi Mallach 62f50bfa0e Minor Catalan updates. 2002-06-03 01:23:43 +00:00
Christian Rose 028d675264 Updated Catalan translation by Jordi Mallach <jordi@sindominio.net>.
2002-06-02  Christian Rose  <menthos@menthos.com>

	* ca.po: Updated Catalan translation by
	Jordi Mallach <jordi@sindominio.net>.
2002-06-02 22:12:56 +00:00
Carlos Perell Marn adccef1bd0 Updated Spanish translation by Juan Manuel Garca Molina
2002-06-01  Carlos Perell Marn <carlos@gnome-db.org>

	* es.po: Updated Spanish translation by Juan Manuel Garca Molina
	<juanma_gm@wanadoo.es>
2002-06-01 22:08:23 +00:00
Jonathan Blandford eacffc9508 add missing flag, #83796
Sat Jun  1 10:38:24 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	add missing flag, #83796
2002-06-01 15:04:57 +00:00
Matthias Clasen d89fd19f87 Accept xbms starting with a C comment - those seem to be not uncommon,
* gdk-pixbuf-io.c (pixbuf_check_xbm): Accept xbms starting
	with a C comment - those seem to be not uncommon, e.g. the Gimp
	produces them.  (#82706)

	* io-xbm.c (read_bitmap_file_data): Don't leak memory on certain
	invalid inputs.
	(gdk_pixbuf__xbm_image_load_real): Don't leak memory on valid inputs.
2002-05-31 23:43:04 +00:00
Isam Bayazidi 78dc4e83a2 adding a no accelerator PO 2002-05-31 20:41:45 +00:00
Michael Meeks 5cb0f9b3a5 destroy the transfer window if the grab fails so we don't get events on
2002-05-30  Michael Meeks  <michael@ximian.com>

	* gtk/gtkmenu.c (gtk_menu_popup): destroy the transfer
	window if the grab fails so we don't get events on this
	window after the menu is finalized with a duff GtkWidget
	pointer: #82366
2002-05-31 16:36:39 +00:00
Shivram U 85bb7d41e1 Check if the owner got is of type GDK_WINDOW_FOREIGN. If so the owner is
Mon May 28 13:28:10  Shivram U  <shivaram.upadhyayula@wipro.com>

	* gtk/gtktextbuffer.c (selection_data_get_buffer): Check if the owner
	got is of type GDK_WINDOW_FOREIGN. If so the owner is not in-process,
	and so return NULL.
2002-05-30 09:41:45 +00:00
Michael Meeks 66dd5d22e6 don't leak the paths.
2002-05-24  Michael Meeks  <michael@ximian.com>

	* gtk/gtkmain.c (_gtk_find_module): don't leak the paths.
2002-05-30 09:27:54 +00:00
Soeren Sandmann a367726d57 revert accidentally committed changes
Thu May 30 07:27:05 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/gdkwindow.c: revert accidentally committed changes
2002-05-30 05:24:20 +00:00
Soeren Sandmann 0a474992c2 add gtk_menu_style_set(). Fixes #79345.
Thu May 30 07:12:02 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_style_set): add
	gtk_menu_style_set(). Fixes #79345.
2002-05-30 05:12:30 +00:00
Tor Lillqvist 05f883f5b6 Use the "logical dpi" to calculate (pseudo) physical sizes. Similar to the
2002-05-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkmain-win32.c (gdk_screen_width_mm,
	gdk_screen_height_mm): Use the "logical dpi" to calculate
	(pseudo) physical sizes. Similar to the use of "logical dpi" in
	Pango as suggested by Joaquin Cuenca Abela.

	Two fixes by Florent Duguet:

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Correct
	semantics for setting cursor to NULL (should use cursor of parent
	window).

	* gdk/win32/gdkgc-win32.c (gdk_win32_hdc_get): Plug memory
	leak.
2002-05-29 22:21:59 +00:00
Dave Camp 08cc81743b Disconnect from keypress events.
2002-05-29  Dave Camp  <dave@ximian.com>

	* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
2002-05-29 19:22:51 +00:00
Chyla Zbigniew c6e0fe3855 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-29 15:42:58 +00:00
Ole Laursen 46f5b022e5 Changed translation of redo.
2002-05-29  Ole Laursen  <olau@hardworking.dk>

	* da.po: Changed translation of redo.
2002-05-29 10:58:41 +00:00
Vincent van Adrighem 301e78d7db Minor changes to the translation (Tino Meinen).
2002-05-28 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Minor changes to the translation (Tino Meinen).
2002-05-28 09:46:16 +00:00
Duarte Loreto de549ecdd3 Updated Portuguese translation.
2002-05-28  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2002-05-28 01:31:31 +00:00
Daniel Elstner d8880ebb77 Fixes for #83190
2002-05-27  Daniel Elstner  <daniel.elstner@gmx.net>

Fixes for #83190

* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing fields to anonymous union: glong, gulong, gint64 and guint64.  This is an internal header file, so it should not affect ABI or API compatibility.

* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value): Implement missing support for glong, gulong, gint64 and guint64 fundamental types.  Use data.v_uint instead of data.v_int for G_TYPE_FLAGS, as GValue does.
(_gtk_tree_data_list_value_to_node): ditto
(_gtk_tree_data_list_node_copy): Add case labels for missing fundamental types, and reorder them to match the other functions.
(gtk_tree_data_list_compare_func): Implement comparison for glong, gulong, gint64 and guint64.  Use g_value_get_enum() for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather than accessing them as gint/guint.  The G_VALUE_HOLDS() check probably won't like this.
2002-05-27 22:33:17 +00:00
Vincent van Adrighem 383ddaa39e Dutch translation updated by Tino Meinen.
2002-05-27 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Dutch translation updated by Tino Meinen.
2002-05-27 15:35:24 +00:00
Isam Bayazidi ebb80c587e adding Arabic file 2002-05-26 22:56:38 +00:00
Carlos Perello Marin c50b3669ee Updated by Gustavo Noronha Silva <kov@debian.org> && converted into UTF-8
2002-05-26  Carlos Perello Marin <carlos@gnome-db.org>

	* pt_BR.po: Updated by Gustavo Noronha Silva <kov@debian.org> &&
	converted into UTF-8
2002-05-26 19:15:02 +00:00
Isam Bayazidi 2a0c24e934 -fixing Arabic view 2002-05-24 23:11:39 +00:00
Isam Bayazidi 44bb96f2c8 - adding Arabic translation file 2002-05-24 22:15:41 +00:00
Dave Camp 8a846eb737 Built an iter directly instead of using
2002-05-24  Dave Camp  <dave@ximian.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
	Built an iter directly instead of using
	gtk_tree_model_sort_elt_get_path(), since that returns a path for
	the child model.
2002-05-24 18:37:28 +00:00
Dave Camp 1209ae2cc8 oops, fixed typo in the last commit 2002-05-24 16:50:53 +00:00
Dave Camp ce69e17c53 Use indices[i] >= level->array->len rather than level->array->len >
2002-05-24  Dave Camp  <dave@ximian.com>

	* gtk/gtktreemodelsort.c: Use indices[i] >= level->array->len
	rather than level->array->len > indices[i] in the bounds check.
2002-05-24 15:52:30 +00:00
Owen Taylor c577abf769 Released 2.0.3.
Thu May 23 17:19:16 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 2.0.3.

        * gtk/gtktooltips.c (gtk_tooltips_event_handler): Disable
        tooltips for menu items with submenus .. they still
        don't really work properly.

        * gtk/gtkwindow.c (gtk_window_move_resize): Clear
        initial_pos_set even if it only causes a move, not
        a resize as well.

        * configure.in: GTK+-2.0.3, interface age, binary age 3.

        * NEWS: Updated.
2002-05-23 22:01:51 +00:00
Jonathan Blandford 4794f2b309 revert last change until I am more sure of it 2002-05-23 15:31:41 +00:00
Jonathan Blandford 6fe89cc83a Check the parentage of a newly inserted node.
Thu May 23 11:08:09 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_row_inserted): Check the
	parentage of a newly inserted node.
2002-05-23 15:15:37 +00:00
Kjartan Maraas edf587b5d0 Update 2002-05-23 10:28:01 +00:00
Tor Lillqvist cef800524a Use correct path to the loaders and immodules directories
2002-05-23  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Use correct path to the loaders and immodules
	directories (GTK_BINARY_VERSION, not GTK_VERSION).
2002-05-22 21:01:18 +00:00
Federico Mena Quintero 44fb34e048 Make the top of the ChangeLog match the one in HEAD - Federico 2002-05-22 20:35:00 +00:00
Federico Mena Quintero fa5b3494ce Ahem, take the rowstride into account!!! Fixes #82515.
2002-05-22  Federico Mena Quintero  <federico@ximian.com>

	* io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
	account!!!  Fixes #82515.

	[This bug is not present in the GNOME 1.4 branch as its XPM loader
	does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
	no row padding and then uses gdk_pixbuf_new_from_data() on it.]

	[IMPORTANT: The comment above is to make my life easier when
	merging stuff across branches.  If you make changes to gdk-pixbuf
	in either branch, please include a comment in the ChangeLog that
	indicates whether this should be merged into the other branch.
	Thanks!]
2002-05-22 20:31:50 +00:00
Federico Mena Quintero 980b21ed3a Ahem, take the rowstride into account!!! Fixes #82515.
2002-05-22  Federico Mena Quintero  <federico@ximian.com>

        * io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
        account!!!  Fixes #82515.

        [This bug is not present in the GNOME 1.4 branch as its XPM loader
        does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
        no row padding and then uses gdk_pixbuf_new_from_data() on it.]

        [IMPORTANT: The comment above is to make my life easier when
        merging stuff across branches.  If you make changes to gdk-pixbuf
        in either branch, please include a comment in the ChangeLog that
        indicates whether this should be merged into the other branch.
        Thanks!]
2002-05-22 20:28:15 +00:00
Owen Taylor 565c6e3ba5 Require autoconf-2.52 explicitely, since otherwise Debian will process it
Wed May 22 16:12:38 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Require autoconf-2.52 explicitely,
        since otherwise Debian will process it with 2.13 (ugh!).
2002-05-22 20:16:48 +00:00
Tor Lillqvist de4153065e Use GTK_BINARY_VERSION (and not GTK_VERSION) in the path to the loaders on
2002-05-22  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-io.c (get_libdir): Use GTK_BINARY_VERSION (and not
	GTK_VERSION) in the path to the loaders on Win32, too.

	* Makefile.am: Pass GTK_BINARY_VERSION.
2002-05-22 19:34:03 +00:00
Jonathan Blandford a7cef089a8 remove GTK_RESIZE_QUEUE setting.
Wed May 22 12:29:20 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_init): remove
	GTK_RESIZE_QUEUE setting.
2002-05-22 16:34:49 +00:00
Owen Taylor c2a0b5322c Fix missing dereference. (HideToshi Tajima)
Tue May 21 16:46:15 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkmain-x11.c (gdk_internal_connection_watch):
        Fix missing dereference. (HideToshi Tajima)
2002-05-21 20:51:30 +00:00
Owen Taylor 1b4ae4ff25 Conditionalize GTK_IS_PLUG() check on GDK_WINDOWING_X11. (Problem reported
Tue May 21 15:33:32 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_show): Conditionalize
        GTK_IS_PLUG() check on GDK_WINDOWING_X11. (Problem
        reported by Sven Neumann)
2002-05-21 19:33:10 +00:00
George Lebl 0d4e66328c update a few strings, that is at least the ones I see the most so that
Tue May 21 10:13:27 2002  George Lebl <jirka@5z.com>

	* cs.po: update a few strings, that is at least the ones I see
	  the most so that things speak at least somewhat czech to me
2002-05-21 17:03:47 +00:00
Owen Taylor 91ba6c2dc6 Patch from HideToshi Tajima to handle Xlib internal connections. (#76681)
Mon May 20 15:02:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c: Patch from HideToshi Tajima
        to handle Xlib internal connections. (#76681)
2002-05-20 19:04:24 +00:00
Owen Taylor a57801b074 on May 20 12:59:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c: Set the private LEAVE_PENDING
        flag to fix problem where with menu items with
        submenus, tooltips were getting stuck. (Effectively
        disables tooltips for menu items with submenus.)
        (Bug #75961, Soeren Sandmann)

        * tests/testgtk.c: Set a tooltip on a menu item
        with a submenu.
2002-05-20 17:06:59 +00:00
Owen Taylor c1b5a2d0ef Undo an accidental revert of fixes of May 16. (Caught by Padraig O'Briain)
Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c: Undo an accidental revert of
        fixes of May 16. (Caught by Padraig O'Briain)
2002-05-20 15:52:08 +00:00
Owen Taylor 785183c7fb Fix bug where size request for text cells was being overwritten. (#82264,
Mon May 20 11:38:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkctree.c (cell_size_request): Fix bug where
        size request for text cells was being overwritten.
        (#82264, Graham Swallow.)
2002-05-20 15:42:43 +00:00
Chyla Zbigniew c2929809ff Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-19 09:03:35 +00:00
Vlad Harchev 840d2ef409 ru.po: updated russian translation from Dmitry G. Mastrukov 2002-05-19 03:57:52 +00:00
Christian Rose a9274b2f0c Updated Swedish translation.
2002-05-19  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-05-19 02:39:42 +00:00
Matthias Clasen 32931e7d08 Check for endianness.
* configure.in: Check for endianness.

	* io-tiff.c (tiff_image_parse): fix packing order on bigendian
	systems.  (#81702)
2002-05-18 14:54:37 +00:00
Owen Taylor 410b70f907 Only optimize out the full configure handling if we got a gratuitous
Thu May 16 19:49:24 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_configure_event): Only
        optimize out the full configure handling if we got
        a gratuitous configure event(configure_request_count == 0)
        and the size didn't change.

        * gtk/gtkwindow.c (gtk_window_move_resize): Use
        g_message(), not g_print() for debug spew.

        * gtk/gtkwindow.c (gtk_window_real_set_focus): Ref
        the old and new focus widgets for the scope of
        the function.

        * gtk/gtksocket.c gtkplug.c: Remove various #if 0'd
        bits of old code.

        * gtk/gtksocket.c gtk/gtkplug.c: Enhance debug messages.
2002-05-17 21:44:37 +00:00
Owen Taylor 0aa1bd5e97 Protect against reentrancy problems by emitting ::preedit_changed at the
Fri May 17 14:40:24 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimmulticontext.c (gtk_im_multicontext_set_slave):
        Protect against reentrancy problems by emitting
        ::preedit_changed at the end, fixing input context
        leak. (Yao Zhang)

        * modules/input/gtkimcontextxim.c (status_window_free):
        Patch from Federico Mena Quintero to fix problem where
        references to IMContextXIM were kept around after
        module was unloaded.

        * gtk/gtkdnd.c (gtk_drag_dest_set): NULL initialize
        proxy window.
2002-05-17 19:28:35 +00:00
Kjartan Maraas d7542b9af8 Update 2002-05-17 19:25:37 +00:00
Owen Taylor 859145de52 Fix a missing unref in the local/passive case. (#82067, Michael Meeks)
Fri May 17 13:56:23 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing
        unref in the local/passive case. (#82067, Michael
        Meeks)

        * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix
        reference leak on the plug window.

        * tests/testsocket.c (add_child): Fix memory leak.

        * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref
        the proxy window.
2002-05-17 18:15:19 +00:00
Pablo Saratxaga 5d2db8f012 Updated Catalan, Vietnamese and Walloon file 2002-05-17 10:07:22 +00:00
Owen Taylor 1fa83a74f5 Thu May 16 18:47:29 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_show): Disable the focus-some-one code for GtkPlug descendants. * gtk/gtkplug.c (gtk_plug_focus_event): Eat focus-in/out events since they can be generated by keyboard grabs, but are spurious for an embeddded widget. (#79196, Padraig O'Briain) * gtk/gtksocket.c (gtk_socket_size_request): Only pay attention to the minimum size hints, and changes to that ... ignore the default size. * gtk/gtksocket.c (gtk_socket_send_configure_event): Pass in root-window relative coordinates as per the ICCCM. * gtk/gtksocket.c (gtk_socket_size_allocate): Send as many synthetic configures as necessary to make up for ConfigureRequest events we got. (#78799, Dave Camp.) 2002-05-16 23:37:30 +00:00
Kristian Rietveld cb9aff42c7 set the prev of the next node correctly, so we don't corrupt the list and
Thu May 16 23:59:56 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed): set the prev
        of the next node correctly, so we don't corrupt the list and cause
        bad things. (fixes #71374)
2002-05-16 22:15:30 +00:00
Jonathan Blandford 1124ea7c72 include missing #ifdef G_ENABLE_DEBUG
Thu May 16 17:29:08 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkrbtree.c (_gtk_rbtree_remove): include missing #ifdef G_ENABLE_DEBUG
2002-05-16 21:35:58 +00:00
Owen Taylor ec80b47977 Fix typo in earlier patch.
Thu May 16 15:44:15 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/gtk-demo/editable_cells.c (cell_edited): Fix
	typo in	earlier	patch.
2002-05-16 19:44:17 +00:00
Owen Taylor 1fd687f7c2 Don't filter control-shift+[non-hex]. (#80252, reported by Nalin
Tue May  7 15:50:51 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
        Don't filter control-shift+[non-hex].
        (#80252, reported by Nalin Dahyabhai)
2002-05-16 19:41:09 +00:00
Owen Taylor f1fa35441e Patch from Matthias Clasen to fix some typos (#77246)
Thu May 16 15:17:30 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Patch from Matthias Clasen to fix some typos
        (#77246)
2002-05-16 19:18:14 +00:00
Owen Taylor d7b7242847 Fixes for #78258
Thu May 16 14:51:14 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for #78258

        * gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
        Fix some 64-bit warning problems. (Patch from Matthias
        Clasen.)

        * gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
        a bunch of debug code with G_ENABLE_DEBUG.

        * configure.in demos/gtk-demo/main.c: Replace
        #ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
2002-05-16 19:12:01 +00:00
Owen Taylor a2e485757c Fix a missed check for division by zero. (#77820, Gareth Pearce)
Thu May 16 12:56:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
        check for division by zero. (#77820, Gareth Pearce)
2002-05-16 16:57:07 +00:00
Owen Taylor 2c79e71d98 gdk_event_put() copies the event and setting name, so we don't have to
Thu May 16 12:50:13 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_xsettings_notify_cb):
	gdk_event_put() copies the event and setting name,
	so we don't have to strdup() it here. (Fix from
	Michael Meeks, #81953)
2002-05-16 16:53:37 +00:00
Ettore Perazzoli c2d9124553 If the menu is scrolled down or up, and some of the widget area is empty,
* gtk/gtkmenu.c (gtk_menu_paint): If the menu is scrolled down or
up, and some of the widget area is empty, don't fill it in with
GTK_SHADOW_IN rectangles that make it looks strange.  Fixes
#72695.
2002-05-16 13:49:04 +00:00
Owen Taylor 806bb88530 Don't call gdk_pointer_grab() to change the cursor if we've already
Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
        call gdk_pointer_grab() to change the cursor if we've
        already ungrabbed on button release / escape.
        (#80420, Dave Camp)
2002-05-15 22:26:45 +00:00
Owen Taylor ea696a2362 Special case menu items to pop down on motion. (#75961)
Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktooltips.c: Special case menu items to
        pop down on motion. (#75961)

        * tests/testgtk.c (create_item_factory): Add tooltips
        to the File menu.

        * gtk/gtkentry.c (update_im_cursor_location): Fix
        cursor locations passed to the IM context.
        (#80027, Yao Zhang)
2002-05-15 21:47:08 +00:00
Owen Taylor 87234fd57b Update from contents of size entry on focus out. (#76493, Lauris
Wed May 15 16:52:57 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfontsel.c: Update from contents of size entry
        on focus out. (#76493, Lauris Kaplinski)

        * gtk/gtkclipboard.c (selection_get_cb): Fix backwads
        info/time arguments. (#80226)
2002-05-15 20:54:42 +00:00
Owen Taylor 31ec94faa5 If not building libpng, don't rebuild gtkstockpixbufs.h (#81819, Bill
Wed May 15 11:13:19 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in gtk/stock-icons/Makefile.am: If not
        building libpng, don't rebuild gtkstockpixbufs.h
        (#81819, Bill Janssen)
2002-05-15 15:31:53 +00:00
Jacob Berkman 2dcfebc67f run perl on the file, since it's not executable
2002-05-15  Jacob Berkman  <jacob@ximian.com>

	* demos/gtk-demo/Makefile.am: run perl on the file, since it's not
	executable
2002-05-15 04:18:06 +00:00
Owen Taylor d81b18a210 Subsitute in @PERL@ instead of hardcoded /usr/bin/perl. (#78355, Gareth
Tue May 14 19:53:15 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/gtk-demo/geninclude.pl.in configure.in:
        Subsitute in @PERL@ instead of hardcoded
        /usr/bin/perl. (#78355, Gareth Pearce. Fix based
        on patch from Matthias Clasen)

        * gdk/Makefile.am: Patch from Daniel Elstner to use glib-mkenums
        instead of makeenums.pl.

        * gdk/{x11,linux-fb,win32}/Makefile.am: Hack to
        get gdkenumtypes.h built first.
2002-05-14 23:57:23 +00:00
Owen Taylor 185087e553 Remove the result file on error. (#79929, David Highley)
Tue May 14 18:41:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/stock-icons/Makefile.am (gtkstockpixbufs.h):
        Remove the result file on error. (#79929, David
        Highley)

        * gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
        If the menu is currently active, cancel it before
        setting the new menu. (#79162, Jonathan Blandford.)
2002-05-14 22:44:30 +00:00
Owen Taylor 26f74e40f6 Fix prepending at the start of the list. (#56349, Thomas Leonard.)
Tue May 14 18:13:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_cache_filter): Fix
        prepending at the start of the list. (#56349,
        Thomas Leonard.)

        * gtk/gtksignal.h (gtk_signal_disconnect_by_func): Add
        explicit casts to GSignalMatchType for C++ compatibility.
        (#77601)
2002-05-14 22:16:01 +00:00
Owen Taylor ff76bf8ba7 Fix frame_right/frame_top screwup. (Detlef Reichl, #78111)
Tue May 14 18:02:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_realize): Fix
        frame_right/frame_top screwup. (Detlef Reichl,
        #78111)

        * gtk/Makefile.am (install-data-local): Use
        $(INSTALL_DATA) not $(INSTALL) when installing
        theme files. (#77094, Ben Liblit)
2002-05-14 22:04:22 +00:00
Owen Taylor 099100a9d3 Fix format of selection data to be 8 rather than GTK_TYPE_POINTER.
Tue May 14 17:30:57 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkctree.c gtk/gtkclist.c: Fix format of
        selection data to be 8 rather than GTK_TYPE_POINTER.
        (#79751, James Henstridge)

        * gtk/gtkmenu.c (gtk_menu_key_press): Call
        gtk_accelerator_valid() with cleaned up
        accel_key/accel_mods, not the raw values from
        the event. (#80513, Havoc Pennington.)

        * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): Remove
        some dead code that set the tearoff window not
        resizable and removed decorations. (#80235)
2002-05-14 21:36:16 +00:00
Owen Taylor 94d05dfaf8 Set the width of the layout to the actual wrap width (our requisition) not
Tue May 14 16:44:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_ensure_layout): Set
        the width of the layout to the actual wrap width
        (our requisition) not the width we set when calculating
        the width. This results in the lines being justified
        within the correct area. (#79157, Anders Carlsson)

        * gtk/gtkaccelgroup.c gtk/gtkmarshelers.list: Corrected
        registered parameter types of "accel_activate" and
        "accel_changed" signals. (Patch from Murray Cumming, #78798)

        * gtk/gtkrc.c (gtk_rc_make_default_dir): Switch
        binary-version and type to correspond to the
        current ordering in _gtk_get_module_path.
        (#78746, Sergey Kuzminov)

        * gtk/gtkrc.c (gtk_rc_get_module_dir): Add docs
        pointing to the GTK_PATH documentation.

        * gtk/Makefile.am (uninstall-local): Delete
        key themes as well. (#81286, Kristian Rietveld.)
2002-05-14 20:52:59 +00:00
Pauli Virtanen f10a6beefc Updated Finnish translation.
2002-05-14  Pauli Virtanen <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2002-05-14 20:51:07 +00:00
Owen Taylor fa7fc23f44 Try adding a #ifndef/#define for XkbKeySymEntry to make up for OSF broken
Tue May 14 15:09:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
        for XkbKeySymEntry to make up for OSF broken
        XKB extension. (#77819, Gareth Pearce)

        * gtk/gtklayout.c: Clamp the upper values in response
        to ::size-allocate if necessary. (#81290, Christophe Saout)

        * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
        combo being destroyed before idle fires.
        (#81396, Timo Sirainen)
2002-05-14 19:12:51 +00:00
Kristian Rietveld f34a1f4807 PACK_END cells support CELL_ACTION_EVENT too now ...
Mon May 13 23:19:20 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        PACK_END cells support CELL_ACTION_EVENT too now ...
2002-05-13 21:18:31 +00:00
Stanislav Visnovsky 8b4829abab Updated Slovak translation.
2002-05-11  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-05-11 14:18:43 +00:00
Ole Laursen f21dfb358d Updated Danish translation.
2002-05-11  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-05-11 11:02:47 +00:00
Daniel Elstner 5a1a08f160 #define INITIALIZE_TREE_ITER(), which zeroes out all GtkTreeIter fields.
2002-05-10  Daniel Elstner  <daniel.elstner@gmx.net>

* gtk/gtktreemodel.c: #define INITIALIZE_TREE_ITER(), which zeroes out all GtkTreeIter fields. (#81380)
(gtk_tree_model_get_iter): Use it.
(gtk_tree_model_iter_children): ditto
(gtk_tree_model_iter_nth_child): ditto
(gtk_tree_model_iter_parent): ditto
2002-05-10 21:48:20 +00:00
Chyla Zbigniew 0cc2d916f1 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-10 12:39:30 +00:00
Kristian Rietveld dbe2343a7d fixup comment, so it doesn't screw the docs.
Thu May  9 23:33:32 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_stop_editing): fixup comment,
        so it doesn't screw the docs.
2002-05-09 21:27:18 +00:00
Michael Natterer bd118b7212 fixed yesterdays fix for cross compiling: simply check the variable
2002-05-08  Michael Natterer  <mitch@gimp.org>

	* configure.in: fixed yesterdays fix for cross compiling: simply
	check the variable "cross_compiling" which gets set by autoconf.
2002-05-08 15:29:10 +00:00
Owen Taylor 175116ac7d Check for selection_atom, not property name atom.
Tue May  7 18:36:03 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/xsettings-client.c (xsettings_client_process_event):
        Check for selection_atom, not property name atom.
2002-05-07 22:45:28 +00:00
Michael Natterer 12cf52e468 added a new conditional CROSS_COMPILING which indicates ($build != $host).
2002-05-07  Michael Natterer  <mitch@gimp.org>

	* configure.in: added a new conditional CROSS_COMPILING which
	indicates ($build != $host). If it is set, look for
	gdk-pixbuf-csource in PATH. Error out if it was not found.

	* gtk/stock-icons/Makefile.am: use the gdk-pixbuf-csource found at
	configure time if CROSS_COMPILING is set, use the one which was
	just built otherwise.
2002-05-07 15:57:51 +00:00
Anders Carlsson c5162fa6e8 Only process manager events with the correct atom.
2002-05-07  Anders Carlsson  <andersca@gnu.org>

	* gdk/x11/xsettings-client.c (xsettings_client_process_event):
	Only process manager events with the correct atom.
2002-05-07 14:51:18 +00:00
Michael Natterer 8aa2e2453e build the static pixbuf loaders conditionally like the dynamic ones so
2002-05-07  Michael Natterer  <mitch@gimp.org>

	* gdk-pixbuf/Makefile.am: build the static pixbuf loaders
	conditionally like the dynamic ones so --without-lib<foo> is
	honored when building with --disable-modules. (#66867)
2002-05-07 12:59:01 +00:00
Kjartan Maraas 2488bbf9fc Updated Norwegian (bokml) translation.
2002-05-07  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-05-07 10:38:24 +00:00
Kristian Rietveld 4dd906e7a7 Merge TreeView fixes from HEAD:
Tue May  7 00:50:20 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD:

        (May  6):
        * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call
        func on current node before the child nodes.

        * gtk/gtktreeview.c (gtk_tree_view_motion_draw_column_motion_arrow):
        unset user_data before destroying the window. (fixes #80065).
2002-05-06 22:44:15 +00:00
Kristian Rietveld 4e3c34eab6 add neighbor size hack to align editable widget.
Tue May  7 00:18:45 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_start_editing): add neighbor
        size hack to align editable widget.

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_pack_end): use g_new0
        here instead of g_new (this triggered some bad crash),
        (gtk_tree_view_column_cell_is_visible): add missing assert
2002-05-06 22:32:24 +00:00
Matthias Clasen 2083f3e262 Always select for property notify for maintaining window state.
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
	(gdk_window_set_events): Always select for property notify for
	maintaining window state.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate
	property notifys if they were selected by gdk_window_set_events.
2002-05-06 22:06:10 +00:00
Owen Taylor c400e38f98 Add ChangeLog.pre-2-0 (#78641)
Mon May  6 11:48:08 2002  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (EXTRA_DIST): Add ChangeLog.pre-2-0 (#78641)

        * m4macros/gtk-2.0.m4: save CFLAGS/LIBS properly when
        compiling "what went wrong" test case. (#79329)

        * m4macros/gtk-2.0.m4: Remove reference to editing
        pkg-config script. (From Jim Gettys)
2002-05-06 18:06:11 +00:00
Changwoo Ryu b2e2fe6ea3 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-05-06 14:26:47 +00:00
Christophe Fergeau 115418d968 Fixed 2 strings 2002-05-04 23:36:01 +00:00
Tuomas Kuosmanen 64fb36c3d8 These have a proper alpha channel thus they dont look jaggy. /tig 2002-05-03 08:46:59 +00:00
Matthias Clasen 2255a7225d Typo fix.
* gtk/gtknotebook.c (gtk_notebook_set_show_border): Typo fix.
2002-05-02 19:16:25 +00:00
Matthias Clasen f4dc453e09 Correct the composite_child blurb.
* gtk/gtkwidget.c (gtk_widget_class_init): Correct the
	composite_child blurb.

	* gtk/gtknotebook.c (gtk_notebook_set_show_border): Clarify docs.  (#73093)
2002-05-02 19:09:34 +00:00
Vincent van Adrighem a8749b2614 Added a few lines about how to use gettext to convert betweeen encodings.
2002-05-02 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* README.translators: Added a few lines about how to use
	gettext to convert betweeen encodings.
2002-05-02 07:32:05 +00:00
Vincent van Adrighem 1c92d4b28d Updated Dutch translation (Tino Meinen).
2002-05-02 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Updated Dutch translation (Tino Meinen).
2002-05-02 07:22:25 +00:00
Chyla Zbigniew 15c38b93e2 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-01 10:42:29 +00:00
Havoc Pennington 1fc3556064 use gtk_text_layout_invalidate_cache instead of cut-and-paste
2002-04-30  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
	gtk_text_layout_invalidate_cache instead of cut-and-paste
	(gtk_text_layout_real_invalidate): always invalidate cache, even
	if the line has no stored line data. #78573

	* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
	gtk_text_view_ensure_layout, #77388
	(gtk_text_view_get_iter_at_location): ditto
	(gtk_text_view_get_line_yrange): ditto
	(gtk_text_view_get_line_at_y): ditto
2002-04-30 20:51:26 +00:00
Havoc Pennington 31b514d831 assign something to "prev" so that removing tag info succeeds. Part of
2002-04-30  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
	something to "prev" so that removing tag info succeeds.
	Part of #77301

	* gtk/gtktextbtree.c (_gtk_text_btree_unref): reorder so that it
	unrefs the tag table first, so that the btree is in a consistent
	state when we're removing tags from it.

	* gtk/gtktexttagtable.c (_gtk_text_tag_table_remove_buffer): strip
	all tags in the tag table out of the buffer. #77301
2002-04-30 15:53:54 +00:00
Alex Larsson 752742d044 Use tmp also if foreground is set.
2002-04-29  Alex Larsson  <alexl@redhat.com>

	* gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
	Use tmp also if foreground is set.
2002-04-29 23:34:08 +00:00
Andraz Tori e49d754fdc Updated Slovenian translation 2002-04-29 23:32:06 +00:00
Kjartan Maraas 22f7b3ee23 Updated Norwegian (bokml) translation.
2002-04-29  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-04-29 13:31:26 +00:00
Jonathan Blandford a704364549 Fix so that you can set a new sort func.
Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 03:02:56 +00:00
Matthias Clasen 21c7e08b21 Avoid a possible division by zero. (#77820)
* gtk/gtkrange.c (gtk_range_calc_layout): Avoid a possible
	division by zero.  (#77820)
2002-04-27 22:31:47 +00:00
Kristian Rietveld 2d509b1d84 Merge TreeView fixes from HEAD:
Sat Apr 27 15:48:49 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD:

        (Apr 26):
        * gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): if the
        deleted node was "below" this path, then do not unref all nodes
        between the deleted parent and the node this rowref is pointing too
        (see added comment in gtk_tree_row_ref_deleted_callback),
        (fixes #77977)
2002-04-27 13:43:44 +00:00
Simos Xenitellis 5ef9c5a5bf Updated Greek translation 2002-04-27 13:24:58 +00:00
Sven Neumann 77d170539a tests/testtreecolumns.c quit the main loop when the window is destroyed.
2002-04-26  Sven Neumann  <sven@gimp.org>

	* tests/testtreecolumns.c
	* tests/testtreeview.c: quit the main loop when the window is
	destroyed. Removed compiler warnings about wrong format in printf().
2002-04-26 16:59:00 +00:00
Kristian Rietveld 9255c12c87 Merge TreeView fixes from HEAD up to Apr 26:
Fri Apr 26 00:00:00 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD up to Apr 26:

        (Apr 25):
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
        resort if we're already in 'unsorted' state, and update the docs

        * gtk/gtktreeview.c (gtk_tree_view_search_iter): make the search
        dialog not scroll horizontally (prolly fixes #74806).

        (Also from Apr 25, fixes #74206):
        * gtk/gtktreeprivate.h: add _gtk_tree_view_column_count_special_cells

        * gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell),
        (_gtk_tree_view_column_get_editable_cell): remove a space which made
        the code look ugly
        (_gtk_tree_view_column_count_special_cells): new function,
        (gtk_tree_view_column_cell_process_action): if there's only one
        activatable cell, the whole column will activate that renderer.

        (Apr 24):
        * gtk/gtktreeview.c (gtk_tree_view_stop_editing): temporarily set
        ->priv->edited_column to NULL. Pleas read the comment in this
        function for an explanation (fixes #79632).
2002-04-25 22:00:07 +00:00
Soeren Sandmann f2b3c6e6a3 use the child's requisition.height, not allocation.height, as width of
Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
	requisition.height, not allocation.height, as width of submenu
	indicator. (#75948)
2002-04-25 18:24:42 +00:00
Matthias Clasen f6238492bc Merged documentation fixes from HEAD. 2002-04-24 22:09:24 +00:00
Anders Carlsson fab341df09 Update ChangeLog 2002-04-22 20:56:12 +00:00
Anders Carlsson e11dcc5426 Use gtk_entry_get_public_chars. Fixes #79532.
2002-04-22  Anders Carlsson  <andersca@gnu.org>

	* gtk/gtkentry.c (gtk_entry_drag_data_get): Use
	gtk_entry_get_public_chars. Fixes #79532.
2002-04-22 20:54:32 +00:00
Kwok-Koon Cheung bee067608a Updated traditional Chinese translation. 2002-04-21 22:15:35 +00:00
Alexander Larsson 9eea275ed7 Merged from HEAD:
2002-04-21  Alexander Larsson  <alla@lysator.liu.se>

	Merged from HEAD:

	* gdk/x11/gdkwindow-x11.c (gdk_window_reparent):
	Save x and y in window_private.

	* gtk/gtkplug.c (_gtk_plug_add_to_socket):
	Move plug window outside the visible area to avoid flashing until
	the first size_allocate.
2002-04-21 19:26:53 +00:00
Kristian Rietveld 39e60a0564 replace GDK_IS_WINDOW with GDK_IS_DRAWABLE in the assert, only check
Sat Apr 20 16:49:26 2002  Kristian Rietveld  <kris@gtk.org>

        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW
        with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED
        if window is a GdkWindow,
        (gdk_bitmap_create_from_data): ditto,
        (gdk_pixmap_create_from_data): ditto
2002-04-20 14:47:25 +00:00
Kristian Rietveld ac5905d0db Merge TreeView fixes from HEAD up to Apr 20 2002:
Sat Apr 20 01:54:59 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD up to Apr 20 2002:

        (All from Apr 19):
        * gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
        TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
        size for the tree (fixes #72729),
        (gtk_tree_view_real_start_editing): correct cell_area->y for
        scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)

        * gtk/gtktreeview.c (gtk_tree_view_row_changed): cancel editing
        if tree_view->priv->edited_column != NULL (fixes #76066)

        (This patch fixes #50310):
        * gtk/gtktreeprivate.h: add _gtk_tree_view_column_autosize

        * gtk/gtktreeview.c: privately export _gtk_tree_view_column_autosize,
        and add a small note about that function,
        (gtk_tree_view_button_press): check for double click and
        "not having an autosize" column before autosizing the column,

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_min_width):
        call _gtk_tree_view_column_autosize to update autosized column width
        (gtk_tree_view_column_set_max_width): ditto
2002-04-19 23:54:42 +00:00
Kristian Rietveld c962023b0d Merge TreeView fixes from HEAD up to Apr 19 2002:
Fri Apr 19 16:49:01 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD up to Apr 19 2002:

        (From Apr 16):
        * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
        ->priv->cursor and ->priv->anchor rowrefs before removing
        node->children from the rbtree. Also check the
        ->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
        (I think I really need to rename those two someday).

        (From Apr 17):
        * gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs

        (From Apr 18):
        * gtk/gtktreemodelsort.c
        (gtk_tree_model_sort_convert_path_to_child_path): so this function
        was completely broken. Fix it and improve readability.

        (From Apr 19):
        * gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
        last_single_clicked{,_2} to last_button_press{,_2}, as the latter
        is a more sane name.

        * gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
        instead of ->priv->cursor, check for the anchor at another place, as
        you can go in edit mode without having an anchor.
2002-04-19 15:46:13 +00:00
Tor Lillqvist a9d9b8581b gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) Fix typo, thanks to
2002-04-18  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
	* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
	thanks to David Sterba for noticing.

	* gtk/gtkmain.h
	* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
	GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
	Win32 whether compiled with -fnative-struct or not. Unfortunately
	this wan't noticed until now. So, from now on, check some other
	struct, too, for which the use of -fnative-struct still
	matters. GtkBox is one such.
2002-04-18 11:25:23 +00:00
Jonathan Blandford 78bd6b2844 include internal children when doing focus.
Mon Apr 15 15:41:56 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcontainer.c (gtk_container_focus): include internal
	children when doing focus.
	(gtk_container_get_all_children): new static function to include
	internal children when making a list of them.
2002-04-15 22:22:40 +00:00
272 changed files with 78755 additions and 38570 deletions
+2234
View File
File diff suppressed because it is too large Load Diff
+2234
View File
File diff suppressed because it is too large Load Diff
+2234
View File
File diff suppressed because it is too large Load Diff
+2234
View File
File diff suppressed because it is too large Load Diff
+2234
View File
File diff suppressed because it is too large Load Diff
+2234
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -20,8 +20,8 @@ GTK+ requires the following packages:
Simple install procedure
========================
% gzip -cd gtk+-2.0.2.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.0.2 # change to the toplevel directory
% gzip -cd gtk+-2.0.9.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.0.9 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]
+1 -3
View File
@@ -13,17 +13,15 @@ EXTRA_DIST = \
NEWS.pre-1-0 \
ChangeLog.pre-1-0 \
ChangeLog.pre-1-2 \
ChangeLog.pre-2-0 \
README.cvs-commits \
README.win32 \
README.nanox \
config.h.win32 \
gtk-zip.sh \
sanitize-la.sh \
po/README.tools \
po/README.translators \
po/desk.pl \
po/makefile.mingw \
po/update.pl \
po/po2tbl.sed.in \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
+137
View File
@@ -1,3 +1,140 @@
Overview of Changes in GTK+ 2.0.9
=================================
* Fix colormap refcounting, which caused frequent metacity crashes
[Christopher James Lahey]
* Lots of work on the Win32 backend [Tor Lillqvist]
- Scrolling fixes
- GdkGC clipping fixes and improvements
- Started implementing all fill styles
* GtkTreeView bug fixes [Kristian Rietveld]
- Make TreeView reordering work on FreeBSD/Solaris [Heiner Eichmann]
* Various bug fixes
Other contributors: Matthias Clasen, Arnaud Charlet, Vitaly Tishkov,
Josh Parsons, Peter Bloomfield
Overview of Changes in GTK+ 2.0.8
=================================
* Fix typo in io-gif.c that broke loading GIFS [Akira Tagoh]
* Improve redraws when scrolling on Win32 [Tor Lillqvist]
* Fix problem with RENDER and XFree86-4.1 [Owen Taylor, Jamie Zawinski]
* Fix problem with GtkImage placement [Owen, Sven Neumann, Soeren Sandmann]
* Updated translation (el)
Overview of Changes in GTK+ 2.0.7
=================================
* Fix some memory leaks in gdk-pixbuf [Sven Neumann]
* Pixbuf loader fixes [Federico Mena Quintero, Elliot Lee]
* Support depth 8 StaticColor in GdkRGB [Matthias Clasen]
* Win32 fixes and improvements [Tor Lillqvist]
- Keyboard handling fixes [Florian Dugent]
- Fixes for building and running on Cygwin [Masahiro Sakai]
- Fix gdk_window_scroll(), other GdkWindow fixes
- Misc bug and build fixes [Soren Andersen, Florent, Tim Evans,
J. Ali Harlow, Andreas Holzmann, Iwasa Kazmi]
* Improve tracking of toplevel focus state [Owen]
* XIM input method fixes [Takuro Ashie, HideToshi Tajima]
* Fix the longstanding problem with <,> keys and XIM [Owen Taylor]
* Fix GtkIMContextSimple for us-intl keyboards [Alexandre Oliva]
* GtkIMContextSimple updates for Eastern Europe [Stanislav Brabec]
* Fix the "key bindings randomly stop working" problem [Sebastian Ritau]
* GtkTextView fixes [Gustavo Giraldez, Padraig O'Briain, Shivaram Upadhyayula]
* GtkTreeView bugfixes [Jonathan Blandford, Kristian Rietveld]
- Various memleak, ref counting fixes [Jonathan, Jorn Baayen, Daniel
Elstner, Morten Welinder]
- gtk_tree_selection_selected_foreach now immediately returns if
the model is being changed [Havoc Pennington]
- Fix evil bug with insertions to GtkTreeModelSort [Hans Petter Jansson]
* GtkCombo fixes [Marco Pesenti Gritti, Zimler Attila, Matthias, Owen]
* Fix 64-bit problem with GtkFundamentalType [Ross Alexander, Manish Singh]
* New and updated translations (am,be,bg,ca,cs,da,de,el,es,el,fa,fr,hi,hu,
ja,ko,lv,ms,nl,no,pl,pt,pt_BR,ru,sk,sv,vi,zh_TW)
* Many miscellaneous bug fixes
Other contributors: Jacob Berkman, Alvert Chin, Chema Celorio,
David L. Cooper II, Brent Fox, Tim Janik, Marco Pesenti Gritti,
Alex Larsson, Zenith Lau, Thomas Leonard, Gaute Lindkvist,
Paolo Maggi, Andy Wingo, Jami Pekannen, Joshua N Pritikin,
Soeren Sandmann, Vitaly Tishkov, Morten Welinder
Overview of Changes in GTK+ 2.0.6
=================================
* GtkTreeView bug fixes [Jonathan Blandford, Kristian Rietveld,
Josh Green, Matthias Clasen]
* Fix problem with keynav and insensitive menu items [Owen Taylor]
* Fix pixbuf_from_drawable() for LSB -> MSB [Federico Mena Quintero]
* Use GTK2_RC_FILES envvar instead of GTK_RC_FILES [Owen]
* Focus check/radio buttons when activating with a mnemonic [Padraig O'Briain]
* Cycle between multiple menubars with F10, not control-tab
[Calum Benson, Padraig]
* Misc bug fixes [Jacob Berkman, Matthias Clasen, Manuel Op de Coul,
Bill Haneman, Norihiro UMEDA, Shivaram Upadhyayula, Yao Zhang]
* Build fixes for cross-compiling and portability [Arnaud Charlet,
J. Ali Harlow]
* Updated translations (bg,ca,da,fr,ja,ko,lv,no,pl,ru,sk,sv,vi)
Overview of Changes in GTK+ 2.0.5
=================================
* Fix a wrong assertion that broke gtk_file_selection_set_filename();
also another fix from testing this function with non-UTF-8 filenames.
* Fix incorrect property notification in GtkTextView. [James M. Cape]
Overview of Changes in GTK+ 2.0.4
=================================
* Fix a number of types which were registered with the
type system with the wrong names [James Henstridge, Jonathan Blandford]
* Support missing data types in GtkList/TreeStore [Daniel Elstner]
* Misc GtkTreeView bug fixes [Dave Camp, Jonathan, Daniel Elstner,
Josh Parsons]
* Drag and drop fixes, including a stuck grab. [Dave, Thomas Leonard,
Owen Taylor]
* Calculate screen size on win32 from the "logical DPI"
[Joaquin Cuenca Abela, Tor Lillqvist]
* Misc Win32 bug fixes. [Florent Duguet, Torn]
* Fix theme changes for GtkMenu [Soeren Sandmann]
* Fix gdk_pixbuf_from_drawable() for big endian. [Federico Mena Quintero]
* Fix encoding handling for gtk_file_selection_set_filename()
[Sebastian Ritau, Owen]
* Fix crash with DND, Qt and Metacity [Cha Young-Ho, Havoc, Owen]
* Fixes for DirectColor visuals [Shivaram Upadhyayula]
* Memory leak and UMR fixes [Michael Meeks, Matthias Clasen, Valgrind]
* Misc bug fixes
* Updated translations (ca,cs,da,es,et,fr,ms,nl,pl,pt,pt_BR,ru,sv)
Other contributors: Nicholas Allen, Jacob Berkman, Remus Draica,
Nano Golveia, Tim Janik, Sergey Kuzminov, George Lebl, Garrett Lesage,
Robin Lu, Timo Meinen, Michel Selten, Boris Shingarov, Jeff Waugh
Overview of Changes in GTK+ 2.0.3
=================================
* GtkTreeView fixes (Jonathan Blandford, Kristian Rietveld, Daniel Elstner)
* Improve GdkRGB support for low color depths (Tor Lillqvist).
* Tweak F10 behavior to focus GtkMenuBar. (Owen Taylor)
* Include internal children when focusing. (Jonathan)
* Win32 fixes (Tor Lillqvist, David Sterba)
* Allow use of a pixmap as the drawable in gdk_pixmap_new(). (Kristian)
* GdkPixbuf fixes (Matthias Clasen, Michael Natterer, Federico Mena Quintero)
* GtkMenu fixes. (Soeren Sandmann)
* Find gdk-pixbuf-csource when cross-compiling. (Michael Natterer)
* Misc input-method related fixes (Yao Zhang, Federico)
* Fix stuck grab during DND. (Dave Camp, Owen)
* Remove in-bevel from scrolled-offscreen menus. (Ettore Perazzoli)
* Various plug/socket fixes (Owen, Padraig O'Briain, Dave Camp,
Michael Meeks)
* Handle Xlib internal connections (HideToshi Tajima)
* Many miscellaneous bug fixes.
Other contributors: Jacob Berkman, Abigail Brady, Rich Burridge,
Anders Carlsson, Murray Cumming, Nalin Dahyabhai, James Henstridge,
David Highley, Ben Liblitt, Tim Janik, Bill Jannsen, Lauris Kaplinski,
Sergey Kuzminov, Alex Larsson, Sven Neumann, Havoc Pennington, Gareth Pearce,
Simon Floery, Thomas Leonard, Detlef Reichl, Martin Schulze, Christophe Saout,
Timo Sirainen, Graham Swallow.
Overview of Changes in GTK+ 2.0.2
=================================
+1 -1
View File
@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 2.0.2. GTK+ is a multi-platform toolkit for
This is GTK+ version 2.0.9. GTK+ is a multi-platform toolkit for
creating graphical user interfaces. Offering a complete set of widgets,
GTK+ is suitable for projects ranging from small one-off projects to
complete application suites.
-3
View File
@@ -45,9 +45,6 @@
#undef USE_GMODULE
#undef USE_MMX
/* Define to use X11R6 additions to XIM */
#undef USE_X11R6_XIM
/* Define to use XKB extension */
#undef HAVE_XKB
+5 -5
View File
@@ -38,8 +38,8 @@ fi
}
have_automake=false
if automake --version < /dev/null > /dev/null 2>&1 ; then
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
if automake-1.4 --version < /dev/null > /dev/null 2>&1 ; then
automake_version=`automake-1.4 --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
case $automake_version in
1.2*|1.3*|1.4)
;;
@@ -78,7 +78,7 @@ esac
if test -z "$ACLOCAL_FLAGS"; then
acdir=`aclocal --print-ac-dir`
acdir=`aclocal-1.4 --print-ac-dir`
m4list="glib-2.0.m4 glib-gettext.m4"
for file in $m4list
@@ -95,12 +95,12 @@ if test -z "$ACLOCAL_FLAGS"; then
done
fi
aclocal $ACLOCAL_FLAGS
aclocal-1.4 $ACLOCAL_FLAGS
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
automake -a $am_opt
automake-1.4 -a $am_opt
autoconf
cd $ORIGDIR
+95 -60
View File
@@ -1,3 +1,6 @@
# require autoconf 2.52
AC_PREREQ(2.52)
# Process this file with autoconf to produce a configure script.
AC_INIT(gdk/gdktypes.h)
@@ -29,9 +32,9 @@ GLIB_AC_DIVERT_BEFORE_HELP([
#
GTK_MAJOR_VERSION=2
GTK_MINOR_VERSION=0
GTK_MICRO_VERSION=2
GTK_INTERFACE_AGE=2
GTK_BINARY_AGE=2
GTK_MICRO_VERSION=9
GTK_INTERFACE_AGE=9
GTK_BINARY_AGE=9
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
dnl This is the X.Y used in -lgtk-FOO-X.Y
GTK_API_VERSION=2.0
@@ -77,7 +80,7 @@ AC_SUBST(GDK_PIXBUF_MICRO)
AC_SUBST(GDK_PIXBUF_VERSION)
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.0.1
GLIB_REQUIRED_VERSION=2.0.6
PANGO_REQUIRED_VERSION=1.0.1
ATK_REQUIRED_VERSION=1.0.1
@@ -169,8 +172,6 @@ AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]]
, enable_ansi=no)
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
, enable_xim="yes")
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
, enable_xim_inst="maybe")
AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
, enable_xkb="maybe")
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
@@ -248,16 +249,44 @@ if test "x$GCC" = "xyes"; then
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
if test "$os_win32" = "yes"; then
case "$CC $CFLAGS " in
*[[\ \ ]]-fnative-struct[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -fnative-struct" ;;
esac
fi
fi
changequote([,])dnl
# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
# gcc2 uses "-fnative-struct".
if test x"$os_win32" = xyes; then
if test x"$GCC" = xyes; then
msnative_struct=''
AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
if test -z "$ac_cv_prog_CC"; then
our_gcc="$CC"
else
our_gcc="$ac_cv_prog_CC"
fi
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
2.)
if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
msnative_struct='-fnative-struct'
fi
;;
*)
if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
msnative_struct='-mms-bitfields'
fi
;;
esac
if test x"$msnative_struct" = x ; then
AC_MSG_RESULT([no way])
AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
else
CFLAGS="$CFLAGS $msnative_struct"
AC_MSG_RESULT([${msnative_struct}])
fi
fi
fi
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@@ -310,7 +339,7 @@ AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_CHECK_PROGS(PERL, perl5 perl)
AC_PATH_PROGS(PERL, perl5 perl)
# We would like indent, but don't require it.
AC_CHECK_PROG(INDENT, indent, indent)
@@ -323,7 +352,7 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
AC_CHECK_FUNCS(lstat mkstemp)
AC_CHECK_FUNCS(lstat mkstemp flockfile)
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
@@ -352,7 +381,7 @@ AC_SUBST(STRIP_BEGIN)
AC_SUBST(STRIP_END)
# i18n stuff
ALL_LINGUAS="az ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
ALL_LINGUAS="am ar az be bg ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hi hr hu ia it ja ko lt lv ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
@@ -431,7 +460,6 @@ LIBS=$gtk_save_LIBS
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
AC_CHECK_HEADERS(winsock.h, AC_DEFINE(HAVE_WINSOCK_H))
if test "${with_ie55+set}" = set && test $with_ie55 != no; then
AC_MSG_CHECKING([for dimm.h])
@@ -500,6 +528,8 @@ AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
# check for bytesex stuff
AC_C_BIGENDIAN
# Checks for header files.
AC_HEADER_STDC
@@ -736,6 +766,12 @@ dnl Test for libpng
*** from CVS.])
fi
REBUILD_PNGS=\#
if test -z "$LIBPNG"; then
REBUILD_PNGS=
fi
AC_SUBST(REBUILD_PNGS)
AC_SUBST(LIBTIFF)
AC_SUBST(LIBJPEG)
AC_SUBST(LIBPNG)
@@ -774,7 +810,7 @@ INCLUDED_LOADER_DEFINE=
IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
for loader in $included_loaders; do
if echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
:
else
AC_MSG_ERROR([the specified loader $loader does not exist])
@@ -797,13 +833,13 @@ AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
if $dynworks ; then
STATIC_LIB_DEPS=
if echo "$included_loaders" | grep "\(^\|\,\)tiff\(\$\|\,\)" > /dev/null; then
if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
fi
if echo "$included_loaders" | grep "\(^\|\,\)jpeg\(\$\|\,\)" > /dev/null; then
if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
fi
if echo "$included_loaders" | grep "\(^\|\,\)png\(\$\|\,\)" > /dev/null; then
if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
fi
else
@@ -850,6 +886,16 @@ fi
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
if test $cross_compiling = yes; then
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
if test x$GDK_PIXBUF_CSOURCE = xno; then
AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
fi
fi
GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
@@ -940,7 +986,7 @@ if test "x$gdktarget" = "xx11"; then
# then we need to repeat the checks.
#
x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
case x_libs in
case "$x_libs" in
*-lX11*) pango_omitted_x_deps=no ;;
*) pango_omitted_x_deps=yes ;;
esac
@@ -960,24 +1006,32 @@ if test "x$gdktarget" = "xx11"; then
#
# Checks for Xft/XRender
#
XFT_LIBS=""
XFT_CFLAGS=""
if test $have_xft = true ; then
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
have_xft=false
AC_CHECK_LIB(Xrender, XRenderFindFormat,
[AC_CHECK_LIB(Xft, XftFontOpen,
[AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
have_xft=true,:)],
:,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
,:,-lXext $x_libs)
if pkg-config --exists pangoxft '>=' 1.1.0 ; then
x_libs="`pkg-config --libs xft` -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
have_xft=true
else
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
AC_CHECK_LIB(Xrender, XRenderFindFormat,
[AC_CHECK_LIB(Xft, XftFontOpen,
[AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
have_xft=true,:)],
:,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
,:,-lXext $x_libs)
if $have_xft ; then
x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
fi
CPPFLAGS="$gtk_save_cppflags"
CPPFLAGS="$gtk_save_cppflags"
fi
if $have_xft ; then
x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
:
else
AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
fi
@@ -1017,7 +1071,7 @@ if test "x$gdktarget" = "xx11"; then
GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
# Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs `$PKG_CONFIG --libs pangox`"
GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs $x_libs"
# Check for shaped window extension
@@ -1038,31 +1092,8 @@ if test "x$gdktarget" = "xx11"; then
# Check for XIM support.
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
: ,
enable_xim_inst="no",
$x_libs_for_checks)
# On Solaris, calling XRegisterIMInstantiateCallback seems to
# cause an immediate segfault, so we disable it, unless
# the user specifically forces it to be on.
if test x$enable_xim_inst = xmaybe ; then
case host in
*-*-solaris*)
enable_xim_inst="no"
;;
*)
enable_xim_inst="yes"
;;
esac
fi
if test "x$enable_xim" = "xyes"; then
GTK_XIM_FLAGS="-DUSE_XIM"
if test "x$enable_xim_inst" = "xyes"; then
AC_DEFINE(USE_X11R6_XIM)
fi
fi
# Check for XKB support.
@@ -1137,6 +1168,9 @@ if test "x$gdktarget" = "xx11"; then
AM_CONDITIONAL(USE_X11, true)
else
AM_CONDITIONAL(HAVE_XFT, false)
AM_CONDITIONAL(XINPUT_GXI, false)
AM_CONDITIONAL(XINPUT_XFREE, false)
AM_CONDITIONAL(USE_X11, false)
fi
@@ -1177,7 +1211,7 @@ if test "x$gdktarget" = "xlinux-fb"; then
fi
ft2_libs="`$PKG_CONFIG --libs pangoft2`"
case ft2_libs in
case "$ft2_libs" in
*-lfreetype*) pango_omitted_ft2_deps=no ;;
*) pango_omitted_ft2_deps=yes ;;
esac
@@ -1212,7 +1246,7 @@ fi
if test "x$gdktarget" = "xx11"; then
if $have_xft = true ; then
PANGO_PACKAGES="pangox pangoxft"
PANGO_PACKAGES="pangoxft pangox"
else
PANGO_PACKAGES=pangox
fi
@@ -1474,6 +1508,7 @@ build/win32/Makefile
build/win32/dirent/Makefile
demos/Makefile
demos/gtk-demo/Makefile
demos/gtk-demo/geninclude.pl
tests/Makefile
docs/Makefile
docs/reference/Makefile
+4
View File
@@ -1,3 +1,7 @@
2002-08-06 jacob berkman <jacob@ximian.com>
* Makefile.am (lib_LTLIBRARIES): link against xlib (bug #83442)
2002-01-25 Federico Mena Quintero <federico@ximian.com>
Merge from gdk-pixbuf stable.
+3 -4
View File
@@ -7,14 +7,13 @@ INCLUDES = @STRIP_BEGIN@ \
@GDK_PIXBUF_XLIB_DEP_CFLAGS@ \
@STRIP_END@
LDADDS = @STRIP_BEGIN@ \
@GDK_PIXBUF_XLIB_DEP_LIBS@ \
@STRIP_END@
libgdk_pixbuf_xlib_2_0_la_LDFLAGS = \
-export-dynamic \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgdk_pixbuf_xlib_2_0_la_LIBADD = \
@GDK_PIXBUF_XLIB_DEP_LIBS@
libgdk_pixbuf_xlib_2_0_la_SOURCES = \
gdk-pixbuf-xlib-private.h \
gdk-pixbuf-xlib.c \
@@ -1145,7 +1145,7 @@ xlib_window_is_viewable (Window w)
if (nchildren > 0)
XFree (children);
if (parent == root)
if ((parent == root) || (w == root))
return TRUE;
w = parent;
+8 -3
View File
@@ -32,11 +32,16 @@ noinst_PROGRAMS = \
testpixbuf-scale \
pixbuf-demo
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource$(EXEEXT) apple-red.png gnome-foot.png
if CROSS_COMPILING
pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
else
pixbuf_csource=GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs $$topdir/gdk-pixbuf/gdk-pixbuf-csource
endif
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource apple-red.png gnome-foot.png
(topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
cd $(srcdir) && \
GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs \
$$topdir/gdk-pixbuf/gdk-pixbuf-csource --build-list \
$(pixbuf_csource) --build-list \
apple_red apple-red.png gnome_foot gnome-foot.png >$$curdir/test-inline-pixbufs.h)
testpixbuf_DEPENDENCIES = $(DEPS)
+1 -1
View File
@@ -55,7 +55,7 @@ EXTRA_DIST = \
$(IMAGEFILES)
demos.h: $(demos) geninclude.pl
(cd $(srcdir) && ./geninclude.pl $(demos) > demos.h)
(cd $(srcdir) && $(PERL) ./geninclude.pl $(demos) > demos.h)
gtk_demo_SOURCES = \
$(demos) \
+1 -1
View File
@@ -158,7 +158,7 @@ cell_edited (GtkCellRendererText *cell,
gtk_tree_model_get_iter (model, &iter, path);
switch ((gint) column)
switch (GPOINTER_TO_INT (column))
{
case COLUMN_NUMBER:
{
-163
View File
@@ -1,163 +0,0 @@
#!/usr/bin/perl -w
print <<EOT;
typedef GtkWidget *(*GDoDemoFunc) (void);
typedef struct _Demo Demo;
struct _Demo
{
gchar *title;
gchar *filename;
GDoDemoFunc func;
Demo *children;
};
EOT
for $file (@ARGV) {
my %demo;
($basename = $file) =~ s/\.c$//;
open INFO_FILE, $file or die "Cannot open '$file'\n";
$title = <INFO_FILE>;
$title =~ s@^\s*/\*\s*@@;
$title =~ s@\s*$@@;
close INFO_FILE;
print "GtkWidget *do_$basename (void);\n";
push @demos, {"title" => $title, "file" => $file,
"func" => "do_$basename"};
}
# generate a list of 'parent names'
foreach $href (@demos) {
if ($href->{"title"} =~ m|^([\w\s]+)/[\w\s]+$|) {
my $parent_name = $1;
my $do_next = 0;
# parent detected
if (defined @parents) {
foreach $foo (@parents) {
if ($foo eq $parent_name) {
$do_next = 1;
}
}
if ($do_next) {
next;
}
}
push @parents, $parent_name;
$tmp = (defined @child_arrays)?($#child_arrays + 1):0;
push @child_arrays, "child$tmp";
push @demos, {"title" => $parent_name, "file" => "NULL",
"func" => "NULL"};
}
}
if (defined @parents) {
$i = 0;
for ($i = 0; $i <= $#parents; $i++) {
$first = 1;
print "\nDemo ", $child_arrays[$i], "[] = {\n";
$j = 0;
for ($j = 0; $j <= $#demos; $j++) {
$href = $demos[$j];
if (!defined $demos[$j]) {
next;
}
if ($demos[$j]{"title"} =~ m|^$parents[$i]/([\w\s]+)$|) {
if ($first) {
$first = 0;
} else {
print ",\n";
}
print qq ( { "$1", "$demos[$j]{file}", $demos[$j]{func}, NULL });
# hack ... ugly
$demos[$j]{"title"} = "foo";
}
}
print ",\n";
print qq ( { NULL } );
print "\n};\n";
}
}
# sort @demos
@demos_old = @demos;
@demos = sort {
$a->{"title"} cmp $b->{"title"};
} @demos_old;
# sort the child arrays
if (defined @child_arrays) {
for ($i = 0; $i <= $#child_arrays; $i++) {
@foo_old = @{$child_arrays[$i]};
@{$child_arrays[$i]} = sort {
$a->{"title"} cmp $b->{"title"};
} @foo_old;
}
}
# toplevel
print "\nDemo testgtk_demos[] = {\n";
$first = 1;
foreach $href (@demos) {
$handled = 0;
# ugly evil hack
if ($href->{title} eq "foo") {
next;
}
if ($first) {
$first = 0;
} else {
print ", \n";
}
if (defined @parents) {
for ($i = 0; $i <= $#parents; $i++) {
if ($parents[$i] eq $href->{title}) {
if ($href->{file} eq 'NULL') {
print qq ( { "$href->{title}", NULL, $href->{func}, $child_arrays[$i] });
} else {
print qq ( { "$href->{title}", "$href->{file}", $href->{func}, $child_arrays[$i] });
}
$handled = 1;
last;
}
}
}
if ($handled) {
next;
}
print qq ( { "$href->{title}", "$href->{file}", $href->{func}, NULL });
}
print ",\n";
print qq ( { NULL } );
print "\n};\n";
exit 0;
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL@ -w
print <<EOT;
typedef GtkWidget *(*GDoDemoFunc) (void);
+3 -3
View File
@@ -86,7 +86,7 @@ read_line (FILE *stream, GString *str)
{
int n_read = 0;
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
flockfile (stream);
#endif
@@ -112,7 +112,7 @@ read_line (FILE *stream, GString *str)
case '\r':
case '\n':
{
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
int next_c = getc_unlocked (stream);
#else
int next_c = getc (stream);
@@ -132,7 +132,7 @@ read_line (FILE *stream, GString *str)
done:
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
funlockfile (stream);
#endif
-392
View File
@@ -1,392 +0,0 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <demos.h>
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static gchar *current_file = NULL;
enum {
TITLE_COLUMN,
FILENAME_COLUMN,
FUNC_COLUMN,
ITALIC_COLUMN,
NUM_COLUMNS
};
gboolean
read_line (FILE *stream, GString *str)
{
int n_read = 0;
flockfile (stream);
g_string_truncate (str, 0);
while (1)
{
int c;
c = getc_unlocked (stream);
if (c == EOF)
goto done;
else
n_read++;
switch (c)
{
case '\r':
case '\n':
{
int next_c = getc_unlocked (stream);
if (!(next_c == EOF ||
(c == '\r' && next_c == '\n') ||
(c == '\n' && next_c == '\r')))
ungetc (next_c, stream);
goto done;
}
default:
g_string_append_c (str, c);
}
}
done:
funlockfile (stream);
return n_read > 0;
}
void
load_file (const gchar *filename)
{
FILE *file;
GtkTextIter start, end;
GString *buffer = g_string_new (NULL);
int state = 0;
gboolean in_para = 0;
if (current_file && !strcmp (current_file, filename))
return;
g_free (current_file);
current_file = g_strdup (filename);
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
gtk_text_buffer_delete (info_buffer, &start, &end);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_delete (source_buffer, &start, &end);
file = fopen (filename, "r");
if (!file)
{
g_warning ("Cannot open %s: %s\n", filename, g_strerror (errno));
return;
}
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
while (read_line (file, buffer))
{
gchar *p = buffer->str;
gchar *q;
switch (state)
{
case 0:
/* Reading title */
while (*p == '/' || *p == '*' || isspace (*p))
p++;
q = p + strlen (p);
while (q > p && isspace (*(q - 1)))
q--;
if (q > p)
{
int len_chars = g_utf8_pointer_to_offset (p, q);
end = start;
g_assert (strlen (p) >= q - p);
gtk_text_buffer_insert (info_buffer, &end, p, q - p);
start = end;
gtk_text_iter_backward_chars (&start, len_chars);
gtk_text_buffer_apply_tag_by_name (info_buffer, "title", &start, &end);
start = end;
state++;
}
break;
case 1:
/* Reading body of info section */
while (isspace (*p))
p++;
if (*p == '*' && *(p + 1) == '/')
{
gtk_text_buffer_get_iter_at_offset (source_buffer, &start, 0);
state++;
}
else
{
int len;
while (*p == '*' || isspace (*p))
p++;
len = strlen (p);
while (isspace (*(p + len - 1)))
len--;
if (len > 0)
{
if (in_para)
gtk_text_buffer_insert (info_buffer, &start, " ", 1);
g_assert (strlen (p) >= len);
gtk_text_buffer_insert (info_buffer, &start, p, len);
in_para = 1;
}
else
{
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
in_para = 0;
}
}
break;
case 2:
/* Skipping blank lines */
while (isspace (*p))
p++;
if (*p)
{
p = buffer->str;
state++;
/* Fall through */
}
else
break;
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
break;
}
}
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
}
gboolean
button_press_event_cb (GtkTreeView *tree_view,
GdkEventButton *event,
GtkTreeModel *model)
{
if (event->type == GDK_2BUTTON_PRESS)
{
GtkTreePath *path = NULL;
gtk_tree_view_get_path_at_pos (tree_view,
event->window,
event->x,
event->y,
&path,
NULL);
if (path)
{
GtkTreeIter iter;
gboolean italic;
GVoidFunc func;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_store_get (GTK_TREE_STORE (model),
&iter,
FUNC_COLUMN, &func,
ITALIC_COLUMN, &italic,
-1);
(func) ();
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
ITALIC_COLUMN, !italic,
-1);
gtk_tree_path_free (path);
}
gtk_signal_emit_stop_by_name (GTK_OBJECT (tree_view),
"button_press_event");
return TRUE;
}
return FALSE;
}
static void
selection_cb (GtkTreeSelection *selection,
GtkTreeModel *model)
{
GtkTreeIter iter;
GValue value = {0, };
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
gtk_tree_model_get_value (model, &iter,
FILENAME_COLUMN,
&value);
load_file (g_value_get_string (&value));
g_value_unset (&value);
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
PangoFontDescription *font_desc;
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
text_view = gtk_text_view_new ();
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
*buffer = gtk_text_buffer_new (NULL);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
if (is_source)
{
font_desc = pango_font_description_from_string ("Courier 10");
gtk_widget_modify_font (text_view, font_desc);
pango_font_description_free (font_desc);
}
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), !is_source);
return scrolled_window;
}
/* Technically a list, but if we do go to 80 demos, we may want to move to a tree */
static GtkWidget *
create_tree (void)
{
GtkTreeSelection *selection;
GtkCellRenderer *cell;
GtkWidget *tree_view;
GtkTreeViewColumn *column;
GtkTreeStore *model;
GtkTreeIter iter;
gint i;
model = gtk_tree_store_new_with_types (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
gtk_tree_selection_set_type (GTK_TREE_SELECTION (selection),
GTK_TREE_SELECTION_SINGLE);
gtk_widget_set_usize (tree_view, 200, -1);
for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++)
{
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
TITLE_COLUMN, testgtk_demos[i].title,
FILENAME_COLUMN, testgtk_demos[i].filename,
FUNC_COLUMN, testgtk_demos[i].func,
ITALIC_COLUMN, FALSE,
-1);
}
cell = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Widget",
cell,
"text", TITLE_COLUMN,
"italic", ITALIC_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
GTK_TREE_VIEW_COLUMN (column));
gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", selection_cb, model);
gtk_signal_connect (GTK_OBJECT (tree_view), "button_press_event", GTK_SIGNAL_FUNC (button_press_event_cb), model);
return tree_view;
}
int
main (int argc, char **argv)
{
GtkWidget *window;
GtkWidget *notebook;
GtkWidget *hbox;
GtkWidget *tree;
GtkTextTag *tag;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();
gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
notebook = gtk_notebook_new ();
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&info_buffer, FALSE),
gtk_label_new ("Info"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&source_buffer, TRUE),
gtk_label_new ("Source"));
tag = gtk_text_buffer_create_tag (info_buffer, "title");
gtk_object_set (GTK_OBJECT (tag),
"font", "Sans 18",
NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
gtk_object_set (GTK_OBJECT (tag),
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
load_file (testgtk_demos[0].filename);
gtk_main ();
return 0;
}
+35
View File
@@ -1,3 +1,38 @@
2002-11-01 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkfilesel.sgml: The label is "Folders" now, not
"Directories". (#97224, Vitaly Tishkov)
* gtk/tree_widget.sgml (select): use GTK_SELECTION_SINGLE, not
GTK_SELECT_SINGLE. (#96516, Erik Grinaker)
Mon Jul 29 22:36:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/tmpl/gtkfilesel.sgml: Fix up the example program
a bit. (#88814, Johnson Wong)
2002-07-16 Sven Neumann <sven@gimp.org>
* gdk/tmpl/rgb.sgml: fixed the example code (return TRUE from the
expose_event handler).
2002-04-24 Matthias Clasen <maclas@gmx.de>
Merged from HEAD:
* gtk/tmpl/gtksocket.sgml:
* gtk/tmpl/gtkdrawingarea.sgml:
* gtk/tmpl/gtktreemodel.sgml:
* gtk/tmpl/gtkradiomenuitem.sgml:
* gtk/tmpl/gtkwidget.sgml:
* gtk/tmpl/gtkdialog.sgml:
* gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml:
* gtk/text_widget.sgml:
* gtk/tree_widget.sgml:
* gtk/gtk-sections.txt:
* gdk/tmpl/properties.sgml: Documentation fixes. (#79001, #67818,
#79080, #78661, #78392, #75588, #72312, #74439)
Tue Mar 26 15:41:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/building.sgml: Add a mention of running ldconfig.
@@ -10,7 +10,8 @@ Application-driven progressive image loading.
process of loading an image, by letting them send the image data
directly to the loader instead of having the loader read the data
from a file. Applications can use this functionality instead of
gdk_pixbuf_new_from_file() when they need to parse image data in
gdk_pixbuf_new_from_file() or gdk_pixbuf_animation_new_from_file()
when they need to parse image data in
small chunks. For example, it should be used when reading an
image from a (potentially) slow network connection, or when
loading an extremely large file.
@@ -47,31 +48,18 @@ Application-driven progressive image loading.
<title>Loading an animation</title>
<para>
Loading an animation is a little more complex then loading an
image. In addition to the above signals, there is also a "<link
linkend="GdkPixbufLoader-frame-done">frame_done</link>" signal,
as well as an "<link
linkend="GdkPixbufLoader-animation-done">animation_done</link>"
signal. The first lets the application know that it is dealing
with an animation, instead of a static image. It also passes a
#GdkPixbufFrame in the signal. As before, if you want to keep
the frame, you need to ref it. Once the first "<link
linkend="GdkPixbufLoader-frame-done">frame_done</link>" signal
Loading an animation is almost as easy as loading an
image. Once the first "<link
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" signal
has been emitted, you can call gdk_pixbuf_loader_get_animation()
to get the #GdkPixbufAnimation struct. Each subsequent frame
goes through a similar lifecycle. For example "<link
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" is
re-emitted. Then "<link
linkend="GdkPixbufLoader-area-updated">area_updated</link>" is
emitted as many times as necessary. Finally, "<link
linkend="GdkPixbufLoader-animation-done">animation_done</link>"
is emitted as soon as all frames are done.
to get the #GdkPixbufAnimation struct and gdk_pixbuf_animation_get_iter()
to get an #GdkPixbufAnimationIter for displaying it.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
gdk_pixbuf_new_from_file()
gdk_pixbuf_new_from_file(), gdk_pixbuf_animation_new_from_file()
</para>
<!-- ##### FUNCTION gdk_pixbuf_loader_new ##### -->
-19
View File
@@ -545,25 +545,6 @@ relation to the baseline. See gdk_text_extents().
@Returns: the height of the character in pixels.
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
<para>
Returns a comma-separated list of XLFDs for the
fonts making up a given #GdkFont.
</para>
@font: a #GdkFont
@Returns: a newly-allocated string containing a list of XLFDs,
should be freed with gdk_font_full_name_free() when no longer needed.
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
<para>
Frees a full font name obtained from gdk_font_full_name_get().
</para>
@name: a full font name.
<!-- ##### TYPEDEF GdkWChar ##### -->
<para>
Specifies a wide character type, used to represent character codes.
+17
View File
@@ -596,6 +596,23 @@ status information, so the application does not need to do anything.
</para>
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
<para>
Frees a full font name obtained from gdk_font_full_name_get().
</para>
@name: a full font name.
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
<para>
Returns a comma-separated list of XLFDs for the
fonts making up a given #GdkFont.
</para>
@font: a #GdkFont
@Returns: a newly-allocated string containing a list of XLFDs,
should be freed with gdk_font_full_name_free() when no longer needed.
<!-- ##### FUNCTION gdk_get_client_window ##### -->
<para>
+2 -2
View File
@@ -244,10 +244,10 @@ Changes the contents of a property on a window.
@window: a #GdkWindow.
@property: the property to change.
@type: the new type for the property. If @mode is
%GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
must match the existing type or an error will occur.
@format: the new format for the property. If @mode is
%GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
must match the existing format or an error will occur.
@mode: a value describing how the new data is to be combined
with the current data.
+2
View File
@@ -90,6 +90,8 @@ on_darea_expose (GtkWidget *widget,
gdk_draw_rgb_image (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
GDK_RGB_DITHER_MAX, rgbbuf, IMAGE_WIDTH * 3);
return TRUE;
}
</programlisting>
</example>
+1 -1
View File
@@ -1690,7 +1690,6 @@ GTK_OBJECT_TYPE_NAME
GtkObjectFlags
GTK_OBJECT_FLAGS
GTK_OBJECT_FLOATING
GTK_OBJECT_CONNECTED
GtkArgFlags
gtk_object_new
gtk_object_sink
@@ -3447,6 +3446,7 @@ gtk_vseparator_get_type
<FILE>gtkwidget</FILE>
<TITLE>GtkWidget</TITLE>
GtkWidget
GtkWidgetClass
GtkWidgetFlags
GTK_WIDGET_TYPE
GTK_WIDGET_STATE
+3 -2
View File
@@ -162,7 +162,7 @@ font and foreground color &mdash use standard
functions such as
<link linkend="gtk-widget-modify-font">gtk_widget_modify_font()</link>
or
<link linkend="gtk-widget-modify-fg">gtk_widget_modify_fg()</link>.
<link linkend="gtk-widget-modify-fg">gtk_widget_modify_text()</link>.
For other attributes there are dedicated methods on
<link linkend="GtkTextView">GtkTextView</link> such as
<link linkend="gtk-text-view-set-tabs">gtk_text_view_set_tabs()</link>.
@@ -170,6 +170,7 @@ For other attributes there are dedicated methods on
<informalexample><programlisting>
GtkWidget *view;
GtkTextBuffer *buffer;
GtkTextIter start, end;
PangoFontDescription *font_desc;
GdkColor color;
GtkTextTag *tag;
@@ -187,7 +188,7 @@ For other attributes there are dedicated methods on
/* Change default color throughout the widget */
gdk_color_parse ("green", &amp;color);
gtk_widget_modify_fg (view, GTK_STATE_NORMAL, &amp;color);
gtk_widget_modify_text (view, GTK_STATE_NORMAL, &amp;color);
/* Change left margin throughout the widget */
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
+144
View File
@@ -585,6 +585,42 @@ Define a function pointer. Deprecated.
@arg:
@arg_id:
<!-- ##### ARG GtkBox:expand ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:fill ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:pack-type ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:padding ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:position ##### -->
<para>
</para>
<!-- ##### ARG GtkButtonBox:secondary ##### -->
<para>
</para>
<!-- ##### STRUCT GtkCellRendererTextPixbuf ##### -->
<para>
@@ -817,6 +853,18 @@ You may not attach these to signals created with the
</para>
<!-- ##### ARG GtkFixed:x ##### -->
<para>
</para>
<!-- ##### ARG GtkFixed:y ##### -->
<para>
</para>
<!-- ##### ENUM GtkFontFilterType ##### -->
<para>
A set of bit flags used to specify the filter being set
@@ -877,6 +925,18 @@ a RC file.
</para>
<!-- ##### ARG GtkLayout:x ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:y ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkMenuBar::cycle-focus ##### -->
<para>
@@ -885,6 +945,42 @@ a RC file.
@menubar: the object which received the signal.
@arg1:
<!-- ##### ARG GtkNotebook:menu-label ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:position ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-expand ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-fill ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-label ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-pack ##### -->
<para>
</para>
<!-- ##### ARG GtkObject:object-signal ##### -->
<para>
Setting this with a GtkType of GTK_TYPE_SIGNAL connects
@@ -1190,6 +1286,54 @@ Holds the data for a statusbar message. <structfield>text</structfield> holds th
@_gtk_reserved11:
@_gtk_reserved12:
<!-- ##### ARG GtkTable:bottom-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:left-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:right-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:top-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:x-options ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:x-padding ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:y-options ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:y-padding ##### -->
<para>
</para>
<!-- ##### STRUCT GtkTextBTreeNode ##### -->
<para>
+54 -54
View File
@@ -5,40 +5,40 @@ GtkButton
A widget that creates a signal when clicked on.
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkButton widget is generally used to attach a function to that
is called when the button is pressed. The various signals and how to use
them are outlined below.
</para>
<para>
The #GtkButton widget can hold any valid child widget. That is it can
hold most any other standard #GtkWidget. The most commonly used child is
the #GtkLabel.
<para>
The #GtkButton widget is generally used to attach a function to that
is called when the button is pressed. The various signals and how to use
them are outlined below.
</para>
<para>
The #GtkButton widget can hold any valid child widget. That is it can
hold most any other standard #GtkWidget. The most commonly used child is
the #GtkLabel.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<para>
</para>
<!-- ##### STRUCT GtkButton ##### -->
<para>
This should not be accessed directly. Use the accessor functions below.
<para>
This should not be accessed directly. Use the accessor functions below.
</para>
<!-- ##### FUNCTION gtk_button_new ##### -->
<para>
Creates a new #GtkButton widget.
<para>
Creates a new #GtkButton widget.
</para>
@Returns: The newly created #GtkButton widget.
<!-- ##### FUNCTION gtk_button_new_with_label ##### -->
<para>
Creates a #GtkButton widget with a #GtkLabel child containing the given
text.
<para>
Creates a #GtkButton widget with a #GtkLabel child containing the given
text.
</para>
@label: The text you want the #GtkLabel to hold.
@@ -64,52 +64,52 @@ text.
<!-- ##### FUNCTION gtk_button_pressed ##### -->
<para>
Emits a #GtkButton::pressed signal to the given #GtkButton.
<para>
Emits a #GtkButton::pressed signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_released ##### -->
<para>
Emits a #GtkButton::released signal to the given #GtkButton.
<para>
Emits a #GtkButton::released signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_clicked ##### -->
<para>
Emits a #GtkButton::clicked signal to the given #GtkButton.
<para>
Emits a #GtkButton::clicked signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_enter ##### -->
<para>
Emits a #GtkButton::enter signal to the given #GtkButton.
<para>
Emits a #GtkButton::enter signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_leave ##### -->
<para>
Emits a #GtkButton::leave signal to the given #GtkButton.
<para>
Emits a #GtkButton::leave signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_set_relief ##### -->
<para>
Sets the relief style of the edges of the given #GtkButton widget.
Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
The default style is, as one can guess, GTK_RELIEF_NORMAL.
<!-- FIXME: put pictures of each style -->
<para>
Sets the relief style of the edges of the given #GtkButton widget.
Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
The default style is, as one can guess, GTK_RELIEF_NORMAL.
<!-- FIXME: put pictures of each style -->
</para>
@button: The #GtkButton you want to set relief styles of.
@@ -117,8 +117,8 @@ The default style is, as one can guess, GTK_RELIEF_NORMAL.
<!-- ##### FUNCTION gtk_button_get_relief ##### -->
<para>
Returns the current relief style of the given #GtkButton.
<para>
Returns the current relief style of the given #GtkButton.
</para>
@button: The #GtkButton you want the #GtkReliefStyle from.
@@ -191,52 +191,52 @@ Returns the current relief style of the given #GtkButton.
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::clicked ##### -->
<para>
Emitted when a button clicked on by the mouse and the cursor stays on the
button. If the cursor is not on the button when the mouse button is released,
the signal is not emitted.
<para>
Emitted when a button clicked on by the mouse and the cursor stays on the
button. If the cursor is not on the button when the mouse button is released,
the signal is not emitted.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::enter ##### -->
<para>
Emitted when the mouse cursor enters the region of the button.
<para>
Emitted when the mouse cursor enters the region of the button.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::leave ##### -->
<para>
Emitted when the mouse cursor leaves the region of the button.
<para>
Emitted when the mouse cursor leaves the region of the button.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::pressed ##### -->
<para>
Emitted when the button is initially pressed.
<para>
Emitted when the button is initially pressed.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::released ##### -->
<para>
Emitted when a button which is pressed is released, no matter where the
mouse cursor is.
<para>
Emitted when a button which is pressed is released, no matter where the
mouse cursor is.
</para>
@button: the object which received the signal.
<!-- ##### ARG GtkButton:label ##### -->
<para>
The text within the child #GtkLabel of the #GtkButton. Only useful if
there is actually a #GtkLabel inside of the #GtkButton.
<para>
The text within the child #GtkLabel of the #GtkButton. Only useful if
there is actually a #GtkLabel inside of the #GtkButton.
</para>
<!-- ##### ARG GtkButton:relief ##### -->
<para>
The #GtkReliefStyle as outlined in gtk_button_set_relief().
<para>
The #GtkReliefStyle as outlined in gtk_button_set_relief().
</para>
<!-- ##### ARG GtkButton:use-underline ##### -->
+1 -1
View File
@@ -82,7 +82,7 @@ void quick_message (gchar *message) {
dialog = gtk_dialog_new_with_buttons ("Message",
main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_BUTTON_OK,
GTK_STOCK_OK,
GTK_RESPONSE_NONE,
NULL);
label = gtk_label_new (message);
+2 -2
View File
@@ -53,7 +53,7 @@ that drawing is implicitly clipped to the exposed area.
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
<programlisting>
gboolean
expose_event_callback (GdkWidget *widget, GdkEventExpose *event, gpointer data)
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
gdk_draw_arc (widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
@@ -64,7 +64,7 @@ expose_event_callback (GdkWidget *widget, GdkEventExpose *event, gpointer data)
return TRUE;
}
[...]
GtkWidget *drawing_area = gtk_drawing_area_new (<!>);
GtkWidget *drawing_area = gtk_drawing_area_new (<!-- -->);
gtk_widget_set_size_request (drawing_area, 100, 100);
g_signal_connect (G_OBJECT (drawing_area), "expose_event",
G_CALLBACK (expose_event_callback), NULL);
+8 -8
View File
@@ -34,15 +34,17 @@ Simple file operations; create directory, delete file, and rename file, are avai
/* The file selection widget and the string to store the chosen filename */
GtkWidget *file_selector;
gchar *selected_filename;
void store_filename (GtkFileSelection *file_selector, gpointer user_data) {
const gchar *selected_filename;
void store_filename (GtkFileSelection *selector, gpointer user_data) {
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
g_print ("Selected filename: %s\n", selected_filename);
}
void create_file_selection (void) {
GtkWidget *file_selector;
/* Create the selector */
file_selector = gtk_file_selection_new ("Please select a file for editing.");
@@ -133,12 +135,10 @@ Creates a new file selection dialog box. By default it will contain a #GtkCList
<!-- ##### FUNCTION gtk_file_selection_set_filename ##### -->
<para>
Sets a default path for the file requestor. If @filename includes a directory path, then the requestor will open with that path as its current working directory.
</para>
@filesel: a #GtkFileSelection.
@filename: a string to set as the default file name.
@filesel:
@filename:
<!-- ##### FUNCTION gtk_file_selection_get_filename ##### -->
@@ -154,7 +154,7 @@ Retrieves the currently selected filename from the file selection dialog. If no
<para>
Will attempt to match @pattern to a valid filenames or subdirectories in the current directory. If a match can be made, the matched filename will appear in the text entry field of the file selection dialog.
If a partial match can be made, the "Files" list will contain those
file names which have been partially matched, and the "Directories"
file names which have been partially matched, and the "Folders"
list those directories which have been partially matched.
</para>
@@ -38,7 +38,7 @@ for(i = 0; i < 5; i++)
<listitem><para>because a radio menu item is a menu item.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkCheckItem</term>
<term>#GtkCheckMenuItem</term>
<listitem><para>to know how to handle the check.</para></listitem>
</varlistentry>
</variablelist>
+2 -4
View File
@@ -29,7 +29,7 @@ The set of these <firstterm>default</firstterm> files
can be retrieved with gtk_rc_get_default_files()
and modified with gtk_rc_add_default_file() and
gtk_rc_set_default_files().
Additionally, the <envar>GTK_RC_FILES</envar> environment variable
Additionally, the <envar>GTK2_RC_FILES</envar> environment variable
can be set to a #G_SEARCHPATH_SEPARATOR_S-separated list of files
in order to overwrite the set of default files at runtime.
</para>
@@ -792,11 +792,9 @@ otherwise %NULL.
<!-- ##### FUNCTION gtk_rc_get_module_dir ##### -->
<para>
Returns the directory in which GTK+ will look for
theme engines.
</para>
@Returns: The directory. (Must be freed with g_free())
@Returns:
<!-- ##### FUNCTION gtk_rc_get_im_module_path ##### -->
+13 -1
View File
@@ -25,7 +25,7 @@ have been added to its parent.
<example>
<title>Obtaining the window ID of a socket.</title>
<programlisting>
GtkWidget *socket = gtk_socket_new (<!>);
GtkWidget *socket = gtk_socket_new (<!-- -->);
gtk_widget_show (socket);
gtk_container_add (GTK_CONTAINER (parent), socket);
@@ -62,6 +62,13 @@ to be destroyed at any time when the main event loop
is running.
</para>
<para>
The communication between a #GtkSocket and a #GtkPlug follows the
<ulink url="http://www.freedesktop.org/standards/xembed.html">XEmbed</ulink>
protocol. This protocol has also been implemented in other toolkits, e.g.
<application>Qt</application>, allowing the same level of integration
when embedding a <application>Qt</application> widget in GTK or vice versa.</para>
<para>
A socket can also be used to swallow arbitrary
pre-existing top-level windows using gtk_socket_steal(),
@@ -77,6 +84,11 @@ as between a #GtkPlug and a #GtkSocket.</para>
<listitem><para>the widget that plugs into a #GtkSocket.</para></listitem>
</varlistentry>
<varlistentry>
<term><ulink url="http://www.freedesktop.org/standards/xembed.html">XEmbed</ulink></term>
<listitem><para>the XEmbed Protocol Specification.</para></listitem>
</varlistentry>
</variablelist>
</para>
+2 -2
View File
@@ -168,7 +168,7 @@ enum
gchar *str_data;
gint int_data;
/* Make sure you terminate calls to gtk_tree_model_get(<!>)
/* Make sure you terminate calls to gtk_tree_model_get(<!-- -->)
* with a '-1' value
*/
gtk_tree_model_get (list_store, &amp;iter,
@@ -190,7 +190,7 @@ enum
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkTreeView, #GtkTreeStore, #GtkListStore, #GtkTreeDnd, #GtkTreeSortable
#GtkTreeView, #GtkTreeStore, #GtkListStore, <link linkend="gtk-GtkTreeView-drag-and-drop">GtkTreeDnd</link>, #GtkTreeSortable
</para>
<!-- ##### STRUCT GtkTreeModel ##### -->
+1 -17
View File
@@ -23,29 +23,13 @@ information about the type is held in a private struct named
</para>
<!-- ##### ENUM GtkFundamentalType ##### -->
<!-- ##### TYPEDEF GtkFundamentalType ##### -->
<para>
#GtkFundamentalType is an enumerated type which lists all the possible
fundamental types (e.g. <type>char</type>, <type>uchar</type>, <type>int</type>,
<type>long</type>, <type>float</type>, etc).
</para>
@GTK_TYPE_INVALID:
@GTK_TYPE_NONE:
@GTK_TYPE_ENUM:
@GTK_TYPE_FLAGS:
@GTK_TYPE_CHAR:
@GTK_TYPE_UCHAR:
@GTK_TYPE_BOOL:
@GTK_TYPE_INT:
@GTK_TYPE_UINT:
@GTK_TYPE_LONG:
@GTK_TYPE_ULONG:
@GTK_TYPE_FLOAT:
@GTK_TYPE_DOUBLE:
@GTK_TYPE_STRING:
@GTK_TYPE_BOXED:
@GTK_TYPE_POINTER:
<!-- ##### MACRO GTK_CLASS_NAME ##### -->
<para>
+16 -3
View File
@@ -20,14 +20,20 @@ GtkWidget
</para>
<!-- ##### STRUCT GtkWidgetClass ##### -->
<para>
</para>
<!-- ##### ENUM GtkWidgetFlags ##### -->
<para>
Tells about certain properties of the widget.
</para>
@GTK_TOPLEVEL:
widgets without a real parent, as there are #GtkWindow<!>s and
#GtkMenu<!>s have this flag set throughout their lifetime.
widgets without a real parent, as there are #GtkWindow<!-- -->s and
#GtkMenu<!-- -->s have this flag set throughout their lifetime.
Toplevel widgets always contain their own #GdkWindow.
@GTK_NO_WINDOW:
Indicative for a widget that does not provide its own #GdkWindow.
@@ -929,7 +935,12 @@ Equivalent to <literal>gtk_widget_set_style (widget, NULL)</literal>.
<!-- ##### FUNCTION gtk_widget_reset_rc_styles ##### -->
<para>
Calls gtk_widget_set_rc_style() recursively on all descendants.
Reset the styles of @widget and all descendents, so when
they are looked up again, they get the correct values
for the currently loaded RC file settings.
</para>
<para>
This function is not useful for applications.
</para>
@widget: a #GtkWidget.
@@ -1760,6 +1771,8 @@ a widget changes from un-anchored to anchored or vice-versa.
@widget: the object which received the signal.
@widget:
<!-- # Unused Parameters # -->
@widget2:
<!-- ##### SIGNAL GtkWidget::key-press-event ##### -->
<para>
+2 -2
View File
@@ -220,7 +220,7 @@ static void tree_selection_changed_cb (GtkTreeSelection *selection, gpointer dat
GtkTreeSelection *select;
select = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
gtk_tree_selection_set_mode (select, GTK_SELECT_SINGLE);
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
g_signal_connect (G_OBJECT (select), "changed",
G_CALLBACK (tree_selection_changed_cb),
NULL);
@@ -287,7 +287,7 @@ setup_tree (void)
populate_tree_model (store);
/* Create a view */
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
/* The view now holds a reference. We can get rid of our own
* reference */
+183
View File
@@ -1,3 +1,186 @@
Wed Nov 6 15:19:53 2002 Owen Taylor <otaylor@redhat.com>
* io-gif.c (CHECK_LZW_SP): Fix trailing semicolon on macro,
clean up a bit.
Tue Nov 5 14:03:08 2002 Owen Taylor <otaylor@redhat.com>
* io-gif.c: Fix LZWP_SP typo. (#97758, Akira Tagoh)
2002-11-04 Sven Neumann <sven@gimp.org>
* io-bmp.c (DecodeHeader): removed redundant code that did nothing,
caused a compiler warning and is also not in the HEAD branch.
2002-10-23 Matthias Clasen <maclas@gmx.de>
* io-gif.c (lzw_read_byte): Check for stack overflow throughout.
(#91808, Elliot Lee)
Thu Oct 3 18:25:57 2002 Owen Taylor <otaylor@redhat.com>
* io-jpeg.c (gdk_pixbuf__jpeg_image_save):
Fix memory leak. (#94399)
Tue Oct 1 17:35:43 2002 Owen Taylor <otaylor@redhat.com>
* gdkpixdata.c: Patch from Andy Wingo to always
escape ? to avoid accidentally generating trigraphs
in the output (#94631)
2002-09-28 Tor Lillqvist <tml@iki.fi>
* pixops/*.S: Don't use .type on Cygwin, either (#91597, Masahiro
Sakai).
2002-09-27 Federico Mena Quintero <federico@ximian.com>
* io-ico.c (gdk_pixbuf__ico_image_begin_load): Free the context if
we cannot allocate the HeaderBuf.
2002-09-27 Federico Mena Quintero <federico@ximian.com>
* io-bmp.c (OneLine): Fix the update region notification to handle
top-to-bottom and bottom-to-top BMPs correctly.
2002-09-25 Federico Mena Quintero <federico@ximian.com>
* io-jpeg.c: Merged the CMYK changes from HEAD.
2002-09-16 Matthias Clasen <maclas@gmx.de>
* test-images.h: line-wrap all images to avoid problems with
line-length-limited compilers. (#90662)
2002-08-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am (libgdk_pixbuf_2_0_la_DEPENDENCIES): Add
gdk_pixbuf_win32res_lo. (#87101, J. Ali Harlow)
2002-08-22 Matthias Clasen <maclas@gmx.de>
* io-png.c (gdk_pixbuf__png_image_save): Plug a memory
leak. (#91422, Sven Neumann)
2002-07-31 Sven Neumann <sven@gimp.org>
* gdk-pixdata.c (gdk_pixdata_to_csource): free the result of
gdk_pixdata_serialize() (bug #89411).
Mon Jul 29 23:06:10 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf-scale.c: Fix some warnings by adding
casts to PixopsInterpType. (#85839, David L. Cooper, II.)
2002-07-16 Matthias Clasen <maclas@gmx.de>
Support for compressed ras images (#84994):
* io-ras.c (RAS2State): Error on unsupported ras variations.
(OneLine8): Fix colormap indexing.
(OneLine): Call updated_func with proper region.
(DoCompressed): New function, handles compressed ras data.
(gdk_pixbuf__ras_image_load_increment): Handle compressed ras
images.
2002-07-07 Matthias Clasen <maclas@gmx.de>
* io-ico.c (DecodeHeader): Correct computation of image height.
(OneLine): Correct update notification.
2002-07-06 Matthias Clasen <maclas@gmx.de>
* io-tiff.c (tiff_set_error): Handle global_error == NULL
better.
(tiff_image_parse): Don't trust TIFFRGBAImageBegin to set
the "put" routine. (Fixes #87384)
(gdk_pixbuf__tiff_image_stop_load): Don't call TIFFClose too
early.
2002-07-02 Matthias Clasen <maclas@gmx.de>
* io-bmp.c (grow_buffer): New function to avoid crashes
on unchecked reallocs.
(DecodeHeader, DecodeColormap, decode_bitmasks,
DoCompressed): Use grow_buffer instead of g_realloc
throughout. Change signatures where necessary to pass the
errors up. (#85448)
(OneLine16): Fix loading of 16bpp BI_RGB bmps. (#86286)
2002-06-28 Sven Neumann <sven@gimp.org>
* gdk-pixbuf-csource.c (print_blurb): converted a Tab to spaces.
Thu Jun 13 18:11:11 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Fix problem where when no alpha was
involved, we scaled rather than composited, but then
went ahead and composited anyways. (#76958, Patch
from Matthias Clasen) Needs to be merged to GNOME
1.4 gdk-pixbuf.
2002-06-07 Federico Mena Quintero <federico@ximian.com>
* io-bmp.c (lsb_32):
(lsb_16): New functions to fetch 32 or 16-bit little-endian values
starting at a specific memory location. We do this instead of
GINT32_FROM_LE() as the latter is simply dereferences a cast,
which doesn't work on platforms with alignment requirements.
Fixes #84083.
2002-06-01 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-io.c (pixbuf_check_xbm): Accept xbms starting
with a C comment - those seem to be not uncommon, e.g. the Gimp
produces them. (#82706)
* io-xbm.c (read_bitmap_file_data): Don't leak memory on certain
invalid inputs.
(gdk_pixbuf__xbm_image_load_real): Don't leak memory on valid inputs.
2002-05-22 Federico Mena Quintero <federico@ximian.com>
* io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
account!!! Fixes #82515.
[This bug is not present in the GNOME 1.4 branch as its XPM loader
does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
no row padding and then uses gdk_pixbuf_new_from_data() on it.]
[IMPORTANT: The comment above is to make my life easier when
merging stuff across branches. If you make changes to gdk-pixbuf
in either branch, please include a comment in the ChangeLog that
indicates whether this should be merged into the other branch.
Thanks!]
2002-05-22 Tor Lillqvist <tml@iki.fi>
* gdk-pixbuf-io.c (get_libdir): Use GTK_BINARY_VERSION (and not
GTK_VERSION) in the path to the loaders on Win32, too.
* Makefile.am: Pass GTK_BINARY_VERSION.
2002-05-18 Matthias Clasen <maclas@gmx.de>
* io-tiff.c (tiff_image_parse): fix packing order on bigendian
systems. (#81702)
Thu May 16 15:17:30 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Patch from Matthias Clasen to fix some typos
(#77246)
Thu May 16 15:02:46 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_to_csource): Fix 64-bit warning.
(#78258)
2002-05-07 Michael Natterer <mitch@gimp.org>
* gdk-pixbuf/Makefile.am: build the static pixbuf loaders
conditionally like the dynamic ones so --without-lib<foo> is
honored when building with --disable-modules. (#66867)
2002-04-11 Matthias Clasen <maclas@gmx.de>
More fixes for #77807:
+28 -15
View File
@@ -17,7 +17,7 @@ gdk_pixbuf-win32res.lo : gdk_pixbuf.rc
install-libtool-import-lib:
$(INSTALL) .libs/libgdk_pixbuf-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libdk_pixbuf-$(GTK_API_VERSION).dll.a
-rm $(DESTDIR)$(libdir)/libgdk_pixbuf-$(GTK_API_VERSION).dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
@@ -144,33 +144,45 @@ libpixbufloader_tga_la_LIBADD = $(module_libs)
if HAVE_PNG
PNG_LIB = libpixbufloader-png.la
STATIC_PNG_LIB = libpixbufloader-static-png.la
endif
if HAVE_JPEG
JPEG_LIB = libpixbufloader-jpeg.la
STATIC_JPEG_LIB = libpixbufloader-static-jpeg.la
endif
GIF_LIB = libpixbufloader-gif.la
STATIC_GIF_LIB = libpixbufloader-static-gif.la
ICO_LIB = libpixbufloader-ico.la
STATIC_ICO_LIB = libpixbufloader-static-ico.la
RAS_LIB = libpixbufloader-ras.la
STATIC_RAS_LIB = libpixbufloader-static-ras.la
if HAVE_TIFF
TIFF_LIB = libpixbufloader-tiff.la
STATIC_TIFF_LIB = libpixbufloader-static-tiff.la
endif
XPM_LIB = libpixbufloader-xpm.la
STATIC_XPM_LIB = libpixbufloader-static-xpm.la
PNM_LIB = libpixbufloader-pnm.la
STATIC_PNM_LIB = libpixbufloader-static-pnm.la
BMP_LIB = libpixbufloader-bmp.la
STATIC_BMP_LIB = libpixbufloader-static-bmp.la
WBMP_LIB = libpixbufloader-wbmp.la
STATIC_WBMP_LIB = libpixbufloader-static-wbmp.la
XBM_LIB = libpixbufloader-xbm.la
STATIC_XBM_LIB = libpixbufloader-static-xbm.la
TGA_LIB = libpixbufloader-tga.la
STATIC_TGA_LIB = libpixbufloader-static-tga.la
if BUILD_DYNAMIC_MODULES
@@ -194,19 +206,19 @@ builtin_objs =
else
loader_LTLIBRARIES =
noinst_LTLIBRARIES = \
libpixbufloader-static-png.la \
libpixbufloader-static-jpeg.la \
libpixbufloader-static-gif.la \
libpixbufloader-static-ico.la \
libpixbufloader-static-ras.la \
libpixbufloader-static-tiff.la \
libpixbufloader-static-xpm.la \
libpixbufloader-static-pnm.la \
libpixbufloader-static-bmp.la \
libpixbufloader-static-wbmp.la \
libpixbufloader-static-xbm.la \
libpixbufloader-static-tga.la
noinst_LTLIBRARIES = \
$(STATIC_PNG_LIB) \
$(STATIC_JPEG_LIB) \
$(STATIC_GIF_LIB) \
$(STATIC_ICO_LIB) \
$(STATIC_RAS_LIB) \
$(STATIC_XPM_LIB) \
$(STATIC_TIFF_LIB) \
$(STATIC_PNM_LIB) \
$(STATIC_BMP_LIB) \
$(STATIC_WBMP_LIB) \
$(STATIC_XBM_LIB) \
$(STATIC_TGA_LIB)
builtin_objs = @INCLUDED_LOADER_OBJ@
@@ -219,6 +231,7 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \
-DGTK_VERSION=\"@GTK_VERSION@\" \
-DGTK_BINARY_VERSION=\"@GTK_BINARY_VERSION@\" \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
@INCLUDED_LOADER_DEFINE@ \
@@ -268,7 +281,7 @@ libgdk_pixbuf_2_0_la_LDFLAGS = @STRIP_BEGIN@ \
@STRIP_END@
libgdk_pixbuf_2_0_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_win32res_lo) $(GDK_PIXBUF_DEP_LIBS)
libgdk_pixbuf_2_0_la_DEPENDENCIES = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_def)
libgdk_pixbuf_2_0_la_DEPENDENCIES = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_def) $(gdk_pixbuf_win32res_lo)
gdk_pixbuf_headers = \
gdk-pixbuf.h \
+1 -1
View File
@@ -277,7 +277,7 @@ print_blurb (FILE *bout,
fprintf (bout, " --static generate static symbols\n");
fprintf (bout, " --decoder provide rle decoder\n");
fprintf (bout, " --name=identifier C macro/variable name\n");
fprintf (bout, " --build-list parse (name, image) pairs\n");
fprintf (bout, " --build-list parse (name, image) pairs\n");
fprintf (bout, " -h, --help show this help message\n");
fprintf (bout, " -v, --version print version informations\n");
fprintf (bout, " --g-fatal-warnings make warnings fatal (abort)\n");
+14 -10
View File
@@ -193,17 +193,21 @@ pixbuf_check_xbm (guchar *buffer, int size)
if (size < 20)
return FALSE;
if (buffer [0] != '#'
|| buffer [1] != 'd'
|| buffer [2] != 'e'
|| buffer [3] != 'f'
|| buffer [4] != 'i'
|| buffer [5] != 'n'
|| buffer [6] != 'e'
|| buffer [7] != ' ')
return FALSE;
if (buffer [0] == '#'
&& buffer [1] == 'd'
&& buffer [2] == 'e'
&& buffer [3] == 'f'
&& buffer [4] == 'i'
&& buffer [5] == 'n'
&& buffer [6] == 'e'
&& buffer [7] == ' ')
return TRUE;
if (buffer [0] == '/'
&& buffer [1] != '*')
return TRUE;
return FALSE;
}
static gboolean
@@ -269,7 +273,7 @@ get_libdir (void)
if (libdir == NULL)
libdir = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "lib\\gtk-2.0\\" GTK_VERSION "\\loaders");
(GETTEXT_PACKAGE, dll_name, "lib\\gtk-2.0\\" GTK_BINARY_VERSION "\\loaders");
return libdir;
}
+3 -3
View File
@@ -78,7 +78,7 @@ gdk_pixbuf_scale (const GdkPixbuf *src,
dest->rowstride, dest->n_channels, dest->has_alpha,
src->pixels, src->width, src->height,
src->rowstride, src->n_channels, src->has_alpha,
scale_x, scale_y, interp_type);
scale_x, scale_y, (PixopsInterpType)interp_type);
}
/**
@@ -129,7 +129,7 @@ gdk_pixbuf_composite (const GdkPixbuf *src,
dest->rowstride, dest->n_channels, dest->has_alpha,
src->pixels, src->width, src->height,
src->rowstride, src->n_channels, src->has_alpha,
scale_x, scale_y, interp_type, overall_alpha);
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha);
}
/**
@@ -197,7 +197,7 @@ gdk_pixbuf_composite_color (const GdkPixbuf *src,
dest->rowstride, dest->n_channels, dest->has_alpha,
src->pixels, src->width, src->height,
src->rowstride, src->n_channels, src->has_alpha,
scale_x, scale_y, interp_type, overall_alpha, check_x, check_y,
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha, check_x, check_y,
check_size, color1, color2);
}
+19 -18
View File
@@ -505,7 +505,7 @@ save_uchar (CSourceData *cdata,
cdata->pad = FALSE;
}
}
if (d < 33 || d > 126)
if (d < 33 || d > 126 || d == '?')
{
APPEND (gstring, "\\%o", d);
cdata->pos += 1 + 1 + (d > 7) + (d > 63);
@@ -594,7 +594,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
guint bpp, width, height, rowstride;
gboolean rle_encoded;
gchar *macro_name;
guint8 *img_buffer, *img_buffer_end, *stream;
guint8 *img_buffer, *img_buffer_end, *stream = NULL;
guint stream_length;
GString *gstring;
@@ -707,9 +707,9 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
cdata.static_prefix, cdata.const_prefix, name);
APPEND (gstring, " 0x%x, /* Pixbuf magic: 'GdkP' */\n",
GDK_PIXBUF_MAGIC_NUMBER);
APPEND (gstring, " %u + %u, /* header length + pixel_data length */\n",
APPEND (gstring, " %u + %lu, /* header length + pixel_data length */\n",
GDK_PIXDATA_HEADER_LENGTH,
rle_encoded ? img_buffer_end - img_buffer : rowstride * height);
rle_encoded ? (glong)(img_buffer_end - img_buffer) : (glong)rowstride * height);
APPEND (gstring, " 0x%x, /* pixdata_type */\n",
pixdata->pixdata_type);
APPEND (gstring, " %u, /* rowstride */\n",
@@ -725,6 +725,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
guint pix_length = img_buffer_end - img_buffer;
stream = gdk_pixdata_serialize (pixdata, &stream_length);
img_buffer = stream;
img_buffer_end = stream + stream_length;
APPEND (gstring, "%s%s%s %s[] = \n",
@@ -734,34 +735,33 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
APPEND (gstring, "{ \"\"\n /* Pixbuf magic (0x%x) */\n \"",
GDK_PIXBUF_MAGIC_NUMBER);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* length: header (%u) + pixel_data (%u) */\n \"",
GDK_PIXDATA_HEADER_LENGTH,
rle_encoded ? pix_length : rowstride * height);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* pixdata_type (0x%x) */\n \"",
pixdata->pixdata_type);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* rowstride (%u) */\n \"",
rowstride);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* width (%u) */\n \"", width);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* height (%u) */\n \"", height);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* pixel_data: */\n");
img_buffer = stream;
}
/* pixel_data intro
@@ -812,8 +812,9 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
/* cleanup
*/
g_free (stream);
g_free (macro_name);
return gstring;
}
+80 -30
View File
@@ -233,14 +233,26 @@ static GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f, GError **error)
return pb;
}
static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
struct bmp_progressive_state *State,
/* Picks up a 32-bit little-endian integer starting at the specified location.
* Does it by hand instead of dereferencing a simple (gint *) cast due to
* alignment constraints many platforms.
*/
static int
lsb_32 (guchar *src)
{
return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
}
/* Same as above, but for 16-bit little-endian integers. */
static short
lsb_16 (guchar *src)
{
return src[0] | (src[1] << 8);
}
static gboolean grow_buffer (struct bmp_progressive_state *State,
GError **error)
{
/* FIXME this is totally unrobust against bogus image data. */
if (State->BufferSize < GUINT32_FROM_LE (* (guint32 *) &BIH[0]) + 14) {
State->BufferSize = GUINT32_FROM_LE (* (guint32 *) &BIH[0]) + 14;
State->buff = g_try_realloc (State->buff, State->BufferSize);
if (State->buff == NULL) {
g_set_error (error,
@@ -251,22 +263,35 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
return FALSE;
}
return TRUE;
}
static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
struct bmp_progressive_state *State,
GError **error)
{
/* FIXME this is totally unrobust against bogus image data. */
if (State->BufferSize < lsb_32 (&BIH[0]) + 14) {
State->BufferSize = lsb_32 (&BIH[0]) + 14;
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
#if DUMPBIH
DumpBIH(BIH);
#endif
State->Header.size = GUINT32_FROM_LE (* (guint32 *) &BIH[0]);
State->Header.size = lsb_32 (&BIH[0]);
if (State->Header.size == 40) {
State->Header.width = GINT32_FROM_LE (* (gint32 *) &BIH[4]);
State->Header.height = GINT32_FROM_LE (* (gint32 *) &BIH[8]);
State->Header.depth = GUINT16_FROM_LE (* (guint16 *) &BIH[14]);
State->Compressed = GUINT32_FROM_LE (* (guint32 *) &BIH[16]);
State->Header.width = lsb_32 (&BIH[4]);
State->Header.height = lsb_32 (&BIH[8]);
State->Header.depth = lsb_16 (&BIH[14]);
State->Compressed = lsb_32 (&BIH[16]);
} else if (State->Header.size == 12) {
State->Header.width = GUINT16_FROM_LE (* (guint16 *) &BIH[4]);
State->Header.height = GUINT16_FROM_LE (* (guint16 *) &BIH[6]);
State->Header.depth = GUINT16_FROM_LE (* (guint16 *) &BIH[10]);
State->Header.width = lsb_16 (&BIH[4]);
State->Header.height = lsb_16 (&BIH[6]);
State->Header.depth = lsb_16 (&BIH[10]);
State->Compressed = BI_RGB;
} else {
g_set_error (error,
@@ -368,7 +393,7 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
State->BufferDone = 0;
if (State->Type <= 8) {
State->read_state = READ_STATE_PALETTE;
State->BufferSize = GUINT32_FROM_LE (* (guint32 *) &BFH[10]) - 14 - State->Header.size;
State->BufferSize = lsb_32 (&BFH[10]) - 14 - State->Header.size;
} else if (State->Compressed == BI_RGB) {
State->read_state = READ_STATE_DATA;
State->BufferSize = State->LineWidth;
@@ -384,12 +409,13 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
return FALSE;
}
State->buff = g_realloc (State->buff, State->BufferSize);
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
static void DecodeColormap (guchar *buff,
static gboolean DecodeColormap (guchar *buff,
struct bmp_progressive_state *State,
GError **error)
{
@@ -404,6 +430,12 @@ static void DecodeColormap (guchar *buff,
State->Colormap[i][0] = buff[i * (State->Header.size == 12 ? 3 : 4)];
State->Colormap[i][1] = buff[i * (State->Header.size == 12 ? 3 : 4) + 1];
State->Colormap[i][2] = buff[i * (State->Header.size == 12 ? 3 : 4) + 2];
#ifdef DUMPCMAP
g_print ("color %d %x %x %x\n", i,
State->Colormap[i][0],
State->Colormap[i][1],
State->Colormap[i][2]);
#endif
}
State->read_state = READ_STATE_DATA;
@@ -414,7 +446,10 @@ static void DecodeColormap (guchar *buff,
else
State->BufferSize = State->LineWidth;
State->buff = g_realloc (State->buff, State->BufferSize);
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
/* Finds the lowest set bit and the number of set bits */
@@ -433,8 +468,10 @@ find_bits (int n, int *lowest, int *n_set)
}
/* Decodes the 3 shorts that follow for the bitmasks for BI_BITFIELDS coding */
static void
decode_bitmasks (struct bmp_progressive_state *State, guchar *buf)
static gboolean
decode_bitmasks (guchar *buf,
struct bmp_progressive_state *State,
GError **error)
{
State->r_mask = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
buf += 4;
@@ -462,7 +499,10 @@ decode_bitmasks (struct bmp_progressive_state *State, guchar *buf)
State->read_state = READ_STATE_DATA;
State->BufferDone = 0;
State->BufferSize = State->LineWidth;
State->buff = g_realloc (State->buff, State->BufferSize);
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
/*
@@ -677,6 +717,8 @@ static void OneLine16(struct bmp_progressive_state *context)
*pixels++ = (r << 3) | (r >> 2);
*pixels++ = (g << 3) | (g >> 2);
*pixels++ = (b << 3) | (b >> 2);
src += 2;
}
}
@@ -799,7 +841,9 @@ static void OneLine(struct bmp_progressive_state *context)
if (context->updated_func != NULL) {
(*context->updated_func) (context->pixbuf,
0,
context->Lines,
(context->Header.Negative ?
(context->Lines - 1) :
(context->Header.height - context->Lines)),
context->Header.width,
1,
context->user_data);
@@ -807,8 +851,8 @@ static void OneLine(struct bmp_progressive_state *context)
}
}
static void
DoCompressed(struct bmp_progressive_state *context)
static gboolean
DoCompressed(struct bmp_progressive_state *context, GError **error)
{
gint count, pos;
switch (context->compr.phase) {
@@ -881,7 +925,8 @@ DoCompressed(struct bmp_progressive_state *context)
if (context->Type == 8)
context->compr.RunCount *= 2;
context->BufferSize = (context->compr.RunCount + 3) / 4 * 2;
context->buff = g_realloc (context->buff, context->BufferSize);
if (!grow_buffer (context, error))
return FALSE;
}
}
context->BufferDone = 0;
@@ -927,13 +972,16 @@ DoCompressed(struct bmp_progressive_state *context)
}
context->compr.phase = 0;
context->BufferSize = 2;
context->buff = g_realloc (context->buff, context->BufferSize);
if (!grow_buffer (context, error))
return FALSE;
context->BufferDone = 0;
break;
case 2:
context->BufferDone = 0;
break;
}
return TRUE;
}
/*
@@ -988,18 +1036,20 @@ gdk_pixbuf__bmp_image_load_increment(gpointer data,
break;
case READ_STATE_PALETTE:
DecodeColormap (context->buff, context, error);
if (!DecodeColormap (context->buff, context, error))
return FALSE;
break;
case READ_STATE_BITMASKS:
decode_bitmasks (context, context->buff);
if (!decode_bitmasks (context->buff, context, error))
return FALSE;
break;
case READ_STATE_DATA:
if (context->Compressed == BI_RGB || context->Compressed == BI_BITFIELDS)
OneLine (context);
else
DoCompressed (context);
else if (!DoCompressed (context, error))
return FALSE;
break;
+15 -2
View File
@@ -534,6 +534,17 @@ gif_lzw_clear_code (GifContext *context)
return 0;
}
#define CHECK_LZW_SP() G_STMT_START { \
if ((guchar *)context->lzw_sp >= \
(guchar *)context->lzw_stack + sizeof (context->lzw_stack)) { \
g_set_error (context->error, \
GDK_PIXBUF_ERROR, \
GDK_PIXBUF_ERROR_CORRUPT_IMAGE, \
_("Stack overflow")); \
return -2; \
} \
} G_STMT_END
static int
lzw_read_byte (GifContext *context)
{
@@ -608,19 +619,20 @@ lzw_read_byte (GifContext *context)
incode = code;
if (code >= context->lzw_max_code) {
CHECK_LZW_SP ();
*(context->lzw_sp)++ = context->lzw_firstcode;
code = context->lzw_oldcode;
}
while (code >= context->lzw_clear_code) {
if ((code >= (1 << MAX_LZW_BITS))
|| (context->lzw_sp >= context->lzw_stack + ((1 << (MAX_LZW_BITS)) * 2 + 1))) {
if (code >= (1 << MAX_LZW_BITS)) {
g_set_error (context->error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Bad code encountered"));
return -2;
}
CHECK_LZW_SP ();
*(context->lzw_sp)++ = context->lzw_table[1][code];
if (code == context->lzw_table[0][code]) {
@@ -633,6 +645,7 @@ lzw_read_byte (GifContext *context)
code = context->lzw_table[0][code];
}
CHECK_LZW_SP ();
*(context->lzw_sp)++ = context->lzw_firstcode = context->lzw_table[1][code];
if ((code = context->lzw_max_code) < (1 << MAX_LZW_BITS)) {
+4 -3
View File
@@ -341,7 +341,7 @@ static void DecodeHeader(guchar *Data, gint Bytes,
return;
}
State->Header.height =
(int)(BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8])/2;
(int)((BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8]))/2;
/* /2 because the BIH height includes the transparency mask */
if (State->Header.height == 0) {
g_set_error (error,
@@ -493,6 +493,7 @@ gdk_pixbuf__ico_image_begin_load(ModulePreparedNotifyFunc prepared_func,
context->HeaderSize = 54;
context->HeaderBuf = g_try_malloc(14 + 40 + 4*256 + 512);
if (!context->HeaderBuf) {
g_free (context);
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
@@ -795,9 +796,9 @@ static void OneLine(struct ico_progressive_state *context)
if (context->updated_func != NULL) {
(*context->updated_func) (context->pixbuf,
0,
context->Lines,
context->Lines % context->Header.height,
context->Header.width,
context->Header.height,
1,
context->user_data);
}
+113 -35
View File
@@ -26,21 +26,6 @@
*/
/*
Progressive file loading notes (11/03/1999) <drmike@redhat.com>...
These are issues I know of and will be dealing with shortly:
- Currently does not handle progressive jpegs - this
requires a change in the way image_load_increment () calls
libjpeg. Progressive jpegs are rarer but I will add this
support asap.
- error handling is not as good as it should be
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
@@ -150,6 +135,7 @@ explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 1);
g_return_if_fail (cinfo->out_color_space == JCS_GRAYSCALE);
/* Expand grey->colour. Expand from the end of the
* memory down, so we can use the same buffer.
@@ -170,6 +156,43 @@ explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
}
}
static void
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
guchar **lines)
{
gint i, j;
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 4);
g_return_if_fail (cinfo->out_color_space == JCS_CMYK);
for (i = cinfo->rec_outbuf_height - 1; i >= 0; i--) {
guchar *p;
p = lines[i];
for (j = 0; j < cinfo->image_width; j++) {
int c, m, y, k;
c = p[0];
m = p[1];
y = p[2];
k = p[3];
if (cinfo->saw_Adobe_marker) {
p[0] = k*c / 255;
p[1] = k*m / 255;
p[2] = k*y / 255;
}
else {
p[0] = (255 - k)*(255 - c) / 255;
p[1] = (255 - k)*(255 - m) / 255;
p[2] = (255 - k)*(255 - y) / 255;
}
p[3] = 255;
p += 4;
}
}
}
typedef struct {
struct jpeg_source_mgr pub; /* public fields */
@@ -234,6 +257,20 @@ stdio_term_source (j_decompress_ptr cinfo)
{
}
static gchar *
colorspace_name (const J_COLOR_SPACE jpeg_color_space)
{
switch (jpeg_color_space) {
case JCS_UNKNOWN: return "UNKNOWN";
case JCS_GRAYSCALE: return "GRAYSCALE";
case JCS_RGB: return "RGB";
case JCS_YCbCr: return "YCbCr";
case JCS_CMYK: return "CMYK";
case JCS_YCCK: return "YCCK";
default: return "invalid";
}
}
/* Shared library entry point */
static GdkPixbuf *
gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
@@ -292,8 +329,10 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
cinfo.do_fancy_upsampling = FALSE;
cinfo.do_block_smoothing = FALSE;
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, cinfo.output_width, cinfo.output_height);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
cinfo.out_color_components == 4 ? TRUE : FALSE,
8, cinfo.output_width, cinfo.output_height);
if (!pixbuf) {
jpeg_destroy_decompress (&cinfo);
@@ -313,7 +352,6 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
dptr = pixbuf->pixels;
/* decompress all the lines, a few at a time */
while (cinfo.output_scanline < cinfo.output_height) {
lptr = lines;
for (i = 0; i < cinfo.rec_outbuf_height; i++) {
@@ -323,8 +361,29 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
jpeg_read_scanlines (&cinfo, lines, cinfo.rec_outbuf_height);
if (cinfo.output_components == 1)
explode_gray_into_buf (&cinfo, lines);
switch (cinfo.out_color_space) {
case JCS_GRAYSCALE:
explode_gray_into_buf (&cinfo, lines);
break;
case JCS_RGB:
/* do nothing */
break;
case JCS_CMYK:
convert_cmyk_to_rgb (&cinfo, lines);
break;
default:
g_object_unref (pixbuf);
if (error && *error == NULL) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("Unsupported JPEG color space (%s)"),
colorspace_name (cinfo.out_color_space));
}
jpeg_destroy_decompress (&cinfo);
return NULL;
}
}
jpeg_finish_decompress (&cinfo);
@@ -587,8 +646,17 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
context->got_header = TRUE;
} else if (!context->did_prescan) {
int rc;
/* start decompression */
cinfo->buffered_image = TRUE;
rc = jpeg_start_decompress (cinfo);
cinfo->do_fancy_upsampling = FALSE;
cinfo->do_block_smoothing = FALSE;
context->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
FALSE,
cinfo->output_components == 4 ? TRUE : FALSE,
8,
cinfo->image_width,
cinfo->image_height);
@@ -609,15 +677,6 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
NULL,
context->user_data);
} else if (!context->did_prescan) {
int rc;
/* start decompression */
cinfo->buffered_image = TRUE;
rc = jpeg_start_decompress (cinfo);
cinfo->do_fancy_upsampling = FALSE;
cinfo->do_block_smoothing = FALSE;
if (rc == JPEG_SUSPENDED)
continue;
@@ -653,10 +712,28 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
if (nlines == 0)
break;
/* handle gray */
if (cinfo->output_components == 1)
explode_gray_into_buf (cinfo, lines);
switch (cinfo->out_color_space) {
case JCS_GRAYSCALE:
explode_gray_into_buf (cinfo, lines);
break;
case JCS_RGB:
/* do nothing */
break;
case JCS_CMYK:
convert_cmyk_to_rgb (cinfo, lines);
break;
default:
if (error && *error == NULL) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("Unsupported JPEG color space (%s)"),
colorspace_name (cinfo->out_color_space));
}
return FALSE;
}
context->dptr += nlines * context->pixbuf->rowstride;
/* send updated signal */
@@ -810,7 +887,8 @@ gdk_pixbuf__jpeg_image_save (FILE *f,
}
/* finish off */
jpeg_finish_compress (&cinfo);
jpeg_finish_compress (&cinfo);
jpeg_destroy_compress(&cinfo);
g_free (buf);
return TRUE;
}
+1 -1
View File
@@ -859,7 +859,7 @@ gdk_pixbuf__png_image_save (FILE *f,
png_write_end (png_ptr, info_ptr);
cleanup:
png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
png_destroy_write_struct (&png_ptr, &info_ptr);
if (num_keys > 0) {
for (i = 0; i < num_keys; i++)
+58 -7
View File
@@ -85,7 +85,7 @@ struct ras_progressive_state {
8 = 8 bit colormapped
1 = 1 bit bitonal
*/
gint DecoderState;
struct rasterfile Header; /* Decoded (BE->CPU) header */
@@ -181,6 +181,14 @@ static gboolean RAS2State(struct rasterfile *RAS,
return FALSE;
}
if (State->Header.type > 2 || State->Header.maptype > 1) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("unsupported RAS image variation"));
return FALSE;
}
/* Now pad the line to be a multiple of 16 bits */
if ((State->LineWidth & 1) != 0)
State->LineWidth++;
@@ -266,7 +274,8 @@ gdk_pixbuf__ras_image_begin_load(ModulePreparedNotifyFunc prepared_func,
context->Lines = 0;
context->RasType = 0;
context->DecoderState = 0;
memset(&context->Header, 0, sizeof(struct rasterfile));
@@ -349,6 +358,7 @@ static void OneLine8(struct ras_progressive_state *context)
{
gint X;
guchar *Pixels;
int offset = context->Header.maplength / 3;
X = 0;
Pixels = context->pixbuf->pixels + context->pixbuf->rowstride * context->Lines;
@@ -357,9 +367,9 @@ static void OneLine8(struct ras_progressive_state *context)
Pixels[X * 3 + 0] =
context->HeaderBuf[context->LineBuf[X] + 32];
Pixels[X * 3 + 1] =
context->HeaderBuf[context->LineBuf[X] + 256 + 32];
context->HeaderBuf[context->LineBuf[X] + offset + 32];
Pixels[X * 3 + 2] =
context->HeaderBuf[context->LineBuf[X] + 512 + 32];
context->HeaderBuf[context->LineBuf[X] + 2*offset + 32];
X++;
}
}
@@ -410,12 +420,48 @@ static void OneLine(struct ras_progressive_state *context)
0,
context->Lines,
context->Header.width,
context->Header.height,
1,
context->user_data);
}
}
static gboolean
DoCompressed (struct ras_progressive_state *context,
const guchar * buf, guint size,
GError **error)
{
int i;
for (i = 0; i < size; i++) {
switch (context->DecoderState) {
case 0:
if (buf[i] == 0x80)
context->DecoderState = 1;
else
context->LineBuf[context->LineDone++] = buf[i];
break;
case 1:
if (buf[i] == 0) {
context->LineBuf[context->LineDone++] = 0x80;
context->DecoderState = 0;
}
else
context->DecoderState = buf[i] + 1;
break;
default:
for (; context->DecoderState; context->DecoderState--) {
context->LineBuf[context->LineDone++] = buf[i];
if ((context->LineDone >= context->LineWidth) && (context->LineWidth > 0))
OneLine(context);
}
}
if ((context->LineDone >= context->LineWidth) && (context->LineWidth > 0))
OneLine(context);
}
return TRUE;
}
/*
* context - from image_begin_load
* buf - new image data
@@ -448,8 +494,13 @@ gdk_pixbuf__ras_image_load_increment(gpointer data,
buf += BytesToCopy;
context->HeaderDone += BytesToCopy;
} else {
/* Pixeldata only */
} else if (context->Header.type == 2) {
if (!DoCompressed (context, buf, size, error)) {
return FALSE;
}
size = 0;
}
else {
BytesToCopy =
context->LineWidth - context->LineDone;
if (BytesToCopy > size)
+35 -4
View File
@@ -119,16 +119,20 @@ tiff_set_error (GError **error,
/* Take the error message from libtiff and merge it with
* some context we provide.
*/
if (global_error) {
g_set_error (error,
GDK_PIXBUF_ERROR,
error_code,
"%s%s%s",
msg, global_error ? ": " : "", global_error);
"%s%s%s", msg, ": ", global_error);
if (global_error) {
g_free (global_error);
global_error = NULL;
}
else {
g_set_error (error,
GDK_PIXBUF_ERROR,
error_code, msg);
}
}
@@ -256,6 +260,14 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
return NULL;
}
if (img.put.any == NULL) {
tiff_set_error (error,
GDK_PIXBUF_ERROR_FAILED,
_("Unsupported TIFF variant"));
g_object_unref (pixbuf);
return NULL;
}
if (img.isContig) {
tiff_put_contig = img.put.contig;
img.put.contig = put_contig;
@@ -268,6 +280,21 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
TIFFRGBAImageGet (&img, (uint32 *)pixels, width, height);
TIFFRGBAImageEnd (&img);
#ifdef WORDS_BIGENDIAN
/* Turns out that the packing used by TIFFRGBAImage depends on the host byte order... */
while (pixels < pixbuf->pixels + bytes) {
uint32 pixel = *(uint32 *)pixels;
int r = TIFFGetR(pixel);
int g = TIFFGetG(pixel);
int b = TIFFGetB(pixel);
int a = TIFFGetA(pixel);
*pixels++ = r;
*pixels++ = g;
*pixels++ = b;
*pixels++ = a;
}
#endif
G_UNLOCK (tiff_loader);
if (context)
(* context->update_func) (pixbuf, 0, 0, width, height, context->user_data);
@@ -461,16 +488,20 @@ gdk_pixbuf__tiff_image_stop_load (gpointer data,
if (pixbuf)
g_object_unref (pixbuf);
retval = pixbuf != NULL;
TIFFClose (tiff);
if (global_error)
{
tiff_set_error (error,
GDK_PIXBUF_ERROR_FAILED,
_("Failed to load TIFF image"));
tiff_pop_handlers ();
retval = FALSE;
}
}
if (tiff)
TIFFClose (tiff);
g_assert (!global_error);
g_free (context->buffer);
+2
View File
@@ -244,6 +244,7 @@ read_bitmap_file_data (FILE *fstream,
*ptr=value;
}
}
break;
}
if (!bits)
@@ -323,6 +324,7 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
}
pixels += row_stride;
}
g_free (data);
if (context) {
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
+3 -3
View File
@@ -1209,7 +1209,7 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
GError **error)
{
gint w, h, n_col, cpp;
gint cnt, xcnt, ycnt, wbytes, n, ns;
gint cnt, xcnt, ycnt, wbytes, n;
gint is_trans = FALSE;
const gchar *buffer;
gchar *name_buf;
@@ -1322,9 +1322,10 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
}
wbytes = w * cpp;
pixtmp = pixbuf->pixels;
for (ycnt = 0; ycnt < h; ycnt++) {
pixtmp = pixbuf->pixels + ycnt * pixbuf->rowstride;
buffer = (*get_buf) (op_body, handle);
if ((!buffer) || (strlen (buffer) < wbytes))
continue;
@@ -1332,7 +1333,6 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
for (n = 0, cnt = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) {
strncpy (pixel_str, &buffer[n], cpp);
pixel_str[cpp] = 0;
ns = 0;
color = g_hash_table_lookup (color_hash, pixel_str);
@@ -4,8 +4,7 @@ gcc2_compiled.:
.text
.align 16
#ifndef __MINGW32__
#if !defined(__MINGW32__) && !defined(__CYGWIN__)
.globl pixops_composite_line_22_4a4_mmx
.type pixops_composite_line_22_4a4_mmx,@function
pixops_composite_line_22_4a4_mmx:
@@ -4,7 +4,7 @@ gcc2_compiled.:
.text
.align 16
#ifndef __MINGW32__
#if !defined(__MINGW32__) && !defined(__CYGWIN__)
.globl pixops_composite_line_color_22_4a4_mmx
.type pixops_composite_line_color_22_4a4_mmx,@function
+1 -1
View File
@@ -4,7 +4,7 @@ gcc2_compiled.:
.text
.align 16
#ifndef __MINGW32__
#if !defined(__MINGW32__) && !defined(__CYGWIN__)
.globl pixops_have_mmx
.type pixops_have_mmx,@function
+15 -10
View File
@@ -493,13 +493,13 @@ composite_line_22_4a4 (int *weights, int n_x, int n_y,
b += ta * q0[6];
a += ta;
ta = w3 * q0[3];
r += ta * q0[0];
g += ta * q0[1];
b += ta * q0[2];
ta = w3 * q1[3];
r += ta * q1[0];
g += ta * q1[1];
b += ta * q1[2];
a += ta;
ta += w4 * q1[7];
ta = w4 * q1[7];
r += ta * q1[4];
g += ta * q1[5];
b += ta * q1[6];
@@ -881,16 +881,15 @@ scale_line_22_33 (int *weights, int n_x, int n_y,
g += w3 * q1[1];
b += w3 * q1[2];
r += w4 * q1[4];
g += w4 * q1[5];
b += w4 * q1[6];
r += w4 * q1[3];
g += w4 * q1[4];
b += w4 * q1[5];
dest[0] = (r + 0x8000) >> 16;
dest[1] = (g + 0x8000) >> 16;
dest[2] = (b + 0x8000) >> 16;
dest += 3;
x += x_step;
}
@@ -1430,10 +1429,13 @@ pixops_composite_color (guchar *dest_buf,
return;
if (!src_has_alpha && overall_alpha == 255)
{
pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels,
src_has_alpha, scale_x, scale_y, interp_type);
return;
}
switch (interp_type)
{
@@ -1481,7 +1483,7 @@ pixops_composite_color (guchar *dest_buf,
* @render_x0: x0 of region of scaled source to store into @dest_buf
* @render_y0: y0 of region of scaled source to store into @dest_buf
* @render_x1: x1 of region of scaled source to store into @dest_buf
* @render_y1: x1 of region of scaled source to store into @dest_buf
* @render_y1: y1 of region of scaled source to store into @dest_buf
* @dest_rowstride: rowstride of @dest_buf
* @dest_channels: number of channels in @dest_buf
* @dest_has_alpha: whether @dest_buf has alpha
@@ -1533,10 +1535,13 @@ pixops_composite (guchar *dest_buf,
return;
if (!src_has_alpha && overall_alpha == 255)
{
pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels,
src_has_alpha, scale_x, scale_y, interp_type);
return;
}
switch (interp_type)
{
+1 -1
View File
@@ -4,7 +4,7 @@ gcc2_compiled.:
.text
.align 16
#ifndef __MINGW32__
#if !defined(__MINGW32__) && !defined(__CYGWIN__)
.globl pixops_scale_line_22_33_mmx
.type pixops_scale_line_22_33_mmx,@function
+1567 -875
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -11,3 +11,4 @@ gdkenumtypes.[ch]
libgdk.la
gdkconfig.h
stamp-gc-h
stamp-gdkenumtypes.h
+28 -9
View File
@@ -42,7 +42,7 @@ gdk_win32_symbols = -export-symbols gdk.def
install-libtool-import-lib:
$(INSTALL) .libs/libgdk-win32-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libdk-win32-$(GTK_API_VERSION).dll.a
-rm $(DESTDIR)$(libdir)/libgdk-win32-$(GTK_API_VERSION).dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
@@ -68,6 +68,7 @@ endif
# since automake doesn't support conditionalized libsomething_la_LDFLAGS
# we use the general approach here
LDFLAGS = @STRIP_BEGIN@ \
@LDFLAGS@ \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic \
-rpath $(libdir) \
@@ -164,7 +165,7 @@ lib_LTLIBRARIES = $(gdktargetlib)
EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la
MAINTAINERCLEANFILES =
MAINTAINERCLEANFILES = gdkenumtypes.h stamp-gdkenumtypes.h
EXTRA_HEADERS =
#
@@ -185,15 +186,33 @@ if DISABLE_EXPLICIT_DEPS
endif
#note: not gdkconfig.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.c gdkenumtypes.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.h
gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
cd $(srcdir) \
&& $(PERL) ./makeenums.pl include $(gdk_public_h_sources) > gdkenumtypes.h
# Generate built header without using automake-1.4 BUILT_SOURCES
$(libgdk_x11_2_0_la_OBJECTS) $(libgdk_linux_fb_2_0_la_OBJECTS) $(libgdk_win32_2_0_la_OBJECTS): gdkenumtypes.h
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
cd $(srcdir) \
&& $(PERL) ./makeenums.pl cfile $(gdk_public_h_sources) > gdkenumtypes.c
$(srcdir)/gdkenumtypes.h: stamp-gdkenumtypes.h
@true
stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#ifndef __GDK_ENUM_TYPES_H__\n#define __GDK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __GDK_ENUM_TYPES_H__ */" \
$(gdk_public_h_sources) ) >> xgen-geth \
&& (cmp -s xgen-geth $(srcdir)/gdkenumtypes.h || cp xgen-geth $(srcdir)/gdkenumtypes.h ) \
&& rm -f xgen-geth \
&& echo timestamp > $(@F)
$(srcdir)/gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#define GDK_ENABLE_BROKEN\n#include \"gdk.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
$(gdk_public_h_sources) ) > xgen-getc \
&& cp xgen-getc $(srcdir)/gdkenumtypes.c \
&& rm -f xgen-getc
gdkconfig.h: stamp-gc-h
@if test -f gdkconfig.h; then :; \
-2
View File
@@ -136,8 +136,6 @@ EXPORTS
gdk_flush
gdk_font_equal
gdk_font_from_description
gdk_font_full_name_free
gdk_font_full_name_get
gdk_font_get_type
gdk_font_id
gdk_font_load
-6
View File
@@ -92,12 +92,6 @@ void gdk_string_extents (GdkFont *font,
gint *ascent,
gint *descent);
#ifdef GDK_WINDOWING_WIN32
/* Ditto temporary */
gchar* gdk_font_full_name_get (GdkFont *font);
void gdk_font_full_name_free (gchar *name);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
+9 -3
View File
@@ -104,9 +104,15 @@ gdk_gc_new_with_values (GdkDrawable *drawable,
if (values_mask & GDK_GC_TS_Y_ORIGIN)
gc->ts_y_origin = values->ts_y_origin;
gc->colormap = gdk_drawable_get_colormap (drawable);
if (gc->colormap)
g_object_ref (G_OBJECT (gc->colormap));
/* gc->colormap will already be set if gdk_gc_new_with_values()
* recurses - as in GdkPixmap => impl object.
*/
if (!gc->colormap)
{
gc->colormap = gdk_drawable_get_colormap (drawable);
if (gc->colormap)
g_object_ref (G_OBJECT (gc->colormap));
}
return gc;
}
+1 -1
View File
@@ -275,7 +275,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
tmp.green = foreground->green;
}
fg_gc = gdk_pango_get_gc (drawable, context, fg_set ? &tmp : NULL,
fg_gc = gdk_pango_get_gc (drawable, context, (fg_set || foreground) ? &tmp : NULL,
stipple, gc);
}
else
+35 -34
View File
@@ -204,9 +204,9 @@ rgb1 (GdkImage *image,
(0x80 >> (xx & 7)) :
(1 << (xx & 7)));
*o++ = colormap->colors[data].red;
*o++ = colormap->colors[data].green;
*o++ = colormap->colors[data].blue;
*o++ = colormap->colors[data].red >> 8;
*o++ = colormap->colors[data].green >> 8;
*o++ = colormap->colors[data].blue >> 8;
}
srow += bpl;
orow += rowstride;
@@ -251,9 +251,9 @@ rgb1a (GdkImage *image,
(0x80 >> (xx & 7)) :
(1 << (xx & 7)));
*o++ = colormap->colors[data].red;
*o++ = colormap->colors[data].green;
*o++ = colormap->colors[data].blue;
*o++ = colormap->colors[data].red >> 8;
*o++ = colormap->colors[data].green >> 8;
*o++ = colormap->colors[data].blue >> 8;
*o++ = 255;
}
srow += bpl;
@@ -296,9 +296,9 @@ rgb8 (GdkImage *image,
for (xx = x1; xx < x2; xx++)
{
data = *s++ & mask;
*o++ = colormap->colors[data].red;
*o++ = colormap->colors[data].green;
*o++ = colormap->colors[data].blue;
*o++ = colormap->colors[data].red >> 8;
*o++ = colormap->colors[data].green >> 8;
*o++ = colormap->colors[data].blue >> 8;
}
srow += bpl;
orow += rowstride;
@@ -338,14 +338,14 @@ rgb8a (GdkImage *image,
{
#ifdef LITTLE
remap[xx] = 0xff000000
| colormap->colors[xx].blue << 16
| colormap->colors[xx].green << 8
| colormap->colors[xx].red;
| (colormap->colors[xx].blue & 0xff00) << 8
| (colormap->colors[xx].green & 0xff00)
| (colormap->colors[xx].red >> 8);
#else
remap[xx] = 0xff
| colormap->colors[xx].red << 24
| colormap->colors[xx].green << 16
| colormap->colors[xx].blue << 8;
| (colormap->colors[xx].red & 0xff00) << 16
| (colormap->colors[xx].green & 0xff00) << 8
| (colormap->colors[xx].blue & 0xff00);
#endif
}
@@ -437,14 +437,15 @@ rgb565lsb (GdkImage *image,
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
/* swap endianness first */
data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;
data = s[1] << 24 | s[0] << 16 | s[3] << 8 | s[2];
s += 4;
*o++ = (data & 0xf800) | (data & 0xe000) >> 5
| (data & 0x7e0) >> 3 | (data & 0x600) >> 9;
*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
| (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;
*o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17
| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
*o++ = (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21
| (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25;
*o++ = (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10
| (data & 0xf800) >> 8 | (data & 0xe000) >> 13;
*o++ = (data & 0x7e0) << 5 | (data & 0x600) >> 1
| (data & 0x1f) << 3 | (data & 0x1c) >> 2;
#endif
}
/* check for last remaining pixel */
@@ -544,12 +545,12 @@ rgb565msb (GdkImage *image,
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
data = *s++;
*o++ = (data & 0xf800) | (data & 0xe000) >> 5
| (data & 0x7e0) >> 3 | (data & 0x600) >> 9;
*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
| (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;
*o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17
| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
*o++ = (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21
| (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25;
*o++ = (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10
| (data & 0xf800) >> 8 | (data & 0xe000) >> 13;
*o++ = (data & 0x7e0) << 5 | (data & 0x600) >> 1
| (data & 0x1f) << 3 | (data & 0x1c) >> 2;
#endif
}
/* check for last remaining pixel */
@@ -1235,9 +1236,9 @@ convert_real_slow (GdkImage *image,
case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_PSEUDO_COLOR:
*o++ = cmap->colors[pixel].red;
*o++ = cmap->colors[pixel].green;
*o++ = cmap->colors[pixel].blue;
*o++ = cmap->colors[pixel].red >> 8;
*o++ = cmap->colors[pixel].green >> 8;
*o++ = cmap->colors[pixel].blue >> 8;
break;
case GDK_VISUAL_TRUE_COLOR:
/* This is odd because it must sometimes shift left (otherwise
@@ -1258,9 +1259,9 @@ convert_real_slow (GdkImage *image,
*o++ = component;
break;
case GDK_VISUAL_DIRECT_COLOR:
*o++ = cmap->colors[((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> 24].red;
*o++ = cmap->colors[((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> 24].green;
*o++ = cmap->colors[((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> 24].blue;
*o++ = cmap->colors[((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> 24].red >> 8;
*o++ = cmap->colors[((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> 24].green >> 8;
*o++ = cmap->colors[((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> 24].blue >> 8;
break;
}
if (alpha)
+12 -5
View File
@@ -180,7 +180,7 @@ gdk_rgb_make_colorcube (GdkRgbInfo *image_info, gulong *pixels,
{
image_info->colorcube[i] = pixels[rt[i >> 8] + gt[(i >> 4) & 0x0f] + bt[i & 0x0f]];
#ifdef VERBOSE
g_print ("%03x %02x %x %x %x\n", i, image-info->colorcube[i], rt[i >> 8], gt[(i >> 4) & 0x0f], bt[i & 0x0f]);
g_print ("%03x %02x %x %x %x\n", i, image_info->colorcube[i], rt[i >> 8], gt[(i >> 4) & 0x0f], bt[i & 0x0f]);
#endif
}
}
@@ -268,7 +268,8 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force,
}
#endif
if (colors_needed)
if (colors_needed &&
image_info->visual->type != GDK_VISUAL_STATIC_COLOR)
{
if (!gdk_colors_alloc (cmap, 0, NULL, 0, junk, colors_needed))
{
@@ -637,7 +638,8 @@ gdk_rgb_create_info (GdkVisual *visual, GdkColormap *colormap)
gdk_rgb_colorcube_222 (image_info);
}
else if (image_info->visual->type == GDK_VISUAL_PSEUDO_COLOR)
else if (image_info->visual->type == GDK_VISUAL_PSEUDO_COLOR
|| image_info->visual->type == GDK_VISUAL_STATIC_COLOR)
{
if (!image_info->cmap &&
(gdk_rgb_install_cmap || image_info->visual != gdk_visual_get_system ()))
@@ -2991,7 +2993,9 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
}
else if (bpp == 8 &&
depth <= 8 &&
depth > 4 &&
(vtype == GDK_VISUAL_PSEUDO_COLOR
|| vtype == GDK_VISUAL_STATIC_COLOR
#ifdef ENABLE_GRAYSCALE
|| vtype == GDK_VISUAL_GRAYSCALE
#endif
@@ -3314,6 +3318,7 @@ gdk_draw_gray_image (GdkDrawable *drawable,
if (image_info->bpp == 1 &&
image_info->gray_cmap == NULL &&
(image_info->visual->type == GDK_VISUAL_PSEUDO_COLOR ||
image_info->visual->type == GDK_VISUAL_STATIC_COLOR ||
image_info->visual->type == GDK_VISUAL_GRAYSCALE))
gdk_rgb_make_gray_cmap (image_info);
@@ -3337,9 +3342,10 @@ gdk_rgb_cmap_get_info (GdkRgbCmap *cmap,
int i, j;
guint32 rgb;
/* We only need a LUT for pseudo-color and grayscale cmaps */
/* We don't need a LUT for TrueColor or DirectColor visuals */
if (image_info->bpp != 1 ||
!(image_info->visual->type == GDK_VISUAL_PSEUDO_COLOR ||
image_info->visual->type == GDK_VISUAL_STATIC_COLOR ||
image_info->visual->type == GDK_VISUAL_GRAYSCALE))
return NULL;
@@ -3363,7 +3369,7 @@ gdk_rgb_cmap_get_info (GdkRgbCmap *cmap,
((rgb & 0xf000) >> 8) |
((rgb & 0xf0) >> 4);
#ifdef VERBOSE
g_print ("%d %x %x %d\n", i, j, image_info->colorcube[j]);
g_print ("%d %x %x\n", i, j, image_info->colorcube[j]);
#endif
cmap_info->lut[i] = image_info->colorcube[j];
}
@@ -3403,6 +3409,7 @@ gdk_rgb_cmap_free (GdkRgbCmap *cmap)
GdkRgbCmapInfo *cmap_info = tmp_list->data;
cmap_info->image_info->cmap_info_list = g_slist_remove (cmap_info->image_info->cmap_info_list, cmap_info);
g_free (cmap_info);
tmp_list = tmp_list->next;
}
g_slist_free (cmap->info_list);
+2
View File
@@ -2148,7 +2148,9 @@ gdk_window_process_all_updates (void)
static gboolean
gdk_window_update_idle (gpointer data)
{
GDK_THREADS_ENTER ();
gdk_window_process_all_updates ();
GDK_THREADS_LEAVE ();
return FALSE;
}
-5
View File
@@ -19,11 +19,6 @@ INCLUDES = @STRIP_BEGIN@ \
@GTK_DEBUG_FLAGS@ \
@STRIP_END@
LDFLAGS = @STRIP_BEGIN@ \
@GDK_DEP_LIBS@ \
-lm \
@STRIP_END@
noinst_LTLIBRARIES = libgdk-linux-fb.la
libgdkinclude_HEADERS= \
-86
View File
@@ -117,92 +117,6 @@ gdk_colormap_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gint
palette_size (HPALETTE hpal)
{
WORD npal = 0;
if (!GetObject (hpal, sizeof (npal), &npal))
WIN32_GDI_FAILED ("GetObject (HPALETTE)");
return npal;
}
#ifdef G_ENABLE_DEBUG
gchar *
gdk_win32_color_to_string (const GdkColor *color)
{
static char buf[100];
sprintf (buf, "(%.04x,%.04x,%.04x):%.06x",
color->red, color->green, color->blue, color->pixel);
return buf;
}
void
gdk_win32_print_paletteentries (const PALETTEENTRY *pep,
const int nentries)
{
char buf[20];
int i;
for (i = 0; i < nentries; i++)
g_print (" %3d %02x: %02x %02x %02x%s\n",
i, i,
pep[i].peRed, pep[i].peGreen, pep[i].peBlue,
(pep[i].peFlags == 0 ? "" :
(pep[i].peFlags == PC_EXPLICIT ? " PC_EXPLICIT" :
(pep[i].peFlags == PC_NOCOLLAPSE ? " PC_NOCOLLAPSE" :
(pep[i].peFlags == PC_RESERVED ? " PC_RESERVED" :
(sprintf (buf, " %d", pep[i].peFlags), buf))))));
}
void
gdk_win32_print_system_palette (void)
{
PALETTEENTRY *pe;
int k;
k = GetSystemPaletteEntries (gdk_display_hdc, 0, 0, NULL);
pe = g_new (PALETTEENTRY, k);
k = GetSystemPaletteEntries (gdk_display_hdc, 0, k, pe);
if (!k)
g_print ("GetSystemPaletteEntries failed: %s\n",
g_win32_error_message (GetLastError ()));
else
{
g_print ("System palette: %d entries\n", k);
gdk_win32_print_paletteentries (pe, k);
}
g_free (pe);
}
void
gdk_win32_print_hpalette (HPALETTE hpal)
{
PALETTEENTRY *pe;
gint n, npal;
npal = palette_size (hpal);
pe = g_new (PALETTEENTRY, npal);
n = GetPaletteEntries (hpal, 0, npal, pe);
if (!n)
g_print ("HPALETTE %p: GetPaletteEntries failed: %s\n",
hpal, g_win32_error_message (GetLastError ()));
else
{
g_print ("HPALETTE %p: %d (%d) entries\n", hpal, n, npal);
gdk_win32_print_paletteentries (pe, n);
}
g_free (pe);
}
#endif
/* Mimics XAllocColorCells. Allocate read/write color cells. */
static gboolean
+1 -1
View File
@@ -977,7 +977,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
event->dnd.x_root = pt.x;
event->dnd.y_root = pt.y;
event->dnd.time = msg->time;
event->dnd.time = _gdk_win32_get_next_tick (msg->time);
nfiles = DragQueryFile (hdrop, 0xFFFFFFFF, NULL, 0);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+12 -404
View File
@@ -123,332 +123,6 @@ charset_name (DWORD charset)
return "unknown";
}
static gint num_fonts;
static gint font_names_size;
static gchar **xfontnames;
static gchar *
logfont_to_xlfd (const LOGFONT *lfp,
int size,
int res,
int avg_width)
{
const gchar *weight;
const gchar *registry, *encoding;
int point_size;
static int logpixelsy = 0;
gchar facename[LF_FACESIZE*5];
gchar *utf8_facename;
gchar *p;
const gchar *q;
if (logpixelsy == 0)
{
logpixelsy = GetDeviceCaps (gdk_display_hdc, LOGPIXELSY);
}
if (lfp->lfWeight >= FW_HEAVY)
weight = "heavy";
else if (lfp->lfWeight >= FW_EXTRABOLD)
weight = "extrabold";
else if (lfp->lfWeight >= FW_BOLD)
weight = "bold";
#ifdef FW_DEMIBOLD
else if (lfp->lfWeight >= FW_DEMIBOLD)
weight = "demibold";
#endif
else if (lfp->lfWeight >= FW_MEDIUM)
weight = "medium";
else if (lfp->lfWeight >= FW_NORMAL)
weight = "normal";
else if (lfp->lfWeight >= FW_LIGHT)
weight = "light";
else if (lfp->lfWeight >= FW_EXTRALIGHT)
weight = "extralight";
else if (lfp->lfWeight >= FW_THIN)
weight = "thin";
else
weight = "regular";
switch (lfp->lfCharSet)
{
case ANSI_CHARSET:
registry = "iso8859";
encoding = "1";
break;
case SHIFTJIS_CHARSET:
registry = "jisx0208.1983";
encoding = "0";
break;
case HANGEUL_CHARSET:
registry = "ksc5601.1987";
encoding = "0";
break;
case GB2312_CHARSET:
registry = "gb2312.1980";
encoding = "0";
break;
case CHINESEBIG5_CHARSET:
registry = "big5";
encoding = "0";
break;
case GREEK_CHARSET:
registry = "iso8859";
encoding = "7";
break;
case TURKISH_CHARSET:
registry = "iso8859";
encoding = "9";
break;
#if 0 /* Not a good idea, I think, to use ISO8859-8 and -6 for the Windows
* hebrew and arabic codepages, they differ too much.
*/
case HEBREW_CHARSET:
registry = "iso8859";
encoding = "8";
break;
case ARABIC_CHARSET:
registry = "iso8859";
encoding = "6";
break;
#endif
default:
registry = "microsoft";
encoding = charset_name (lfp->lfCharSet);
}
point_size = (int) (((double) size/logpixelsy) * 720.);
if (res == -1)
res = logpixelsy;
/* Convert the facename Windows fives us from the locale-dependent
* codepage to UTF-8.
*/
utf8_facename = g_filename_to_utf8 (lfp->lfFaceName, -1, NULL, NULL, NULL);
/* Replace characters illegal in an XLFD with hex escapes. */
p = facename;
q = utf8_facename;
while (*q)
{
if (*q == '-' || *q == '*' || *q == '?' || *q == '%')
p += sprintf (p, "%%%.02x", *q);
else
*p++ = *q;
q++;
}
*p = '\0';
g_free (utf8_facename);
return g_strdup_printf
("-%s-%s-%s-%s-%s-%s-%d-%d-%d-%d-%s-%d-%s-%s",
"unknown",
facename,
weight,
(lfp->lfItalic ?
((lfp->lfPitchAndFamily & 0xF0) == FF_ROMAN
|| (lfp->lfPitchAndFamily & 0xF0) == FF_SCRIPT ?
"i" : "o") : "r"),
"normal",
"",
size,
point_size,
res,
res,
((lfp->lfPitchAndFamily & 0x03) == FIXED_PITCH ? "m" : "p"),
avg_width,
registry, encoding);
}
gchar *
gdk_font_full_name_get (GdkFont *font)
{
GdkFontPrivateWin32 *private;
GdkWin32SingleFont *singlefont;
GSList *list;
GString *string;
gchar *result;
gchar *xlfd;
LOGFONT logfont;
g_return_val_if_fail (font != NULL, NULL);
private = (GdkFontPrivateWin32 *) font;
list = private->fonts;
string = g_string_new ("");
while (list)
{
singlefont = (GdkWin32SingleFont *) list->data;
if (GetObject (singlefont->hfont, sizeof (LOGFONT), &logfont) == 0)
{
WIN32_GDI_FAILED ("GetObject");
return NULL;
}
xlfd = logfont_to_xlfd (&logfont, logfont.lfHeight, -1, 0);
string = g_string_append (string, xlfd);
g_free (xlfd);
list = list->next;
if (list)
string = g_string_append_c (string, ',');
}
result = string->str;
g_string_free (string, FALSE);
return result;
}
void
gdk_font_full_name_free (gchar *name)
{
g_free (name);
}
static gboolean
pattern_match (const gchar *pattern,
const gchar *string)
{
const gchar *p = pattern, *n = string;
gchar c, c1;
/* Common case first */
if ((pattern[0] == '*'
&& pattern[1] == '\0')
|| (pattern[0] == '-'
&& pattern[1] == '*'
&& pattern[2] == '\0'))
return TRUE;
while ((c = *p++) != '\0')
{
c = tolower (c);
switch (c)
{
case '?':
if (*n == '\0')
return FALSE;
break;
case '*':
for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
if (c == '?' && *n == '\0')
return FALSE;
if (c == '\0')
return TRUE;
c1 = tolower (c);
for (--p; *n != '\0'; ++n)
if (tolower (*n) == c1
&& pattern_match (p, n))
return TRUE;
return FALSE;
default:
if (c != tolower (*n))
return FALSE;
}
++n;
}
if (*n == '\0')
return TRUE;
return FALSE;
}
static int CALLBACK
InnerEnumFontFamExProc (const LOGFONT *lfp,
const TEXTMETRIC *metrics,
DWORD fontType,
LPARAM lParam)
{
int size;
gchar *xlfd;
if (fontType == TRUETYPE_FONTTYPE)
{
size = 0;
}
else
{
size = lfp->lfHeight;
}
xlfd = logfont_to_xlfd (lfp, size, 0, 0);
if (!pattern_match ((gchar *) lParam, xlfd))
{
g_free (xlfd);
return 1;
}
num_fonts++;
if (num_fonts == font_names_size)
{
font_names_size *= 2;
xfontnames = g_realloc (xfontnames, font_names_size * sizeof (gchar *));
}
xfontnames[num_fonts-1] = xlfd;
return 1;
}
static int CALLBACK
EnumFontFamExProc (const LOGFONT *lfp,
const TEXTMETRIC *metrics,
DWORD fontType,
LPARAM lParam)
{
if (fontType == TRUETYPE_FONTTYPE)
{
LOGFONT lf;
lf = *lfp;
EnumFontFamiliesEx (gdk_display_hdc, &lf, InnerEnumFontFamExProc, lParam, 0);
}
else
InnerEnumFontFamExProc (lfp, metrics, fontType, lParam);
return 1;
}
gchar **
gdk_font_list_new (const gchar *font_pattern,
gint *n_returned)
{
LOGFONT logfont;
gchar **result;
num_fonts = 0;
font_names_size = 100;
xfontnames = g_new (gchar *, font_names_size);
memset (&logfont, 0, sizeof (logfont));
logfont.lfCharSet = DEFAULT_CHARSET;
EnumFontFamiliesEx (gdk_display_hdc, &logfont, EnumFontFamExProc,
(LPARAM) font_pattern, 0);
result = g_new (gchar *, num_fonts + 1);
memmove (result, xfontnames, num_fonts * sizeof (gchar *));
result[num_fonts] = NULL;
g_free (xfontnames);
*n_returned = num_fonts;
return result;
}
void
gdk_font_list_free (gchar **font_list)
{
g_strfreev (font_list);
}
/* This table classifies Unicode characters according to the Microsoft
* Unicode subset numbering. This is based on the table in "Developing
* International Software for Windows 95 and Windows NT". This is almost,
@@ -1230,8 +904,8 @@ gdk_font_load_logfont (LOGFONT *lfp)
else
singlefont->codepage = 0;
GDK_NOTE (MISC, (g_print ("... = %#x %s cs %s cp%d\n",
(guint) singlefont->hfont, face,
GDK_NOTE (MISC, (g_print ("... = %p %s cs %s cp%d\n",
singlefont->hfont, face,
charset_name (singlefont->charset),
singlefont->codepage),
g_print ("... Unicode subranges:"),
@@ -1676,8 +1350,8 @@ _gdk_font_destroy (GdkFont *font)
GSList *list;
singlefont = (GdkWin32SingleFont *) private->fonts->data;
GDK_NOTE (MISC, g_print ("_gdk_font_destroy %#x\n",
(guint)singlefont->hfont));
GDK_NOTE (MISC, g_print ("_gdk_font_destroy %p\n",
singlefont->hfont));
gdk_font_hash_remove (font->type, font);
@@ -1840,9 +1514,9 @@ _gdk_wchar_text_handle (GdkFont *font,
if (!list)
singlefont = NULL;
GDK_NOTE (MISC, g_print ("%d:%d:%d:%#x ",
GDK_NOTE (MISC, g_print ("%d:%d:%d:%p ",
start-wcstr, wcp-wcstr, block,
(singlefont ? (guint) singlefont->hfont : 0)));
(singlefont ? singlefont->hfont : 0)));
/* Call the callback function */
(*handler) (singlefont, start, wcp+1 - start, arg);
@@ -1881,57 +1555,16 @@ gdk_text_size_handler (GdkWin32SingleFont *singlefont,
arg->total.cy = MAX (arg->total.cy, this_size.cy);
}
static gboolean
gdk_text_size (GdkFont *font,
const gchar *text,
gint text_length,
gdk_text_size_arg *arg)
{
gint wlen;
wchar_t *wcstr;
g_return_val_if_fail (font != NULL, FALSE);
g_return_val_if_fail (text != NULL, FALSE);
if (text_length == 0)
return 0;
g_assert (font->type == GDK_FONT_FONT || font->type == GDK_FONT_FONTSET);
wcstr = g_new (wchar_t, text_length);
if (text_length == 1)
{
/* For single characters, don't try to interpret as UTF-8.
*/
wcstr[0] = (guchar) text[0];
_gdk_wchar_text_handle (font, wcstr, 1, gdk_text_size_handler, arg);
}
else
{
if ((wlen = _gdk_utf8_to_ucs2 (wcstr, text, text_length, text_length)) == -1)
g_warning ("gdk_text_size: _gdk_utf8_to_ucs2 failed");
else
_gdk_wchar_text_handle (font, wcstr, wlen, gdk_text_size_handler, arg);
}
g_free (wcstr);
return TRUE;
}
gint
gdk_text_width (GdkFont *font,
const gchar *text,
gint text_length)
{
gdk_text_size_arg arg;
gint width = -1;
arg.total.cx = arg.total.cy = 0;
gdk_text_extents (font, text, text_length, NULL, NULL, &width, NULL, NULL);
if (!gdk_text_size (font, text, text_length, &arg))
return -1;
return arg.total.cx;
return width;
}
gint
@@ -1939,36 +1572,11 @@ gdk_text_width_wc (GdkFont *font,
const GdkWChar *text,
gint text_length)
{
gdk_text_size_arg arg;
wchar_t *wcstr;
gint i;
gint width = -1;
g_return_val_if_fail (font != NULL, -1);
g_return_val_if_fail (text != NULL, -1);
gdk_text_extents_wc (font, text, text_length, NULL, NULL, &width, NULL, NULL);
if (text_length == 0)
return 0;
g_assert (font->type == GDK_FONT_FONT || font->type == GDK_FONT_FONTSET);
if (sizeof (wchar_t) != sizeof (GdkWChar))
{
wcstr = g_new (wchar_t, text_length);
for (i = 0; i < text_length; i++)
wcstr[i] = text[i];
}
else
wcstr = (wchar_t *) text;
arg.total.cx = arg.total.cy = 0;
_gdk_wchar_text_handle (font, wcstr, text_length,
gdk_text_size_handler, &arg);
if (sizeof (wchar_t) != sizeof (GdkWChar))
g_free (wcstr);
return arg.total.cx;
return width;
}
void
+161 -329
View File
@@ -96,8 +96,8 @@ gdk_gc_win32_finalize (GObject *object)
{
GdkGCWin32 *win32_gc = GDK_GC_WIN32 (object);
if (win32_gc->clip_region)
gdk_region_destroy (win32_gc->clip_region);
if (win32_gc->hcliprgn != NULL)
DeleteObject (win32_gc->hcliprgn);
if (win32_gc->values_mask & GDK_GC_FONT)
gdk_font_unref (win32_gc->font);
@@ -148,14 +148,10 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
win32_gc->font = values->font;
if (win32_gc->font != NULL)
{
gchar *xlfd;
gdk_font_ref (win32_gc->font);
win32_gc->values_mask |= GDK_GC_FONT;
GDK_NOTE (GC, (xlfd = gdk_font_full_name_get (win32_gc->font),
g_print ("%sfont=%s", s, xlfd),
s = ",",
gdk_font_full_name_free (xlfd)));
GDK_NOTE (GC, (g_print ("%sfont=%p", s, win32_gc->font),
s = ","));
}
else
{
@@ -197,7 +193,8 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
{
win32_gc->fill_style = values->fill;
win32_gc->values_mask |= GDK_GC_FILL;
GDK_NOTE (GC, (g_print ("%sfill=%d", s, win32_gc->fill_style),
GDK_NOTE (GC, (g_print ("%sfill=%s", s,
gdk_win32_fill_style_to_string (win32_gc->fill_style)),
s = ","));
}
@@ -282,22 +279,12 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
if (mask & GDK_GC_CLIP_MASK)
{
if (win32_gc->clip_region != NULL)
{
gdk_region_destroy (win32_gc->clip_region);
win32_gc->clip_region = NULL;
}
if (win32_gc->hcliprgn != NULL)
{
DeleteObject (win32_gc->hcliprgn);
win32_gc->hcliprgn = NULL;
}
DeleteObject (win32_gc->hcliprgn);
if (values->clip_mask != NULL)
{
win32_gc->hcliprgn =
_gdk_win32_bitmap_to_region (values->clip_mask);
win32_gc->hcliprgn = _gdk_win32_bitmap_to_hrgn (values->clip_mask);
win32_gc->values_mask |= GDK_GC_CLIP_MASK;
}
else
@@ -373,8 +360,6 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
win32_gc->pen_num_dashes = 0;
}
win32_gc->pen_style &= ~(PS_STYLE_MASK);
GDK_NOTE (GC, (g_print ("%sps|=LINE_SOLID", s),
s = ","));
win32_gc->pen_style |= PS_SOLID;
break;
case GDK_LINE_ON_OFF_DASH:
@@ -386,12 +371,12 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
* line endings ? --hb
*/
win32_gc->pen_style &= ~(PS_STYLE_MASK);
GDK_NOTE (GC, (g_print ("%sps|=DASH", s),
s = ","));
win32_gc->pen_style |= PS_DASH;
win32_gc->pen_style |= PS_DASH;
}
break;
}
GDK_NOTE (GC, (g_print ("%sps|=PS_STYLE_%s", s, gdk_win32_psstyle_to_string (win32_gc->pen_style)),
s = ","));
win32_gc->values_mask |= GDK_GC_LINE_STYLE;
}
@@ -402,21 +387,17 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
{
case GDK_CAP_NOT_LAST: /* ??? */
case GDK_CAP_BUTT:
GDK_NOTE (GC, (g_print ("%sps|=ENDCAP_FLAT", s),
s = ","));
win32_gc->pen_style |= PS_ENDCAP_FLAT;
break;
case GDK_CAP_ROUND:
GDK_NOTE (GC, (g_print ("%sps|=ENDCAP_ROUND", s),
s = ","));
win32_gc->pen_style |= PS_ENDCAP_ROUND;
break;
case GDK_CAP_PROJECTING:
GDK_NOTE (GC, (g_print ("%sps|=ENDCAP_SQUARE", s),
s = ","));
win32_gc->pen_style |= PS_ENDCAP_SQUARE;
break;
}
GDK_NOTE (GC, (g_print ("%sps|=PS_ENDCAP_%s", s, gdk_win32_psendcap_to_string (win32_gc->pen_style)),
s = ","));
win32_gc->values_mask |= GDK_GC_CAP_STYLE;
}
@@ -426,24 +407,20 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
switch (values->join_style)
{
case GDK_JOIN_MITER:
GDK_NOTE (GC, (g_print ("%sps|=JOIN_MITER", s),
s = ","));
win32_gc->pen_style |= PS_JOIN_MITER;
break;
case GDK_JOIN_ROUND:
GDK_NOTE (GC, (g_print ("%sps|=JOIN_ROUND", s),
s = ","));
win32_gc->pen_style |= PS_JOIN_ROUND;
break;
case GDK_JOIN_BEVEL:
GDK_NOTE (GC, (g_print ("%sps|=JOIN_BEVEL", s),
s = ","));
win32_gc->pen_style |= PS_JOIN_BEVEL;
break;
}
GDK_NOTE (GC, (g_print ("%sps|=PS_JOIN_%s", s, gdk_win32_psjoin_to_string (win32_gc->pen_style)),
s = ","));
win32_gc->values_mask |= GDK_GC_JOIN_STYLE;
}
GDK_NOTE (GC, g_print ("}\n"));
GDK_NOTE (GC, g_print ("} mask=(%s)", gdk_win32_gcvalues_mask_to_string (win32_gc->values_mask)));
}
GdkGC*
@@ -462,8 +439,6 @@ _gdk_win32_gc_new (GdkDrawable *drawable,
gc = g_object_new (_gdk_gc_win32_get_type (), NULL);
win32_gc = GDK_GC_WIN32 (gc);
win32_gc->hdc = NULL;
win32_gc->clip_region = NULL;
win32_gc->hcliprgn = NULL;
/* Use the same default values as X11 does, even if they don't make
@@ -483,13 +458,13 @@ _gdk_win32_gc_new (GdkDrawable *drawable,
win32_gc->values_mask = GDK_GC_FUNCTION | GDK_GC_FILL;
GDK_NOTE (GC, g_print ("_gdk_win32_gc_new: "));
GDK_NOTE (GC, g_print ("_gdk_win32_gc_new: %p: ", win32_gc));
gdk_win32_gc_values_to_win32values (values, mask, win32_gc);
GDK_NOTE (GC, g_print ("\n"));
win32_gc->hdc = NULL;
win32_gc->hwnd = NULL;
GDK_NOTE (GC, g_print (" = %p\n", gc));
return gc;
}
@@ -586,9 +561,9 @@ gdk_win32_gc_set_values (GdkGC *gc,
{
g_return_if_fail (GDK_IS_GC (gc));
GDK_NOTE (GC, g_print ("gdk_win32_gc_set_values: "));
GDK_NOTE (GC, g_print ("gdk_win32_gc_set_values: %p: ", GDK_GC_WIN32 (gc)));
gdk_win32_gc_values_to_win32values (values, mask, GDK_GC_WIN32 (gc));
GDK_NOTE (GC, g_print ("\n"));
}
static void
@@ -628,36 +603,35 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
win32_gc = GDK_GC_WIN32 (gc);
if (win32_gc->hcliprgn)
{
DeleteObject (win32_gc->hcliprgn);
win32_gc->hcliprgn = NULL;
}
if (win32_gc->clip_region)
gdk_region_destroy (win32_gc->clip_region);
DeleteObject (win32_gc->hcliprgn);
if (rectangle)
{
GDK_NOTE (GC,
g_print ("gdk_gc_set_clip_rectangle: %dx%d@+%d+%d\n",
rectangle->width, rectangle->height,
rectangle->x, rectangle->y));
win32_gc->clip_region = gdk_region_rectangle (rectangle);
GDK_NOTE (GC, g_print ("gdk_gc_set_clip_rectangle: %p: %s\n",
win32_gc,
gdk_win32_gdkrectangle_to_string (rectangle)));
win32_gc->hcliprgn = CreateRectRgn (rectangle->x, rectangle->y,
rectangle->x + rectangle->width,
rectangle->y + rectangle->height);
win32_gc->values_mask |= GDK_GC_CLIP_MASK;
}
else
{
GDK_NOTE (GC, g_print ("gdk_gc_set_clip_rectangle: NULL\n"));
win32_gc->clip_region = NULL;
win32_gc->hcliprgn = NULL;
win32_gc->values_mask &= ~GDK_GC_CLIP_MASK;
}
win32_gc->values_mask &= ~(GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN);
gc->clip_x_origin = 0;
gc->clip_y_origin = 0;
win32_gc->values_mask &= ~(GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN);
}
void
gdk_gc_set_clip_region (GdkGC *gc,
GdkRegion *region)
gdk_gc_set_clip_region (GdkGC *gc,
GdkRegion *region)
{
GdkGCWin32 *win32_gc;
@@ -665,30 +639,29 @@ gdk_gc_set_clip_region (GdkGC *gc,
win32_gc = GDK_GC_WIN32 (gc);
if (win32_gc->clip_region)
gdk_region_destroy (win32_gc->clip_region);
if (win32_gc->hcliprgn)
DeleteObject (win32_gc->hcliprgn);
if (region)
{
GDK_NOTE (GC, g_print ("gdk_gc_set_clip_region: %dx%d+%d+%d\n",
region->extents.x2 - region->extents.x1,
region->extents.y2 - region->extents.y1,
region->extents.x1, region->extents.y1));
GDK_NOTE (GC, g_print ("gdk_gc_set_clip_region: %p: %s\n",
win32_gc,
gdk_win32_gdkregion_to_string (region)));
win32_gc->clip_region = gdk_region_copy (region);
win32_gc->hcliprgn = _gdk_win32_gdkregion_to_hrgn (region, 0, 0);
win32_gc->values_mask |= GDK_GC_CLIP_MASK;
}
else
{
GDK_NOTE (GC, g_print ("gdk_gc_set_clip_region: NULL\n"));
win32_gc->clip_region = NULL;
win32_gc->hcliprgn = NULL;
win32_gc->values_mask &= ~GDK_GC_CLIP_MASK;
}
gc->clip_x_origin = 0;
gc->clip_y_origin = 0;
win32_gc->values_mask &= ~(GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN);
}
@@ -705,24 +678,32 @@ gdk_gc_copy (GdkGC *dst_gc,
dst_win32_gc = GDK_GC_WIN32 (dst_gc);
src_win32_gc = GDK_GC_WIN32 (src_gc);
if (dst_win32_gc->font != NULL)
gdk_font_unref (dst_win32_gc->font);
if (dst_win32_gc->tile != NULL)
gdk_drawable_unref (dst_win32_gc->tile);
if (dst_win32_gc->stipple != NULL)
gdk_drawable_unref (dst_win32_gc->stipple);
if (dst_win32_gc->clip_region != NULL)
gdk_region_destroy (dst_win32_gc->clip_region);
GDK_NOTE (GC, g_print ("gdk_gc_copy: %p := %p\n", dst_win32_gc, src_win32_gc));
if (dst_gc->colormap)
g_object_unref (G_OBJECT (dst_gc->colormap));
if (dst_win32_gc->hcliprgn != NULL)
DeleteObject (dst_win32_gc->hcliprgn);
if (dst_win32_gc->font != NULL)
gdk_font_unref (dst_win32_gc->font);
if (dst_win32_gc->tile != NULL)
gdk_drawable_unref (dst_win32_gc->tile);
if (dst_win32_gc->stipple != NULL)
gdk_drawable_unref (dst_win32_gc->stipple);
if (dst_win32_gc->pen_dashes)
g_free (dst_win32_gc->pen_dashes);
*dst_win32_gc = *src_win32_gc;
dst_win32_gc->hdc = NULL;
if (dst_gc->colormap)
g_object_ref (G_OBJECT (dst_gc->colormap));
if (dst_win32_gc->pen_dashes)
dst_win32_gc->pen_dashes = g_memdup (src_win32_gc->pen_dashes,
sizeof (DWORD) * src_win32_gc->pen_num_dashes);
if (dst_win32_gc->hcliprgn)
{
/* create a new region, to copy to */
@@ -731,14 +712,19 @@ gdk_gc_copy (GdkGC *dst_gc,
CombineRgn (dst_win32_gc->hcliprgn, src_win32_gc->hcliprgn,
NULL, RGN_COPY);
}
if (dst_win32_gc->clip_region != NULL)
dst_win32_gc->clip_region = gdk_region_copy (dst_win32_gc->clip_region);
if (dst_win32_gc->font != NULL)
gdk_font_ref (dst_win32_gc->font);
if (dst_win32_gc->tile != NULL)
gdk_drawable_ref (dst_win32_gc->tile);
if (dst_win32_gc->stipple != NULL)
gdk_drawable_ref (dst_win32_gc->stipple);
if (dst_win32_gc->pen_dashes)
dst_win32_gc->pen_dashes = g_memdup (src_win32_gc->pen_dashes,
sizeof (DWORD) * src_win32_gc->pen_num_dashes);
}
static guint bitmask[9] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };
@@ -855,8 +841,11 @@ predraw_set_foreground (GdkGC *gc,
case GDK_OPAQUE_STIPPLED:
if (*ok && (hbr = CreatePatternBrush (GDK_PIXMAP_HBITMAP (win32_gc->stipple))) == NULL)
WIN32_GDI_FAILED ("CreatePatternBrush"), *ok = FALSE;
if (*ok && !SetBrushOrgEx(win32_gc->hdc, gc->ts_x_origin,
gc->ts_y_origin, NULL))
if (*ok && win32_gc->values_mask & (GDK_GC_TS_X_ORIGIN | GDK_GC_TS_Y_ORIGIN) &&
!SetBrushOrgEx(win32_gc->hdc,
win32_gc->values_mask & GDK_GC_TS_X_ORIGIN ? gc->ts_x_origin : 0,
win32_gc->values_mask & GDK_GC_TS_Y_ORIGIN ? gc->ts_y_origin : 0,
NULL))
WIN32_GDI_FAILED ("SetBrushOrgEx"), *ok = FALSE;
break;
@@ -867,6 +856,7 @@ predraw_set_foreground (GdkGC *gc,
WIN32_GDI_FAILED ("CreateSolidBrush"), *ok = FALSE;
break;
}
if (*ok)
{
HBRUSH old_hbr = SelectObject (win32_gc->hdc, hbr);
@@ -904,7 +894,6 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
GdkGCWin32 *win32_gc = (GdkGCWin32 *) gc;
GdkDrawableImplWin32 *impl = NULL;
gboolean ok = TRUE;
int flag;
g_assert (win32_gc->hdc == NULL);
@@ -958,162 +947,51 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
if (SetROP2 (win32_gc->hdc, win32_gc->rop2) == 0)
WIN32_GDI_FAILED ("SetROP2"), ok = FALSE;
if (win32_gc->values_mask & GDK_GC_CLIP_MASK)
g_assert ((win32_gc->clip_region != NULL) != (win32_gc->hcliprgn != NULL));
if (ok
&& (win32_gc->values_mask & GDK_GC_CLIP_MASK)
&& win32_gc->clip_region != NULL)
{
HRGN hrgn;
RGNDATA *rgndata;
RECT *rect;
GdkRegionBox *boxes = win32_gc->clip_region->rects;
guint nbytes =
sizeof (RGNDATAHEADER) + (sizeof (RECT) * win32_gc->clip_region->numRects);
int i;
rgndata = g_malloc (nbytes);
rgndata->rdh.dwSize = sizeof (RGNDATAHEADER);
rgndata->rdh.iType = RDH_RECTANGLES;
rgndata->rdh.nCount = rgndata->rdh.nRgnSize = 0;
SetRect (&rgndata->rdh.rcBound,
G_MAXSHORT, G_MAXSHORT, G_MINSHORT, G_MINSHORT);
for (i = 0; i < win32_gc->clip_region->numRects; i++)
{
rect = ((RECT *) rgndata->Buffer) + rgndata->rdh.nCount++;
rect->left = CLAMP (boxes[i].x1 + gc->clip_x_origin,
G_MINSHORT, G_MAXSHORT);
rect->right = CLAMP (boxes[i].x2 + gc->clip_x_origin,
G_MINSHORT, G_MAXSHORT);
rect->top = CLAMP (boxes[i].y1 + gc->clip_y_origin,
G_MINSHORT, G_MAXSHORT);
rect->bottom = CLAMP (boxes[i].y2 + gc->clip_y_origin,
G_MINSHORT, G_MAXSHORT);
GDK_NOTE (GC, g_print ("clip rgn box %d: %ldx%ld@+%ld+%ld\n",
i,
rect->right-rect->left,
rect->bottom-rect->top,
rect->left, rect->top));
if (rect->left < rgndata->rdh.rcBound.left)
rgndata->rdh.rcBound.left = rect->left;
if (rect->right > rgndata->rdh.rcBound.right)
rgndata->rdh.rcBound.right = rect->right;
if (rect->top < rgndata->rdh.rcBound.top)
rgndata->rdh.rcBound.top = rect->top;
if (rect->bottom > rgndata->rdh.rcBound.bottom)
rgndata->rdh.rcBound.bottom = rect->bottom;
}
if ((hrgn = ExtCreateRegion (NULL, nbytes, rgndata)) == NULL)
WIN32_API_FAILED ("ExtCreateRegion"), ok = FALSE;
/*
* XXX: combine the fillmode-stipple with the clip region possibly
* this needs to be done with the hcliprgn below as well, but
* the test case here were check boxes and radio buttons ...
*/
if ( (win32_gc->values_mask & GDK_GC_STIPPLE)
&& (win32_gc->values_mask & GDK_GC_FILL) && (win32_gc->fill_style == GDK_STIPPLED))
{
HRGN hstipplergn = _gdk_win32_bitmap_to_region (win32_gc->stipple);
if (OffsetRgn (hstipplergn,
win32_gc->values_mask & GDK_GC_TS_X_ORIGIN ? gc->ts_x_origin : 0,
win32_gc->values_mask & GDK_GC_TS_Y_ORIGIN ? gc->ts_y_origin : 0) == ERROR)
WIN32_API_FAILED ("OffsetRgn"), ok = FALSE;
if (CombineRgn (hrgn, hrgn, hstipplergn, RGN_AND) == ERROR)
WIN32_API_FAILED ("CombineRgn"), ok = FALSE;
if (!DeleteObject (hstipplergn))
WIN32_API_FAILED ("DeleteObject");
}
if (ok && SelectClipRgn (win32_gc->hdc, hrgn) == ERROR)
WIN32_API_FAILED ("SelectClipRgn"), ok = FALSE;
if (hrgn != NULL)
DeleteObject (hrgn);
}
else if (ok
&& (win32_gc->values_mask & GDK_GC_CLIP_MASK)
&& win32_gc->hcliprgn != NULL)
if (ok &&
(win32_gc->values_mask & GDK_GC_CLIP_MASK) &&
win32_gc->hcliprgn != NULL)
{
if (SelectClipRgn (win32_gc->hdc, win32_gc->hcliprgn) == ERROR)
WIN32_API_FAILED ("SelectClipRgn"), ok = FALSE;
if (ok && !OffsetClipRgn (win32_gc->hdc,
win32_gc->values_mask & GDK_GC_CLIP_X_ORIGIN ? gc->clip_x_origin : 0,
win32_gc->values_mask & GDK_GC_CLIP_Y_ORIGIN ? gc->clip_y_origin : 0))
#if 0 /* No, this is totally bogus. The stipple should replicate in x
* and y directions, not be just one copy of the bitmap. We must
* handle stipples elsewhere.
*/
/* Combine the fillmode-stipple with the clip region */
if (ok &&
(win32_gc->values_mask & GDK_GC_STIPPLE) &&
(win32_gc->values_mask & GDK_GC_FILL) &&
(win32_gc->fill_style == GDK_STIPPLED))
{
HRGN hstipplergn;
if ((hstipplergn = _gdk_win32_bitmap_to_hrgn (win32_gc->stipple)) == NULL)
;
else if (win32_gc->values_mask & (GDK_GC_TS_X_ORIGIN | GDK_GC_TS_Y_ORIGIN) &&
OffsetRgn (hstipplergn,
win32_gc->values_mask & GDK_GC_TS_X_ORIGIN ? gc->ts_x_origin : 0,
win32_gc->values_mask & GDK_GC_TS_Y_ORIGIN ? gc->ts_y_origin : 0) == ERROR)
WIN32_API_FAILED ("OffsetRgn");
else if (ExtSelectClipRgn (win32_gc->hdc, hstipplergn, RGN_AND) == ERROR)
WIN32_API_FAILED ("ExtSelectClipRgn");
if (hstipplergn != NULL && !DeleteObject (hstipplergn))
WIN32_API_FAILED ("DeleteObject");
}
#endif
if (ok && win32_gc->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN) &&
OffsetClipRgn (win32_gc->hdc,
win32_gc->values_mask & GDK_GC_CLIP_X_ORIGIN ? gc->clip_x_origin : 0,
win32_gc->values_mask & GDK_GC_CLIP_Y_ORIGIN ? gc->clip_y_origin : 0) == ERROR)
WIN32_API_FAILED ("OffsetClipRgn"), ok = FALSE;
}
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_GC)
{
HGDIOBJ obj;
LOGBRUSH logbrush;
EXTLOGPEN extlogpen;
HRGN hrgn;
RECT rect;
g_print ("gdk_win32_hdc_get: %p\n", win32_gc->hdc);
obj = GetCurrentObject (win32_gc->hdc, OBJ_BRUSH);
GetObject (obj, sizeof (LOGBRUSH), &logbrush);
g_print ("brush: style: %s color: %06lx hatch: %#lx\n",
(logbrush.lbStyle == BS_HOLLOW ? "HOLLOW" :
(logbrush.lbStyle == BS_PATTERN ? "PATTERN" :
(logbrush.lbStyle == BS_SOLID ? "SOLID" :
"???"))),
logbrush.lbColor,
logbrush.lbHatch);
obj = GetCurrentObject (win32_gc->hdc, OBJ_PEN);
GetObject (obj, sizeof (EXTLOGPEN), &extlogpen);
g_print ("pen: type: %s style: %s endcap: %s join: %s width: %d brush: %s\n",
((extlogpen.elpPenStyle & PS_TYPE_MASK) ==
PS_GEOMETRIC ? "GEOMETRIC" : "COSMETIC"),
((extlogpen.elpPenStyle & PS_STYLE_MASK) ==
PS_NULL ? "NULL" :
((extlogpen.elpPenStyle & PS_STYLE_MASK) == PS_SOLID ? "SOLID" :
((extlogpen.elpPenStyle & PS_STYLE_MASK) == PS_DOT ? "DOT" :
((extlogpen.elpPenStyle & PS_STYLE_MASK) == PS_DASH ? "DASH" :
"???")))),
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_FLAT ? "FLAT" :
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_ROUND ? "ROUND" :
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_SQUARE ? "ROUND" :
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_SQUARE ? "ROUND" : "???")))),
((extlogpen.elpPenStyle & PS_JOIN_MASK) ==
PS_JOIN_BEVEL ? "BEVEL" :
((extlogpen.elpPenStyle & PS_JOIN_MASK) ==
PS_JOIN_MITER ? "MITER" :
((extlogpen.elpPenStyle & PS_JOIN_MASK) ==
PS_JOIN_ROUND ? "ROUND" : "???"))),
extlogpen.elpWidth,
(extlogpen.elpBrushStyle == BS_DIBPATTERN ? "DIBPATTERN" :
(extlogpen.elpBrushStyle == BS_DIBPATTERNPT ? "DIBPATTERNPT" :
(extlogpen.elpBrushStyle == BS_HATCHED ? "HATCHED" :
(extlogpen.elpBrushStyle == BS_HOLLOW ? "HOLLOW" :
(extlogpen.elpBrushStyle == BS_PATTERN ? "PATTERN" :
(extlogpen.elpBrushStyle == BS_SOLID ? "SOLID" : "???")))))));
hrgn = CreateRectRgn (0, 0, 0, 0);
if ((flag = GetClipRgn (win32_gc->hdc, hrgn)) == -1)
WIN32_API_FAILED ("GetClipRgn");
else if (flag == 0)
g_print ("no clip region\n");
else if (flag == 1)
{
GetRgnBox (hrgn, &rect);
g_print ("clip region bbox: %ldx%ld@+%ld+%ld\n",
rect.right - rect.left,
rect.bottom - rect.top,
rect.left, rect.top);
}
DeleteObject (hrgn);
}
#endif
GDK_NOTE (GC, (g_print ("gdk_win32_hdc_get: %p (%s): ",
win32_gc, gdk_win32_gcvalues_mask_to_string (usage)),
gdk_win32_print_dc (win32_gc->hdc)));
return win32_gc->hdc;
}
@@ -1127,7 +1005,9 @@ gdk_win32_hdc_release (GdkDrawable *drawable,
HGDIOBJ hpen = NULL;
HGDIOBJ hbr = NULL;
GDK_NOTE (GC, g_print ("gdk_win32_hdc_release: %p\n", win32_gc->hdc));
GDK_NOTE (GC, g_print ("gdk_win32_hdc_release: %p: %p (%s)\n",
win32_gc, win32_gc->hdc,
gdk_win32_gcvalues_mask_to_string (usage)));
if (GDK_IS_DRAWABLE_IMPL_WIN32 (drawable))
impl = GDK_DRAWABLE_IMPL_WIN32(drawable);
@@ -1193,12 +1073,12 @@ gdk_win32_hdc_release (GdkDrawable *drawable,
* bitmaps (and not pixmaps), with zero pixels being transparent.
*/
/* _gdk_win32_bitmap_to_region : Create a region from the
/* _gdk_win32_bitmap_to_hrgn : Create a region from the
* "non-transparent" pixels of a bitmap.
*/
HRGN
_gdk_win32_bitmap_to_region (GdkPixmap *pixmap)
_gdk_win32_bitmap_to_hrgn (GdkPixmap *pixmap)
{
HRGN hRgn = NULL;
HRGN h;
@@ -1304,100 +1184,52 @@ _gdk_win32_bitmap_to_region (GdkPixmap *pixmap)
return hRgn;
}
#ifdef G_ENABLE_DEBUG
gchar *
gdk_win32_cap_style_to_string (GdkCapStyle cap_style)
HRGN
_gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
gint x_origin,
gint y_origin)
{
switch (cap_style)
{
#define CASE(x) case x: return #x + strlen ("GDK_CAP_")
CASE (GDK_CAP_NOT_LAST);
CASE (GDK_CAP_BUTT);
CASE (GDK_CAP_ROUND);
CASE (GDK_CAP_PROJECTING);
#undef CASE
default: return ("illegal GdkCapStyle value");
}
/* NOTREACHED */
return NULL;
}
HRGN hrgn;
RGNDATA *rgndata;
RECT *rect;
GdkRegionBox *boxes = region->rects;
guint nbytes =
sizeof (RGNDATAHEADER) + (sizeof (RECT) * region->numRects);
int i;
gchar *
gdk_win32_fill_style_to_string (GdkFill fill)
{
switch (fill)
{
#define CASE(x) case x: return #x + strlen ("GDK_")
CASE (GDK_SOLID);
CASE (GDK_TILED);
CASE (GDK_STIPPLED);
CASE (GDK_OPAQUE_STIPPLED);
#undef CASE
default: return ("illegal GdkFill value");
}
/* NOTREACHED */
return NULL;
}
rgndata = g_malloc (nbytes);
rgndata->rdh.dwSize = sizeof (RGNDATAHEADER);
rgndata->rdh.iType = RDH_RECTANGLES;
rgndata->rdh.nCount = rgndata->rdh.nRgnSize = 0;
SetRect (&rgndata->rdh.rcBound,
G_MAXSHORT, G_MAXSHORT, G_MINSHORT, G_MINSHORT);
gchar *
gdk_win32_function_to_string (GdkFunction function)
{
switch (function)
for (i = 0; i < region->numRects; i++)
{
#define CASE(x) case x: return #x + strlen ("GDK_")
CASE (GDK_COPY);
CASE (GDK_INVERT);
CASE (GDK_XOR);
CASE (GDK_CLEAR);
CASE (GDK_AND);
CASE (GDK_AND_REVERSE);
CASE (GDK_AND_INVERT);
CASE (GDK_NOOP);
CASE (GDK_OR);
CASE (GDK_EQUIV);
CASE (GDK_OR_REVERSE);
CASE (GDK_COPY_INVERT);
CASE (GDK_OR_INVERT);
CASE (GDK_NAND);
CASE (GDK_SET);
#undef CASE
default: return ("illegal GdkFunction value");
}
/* NOTREACHED */
return NULL;
}
rect = ((RECT *) rgndata->Buffer) + rgndata->rdh.nCount++;
gchar *
gdk_win32_join_style_to_string (GdkJoinStyle join_style)
{
switch (join_style)
{
#define CASE(x) case x: return #x + strlen ("GDK_JOIN_")
CASE (GDK_JOIN_MITER);
CASE (GDK_JOIN_ROUND);
CASE (GDK_JOIN_BEVEL);
#undef CASE
default: return ("illegal GdkJoinStyle value");
}
/* NOTREACHED */
return NULL;
}
rect->left = CLAMP (boxes[i].x1 + x_origin,
G_MINSHORT, G_MAXSHORT);
rect->right = CLAMP (boxes[i].x2 + x_origin,
G_MINSHORT, G_MAXSHORT);
rect->top = CLAMP (boxes[i].y1 + y_origin,
G_MINSHORT, G_MAXSHORT);
rect->bottom = CLAMP (boxes[i].y2 + y_origin,
G_MINSHORT, G_MAXSHORT);
gchar *
gdk_win32_line_style_to_string (GdkLineStyle line_style)
{
switch (line_style)
{
#define CASE(x) case x: return #x + strlen ("GDK_LINE_")
CASE(GDK_LINE_SOLID);
CASE(GDK_LINE_ON_OFF_DASH);
CASE(GDK_LINE_DOUBLE_DASH);
#undef CASE
default: return ("illegal GdkLineStyle value");
if (rect->left < rgndata->rdh.rcBound.left)
rgndata->rdh.rcBound.left = rect->left;
if (rect->right > rgndata->rdh.rcBound.right)
rgndata->rdh.rcBound.right = rect->right;
if (rect->top < rgndata->rdh.rcBound.top)
rgndata->rdh.rcBound.top = rect->top;
if (rect->bottom > rgndata->rdh.rcBound.bottom)
rgndata->rdh.rcBound.bottom = rect->bottom;
}
/* NOTREACHED */
return NULL;
}
if ((hrgn = ExtCreateRegion (NULL, nbytes, rgndata)) == NULL)
WIN32_API_FAILED ("ExtCreateRegion");
#endif
g_free (rgndata);
return (hrgn);
}
+199 -87
View File
@@ -39,6 +39,8 @@
typedef struct _GdkWindowQueueItem GdkWindowQueueItem;
typedef struct _GdkWindowParentPos GdkWindowParentPos;
#if 0
typedef enum {
GDK_WINDOW_QUEUE_TRANSLATE,
GDK_WINDOW_QUEUE_ANTIEXPOSE
@@ -60,6 +62,8 @@ struct _GdkWindowQueueItem
} u;
};
#endif
struct _GdkWindowParentPos
{
gint x;
@@ -69,11 +73,12 @@ struct _GdkWindowParentPos
GdkRectangle clip_rect;
};
static void gdk_window_compute_position (GdkWindowImplWin32 *window,
static void gdk_window_compute_position (GdkWindowImplWin32 *window,
GdkWindowParentPos *parent_pos,
GdkWin32PositionInfo *info);
static void gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
GdkWindowParentPos *parent_pos);
static void gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
GdkWindowParentPos *parent_pos);
static void gdk_window_premove (GdkWindow *window,
GdkWindowParentPos *parent_pos);
static void gdk_window_postmove (GdkWindow *window,
@@ -87,7 +92,9 @@ static void gdk_window_clip_changed (GdkWindow *window,
GdkRectangle *old_clip,
GdkRectangle *new_clip);
#if 0
static GSList *translate_queue = NULL;
#endif
void
_gdk_windowing_window_get_offsets (GdkWindow *window,
@@ -121,29 +128,55 @@ gdk_window_copy_area_scroll (GdkWindow *window,
gint dx,
gint dy)
{
#if 0
GdkWindowObject *obj = GDK_WINDOW_OBJECT (window);
GList *tmp_list;
#endif
GDK_NOTE (MISC, g_print ("gdk_window_copy_area_scroll: %p %s %d,%d\n",
GDK_WINDOW_HWND (window),
gdk_win32_gdkrectangle_to_string (dest_rect),
dx, dy));
if (dest_rect->width > 0 && dest_rect->height > 0)
{
RECT clipRect;
#ifdef G_ENABLE_DEBUG
RECT update_rect;
#endif
clipRect.left = dest_rect->x;
clipRect.top = dest_rect->y;
clipRect.right = clipRect.left + dest_rect->width;
clipRect.bottom = clipRect.top + dest_rect->height;
if (dx < 0)
clipRect.right -= dx;
else
clipRect.left -= dx;
if (dy < 0)
clipRect.bottom -= dy;
else
clipRect.top -= dy;
gdk_window_queue_translation (window, dx, dy);
if (!ScrollWindowEx (GDK_WINDOW_HWND (window),
dx, dy, /* in: scroll offsets */
NULL, /* in: scroll rect, NULL == entire client area */
&clipRect, /* in: restrict to */
NULL, /* out: update region */
NULL, /* in: update region */
NULL, /* out: update rect */
SW_INVALIDATE))
SW_INVALIDATE | SW_SCROLLCHILDREN))
WIN32_API_FAILED ("ScrollWindowEx");
GDK_NOTE (EVENTS,
(GetUpdateRect (GDK_WINDOW_HWND (window), &update_rect, FALSE),
g_print ("gdk_window_copy_area_scroll: post-scroll update rect: %s\n",
gdk_win32_rect_to_string (&update_rect))));
}
#if 0
tmp_list = obj->children;
while (tmp_list)
{
@@ -154,6 +187,7 @@ gdk_window_copy_area_scroll (GdkWindow *window,
tmp_list = tmp_list->next;
}
#endif
}
static void
@@ -202,6 +236,8 @@ compute_intermediate_position (GdkWin32PositionInfo *position_info,
new_position->height = new_y1 - new_y0;
}
#if 0
static void
gdk_window_guffaw_scroll (GdkWindow *window,
gint dx,
@@ -217,6 +253,9 @@ gdk_window_guffaw_scroll (GdkWindow *window,
GdkWindowParentPos parent_pos;
GList *tmp_list;
GDK_NOTE (EVENTS, g_print ("gdk_window_guffaw_scroll: %p %d,%d\n",
GDK_WINDOW_HWND (window), dx, dy));
gdk_window_compute_parent_pos (impl, &parent_pos);
gdk_window_compute_position (impl, &parent_pos, &new_info);
@@ -241,7 +280,7 @@ gdk_window_guffaw_scroll (GdkWindow *window,
*/
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_position.x, new_position.y,
new_position.width, new_position.height,
new_position.width, new_position.height,
SWP_NOACTIVATE | SWP_NOZORDER))
WIN32_API_FAILED ("SetWindowPos");
@@ -282,27 +321,16 @@ gdk_window_guffaw_scroll (GdkWindow *window,
}
}
/**
* gdk_window_scroll:
* @window: a #GdkWindow
* @dx: Amount to scroll in the X direction
* @dy: Amount to scroll in the Y direction
*
* Scroll the contents of @window, both pixels and children, by the given
* amount. @window itself does not move. Portions of the window that the scroll
* operation brings in from offscreen areas are invalidated. The invalidated
* region may be bigger than what would strictly be necessary. (For Win32, a
* minimum area will be invalidated if the window has no subwindows, or if the
* edges of the window's parent do not extend beyond the edges of the window. In
* other cases, a multi-step process is used to scroll the window which may
* produce temporary visual artifacts and unnecessary invalidations.)
**/
#endif
void
gdk_window_scroll (GdkWindow *window,
gint dx,
gint dy)
{
#if 0
gboolean can_guffaw_scroll = FALSE;
#endif
GdkRegion *invalidate_region;
GdkWindowImplWin32 *impl;
GdkWindowObject *obj;
@@ -313,6 +341,9 @@ gdk_window_scroll (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
GDK_NOTE (EVENTS, g_print ("gdk_window_scroll: %p %d,%d\n",
GDK_WINDOW_HWND (window), dx, dy));
obj = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
@@ -341,7 +372,7 @@ gdk_window_scroll (GdkWindow *window,
gdk_window_invalidate_region (window, invalidate_region, TRUE);
gdk_region_destroy (invalidate_region);
#if 0
/* We can guffaw scroll if we are a child window, and the parent
* does not extend beyond our edges. Otherwise, we use XCopyArea, then
* move any children later
@@ -352,11 +383,13 @@ gdk_window_scroll (GdkWindow *window,
can_guffaw_scroll = ((dx == 0 || (obj->x <= 0 && obj->x + impl->width >= parent_impl->width)) &&
(dy == 0 || (obj->y <= 0 && obj->y + impl->height >= parent_impl->height)));
}
if (!obj->children || !can_guffaw_scroll)
gdk_window_copy_area_scroll (window, &dest_rect, dx, dy);
else
gdk_window_guffaw_scroll (window, dx, dy);
#else
gdk_window_copy_area_scroll (window, &dest_rect, dx, dy);
#endif
}
void
@@ -371,6 +404,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
GdkWin32PositionInfo new_info;
GdkWindowParentPos parent_pos;
GList *tmp_list;
gint d_xoffset, d_yoffset;
gint dx, dy;
gboolean is_move;
@@ -379,9 +413,14 @@ _gdk_window_move_resize_child (GdkWindow *window,
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
obj = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
GDK_NOTE (MISC, g_print ("_gdk_window_move_resize_child: %s@+%d+%d %dx%d@+%d+%d\n",
gdk_win32_drawable_description (window),
obj->x, obj->y,
width, height, x, y));
dx = x - obj->x;
dy = y - obj->y;
@@ -389,8 +428,13 @@ _gdk_window_move_resize_child (GdkWindow *window,
is_resize = impl->width != width || impl->height != height;
if (!is_move && !is_resize)
return;
{
GDK_NOTE (MISC, g_print ("...neither move or resize\n"));
return;
}
GDK_NOTE (MISC, g_print ("...%s%s\n", is_move ? "is_move " : "", is_resize ? "is_resize" : ""));
obj->x = x;
obj->y = y;
impl->width = width;
@@ -414,6 +458,8 @@ _gdk_window_move_resize_child (GdkWindow *window,
{
GdkRectangle new_position;
GDK_NOTE (MISC, g_print ("...d_xoffset=%d d_yoffset=%d\n", d_xoffset, d_yoffset));
gdk_window_set_static_gravities (window, TRUE);
if (d_xoffset < 0 || d_yoffset < 0)
@@ -422,6 +468,9 @@ _gdk_window_move_resize_child (GdkWindow *window,
compute_intermediate_position (&impl->position_info, &new_info, d_xoffset, d_yoffset,
&new_position);
GDK_NOTE (MISC, g_print ("...SetWindowPos(%p,%s)\n",
GDK_WINDOW_HWND (window),
gdk_win32_gdkrectangle_to_string (&new_position)));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_position.x, new_position.y,
new_position.width, new_position.height,
@@ -435,6 +484,9 @@ _gdk_window_move_resize_child (GdkWindow *window,
tmp_list = tmp_list->next;
}
GDK_NOTE (MISC, g_print ("...SetWindowPos(%p,0x0@+%d+%d)\n",
GDK_WINDOW_HWND (window),
new_position.x + dx, new_position.y + dy));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_position.x + dx, new_position.y + dy, 0, 0,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE | SWP_NOREDRAW))
@@ -443,6 +495,10 @@ _gdk_window_move_resize_child (GdkWindow *window,
if (d_xoffset > 0 || d_yoffset > 0)
gdk_window_queue_translation (window, MAX (d_xoffset, 0), MAX (d_yoffset, 0));
GDK_NOTE (MISC, g_print ("...SetWindowPos(%p,%dx%d@+%d+%d)\n",
GDK_WINDOW_HWND (window),
new_info.width, new_info.height,
new_info.x, new_info.y));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_info.x, new_info.y,
new_info.width, new_info.height,
@@ -453,7 +509,11 @@ _gdk_window_move_resize_child (GdkWindow *window,
gdk_window_tmp_reset_bg (window);
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
{
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_SHOWNA)\n",
GDK_WINDOW_HWND (window)));
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
}
impl->position_info = new_info;
@@ -470,7 +530,11 @@ _gdk_window_move_resize_child (GdkWindow *window,
gdk_window_set_static_gravities (window, FALSE);
if (impl->position_info.mapped && !new_info.mapped)
ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE);
{
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_HIDE)\n",
GDK_WINDOW_HWND (window)));
ShowWindow (GDK_WINDOW_HWND (window), SW_HIDE);
}
tmp_list = obj->children;
while (tmp_list)
@@ -479,10 +543,15 @@ _gdk_window_move_resize_child (GdkWindow *window,
tmp_list = tmp_list->next;
}
GDK_NOTE (MISC, g_print ("...SetWindowPos(%p,%dx%d@+%d+%d)\n",
GDK_WINDOW_HWND (window),
new_info.width, new_info.height,
new_info.x, new_info.y));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_info.x, new_info.y,
new_info.width, new_info.height,
SWP_NOACTIVATE | SWP_NOZORDER |
(is_move ? 0 : SWP_NOMOVE) |
(is_resize ? 0 : SWP_NOSIZE)))
WIN32_API_FAILED ("SetWindowPos");
@@ -497,7 +566,11 @@ _gdk_window_move_resize_child (GdkWindow *window,
gdk_window_tmp_reset_bg (window);
if (!impl->position_info.mapped && new_info.mapped && GDK_WINDOW_IS_MAPPED (obj))
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
{
GDK_NOTE (MISC, g_print ("...ShowWindow(%p, SW_SHOWNA)\n",
GDK_WINDOW_HWND (window)));
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
}
impl->position_info = new_info;
}
@@ -530,9 +603,9 @@ gdk_window_compute_position (GdkWindowImplWin32 *window,
if (parent_pos->x + wrapper->x < -(SIZE_LIMIT/2))
{
if (parent_pos->x + wrapper->x + window->width < (SIZE_LIMIT/2))
info->x = parent_pos->x + wrapper->x + window->width - SIZE_LIMIT - parent_pos->win32_x;
info->x = parent_pos->x + wrapper->x + window->width - info->width - parent_pos->win32_x;
else
info->x = -(SIZE_LIMIT/2) - parent_pos->win32_y;
info->x = -(SIZE_LIMIT/2) - parent_pos->win32_x;
}
else
info->x = parent_pos->x + wrapper->x - parent_pos->win32_x;
@@ -550,7 +623,7 @@ gdk_window_compute_position (GdkWindowImplWin32 *window,
if (parent_pos->y + wrapper->y < -(SIZE_LIMIT/2))
{
if (parent_pos->y + wrapper->y + window->height < (SIZE_LIMIT/2))
info->y = parent_pos->y + wrapper->y + window->height - SIZE_LIMIT - parent_pos->win32_y;
info->y = parent_pos->y + wrapper->y + window->height - info->height - parent_pos->win32_y;
else
info->y = -(SIZE_LIMIT/2) - parent_pos->win32_y;
}
@@ -614,7 +687,8 @@ gdk_window_compute_parent_pos (GdkWindowImplWin32 *window,
g_return_if_fail (GDK_IS_WINDOW_IMPL_WIN32 (window));
wrapper = GDK_WINDOW_OBJECT (GDK_DRAWABLE_IMPL_WIN32 (window)->wrapper);
wrapper =
GDK_WINDOW_OBJECT (GDK_DRAWABLE_IMPL_WIN32 (window)->wrapper);
parent_pos->x = 0;
parent_pos->y = 0;
@@ -701,6 +775,12 @@ gdk_window_premove (GdkWindow *window,
compute_intermediate_position (&impl->position_info, &new_info, d_xoffset, d_yoffset,
&new_position);
GDK_NOTE (MISC, g_print ("gdk_window_premove: %s@+%d+%d\n"
"...SetWindowPos(%s)\n",
gdk_win32_drawable_description (window),
obj->x, obj->y,
gdk_win32_gdkrectangle_to_string (&new_position)));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_position.x, new_position.y,
new_position.width, new_position.height,
@@ -746,6 +826,13 @@ gdk_window_postmove (GdkWindow *window,
if (d_xoffset > 0 || d_yoffset > 0)
gdk_window_queue_translation (window, MAX (d_xoffset, 0), MAX (d_yoffset, 0));
GDK_NOTE (MISC, g_print ("gdk_window_postmove: %s@+%d+%d\n"
"...SetWindowPos(%dx%d@+%d+%d)\n",
gdk_win32_drawable_description (window),
obj->x, obj->y,
new_info.width, new_info.height,
new_info.x, new_info.y));
if (!SetWindowPos (GDK_WINDOW_HWND (window), NULL,
new_info.x, new_info.y,
new_info.width, new_info.height,
@@ -769,87 +856,88 @@ gdk_window_postmove (GdkWindow *window,
}
}
#if 0
static void
gdk_window_queue_append (GdkWindow *window,
GdkWindowQueueItem *item)
{
if (g_slist_length (translate_queue) >= 128)
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
GDK_NOTE (EVENTS, g_print ("gdk_window_queue_append: length >= 128\n"));
_gdk_window_process_expose (window, _gdk_win32_get_next_tick (0),
&impl->position_info.clip_rect);
}
item->window = window;
item->serial = GetTickCount ();
GDK_NOTE (EVENTS, (g_print ("gdk_window_queue_append: %s %p %ld ",
(item->type == GDK_WINDOW_QUEUE_TRANSLATE ?
"TRANSLATE" : "ANTIEXPOSE"),
GDK_WINDOW_HWND (window),
item->serial),
(item->type == GDK_WINDOW_QUEUE_TRANSLATE ?
g_print ("%d,%d\n",
item->u.translate.dx, item->u.translate.dy) :
g_print ("%s\n",
gdk_win32_gdkregion_to_string (item->u.antiexpose.area)))));
gdk_drawable_ref (window);
translate_queue = g_slist_append (translate_queue, item) ;
}
#endif
static void
gdk_window_queue_translation (GdkWindow *window,
gint dx,
gint dy)
{
#if 0
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
item->window = window;
item->serial = GetMessageTime ();
item->type = GDK_WINDOW_QUEUE_TRANSLATE;
item->u.translate.dx = dx;
item->u.translate.dy = dy;
GDK_NOTE (EVENTS, g_print ("gdk_window_queue_translation %#x %ld %d,%d\n",
(guint) GDK_WINDOW_HWND (window),
item->serial,
dx, dy));
gdk_drawable_ref (window);
translate_queue = g_slist_append (translate_queue, item);
gdk_window_queue_append (window, item);
#endif
}
gboolean
_gdk_windowing_window_queue_antiexpose (GdkWindow *window,
GdkRegion *area)
{
#if 1
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
HRGN hrgn = _gdk_win32_gdkregion_to_hrgn (area, 0, 0);
item->window = window;
item->serial = GetMessageTime ();
item->type = GDK_WINDOW_QUEUE_ANTIEXPOSE;
item->u.antiexpose.area = area;
GDK_NOTE (EVENTS, g_print ("_gdk_windowing_window_queue_antiexpose: ValidateRgn %p %s\n",
GDK_WINDOW_HWND (window),
gdk_win32_gdkregion_to_string (area)));
GDK_NOTE (EVENTS, g_print ("_gdk_windowing_window_queue_antiexpose %#x %ld %dx%d@+%d+%d\n",
(guint) GDK_WINDOW_HWND (window),
item->serial,
area->extents.x2 - area->extents.x1,
area->extents.y2 - area->extents.y1,
area->extents.x1, area->extents.y1));
ValidateRgn (GDK_WINDOW_HWND (window), hrgn);
gdk_drawable_ref (window);
translate_queue = g_slist_append (translate_queue, item);
DeleteObject (hrgn);
return TRUE;
#else
GdkRectangle r;
HRGN hrgn;
gdk_region_get_clipbox (area, &r);
hrgn = CreateRectRgn(r.x, r.y, r.width+1, r.height+1);
g_return_val_if_fail (area != NULL, FALSE);
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_queue_antiexpose %#x\n",
(guint) GDK_WINDOW_HWND (window)));
/* HB: not quite sure if this is the right thing to do.
* (Region not to be proceesed by next WM_PAINT)
*/
ValidateRgn(GDK_WINDOW_HWND (window), hrgn);
DeleteObject(hrgn);
return TRUE;
#endif
return FALSE;
}
void
_gdk_window_process_expose (GdkWindow *window,
gulong serial,
GdkRectangle *area)
GdkRegion *invalidate_region)
{
GdkWindowImplWin32 *impl;
GdkRegion *invalidate_region = gdk_region_rectangle (area);
GdkRegion *clip_region;
#if 0
GSList *tmp_list = translate_queue;
#endif
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose %#x %ld %dx%d@+%d+%d\n",
(guint) GDK_WINDOW_HWND (window), serial,
area->width, area->height, area->x, area->y));
GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose: %p %s\n",
GDK_WINDOW_HWND (window),
gdk_win32_gdkregion_to_string (invalidate_region)));
#if 0
while (tmp_list)
{
GdkWindowQueueItem *item = tmp_list->data;
@@ -860,15 +948,33 @@ _gdk_window_process_expose (GdkWindow *window,
if (item->window == window)
{
if (item->type == GDK_WINDOW_QUEUE_TRANSLATE)
gdk_region_offset (invalidate_region, - item->u.translate.dx, - item->u.translate.dy);
{
GDK_NOTE (EVENTS, g_print ("...item %ld xlating region by %d,%d\n",
item->serial,
item->u.translate.dx, item->u.translate.dy));
gdk_region_offset (invalidate_region, - item->u.translate.dx, - item->u.translate.dy);
}
else /* anti-expose */
gdk_region_subtract (invalidate_region, item->u.antiexpose.area);
{
#ifdef G_ENABLE_DEBUG
GdkRectangle rect;
GDK_NOTE (EVENTS,
(gdk_region_get_clipbox (item->u.antiexpose.area, &rect),
g_print ("...item %ld antiexposing %s\n",
item->serial,
gdk_win32_gdkrectangle_to_string (&rect))));
#endif
gdk_region_subtract (invalidate_region, item->u.antiexpose.area);
}
}
}
else
{
GSList *tmp_link = translate_queue;
GDK_NOTE (EVENTS, g_print ("...item %ld being removed\n", item->serial));
translate_queue = g_slist_remove_link (translate_queue, translate_queue);
gdk_drawable_unref (item->window);
@@ -880,13 +986,14 @@ _gdk_window_process_expose (GdkWindow *window,
}
}
GDK_NOTE (EVENTS, g_print ("...queue length now %d\n", g_slist_length (translate_queue)));
#endif
clip_region = gdk_region_rectangle (&impl->position_info.clip_rect);
gdk_region_intersect (invalidate_region, clip_region);
if (!gdk_region_empty (invalidate_region))
gdk_window_invalidate_region (window, invalidate_region, FALSE);
gdk_region_destroy (invalidate_region);
gdk_region_destroy (clip_region);
}
@@ -934,7 +1041,9 @@ gdk_window_tmp_reset_bg (GdkWindow *window)
}
static void
gdk_window_clip_changed (GdkWindow *window, GdkRectangle *old_clip, GdkRectangle *new_clip)
gdk_window_clip_changed (GdkWindow *window,
GdkRectangle *old_clip,
GdkRectangle *new_clip)
{
GdkWindowImplWin32 *impl;
GdkWindowObject *obj;
@@ -966,6 +1075,9 @@ gdk_window_clip_changed (GdkWindow *window, GdkRectangle *old_clip, GdkRectangle
if (!gdk_region_empty (new_clip_region))
{
gdk_window_tmp_unset_bg (window);
GDK_NOTE (EVENTS,
g_print ("gdk_window_clip_changed: invalidating region: %s\n",
gdk_win32_gdkregion_to_string (new_clip_region)));
gdk_window_invalidate_region (window, new_clip_region, FALSE);
}
-1
View File
@@ -52,5 +52,4 @@ GdkAtom _gdk_selection_property;
DWORD windows_version;
gint gdk_input_ignore_wintab = FALSE;
gint gdk_event_func_from_window_proc = FALSE;
gint gdk_max_colors = 0;
+7 -4
View File
@@ -142,7 +142,7 @@ _gdk_win32_setup_pixmap_image (GdkPixmap *pixmap,
image->bpp = 4;
break;
default:
g_warning ("_gdk_win32_setup_pixmap_image: depth=%d", image->depth);
g_warning ("_gdk_win32_setup_pixmap_image: depth=%d", depth);
g_assert_not_reached ();
}
if (depth == 1)
@@ -154,6 +154,9 @@ _gdk_win32_setup_pixmap_image (GdkPixmap *pixmap,
image->bits_per_pixel = image->depth;
image->mem = bits;
GDK_NOTE (IMAGE, g_print ("_gdk_win32_setup_pixmap_image: %dx%dx%d (bpl:%d) = %p\n",
width, height, depth, image->bpl, image));
return image;
}
@@ -369,6 +372,9 @@ gdk_win32_image_destroy (GdkImage *image)
pixmap = image->windowing_data;
GDK_NOTE (IMAGE, g_print ("gdk_win32_image_destroy: %p pixmap=%p\n",
image, pixmap));
if (pixmap == NULL) /* This means that _gdk_image_exit()
* destroyed the image already, and
* now we're called a second time from
@@ -376,9 +382,6 @@ gdk_win32_image_destroy (GdkImage *image)
*/
return;
GDK_NOTE (IMAGE, g_print ("gdk_win32_image_destroy: %p\n",
GDK_PIXMAP_HBITMAP (pixmap)));
gdk_pixmap_unref (pixmap);
image->windowing_data = NULL;
}
+7 -7
View File
@@ -246,7 +246,7 @@ gdk_input_wintab_init (void)
wa.window_type = GDK_WINDOW_TOPLEVEL;
if ((wintab_window = gdk_window_new (NULL, &wa, GDK_WA_X|GDK_WA_Y)) == NULL)
{
g_warning ("_gdk_input_init: gdk_window_new failed");
g_warning ("gdk_input_wintab_init: gdk_window_new failed");
return;
}
gdk_drawable_ref (wintab_window);
@@ -330,7 +330,7 @@ gdk_input_wintab_init (void)
hctx = g_new (HCTX, 1);
if ((*hctx = WTOpen (GDK_WINDOW_HWND (wintab_window), &lc, TRUE)) == NULL)
{
g_warning ("_gdk_input_init: WTOpen failed");
g_warning ("gdk_input_wintab_init: WTOpen failed");
return;
}
GDK_NOTE (INPUT, g_print ("opened Wintab device %d %p\n",
@@ -566,8 +566,8 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
if (gdkdev->info.mode == GDK_MODE_SCREEN)
{
x_scale = gdk_screen_width() / device_width;
y_scale = gdk_screen_height() / device_height;
x_scale = GetSystemMetrics (SM_CXSCREEN) / device_width;
y_scale = GetSystemMetrics (SM_CYSCREEN) / device_height;
x_offset = - input_window->root_x;
y_offset = - input_window->root_y;
@@ -846,7 +846,7 @@ _gdk_input_other_event (GdkEvent *event,
if (event->any.type == GDK_BUTTON_PRESS
|| event->any.type == GDK_BUTTON_RELEASE)
{
event->button.time = msg->time;
event->button.time = _gdk_win32_get_next_tick (msg->time);
event->button.device = &gdkdev->info;
#if 0
@@ -875,7 +875,7 @@ _gdk_input_other_event (GdkEvent *event,
}
else
{
event->motion.time = msg->time;
event->motion.time = _gdk_win32_get_next_tick (msg->time);
event->motion.is_hint = FALSE;
event->motion.device = &gdkdev->info;
@@ -944,7 +944,7 @@ _gdk_input_other_event (GdkEvent *event,
event->proximity.type = GDK_PROXIMITY_IN;
_gdk_input_ignore_core = TRUE;
}
event->proximity.time = msg->time;
event->proximity.time = _gdk_win32_get_next_tick (msg->time);
event->proximity.device = &gdkdev->info;
GDK_NOTE (EVENTS_OR_INPUT,
+25 -22
View File
@@ -44,6 +44,30 @@ static GdkKeymap *default_keymap = NULL;
static guint *keysym_tab = NULL;
#ifdef G_ENABLE_DEBUG
static void
print_keysym_tab (void)
{
gint vk;
g_print ("keymap:\n");
for (vk = 0; vk < 256; vk++)
{
gint state;
g_print ("%#.02x: ", vk);
for (state = 0; state < 4; state++)
{
gchar *name = gdk_keyval_name (keysym_tab[vk*4 + state]);
if (name == NULL)
name = "(none)";
g_print ("%s ", name);
}
g_print ("\n");
}
}
#endif
static void
update_keymap (void)
{
@@ -262,28 +286,7 @@ update_keymap (void)
key_state[vk] = 0;
}
}
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_EVENTS)
{
gint vk;
g_print ("keymap:\n");
for (vk = 0; vk < 256; vk++)
{
gint state;
g_print ("%#.02x: ", vk);
for (state = 0; state < 4; state++)
{
gchar *name = gdk_keyval_name (keysym_tab[vk*4 + state]);
if (name == NULL)
name = "(none)";
g_print ("%s ", name);
}
g_print ("\n");
}
}
#endif
GDK_NOTE (EVENTS, print_keysym_tab ());
}
GdkKeymap*
+700 -15
View File
@@ -34,6 +34,7 @@
#include <io.h>
#include "gdk.h"
#include "gdkregion-generic.h"
#include "gdkkeysyms.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
@@ -41,6 +42,14 @@
#include <objbase.h>
#if defined (__GNUC__) && defined (HAVE_DIMM_H)
/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
# define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
# define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
#endif
#include <imm.h>
static gboolean gdk_synchronize = FALSE;
GdkArgDesc _gdk_windowing_args[] = {
@@ -49,17 +58,14 @@ GdkArgDesc _gdk_windowing_args[] = {
(GdkArgFunc) NULL},
{ "ignore-wintab", GDK_ARG_BOOL, &gdk_input_ignore_wintab,
(GdkArgFunc) NULL},
{ "event-func-from-window-proc",
GDK_ARG_BOOL, &gdk_event_func_from_window_proc,
(GdkArgFunc) NULL},
{ "max-colors", GDK_ARG_INT, &gdk_max_colors, (GdkArgFunc) NULL},
{ NULL }
};
int __stdcall
DllMain(HINSTANCE hinstDLL,
DWORD dwReason,
LPVOID reserved)
DllMain (HINSTANCE hinstDLL,
DWORD dwReason,
LPVOID reserved)
{
gdk_dll_hinstance = hinstDLL;
@@ -76,8 +82,6 @@ _gdk_windowing_init_check (int argc,
if (getenv ("GDK_IGNORE_WINTAB") != NULL)
gdk_input_ignore_wintab = TRUE;
#endif
if (getenv ("GDK_EVENT_FUNC_FROM_WINDOW_PROC") != NULL)
gdk_event_func_from_window_proc = TRUE;
if (gdk_synchronize)
GdiSetBatchLimit (1);
@@ -87,14 +91,19 @@ _gdk_windowing_init_check (int argc,
gdk_root_window = GetDesktopWindow ();
windows_version = GetVersion ();
if (getenv ("PRETEND_WIN9X"))
windows_version = 0x80000004;
GDK_NOTE (MISC, g_print ("Windows version: %08x\n", windows_version));
_gdk_input_locale = GetKeyboardLayout (0);
GetLocaleInfo (MAKELCID (LOWORD (_gdk_input_locale), SORT_DEFAULT),
LOCALE_IDEFAULTANSICODEPAGE,
buf, sizeof (buf));
_gdk_input_codepage = atoi (buf);
GDK_NOTE (MISC, g_print ("input_locale: %#lx, codepage:%d\n",
_gdk_input_locale, _gdk_input_codepage));
GDK_NOTE (EVENTS, g_print ("input_locale:%p, codepage:%d\n",
_gdk_input_locale, _gdk_input_codepage));
CoInitialize (NULL);
cf_rtf = RegisterClipboardFormat ("Rich Text Format");
@@ -219,7 +228,7 @@ gdk_screen_height (void)
gint
gdk_screen_width_mm (void)
{
return GetDeviceCaps (gdk_display_hdc, HORZSIZE);
return (double) GetDeviceCaps (gdk_display_hdc, HORZRES) / GetDeviceCaps (gdk_display_hdc, LOGPIXELSX) * 25.4;
}
/*
@@ -240,19 +249,19 @@ gdk_screen_width_mm (void)
gint
gdk_screen_height_mm (void)
{
return GetDeviceCaps (gdk_display_hdc, VERTSIZE);
return (double) GetDeviceCaps (gdk_display_hdc, VERTRES) / GetDeviceCaps (gdk_display_hdc, LOGPIXELSY) * 25.4;
}
void
gdk_set_sm_client_id (const gchar* sm_client_id)
{
g_warning("gdk_set_sm_client_id %s", sm_client_id ? sm_client_id : "NULL");
g_warning ("gdk_set_sm_client_id %s", sm_client_id ? sm_client_id : "NULL");
}
void
gdk_beep (void)
{
Beep(1000, 50);
Beep (1000, 50);
}
void
@@ -280,3 +289,679 @@ gdk_error_trap_pop (void)
{
return 0;
}
#ifdef G_ENABLE_DEBUG
/*
* Like g_strdup_printf, but to a static buffer. Return value does not
* have to be g_free()d. The buffer is of bounded size and reused
* cyclically. Thus the return value is valid only until that part of
* the buffer happens to get reused. This doesn't matter as this
* function's return value is used in debugging output right after the call,
* and the return value isn't used after that.
*/
static gchar *
static_printf (const gchar *format,
...)
{
static gchar buf[10000];
gchar *msg;
static gchar *bufp = buf;
gchar *retval;
va_list args;
va_start (args, format);
msg = g_strdup_vprintf (format, args);
va_end (args);
g_assert (strlen (msg) < sizeof (buf));
if (bufp + strlen (msg) + 1 > buf + sizeof (buf))
bufp = buf;
retval = bufp;
strcpy (bufp, msg);
bufp += strlen (msg) + 1;
g_free (msg);
return retval;
}
gchar *
gdk_win32_color_to_string (const GdkColor *color)
{
return static_printf ("(%.04x,%.04x,%.04x):%.06x",
color->red, color->green,
color->blue, color->pixel);
}
void
gdk_win32_print_paletteentries (const PALETTEENTRY *pep,
const int nentries)
{
char buf[20];
int i;
for (i = 0; i < nentries; i++)
g_print (" %3d %02x: %02x %02x %02x%s\n",
i, i,
pep[i].peRed, pep[i].peGreen, pep[i].peBlue,
(pep[i].peFlags == 0 ? "" :
(pep[i].peFlags == PC_EXPLICIT ? " PC_EXPLICIT" :
(pep[i].peFlags == PC_NOCOLLAPSE ? " PC_NOCOLLAPSE" :
(pep[i].peFlags == PC_RESERVED ? " PC_RESERVED" :
(sprintf (buf, " %d", pep[i].peFlags), buf))))));
}
void
gdk_win32_print_system_palette (void)
{
PALETTEENTRY *pe;
int k;
k = GetSystemPaletteEntries (gdk_display_hdc, 0, 0, NULL);
pe = g_new (PALETTEENTRY, k);
k = GetSystemPaletteEntries (gdk_display_hdc, 0, k, pe);
if (!k)
g_print ("GetSystemPaletteEntries failed: %s\n",
g_win32_error_message (GetLastError ()));
else
{
g_print ("System palette: %d entries\n", k);
gdk_win32_print_paletteentries (pe, k);
}
g_free (pe);
}
static gint
palette_size (HPALETTE hpal)
{
WORD npal = 0;
if (!GetObject (hpal, sizeof (npal), &npal))
WIN32_GDI_FAILED ("GetObject (HPALETTE)");
return npal;
}
void
gdk_win32_print_hpalette (HPALETTE hpal)
{
PALETTEENTRY *pe;
gint n, npal;
npal = palette_size (hpal);
pe = g_new (PALETTEENTRY, npal);
n = GetPaletteEntries (hpal, 0, npal, pe);
if (!n)
g_print ("HPALETTE %p: GetPaletteEntries failed: %s\n",
hpal, g_win32_error_message (GetLastError ()));
else
{
g_print ("HPALETTE %p: %d (%d) entries\n", hpal, n, npal);
gdk_win32_print_paletteentries (pe, n);
}
g_free (pe);
}
void
gdk_win32_print_dc (HDC hdc)
{
HGDIOBJ obj;
LOGBRUSH logbrush;
EXTLOGPEN extlogpen;
HRGN hrgn;
RECT rect;
int flag;
g_print ("%p\n", hdc);
obj = GetCurrentObject (hdc, OBJ_BRUSH);
GetObject (obj, sizeof (LOGBRUSH), &logbrush);
g_print ("brush: %s color=%06lx hatch=%p\n",
gdk_win32_lbstyle_to_string (logbrush.lbStyle),
logbrush.lbColor, (gpointer) logbrush.lbHatch);
obj = GetCurrentObject (hdc, OBJ_PEN);
GetObject (obj, sizeof (EXTLOGPEN), &extlogpen);
g_print ("pen: %s %s %s %s w=%d %s\n",
gdk_win32_pstype_to_string (extlogpen.elpPenStyle),
gdk_win32_psstyle_to_string (extlogpen.elpPenStyle),
gdk_win32_psendcap_to_string (extlogpen.elpPenStyle),
gdk_win32_psjoin_to_string (extlogpen.elpPenStyle),
extlogpen.elpWidth,
gdk_win32_lbstyle_to_string (extlogpen.elpBrushStyle));
g_print ("rop2: %s textcolor=%06lx\n",
gdk_win32_rop2_to_string (GetROP2 (hdc)),
GetTextColor (hdc));
hrgn = CreateRectRgn (0, 0, 0, 0);
if ((flag = GetClipRgn (hdc, hrgn)) == -1)
WIN32_API_FAILED ("GetClipRgn");
else if (flag == 0)
g_print ("no clip region\n");
else if (flag == 1)
{
GetRgnBox (hrgn, &rect);
g_print ("clip region: %p bbox: %s\n",
hrgn, gdk_win32_rect_to_string (&rect));
}
DeleteObject (hrgn);
}
gchar *
gdk_win32_cap_style_to_string (GdkCapStyle cap_style)
{
switch (cap_style)
{
#define CASE(x) case GDK_CAP_##x: return #x
CASE (NOT_LAST);
CASE (BUTT);
CASE (ROUND);
CASE (PROJECTING);
#undef CASE
default: return static_printf ("illegal_%d", cap_style);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_fill_style_to_string (GdkFill fill)
{
switch (fill)
{
#define CASE(x) case GDK_##x: return #x
CASE (SOLID);
CASE (TILED);
CASE (STIPPLED);
CASE (OPAQUE_STIPPLED);
#undef CASE
default: return static_printf ("illegal_%d", fill);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_function_to_string (GdkFunction function)
{
switch (function)
{
#define CASE(x) case GDK_##x: return #x
CASE (COPY);
CASE (INVERT);
CASE (XOR);
CASE (CLEAR);
CASE (AND);
CASE (AND_REVERSE);
CASE (AND_INVERT);
CASE (NOOP);
CASE (OR);
CASE (EQUIV);
CASE (OR_REVERSE);
CASE (COPY_INVERT);
CASE (OR_INVERT);
CASE (NAND);
CASE (SET);
#undef CASE
default: return static_printf ("illegal_%d", function);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_join_style_to_string (GdkJoinStyle join_style)
{
switch (join_style)
{
#define CASE(x) case GDK_JOIN_##x: return #x
CASE (MITER);
CASE (ROUND);
CASE (BEVEL);
#undef CASE
default: return static_printf ("illegal_%d", join_style);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_line_style_to_string (GdkLineStyle line_style)
{
switch (line_style)
{
#define CASE(x) case GDK_LINE_##x: return #x
CASE(SOLID);
CASE(ON_OFF_DASH);
CASE(DOUBLE_DASH);
#undef CASE
default: return static_printf ("illegal_%d", line_style);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask)
{
gchar buf[400];
gchar *bufp = buf;
gchar *s = "";
#define BIT(x) \
if (mask & GDK_GC_##x) \
(bufp += sprintf (bufp, "%s" #x, s), s = "|")
BIT (FOREGROUND);
BIT (BACKGROUND);
BIT (FONT);
BIT (FUNCTION);
BIT (FILL);
BIT (TILE);
BIT (STIPPLE);
BIT (CLIP_MASK);
BIT (SUBWINDOW);
BIT (TS_X_ORIGIN);
BIT (TS_Y_ORIGIN);
BIT (CLIP_X_ORIGIN);
BIT (CLIP_Y_ORIGIN);
BIT (EXPOSURES);
BIT (LINE_WIDTH);
BIT (LINE_STYLE);
BIT (CAP_STYLE);
BIT (JOIN_STYLE);
#undef BIT
return static_printf ("%s", buf);
}
gchar *
gdk_win32_rop2_to_string (int rop2)
{
switch (rop2)
{
#define CASE(x) case R2_##x: return #x
CASE (BLACK);
CASE (COPYPEN);
CASE (MASKNOTPEN);
CASE (MASKPEN);
CASE (MASKPENNOT);
CASE (MERGENOTPEN);
CASE (MERGEPEN);
CASE (MERGEPENNOT);
CASE (NOP);
CASE (NOT);
CASE (NOTCOPYPEN);
CASE (NOTMASKPEN);
CASE (NOTMERGEPEN);
CASE (NOTXORPEN);
CASE (WHITE);
CASE (XORPEN);
#undef CASE
default: return static_printf ("illegal_%x", rop2);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_lbstyle_to_string (UINT brush_style)
{
switch (brush_style)
{
#define CASE(x) case BS_##x: return #x
CASE (DIBPATTERN);
CASE (DIBPATTERNPT);
CASE (HATCHED);
CASE (HOLLOW);
CASE (PATTERN);
CASE (SOLID);
#undef CASE
default: return static_printf ("illegal_%d", brush_style);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_pstype_to_string (DWORD pen_style)
{
switch (pen_style & PS_TYPE_MASK)
{
case PS_GEOMETRIC: return "GEOMETRIC";
case PS_COSMETIC: return "COSMETIC";
default: return static_printf ("illegal_%d", pen_style & PS_TYPE_MASK);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_psstyle_to_string (DWORD pen_style)
{
switch (pen_style & PS_STYLE_MASK)
{
#define CASE(x) case PS_##x: return #x
CASE (DASH);
CASE (DASHDOT);
CASE (DASHDOTDOT);
CASE (DOT);
CASE (INSIDEFRAME);
CASE (NULL);
CASE (SOLID);
CASE (USERSTYLE);
#undef CASE
default: return static_printf ("illegal_%d", pen_style & PS_STYLE_MASK);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_psendcap_to_string (DWORD pen_style)
{
switch (pen_style & PS_ENDCAP_MASK)
{
#define CASE(x) case PS_ENDCAP_##x: return #x
CASE (FLAT);
CASE (ROUND);
CASE (SQUARE);
#undef CASE
default: return static_printf ("illegal_%d", pen_style & PS_ENDCAP_MASK);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_psjoin_to_string (DWORD pen_style)
{
switch (pen_style & PS_JOIN_MASK)
{
#define CASE(x) case PS_JOIN_##x: return #x
CASE (BEVEL);
CASE (MITER);
CASE (ROUND);
#undef CASE
default: return static_printf ("illegal_%d", pen_style & PS_JOIN_MASK);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_message_to_string (UINT msg)
{
switch (msg)
{
#define CASE(x) case x: return #x
CASE (WM_NULL);
CASE (WM_CREATE);
CASE (WM_DESTROY);
CASE (WM_MOVE);
CASE (WM_SIZE);
CASE (WM_ACTIVATE);
CASE (WM_SETFOCUS);
CASE (WM_KILLFOCUS);
CASE (WM_ENABLE);
CASE (WM_SETREDRAW);
CASE (WM_SETTEXT);
CASE (WM_GETTEXT);
CASE (WM_GETTEXTLENGTH);
CASE (WM_PAINT);
CASE (WM_CLOSE);
CASE (WM_QUERYENDSESSION);
CASE (WM_QUERYOPEN);
CASE (WM_ENDSESSION);
CASE (WM_QUIT);
CASE (WM_ERASEBKGND);
CASE (WM_SYSCOLORCHANGE);
CASE (WM_SHOWWINDOW);
CASE (WM_WININICHANGE);
CASE (WM_DEVMODECHANGE);
CASE (WM_ACTIVATEAPP);
CASE (WM_FONTCHANGE);
CASE (WM_TIMECHANGE);
CASE (WM_CANCELMODE);
CASE (WM_SETCURSOR);
CASE (WM_MOUSEACTIVATE);
CASE (WM_CHILDACTIVATE);
CASE (WM_QUEUESYNC);
CASE (WM_GETMINMAXINFO);
CASE (WM_PAINTICON);
CASE (WM_ICONERASEBKGND);
CASE (WM_NEXTDLGCTL);
CASE (WM_SPOOLERSTATUS);
CASE (WM_DRAWITEM);
CASE (WM_MEASUREITEM);
CASE (WM_DELETEITEM);
CASE (WM_VKEYTOITEM);
CASE (WM_CHARTOITEM);
CASE (WM_SETFONT);
CASE (WM_GETFONT);
CASE (WM_SETHOTKEY);
CASE (WM_GETHOTKEY);
CASE (WM_QUERYDRAGICON);
CASE (WM_COMPAREITEM);
CASE (WM_GETOBJECT);
CASE (WM_COMPACTING);
CASE (WM_WINDOWPOSCHANGING);
CASE (WM_WINDOWPOSCHANGED);
CASE (WM_POWER);
CASE (WM_COPYDATA);
CASE (WM_CANCELJOURNAL);
CASE (WM_NOTIFY);
CASE (WM_INPUTLANGCHANGEREQUEST);
CASE (WM_INPUTLANGCHANGE);
CASE (WM_TCARD);
CASE (WM_HELP);
CASE (WM_USERCHANGED);
CASE (WM_NOTIFYFORMAT);
CASE (WM_CONTEXTMENU);
CASE (WM_STYLECHANGING);
CASE (WM_STYLECHANGED);
CASE (WM_DISPLAYCHANGE);
CASE (WM_GETICON);
CASE (WM_SETICON);
CASE (WM_NCCREATE);
CASE (WM_NCDESTROY);
CASE (WM_NCCALCSIZE);
CASE (WM_NCHITTEST);
CASE (WM_NCPAINT);
CASE (WM_NCACTIVATE);
CASE (WM_GETDLGCODE);
CASE (WM_SYNCPAINT);
CASE (WM_NCMOUSEMOVE);
CASE (WM_NCLBUTTONDOWN);
CASE (WM_NCLBUTTONUP);
CASE (WM_NCLBUTTONDBLCLK);
CASE (WM_NCRBUTTONDOWN);
CASE (WM_NCRBUTTONUP);
CASE (WM_NCRBUTTONDBLCLK);
CASE (WM_NCMBUTTONDOWN);
CASE (WM_NCMBUTTONUP);
CASE (WM_NCMBUTTONDBLCLK);
CASE (WM_NCXBUTTONDOWN);
CASE (WM_NCXBUTTONUP);
CASE (WM_NCXBUTTONDBLCLK);
CASE (WM_KEYDOWN);
CASE (WM_KEYUP);
CASE (WM_CHAR);
CASE (WM_DEADCHAR);
CASE (WM_SYSKEYDOWN);
CASE (WM_SYSKEYUP);
CASE (WM_SYSCHAR);
CASE (WM_SYSDEADCHAR);
CASE (WM_KEYLAST);
CASE (WM_IME_STARTCOMPOSITION);
CASE (WM_IME_ENDCOMPOSITION);
CASE (WM_IME_COMPOSITION);
CASE (WM_INITDIALOG);
CASE (WM_COMMAND);
CASE (WM_SYSCOMMAND);
CASE (WM_TIMER);
CASE (WM_HSCROLL);
CASE (WM_VSCROLL);
CASE (WM_INITMENU);
CASE (WM_INITMENUPOPUP);
CASE (WM_MENUSELECT);
CASE (WM_MENUCHAR);
CASE (WM_ENTERIDLE);
CASE (WM_MENURBUTTONUP);
CASE (WM_MENUDRAG);
CASE (WM_MENUGETOBJECT);
CASE (WM_UNINITMENUPOPUP);
CASE (WM_MENUCOMMAND);
CASE (WM_CHANGEUISTATE);
CASE (WM_UPDATEUISTATE);
CASE (WM_QUERYUISTATE);
CASE (WM_CTLCOLORMSGBOX);
CASE (WM_CTLCOLOREDIT);
CASE (WM_CTLCOLORLISTBOX);
CASE (WM_CTLCOLORBTN);
CASE (WM_CTLCOLORDLG);
CASE (WM_CTLCOLORSCROLLBAR);
CASE (WM_CTLCOLORSTATIC);
CASE (WM_MOUSEMOVE);
CASE (WM_LBUTTONDOWN);
CASE (WM_LBUTTONUP);
CASE (WM_LBUTTONDBLCLK);
CASE (WM_RBUTTONDOWN);
CASE (WM_RBUTTONUP);
CASE (WM_RBUTTONDBLCLK);
CASE (WM_MBUTTONDOWN);
CASE (WM_MBUTTONUP);
CASE (WM_MBUTTONDBLCLK);
CASE (WM_MOUSEWHEEL);
CASE (WM_XBUTTONDOWN);
CASE (WM_XBUTTONUP);
CASE (WM_XBUTTONDBLCLK);
CASE (WM_PARENTNOTIFY);
CASE (WM_ENTERMENULOOP);
CASE (WM_EXITMENULOOP);
CASE (WM_NEXTMENU);
CASE (WM_SIZING);
CASE (WM_CAPTURECHANGED);
CASE (WM_MOVING);
CASE (WM_POWERBROADCAST);
CASE (WM_DEVICECHANGE);
CASE (WM_MDICREATE);
CASE (WM_MDIDESTROY);
CASE (WM_MDIACTIVATE);
CASE (WM_MDIRESTORE);
CASE (WM_MDINEXT);
CASE (WM_MDIMAXIMIZE);
CASE (WM_MDITILE);
CASE (WM_MDICASCADE);
CASE (WM_MDIICONARRANGE);
CASE (WM_MDIGETACTIVE);
CASE (WM_MDISETMENU);
CASE (WM_ENTERSIZEMOVE);
CASE (WM_EXITSIZEMOVE);
CASE (WM_DROPFILES);
CASE (WM_MDIREFRESHMENU);
CASE (WM_IME_SETCONTEXT);
CASE (WM_IME_NOTIFY);
CASE (WM_IME_CONTROL);
CASE (WM_IME_COMPOSITIONFULL);
CASE (WM_IME_SELECT);
CASE (WM_IME_CHAR);
CASE (WM_IME_REQUEST);
CASE (WM_IME_KEYDOWN);
CASE (WM_IME_KEYUP);
CASE (WM_MOUSEHOVER);
CASE (WM_MOUSELEAVE);
CASE (WM_NCMOUSEHOVER);
CASE (WM_NCMOUSELEAVE);
CASE (WM_CUT);
CASE (WM_COPY);
CASE (WM_PASTE);
CASE (WM_CLEAR);
CASE (WM_UNDO);
CASE (WM_RENDERFORMAT);
CASE (WM_RENDERALLFORMATS);
CASE (WM_DESTROYCLIPBOARD);
CASE (WM_DRAWCLIPBOARD);
CASE (WM_PAINTCLIPBOARD);
CASE (WM_VSCROLLCLIPBOARD);
CASE (WM_SIZECLIPBOARD);
CASE (WM_ASKCBFORMATNAME);
CASE (WM_CHANGECBCHAIN);
CASE (WM_HSCROLLCLIPBOARD);
CASE (WM_QUERYNEWPALETTE);
CASE (WM_PALETTEISCHANGING);
CASE (WM_PALETTECHANGED);
CASE (WM_HOTKEY);
CASE (WM_PRINT);
CASE (WM_PRINTCLIENT);
CASE (WM_APPCOMMAND);
CASE (WM_HANDHELDFIRST);
CASE (WM_HANDHELDLAST);
CASE (WM_AFXFIRST);
CASE (WM_AFXLAST);
CASE (WM_PENWINFIRST);
CASE (WM_PENWINLAST);
CASE (WM_APP);
#undef CASE
default:
if (msg >= WM_HANDHELDFIRST && msg <= WM_HANDHELDLAST)
return static_printf ("WM_HANDHELDFIRST+%d", msg - WM_HANDHELDFIRST);
else if (msg >= WM_AFXFIRST && msg <= WM_AFXLAST)
return static_printf ("WM_AFXFIRST+%d", msg - WM_AFXFIRST);
else if (msg >= WM_PENWINFIRST && msg <= WM_PENWINLAST)
return static_printf ("WM_PENWINFIRST+%d", msg - WM_PENWINFIRST);
else if (msg >= WM_USER && msg <= 0x7FFF)
return static_printf ("WM_USER+%d", msg - WM_USER);
else if (msg >= 0xC000 && msg <= 0xFFFF)
return static_printf ("reg-%#x", msg);
else
return static_printf ("unk-%#x", msg);
}
/* NOTREACHED */
return NULL;
}
gchar *
gdk_win32_rect_to_string (const RECT *rect)
{
return static_printf ("%ldx%ld@+%ld+%ld",
(rect->right - rect->left), (rect->bottom - rect->top),
rect->left, rect->top);
}
gchar *
gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect)
{
return static_printf ("%dx%d@+%d+%d",
rect->width, rect->height,
rect->x, rect->y);
}
gchar *
gdk_win32_gdkregion_to_string (const GdkRegion *rgn)
{
return static_printf ("%dx%d@+%d+%d",
(rgn->extents.x2 - rgn->extents.x1),
(rgn->extents.y2 - rgn->extents.y1),
rgn->extents.x1, rgn->extents.y1);
}
gchar *
gdk_win32_drawable_description (GdkDrawable *d)
{
GdkVisual *v;
gint width, height;
gdk_drawable_get_size (d, &width, &height);
return static_printf
("%s:%p:%dx%dx%d",
G_OBJECT_TYPE_NAME (d),
GDK_DRAWABLE_HANDLE (d),
width, height,
(GDK_IS_PIXMAP (d) ? GDK_PIXMAP_IMPL_WIN32 (GDK_PIXMAP_OBJECT (d)->impl)->image->depth
: ((v = gdk_drawable_get_visual (d)) ? v->depth : gdk_visual_get_system ()->depth)));
}
#endif /* G_ENABLE_DEBUG */
+34 -44
View File
@@ -101,6 +101,7 @@ gdk_pixmap_impl_win32_finalize (GObject *object)
{
GdkPixmapImplWin32 *impl = GDK_PIXMAP_IMPL_WIN32 (object);
GdkPixmap *wrapper = GDK_PIXMAP (GDK_DRAWABLE_IMPL_WIN32 (impl)->wrapper);
GdkImage *image = impl->image;
GDK_NOTE (PIXMAP, g_print ("gdk_pixmap_impl_win32_finalize: %p\n",
GDK_PIXMAP_HBITMAP (wrapper)));
@@ -110,6 +111,9 @@ gdk_pixmap_impl_win32_finalize (GObject *object)
gdk_win32_handle_table_remove (GDK_PIXMAP_HBITMAP (wrapper));
image->windowing_data = NULL;
g_object_unref (image);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -125,11 +129,10 @@ gdk_pixmap_impl_win32_get_size (GdkDrawable *drawable,
}
GdkPixmap*
_gdk_win32_pixmap_new (GdkWindow *window,
GdkVisual *visual,
gint width,
gint height,
gint depth)
gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth)
{
struct {
BITMAPINFOHEADER bmiHeader;
@@ -141,38 +144,33 @@ _gdk_win32_pixmap_new (GdkWindow *window,
} bmi;
UINT iUsage;
HDC hdc;
HWND hwnd;
HPALETTE holdpal = NULL;
HBITMAP hbitmap;
GdkPixmap *pixmap;
GdkDrawableImplWin32 *drawable_impl;
GdkPixmapImplWin32 *pixmap_impl;
GdkColormap *cmap;
guchar *bits;
gint i;
gint window_depth;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
if (!visual)
{
if (window)
visual = gdk_drawable_get_visual (window);
else
visual = gdk_visual_get_system ();
}
window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (window));
if (depth == -1)
depth = visual->depth;
depth = window_depth;
GDK_NOTE (PIXMAP, g_print ("_gdk_win32_pixmap_new: %dx%dx%d "
"window=%p visual=%p\n",
width, height, depth, window, visual));
GDK_NOTE (PIXMAP, g_print ("_gdk_win32_pixmap_new: %dx%dx%d window=%p\n",
width, height, depth, window));
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
drawable_impl = GDK_DRAWABLE_IMPL_WIN32 (GDK_PIXMAP_OBJECT (pixmap)->impl);
@@ -184,7 +182,18 @@ _gdk_win32_pixmap_new (GdkWindow *window,
pixmap_impl->height = height;
GDK_PIXMAP_OBJECT (pixmap)->depth = depth;
if ((hdc = GetDC (GDK_WINDOW_HWND (window))) == NULL)
if (depth == window_depth)
{
cmap = gdk_drawable_get_colormap (window);
if (cmap)
gdk_drawable_set_colormap (pixmap, cmap);
}
if (GDK_IS_WINDOW (window))
hwnd = GDK_WINDOW_HWND (window);
else
hwnd = GDK_WINDOW_HWND (_gdk_parent_root);
if ((hdc = GetDC (hwnd)) == NULL)
{
WIN32_GDI_FAILED ("GetDC");
g_object_unref ((GObject *) pixmap);
@@ -247,21 +256,10 @@ _gdk_win32_pixmap_new (GdkWindow *window,
bmi.u.bmiColors[1].rgbGreen =
bmi.u.bmiColors[1].rgbRed = 0xFF;
bmi.u.bmiColors[1].rgbReserved = 0x00;
drawable_impl->colormap = NULL;
}
else
{
if (depth > 8 && depth != visual->depth)
g_warning ("_gdk_win32_pixmap_new: depth %d doesn't match display depth %d",
depth, visual->depth);
drawable_impl->colormap = GDK_DRAWABLE_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl)->colormap;
if (drawable_impl->colormap == NULL)
drawable_impl->colormap = gdk_colormap_get_system ();
gdk_colormap_ref (drawable_impl->colormap);
if (depth <= 8)
if (depth <= 8 && drawable_impl->colormap != NULL)
{
GdkColormapPrivateWin32 *cmapp =
GDK_WIN32_COLORMAP_DATA (drawable_impl->colormap);
@@ -281,6 +279,8 @@ _gdk_win32_pixmap_new (GdkWindow *window,
}
else if (bmi.bmiHeader.biBitCount == 16)
{
GdkVisual *visual = gdk_visual_get_system ();
bmi.u.bmiMasks[0] = visual->red_mask;
bmi.u.bmiMasks[1] = visual->green_mask;
bmi.u.bmiMasks[2] = visual->blue_mask;
@@ -292,15 +292,14 @@ _gdk_win32_pixmap_new (GdkWindow *window,
if (holdpal != NULL)
SelectPalette (hdc, holdpal, FALSE);
if (!ReleaseDC (GDK_WINDOW_HWND (window), hdc))
if (!ReleaseDC (hwnd, hdc))
WIN32_GDI_FAILED ("ReleaseDC");
GDK_NOTE (PIXMAP, g_print ("...=%p bits=%p\n", hbitmap, bits));
GDK_NOTE (PIXMAP, g_print ("...=%p bits=%p pixmap=%p\n", hbitmap, bits, pixmap));
if (hbitmap == NULL)
{
WIN32_GDI_FAILED ("CreateDIBSection");
ReleaseDC (GDK_WINDOW_HWND (window), hdc);
g_object_unref ((GObject *) pixmap);
return NULL;
}
@@ -315,15 +314,6 @@ _gdk_win32_pixmap_new (GdkWindow *window,
return pixmap;
}
GdkPixmap*
gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth)
{
return _gdk_win32_pixmap_new (window, NULL, width, height, depth);
}
static unsigned char mirror[256] = {
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+48 -33
View File
@@ -263,11 +263,7 @@ struct _GdkGCWin32
* window or pixmap. We thus keep all the necessary values in the
* GdkGCWin32 object.
*/
HDC hdc;
int saved_dc;
GdkRegion *clip_region;
HRGN hcliprgn;
GdkGCValuesMask values_mask;
@@ -286,8 +282,13 @@ struct _GdkGCWin32
DWORD pen_style;
DWORD *pen_dashes; /* use for PS_USERSTYLE or step-by-step rendering */
gint pen_num_dashes;
HANDLE hwnd; /* If a HDC is allocated, for which window,
* or what bitmap is selected into it
/* Following fields are valid while the GC exists as a Windows DC */
HDC hdc;
int saved_dc;
HANDLE hwnd; /* For which window, or what bitmap is
* selected into it
*/
HPALETTE holdpal;
};
@@ -297,27 +298,18 @@ struct _GdkGCWin32Class
GdkGCClass parent_class;
};
gulong _gdk_win32_get_next_tick (gulong suggested_tick);
GType _gdk_gc_win32_get_type (void);
/* Routines from gdkgeometry-win32.c */
void _gdk_window_init_position (GdkWindow *window);
void _gdk_window_move_resize_child (GdkWindow *window,
gint x,
gint y,
gint width,
gint height);
void _gdk_window_process_expose (GdkWindow *window,
gulong serial,
GdkRectangle *area);
/* gdkdrawable-win32.c, background draw helper */
void _gdk_win32_draw_tiles (GdkDrawable *drawable,
GdkGC *gc,
GdkPixmap *tile,
gint x,
gint y,
gint width,
gint height);
void _gdk_window_process_expose (GdkWindow *window,
GdkRegion *invalidate_region);
void _gdk_win32_selection_init (void);
void _gdk_win32_dnd_exit (void);
@@ -345,12 +337,6 @@ GdkImage *_gdk_win32_copy_to_image (GdkDrawable *drawable,
gint width,
gint height);
GdkPixmap *_gdk_win32_pixmap_new (GdkWindow *window,
GdkVisual *visual,
gint width,
gint height,
gint depth);
GdkImage *_gdk_win32_setup_pixmap_image (GdkPixmap *pixmap,
GdkWindow *window,
gint width,
@@ -372,9 +358,11 @@ void _gdk_win32_blit (gboolean use_fg_bg,
COLORREF _gdk_win32_colormap_color (GdkColormap *colormap,
gulong pixel);
HRGN _gdk_win32_bitmap_to_region (GdkPixmap *bitmap);
HRGN _gdk_win32_bitmap_to_hrgn (GdkPixmap *bitmap);
gchar *gdk_font_full_name_get (GdkFont *font);
HRGN _gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
gint x_origin,
gint y_origin);
void _gdk_selection_property_store (GdkWindow *owner,
GdkAtom type,
@@ -404,17 +392,33 @@ void _gdk_wchar_text_handle (GdkFont *font,
void *arg);
#ifdef G_ENABLE_DEBUG
gchar *gdk_win32_color_to_string (const GdkColor *color);
gchar *gdk_win32_color_to_string (const GdkColor *color);
void gdk_win32_print_paletteentries (const PALETTEENTRY *pep,
const int nentries);
void gdk_win32_print_system_palette (void);
void gdk_win32_print_hpalette (HPALETTE hpal);
void gdk_win32_print_dc (HDC hdc);
gchar *gdk_win32_cap_style_to_string (GdkCapStyle cap_style);
gchar *gdk_win32_fill_style_to_string (GdkFill fill);
gchar *gdk_win32_function_to_string (GdkFunction function);
gchar *gdk_win32_join_style_to_string (GdkJoinStyle join_style);
gchar *gdk_win32_line_style_to_string (GdkLineStyle line_style);
gchar *gdk_win32_message_name (UINT msg);
gchar *gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask);
gchar *gdk_win32_drawable_description (GdkDrawable *d);
gchar *gdk_win32_rop2_to_string (int rop2);
gchar *gdk_win32_lbstyle_to_string (UINT brush_style);
gchar *gdk_win32_pstype_to_string (DWORD pen_style);
gchar *gdk_win32_psstyle_to_string (DWORD pen_style);
gchar *gdk_win32_psendcap_to_string (DWORD pen_style);
gchar *gdk_win32_psjoin_to_string (DWORD pen_style);
gchar *gdk_win32_message_to_string (UINT msg);
gchar *gdk_win32_rect_to_string (const RECT *rect);
gchar *gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect);
gchar *gdk_win32_gdkregion_to_string (const GdkRegion *box);
#define PING() printf(G_STRLOC),fflush(stdout)
#else
#define PING()
#endif
gchar *gdk_win32_last_error_string (void);
@@ -428,6 +432,8 @@ void gdk_win32_gdi_failed (const gchar *where,
gint line,
const gchar *api);
/* Macros that print an warning message about failed GDI and other Win32 API calls */
#ifdef __GNUC__
#define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
#define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
@@ -437,6 +443,15 @@ void gdk_win32_gdi_failed (const gchar *where,
#define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__, __LINE__, api)
#define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__, __LINE__, api)
#endif
/* These two macros call a GDI or other Win32 API and if the return
* value is zero or NULL, print a warning message. The majority of GDI
* calls return zero or NULL on failure. The value of the macros is nonzero
* if the call succeeded, zero otherwise.
*/
#define GDI_CALL(api, arglist) (api arglist ? 1 : (WIN32_GDI_FAILED (#api), 0))
#define API_CALL(api, arglist) (api arglist ? 1 : (WIN32_API_FAILED (#api), 0))
extern LRESULT CALLBACK _gdk_win32_window_procedure (HWND, UINT, WPARAM, LPARAM);
@@ -475,9 +490,9 @@ extern DWORD windows_version;
/* Options */
extern gboolean gdk_input_ignore_wintab;
extern gboolean gdk_event_func_from_window_proc;
extern gint gdk_max_colors;
#define GDK_WIN32_COLORMAP_DATA(cmap) ((GdkColormapPrivateWin32 *) GDK_COLORMAP (cmap)->windowing_data)
#endif /* __GDK_PRIVATE_WIN32_H__ */
+1 -1
View File
@@ -390,7 +390,7 @@ gdk_property_change (GdkWindow *window,
cf = CF_TEXT;
for (i = 0; i < nelements; i++)
{
if (*data == '\n')
if (data[i] == '\n')
*ucptr++ = '\r';
*ucptr++ = data[i];
}
+5 -5
View File
@@ -387,7 +387,7 @@ gdk_selection_convert (GdkWindow *requestor,
}
wcs = g_new (wchar_t, length + 1);
wclen = MultiByteToWideChar (cp, 0, ptr, length,
wclen = MultiByteToWideChar (cp, 0, ptr, -1,
wcs, length + 1);
/* Strip out \r */
@@ -782,7 +782,7 @@ gdk_text_property_to_utf8_list (GdkAtom encoding,
* routines for COMPOUND_TEXT only enforce this in one direction,
* causing cut-and-paste of \r and \r\n separated text to fail.
* This routine strips out all non-allowed C0 and C1 characters
* from the input string and also canonicalizes \r, \r\n, and \n\r to \n
* from the input string and also canonicalizes \r, and \r\n to \n
*/
static gchar *
sanitize_utf8 (const gchar *src)
@@ -793,10 +793,10 @@ sanitize_utf8 (const gchar *src)
while (*p)
{
if (*p == '\r' || *p == '\n')
if (*p == '\r')
{
p++;
if (*p == '\r' || *p == '\n')
if (*p == '\n')
p++;
g_string_append_c (result, '\n');
@@ -807,7 +807,7 @@ sanitize_utf8 (const gchar *src)
char buf[7];
gint buflen;
if (!((ch < 0x20 && ch != '\t') || (ch >= 0x7f && ch < 0xa0)))
if (!((ch < 0x20 && ch != '\t' && ch != '\n') || (ch >= 0x7f && ch < 0xa0)))
{
buflen = g_unichar_to_utf8 (ch, buf);
g_string_append_len (result, buf, buflen);
+109 -142
View File
@@ -34,17 +34,13 @@
#include "gdkprivate-win32.h"
#include "gdkinput-win32.h"
static gboolean gdk_window_gravity_works (void);
static void gdk_window_set_static_win_gravity (GdkWindow *window,
gboolean on);
static GdkColormap* gdk_window_impl_win32_get_colormap (GdkDrawable *drawable);
static void gdk_window_impl_win32_set_colormap (GdkDrawable *drawable,
GdkColormap *cmap);
static void gdk_window_impl_win32_get_size (GdkDrawable *drawable,
gint *width,
gint *height);
static GdkRegion* gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable);
static GdkRegion* gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable);
static void gdk_window_impl_win32_init (GdkWindowImplWin32 *window);
static void gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass);
static void gdk_window_impl_win32_finalize (GObject *object);
@@ -247,6 +243,8 @@ _gdk_windowing_window_init (void)
impl->width = width;
impl->height = height;
_gdk_window_init_position (GDK_WINDOW (private));
gdk_win32_handle_table_insert (&gdk_root_window, _gdk_parent_root);
}
@@ -307,14 +305,14 @@ RegisterGdkClass (GdkWindowType wtype)
/* initialize once! */
if (0 == hAppIcon)
{
gchar sLoc [_MAX_PATH+1];
gchar sLoc [MAX_PATH+1];
if (0 != GetModuleFileName (gdk_app_hmodule, sLoc, _MAX_PATH))
if (0 != GetModuleFileName (gdk_app_hmodule, sLoc, MAX_PATH))
{
hAppIcon = ExtractIcon (gdk_app_hmodule, sLoc, 0);
if (0 == hAppIcon)
{
if (0 != GetModuleFileName (gdk_dll_hinstance, sLoc, _MAX_PATH))
if (0 != GetModuleFileName (gdk_dll_hinstance, sLoc, MAX_PATH))
hAppIcon = ExtractIcon (gdk_dll_hinstance, sLoc, 0);
}
}
@@ -512,7 +510,7 @@ gdk_window_new (GdkWindow *parent,
else
{
dwExStyle = WS_EX_TRANSPARENT;
private->depth = 0;
private->depth = visual->depth;
private->input_only = TRUE;
draw_impl->colormap = gdk_colormap_get_system ();
gdk_colormap_ref (draw_impl->colormap);
@@ -712,6 +710,8 @@ gdk_window_foreign_new (GdkNativeWindow anid)
private->state |= GDK_WINDOW_STATE_WITHDRAWN;
private->depth = gdk_visual_get_system ()->depth;
_gdk_window_init_position (GDK_WINDOW (private));
gdk_drawable_ref (window);
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
@@ -946,9 +946,7 @@ gdk_window_resize (GdkWindow *window,
gint width,
gint height)
{
GdkWindowObject *private = (GdkWindowObject*) window;
GdkWindowImplWin32 *impl;
int x, y;
GdkWindowObject *private;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -958,7 +956,7 @@ gdk_window_resize (GdkWindow *window,
if (height < 1)
height = 1;
impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
private = (GdkWindowObject*) window;
if (!GDK_WINDOW_DESTROYED (window))
{
@@ -967,10 +965,15 @@ gdk_window_resize (GdkWindow *window,
width, height);
else
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
POINT pt;
RECT rect;
DWORD dwStyle;
DWORD dwExStyle;
int x, y;
if (width != impl->width || height != impl->height)
private->resize_count += 1;
pt.x = 0;
pt.y = 0;
@@ -994,7 +997,6 @@ gdk_window_resize (GdkWindow *window,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER))
WIN32_API_FAILED ("SetWindowPos");
}
private->resize_count += 1;
}
}
@@ -1005,8 +1007,7 @@ gdk_window_move_resize (GdkWindow *window,
gint width,
gint height)
{
GdkWindowObject *private = (GdkWindowObject*) window;
GdkWindowImplWin32 *impl;
GdkWindowObject *private;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -1016,14 +1017,10 @@ gdk_window_move_resize (GdkWindow *window,
if (height < 1)
height = 1;
impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
private = (GdkWindowObject*) window;
if (!private->destroyed)
if (!GDK_WINDOW_DESTROYED (window))
{
RECT rect;
DWORD dwStyle;
DWORD dwExStyle;
GDK_NOTE (MISC, g_print ("gdk_window_move_resize: %p %dx%d@+%d+%d\n",
GDK_WINDOW_HWND (window),
width, height, x, y));
@@ -1032,6 +1029,14 @@ gdk_window_move_resize (GdkWindow *window,
_gdk_window_move_resize_child (window, x, y, width, height);
else
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
RECT rect;
DWORD dwStyle;
DWORD dwExStyle;
if (width != impl->width || height != impl->height)
private->resize_count += 1;
rect.left = x;
rect.top = y;
rect.right = x + width;
@@ -1105,11 +1110,13 @@ gdk_window_reparent (GdkWindow *window,
old_parent_private->children =
g_list_remove (old_parent_private->children, window);
#if 0
if ((old_parent_private &&
(!old_parent_private->guffaw_gravity != !parent_private->guffaw_gravity)) ||
(!old_parent_private && parent_private->guffaw_gravity))
gdk_window_set_static_win_gravity (window, parent_private->guffaw_gravity);
#endif
parent_private->children = g_list_prepend (parent_private->children, window);
_gdk_window_init_position (GDK_WINDOW (window_private));
}
@@ -1519,7 +1526,7 @@ gdk_window_set_transient_for (GdkWindow *window,
if (!SetParent (window_id, parent_id))
WIN32_API_FAILED ("SetParent");
#else /* make the modal window topmost instead */
if (!SetWindowPos (window_id, HWND_TOPMOST, 0, 0, 0, 0,
if (!SetWindowPos (window_id, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE))
WIN32_API_FAILED ("SetWindowPos");
#endif
@@ -1594,6 +1601,7 @@ gdk_window_set_cursor (GdkWindow *window,
{
GdkWindowImplWin32 *impl;
GdkCursorPrivate *cursor_private;
GdkWindowObject *parent_window;
HCURSOR hcursor;
HCURSOR hprevcursor;
@@ -1637,9 +1645,10 @@ gdk_window_set_cursor (GdkWindow *window,
hcursor, impl->hcursor));
}
/* Set new cursor in all cases if we're over our window */
/* If the pointer is over our window, set new cursor if given */
if (gdk_window_get_pointer(window, NULL, NULL, NULL) == window)
SetCursor (impl->hcursor);
if (impl->hcursor != NULL)
SetCursor (impl->hcursor);
/* Destroy the previous cursor: Need to make sure it's no longer in
* use before we destroy it, in case we're not over our window but
@@ -1648,7 +1657,25 @@ gdk_window_set_cursor (GdkWindow *window,
if (hprevcursor != NULL)
{
if (GetCursor() == hprevcursor)
SetCursor (NULL);
{
/* Look for a suitable cursor to use instead */
hcursor = NULL;
parent_window = GDK_WINDOW_OBJECT (window)->parent;
while (hcursor == NULL)
{
if (parent_window)
{
impl = GDK_WINDOW_IMPL_WIN32 (parent_window->impl);
hcursor = impl->hcursor;
parent_window = parent_window->parent;
}
else
{
hcursor = LoadCursor (NULL, IDC_ARROW);
}
}
SetCursor (hcursor);
}
GDK_NOTE (MISC, g_print ("...DestroyCursor (%p)\n",
hprevcursor));
@@ -1678,6 +1705,26 @@ gdk_window_get_geometry (GdkWindow *window,
if (!GetClientRect (GDK_WINDOW_HWND (window), &rect))
WIN32_API_FAILED ("GetClientRect");
if (window != _gdk_parent_root)
{
POINT pt;
GdkWindow *parent = gdk_window_get_parent (window);
pt.x = rect.left;
pt.y = rect.top;
ClientToScreen (GDK_WINDOW_HWND (window), &pt);
ScreenToClient (GDK_WINDOW_HWND (parent), &pt);
rect.left = pt.x;
rect.top = pt.y;
pt.x = rect.right;
pt.y = rect.bottom;
ClientToScreen (GDK_WINDOW_HWND (window), &pt);
ScreenToClient (GDK_WINDOW_HWND (parent), &pt);
rect.right = pt.x;
rect.bottom = pt.y;
}
if (x)
*x = rect.left;
if (y)
@@ -1790,7 +1837,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
WIN32_API_FAILED ("GetWindowRect");
rect->x = r.left;
rect->y = r.right;
rect->y = r.top;
rect->width = r.right - r.left;
rect->height = r.bottom - r.top;
}
@@ -1970,7 +2017,7 @@ gdk_window_shape_combine_mask (GdkWindow *window,
RECT rect;
/* Convert mask bitmap to region */
hrgn = _gdk_win32_bitmap_to_region (mask);
hrgn = _gdk_win32_bitmap_to_hrgn (mask);
GDK_NOTE (MISC, g_print ("gdk_window_shape_combine_mask: %p %p\n",
GDK_WINDOW_HWND (window),
@@ -2074,19 +2121,26 @@ void
gdk_window_set_decorations (GdkWindow *window,
GdkWMDecoration decorations)
{
LONG style, exstyle;
LONG style;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
GDK_NOTE (MISC, g_print ("gdk_window_set_decorations: %p %s%s%s%s%s%s%s\n",
GDK_WINDOW_HWND (window),
(decorations & GDK_DECOR_ALL ? "ALL " : ""),
(decorations & GDK_DECOR_BORDER ? "BORDER " : ""),
(decorations & GDK_DECOR_RESIZEH ? "RESIZEH " : ""),
(decorations & GDK_DECOR_TITLE ? "TITLE " : ""),
(decorations & GDK_DECOR_MENU ? "MENU " : ""),
(decorations & GDK_DECOR_MINIMIZE ? "MINIMIZE " : ""),
(decorations & GDK_DECOR_MAXIMIZE ? "MAXIMIZE " : "")));
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
style &= (WS_OVERLAPPED|WS_POPUP|WS_CHILD|WS_MINIMIZE|WS_VISIBLE|WS_DISABLED
|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_MAXIMIZE);
exstyle &= (WS_EX_TOPMOST|WS_EX_TRANSPARENT);
if (decorations & GDK_DECOR_ALL)
style |= (WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
if (decorations & GDK_DECOR_BORDER)
@@ -2103,26 +2157,35 @@ gdk_window_set_decorations (GdkWindow *window,
style |= (WS_MAXIMIZEBOX);
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
}
void
gdk_window_set_functions (GdkWindow *window,
GdkWMFunction functions)
{
LONG style, exstyle;
LONG style;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
GDK_NOTE (MISC, g_print ("gdk_window_set_functions: %p %s%s%s%s%s%s\n",
GDK_WINDOW_HWND (window),
(functions & GDK_FUNC_ALL ? "ALL " : ""),
(functions & GDK_FUNC_RESIZE ? "RESIZE " : ""),
(functions & GDK_FUNC_MOVE ? "MOVE " : ""),
(functions & GDK_FUNC_MINIMIZE ? "MINIMIZE " : ""),
(functions & GDK_FUNC_MAXIMIZE ? "MAXIMIZE " : ""),
(functions & GDK_FUNC_CLOSE ? "CLOSE " : "")));
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
style &= (WS_OVERLAPPED|WS_POPUP|WS_CHILD|WS_MINIMIZE|WS_VISIBLE|WS_DISABLED
|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_MAXIMIZE|WS_CAPTION|WS_BORDER
|WS_SYSMENU);
exstyle &= (WS_EX_TOPMOST|WS_EX_TRANSPARENT);
if (functions & GDK_FUNC_ALL)
style |= (WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
if (functions & GDK_FUNC_RESIZE)
@@ -2135,19 +2198,15 @@ gdk_window_set_functions (GdkWindow *window,
style |= (WS_MAXIMIZEBOX);
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
}
/*
* propagate the shapes from all child windows of a GDK window to the parent
* window. Shamelessly ripped from Enlightenment's code
*
* - Raster
*/
static void
QueryTree (HWND hwnd,
QueryTree (HWND hwnd,
HWND **children,
gint *nchildren)
gint *nchildren)
{
guint i, n;
HWND child;
@@ -2209,6 +2268,7 @@ gdk_propagate_shapes (HANDLE win,
}
}
SetWindowRgn (win, region, TRUE);
g_free (list);
}
else
DeleteObject (region);
@@ -2238,91 +2298,11 @@ gdk_window_merge_child_shapes (GdkWindow *window)
gdk_propagate_shapes (GDK_WINDOW_HWND (window), TRUE);
}
/* Support for windows that can be guffaw-scrolled
* (See http://www.gtk.org/~otaylor/whitepapers/guffaw-scrolling.txt)
*/
static gboolean
gdk_window_gravity_works (void)
{
enum { UNKNOWN, NO, YES };
static gint gravity_works = UNKNOWN;
if (gravity_works == UNKNOWN)
{
GdkWindowAttr attr;
GdkWindow *parent;
GdkWindow *child;
gint y;
attr.window_type = GDK_WINDOW_TEMP;
attr.wclass = GDK_INPUT_OUTPUT;
attr.x = 0;
attr.y = 0;
attr.width = 100;
attr.height = 100;
attr.event_mask = 0;
parent = gdk_window_new (NULL, &attr, GDK_WA_X | GDK_WA_Y);
attr.window_type = GDK_WINDOW_CHILD;
child = gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
gdk_window_set_static_win_gravity (child, TRUE);
gdk_window_resize (parent, 100, 110);
gdk_window_move (parent, 0, -10);
gdk_window_move_resize (parent, 0, 0, 100, 100);
gdk_window_resize (parent, 100, 110);
gdk_window_move (parent, 0, -10);
gdk_window_move_resize (parent, 0, 0, 100, 100);
gdk_window_get_geometry (child, NULL, &y, NULL, NULL, NULL);
gdk_window_destroy (parent);
gdk_window_destroy (child);
gravity_works = ((y == -20) ? YES : NO);
}
return (gravity_works == YES);
}
static void
gdk_window_set_static_bit_gravity (GdkWindow *window, gboolean on)
{
g_return_if_fail (window != NULL);
GDK_NOTE (MISC, g_print ("gdk_window_set_static_bit_gravity: Not implemented\n"));
}
static void
gdk_window_set_static_win_gravity (GdkWindow *window, gboolean on)
{
g_return_if_fail (window != NULL);
GDK_NOTE (MISC, g_print ("gdk_window_set_static_win_gravity: Not implemented\n"));
}
/*************************************************************
* gdk_window_set_static_gravities:
* Set the bit gravity of the given window to static,
* and flag it so all children get static subwindow
* gravity.
* arguments:
* window: window for which to set static gravity
* use_static: Whether to turn static gravity on or off.
* results:
* Does the XServer support static gravity?
*************************************************************/
gboolean
gdk_window_set_static_gravities (GdkWindow *window,
gboolean use_static)
{
GdkWindowObject *private = (GdkWindowObject *)window;
GList *tmp_list;
g_return_val_if_fail (window != NULL, FALSE);
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
@@ -2330,24 +2310,11 @@ gdk_window_set_static_gravities (GdkWindow *window,
if (!use_static == !private->guffaw_gravity)
return TRUE;
if (use_static && !gdk_window_gravity_works ())
if (use_static)
return FALSE;
private->guffaw_gravity = use_static;
if (!GDK_WINDOW_DESTROYED (window))
{
gdk_window_set_static_bit_gravity (window, use_static);
tmp_list = private->children;
while (tmp_list)
{
gdk_window_set_static_win_gravity (window, use_static);
tmp_list = tmp_list->next;
}
}
return TRUE;
}
@@ -2508,7 +2475,7 @@ gdk_window_set_modal_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
if (!SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST,
0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))
0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))
WIN32_API_FAILED ("SetWindowPos");
}
@@ -2539,7 +2506,7 @@ gdk_window_set_type_hint (GdkWindow *window,
/*
* XXX ???
*/
GDK_NOTE (MISC, g_print ("gdk_window_set_type_hint (%p)\n",
GDK_NOTE (MISC, g_print ("gdk_window_set_type_hint: %p\n",
GDK_WINDOW_HWND (window)));
}
+1 -1
View File
@@ -19,7 +19,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", "GIMP Drawing Kit"
VALUE "FileVersion", "@GTK_VERSION@.BUILDNUMBER"
VALUE "InternalName", "libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@"
VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Modified by the GTK+ Team and others 1997-2001."
VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Modified by the GTK+ Team and others 1997-2002."
VALUE "OriginalFilename", "libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll"
VALUE "ProductName", "GTK+"
VALUE "ProductVersion", "@GTK_VERSION@"
+4 -1
View File
@@ -88,4 +88,7 @@ EXTRA_DIST = \
gdkinput-x11.c \
gdkinput-xfree.c \
gdkinput-gxi.c \
gdkinput-none.c
gdkinput-none.c \
gxid_lib.c \
gxid_lib.h \
gxid_proto.h
+56 -14
View File
@@ -248,25 +248,13 @@ gdk_colormap_new (GdkVisual *visual,
return colormap;
}
#define MIN_SYNC_TIME 2
static void
gdk_colormap_sync (GdkColormap *colormap,
gboolean force)
gdk_colormap_sync_palette (GdkColormap *colormap)
{
time_t current_time;
GdkColormapPrivateX11 *private = GDK_COLORMAP_PRIVATE_DATA (colormap);
XColor *xpalette;
gint nlookup;
gint i;
g_return_if_fail (GDK_IS_COLORMAP (colormap));
current_time = time (NULL);
if (!force && ((current_time - private->last_sync_time) < MIN_SYNC_TIME))
return;
private->last_sync_time = current_time;
nlookup = 0;
xpalette = g_new (XColor, colormap->size);
@@ -296,6 +284,60 @@ gdk_colormap_sync (GdkColormap *colormap,
g_free (xpalette);
}
static void
gdk_colormap_sync_direct_color (GdkColormap *colormap)
{
GdkColormapPrivateX11 *private = GDK_COLORMAP_PRIVATE_DATA (colormap);
GdkVisual *visual = colormap->visual;
XColor *xpalette;
gint i;
xpalette = g_new (XColor, colormap->size);
for (i = 0; i < colormap->size; i++)
{
xpalette[i].pixel =
(((i << visual->red_shift) & visual->red_mask) |
((i << visual->green_shift) & visual->green_mask) |
((i << visual->blue_shift) & visual->blue_mask));
}
XQueryColors (gdk_display, private->xcolormap, xpalette, colormap->size);
for (i = 0; i < colormap->size; i++)
{
colormap->colors[i].pixel = xpalette[i].pixel;
colormap->colors[i].red = xpalette[i].red;
colormap->colors[i].green = xpalette[i].green;
colormap->colors[i].blue = xpalette[i].blue;
}
g_free (xpalette);
}
#define MIN_SYNC_TIME 2
static void
gdk_colormap_sync (GdkColormap *colormap,
gboolean force)
{
time_t current_time;
GdkColormapPrivateX11 *private = GDK_COLORMAP_PRIVATE_DATA (colormap);
g_return_if_fail (GDK_IS_COLORMAP (colormap));
current_time = time (NULL);
if (!force && ((current_time - private->last_sync_time) < MIN_SYNC_TIME))
return;
private->last_sync_time = current_time;
if (colormap->visual->type == GDK_VISUAL_DIRECT_COLOR)
gdk_colormap_sync_direct_color (colormap);
else
gdk_colormap_sync_palette (colormap);
}
GdkColormap*
@@ -331,10 +373,10 @@ gdk_colormap_get_system (void)
/* Fall through */
case GDK_VISUAL_STATIC_GRAY:
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_DIRECT_COLOR:
colormap->colors = g_new (GdkColor, colormap->size);
gdk_colormap_sync (colormap, TRUE);
case GDK_VISUAL_DIRECT_COLOR:
case GDK_VISUAL_TRUE_COLOR:
break;
}
+37 -3
View File
@@ -335,6 +335,8 @@ gdk_window_cache_filter (GdkXEvent *xev,
node->prev = above_node->prev;
if (node->prev)
node->prev->next = node;
else
cache->children = node;
node->next = above_node;
above_node->prev = node;
}
@@ -1740,6 +1742,10 @@ motif_dnd_filter (GdkXEvent *xev,
Atom atom;
gint16 x_root, y_root;
gboolean is_reply;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
/* First read some fields common to all Motif DND messages */
@@ -1878,6 +1884,10 @@ xdnd_status_filter (GdkXEvent *xev,
guint32 flags = xevent->xclient.data.l[1];
Atom action = xevent->xclient.data.l[4];
GdkDragContext *context;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndStatus: dest_window: %#x action: %ld",
@@ -1920,6 +1930,10 @@ xdnd_finished_filter (GdkXEvent *xev,
XEvent *xevent = (XEvent *)xev;
guint32 dest_window = xevent->xclient.data.l[0];
GdkDragContext *context;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndFinished: dest_window: %#x", dest_window));
@@ -2371,9 +2385,17 @@ xdnd_enter_filter (GdkXEvent *xev,
gulong nitems, after;
Atom *data;
guint32 source_window = xevent->xclient.data.l[0];
gboolean get_types = ((xevent->xclient.data.l[1] & 1) != 0);
gint version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
guint32 source_window;
gboolean get_types;
gint version;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
source_window = xevent->xclient.data.l[0];
get_types = ((xevent->xclient.data.l[1] & 1) != 0);
version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
GDK_NOTE (DND,
g_message ("XdndEnter: source_window: %#x, version: %#x",
@@ -2472,6 +2494,10 @@ xdnd_leave_filter (GdkXEvent *xev,
g_message ("XdndLeave: source_window: %#x",
source_window));
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_XDND) &&
(GDK_DRAWABLE_XID (current_dest_drag->source_window) == source_window))
@@ -2499,6 +2525,10 @@ xdnd_position_filter (GdkXEvent *xev,
gint16 y_root = xevent->xclient.data.l[2] & 0xffff;
guint32 time = xevent->xclient.data.l[3];
Atom action = xevent->xclient.data.l[4];
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld",
@@ -2539,6 +2569,10 @@ xdnd_drop_filter (GdkXEvent *xev,
XEvent *xevent = (XEvent *)xev;
guint32 source_window = xevent->xclient.data.l[0];
guint32 time = xevent->xclient.data.l[2];
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndDrop: source_window: %#x time: %d",
+2 -1
View File
@@ -1285,7 +1285,8 @@ gdk_x11_draw_pixbuf (GdkDrawable *drawable,
if (format_type == FORMAT_NONE ||
!gdk_pixbuf_get_has_alpha (pixbuf) ||
(dither == GDK_RGB_DITHER_MAX && gdk_drawable_get_depth (drawable) != 24))
(dither == GDK_RGB_DITHER_MAX && gdk_drawable_get_depth (drawable) != 24) ||
gdk_x11_drawable_get_picture (drawable) == None)
{
GdkDrawable *wrapper = GDK_DRAWABLE_IMPL_X11 (drawable)->wrapper;
GDK_DRAWABLE_CLASS (parent_class)->_draw_pixbuf (wrapper, gc, pixbuf,
+37 -14
View File
@@ -304,7 +304,8 @@ gdk_check_wm_state_changed (GdkWindow *window)
gboolean found_sticky, found_maxvert, found_maxhorz;
GdkWindowState old_state;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_WINDOW_DESTROYED (window) ||
gdk_window_get_window_type (window) != GDK_WINDOW_TOPLEVEL)
return;
if (wm_state_atom == 0)
@@ -665,6 +666,7 @@ gdk_event_translate (GdkEvent *event,
charcount = XLookupString (&xevent->xkey, buf, 16,
&keysym, &compose);
event->key.keyval = keysym;
event->key.hardware_keycode = xevent->xkey.keycode;
GDK_NOTE (EVENTS,
g_message ("key release:\t\twindow: %ld key: %12s %d",
@@ -1010,10 +1012,20 @@ gdk_event_translate (GdkEvent *event,
case NotifyNonlinear:
case NotifyVirtual:
case NotifyNonlinearVirtual:
window_impl->has_focus = TRUE;
/* We pretend that the focus moves to the grab
* window, so we pay attention to NotifyGrab
* NotifyUngrab, and ignore NotifyWhileGrabbed
*/
if (xevent->xfocus.mode != NotifyWhileGrabbed)
window_impl->has_focus = TRUE;
break;
case NotifyPointer:
window_impl->has_pointer_focus = TRUE;
/* The X server sends NotifyPointer/NotifyGrab,
* but the pointer focus is ignored while a
* grab is in effect
*/
if (xevent->xfocus.mode != NotifyGrab)
window_impl->has_pointer_focus = TRUE;
break;
case NotifyInferior:
case NotifyPointerRoot:
@@ -1039,10 +1051,12 @@ gdk_event_translate (GdkEvent *event,
case NotifyNonlinear:
case NotifyVirtual:
case NotifyNonlinearVirtual:
window_impl->has_focus = FALSE;
if (xevent->xfocus.mode != NotifyWhileGrabbed)
window_impl->has_focus = FALSE;
break;
case NotifyPointer:
window_impl->has_pointer_focus = FALSE;
if (xevent->xfocus.mode != NotifyUngrab)
window_impl->has_pointer_focus = FALSE;
break;
case NotifyInferior:
case NotifyPointerRoot:
@@ -1311,13 +1325,17 @@ gdk_event_translate (GdkEvent *event,
? " (discarding)"
: GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD
? " (discarding child)"
: xevent->xconfigure.event != xevent->xconfigure.window
? " (discarding substructure)"
: ""));
if (window &&
xevent->xconfigure.event == xevent->xconfigure.window &&
!GDK_WINDOW_DESTROYED (window) &&
(window_private->extension_events != 0))
_gdk_input_configure_event (&xevent->xconfigure, window);
if (!window ||
xevent->xconfigure.event != xevent->xconfigure.window ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_ROOT)
return_val = FALSE;
@@ -1387,12 +1405,6 @@ gdk_event_translate (GdkEvent *event,
break;
}
event->property.type = GDK_PROPERTY_NOTIFY;
event->property.window = window;
event->property.atom = gdk_x11_xatom_to_atom (xevent->xproperty.atom);
event->property.time = xevent->xproperty.time;
event->property.state = xevent->xproperty.state;
if (wm_state_atom == 0)
wm_state_atom = gdk_x11_get_xatom_by_name ("_NET_WM_STATE");
@@ -1403,9 +1415,20 @@ gdk_event_translate (GdkEvent *event,
xevent->xproperty.atom == wm_desktop_atom)
{
/* If window state changed, then synthesize those events. */
gdk_check_wm_state_changed (event->property.window);
gdk_check_wm_state_changed (window);
}
if (window_private->event_mask & GDK_PROPERTY_CHANGE_MASK)
{
event->property.type = GDK_PROPERTY_NOTIFY;
event->property.window = window;
event->property.atom = gdk_x11_xatom_to_atom (xevent->xproperty.atom);
event->property.time = xevent->xproperty.time;
event->property.state = xevent->xproperty.state;
}
else
return_val = FALSE;
break;
case SelectionClear:
@@ -2076,7 +2099,7 @@ gdk_xsettings_notify_cb (const char *name,
for (i = 0; i < G_N_ELEMENTS (settings_map) ; i++)
if (strcmp (settings_map[i].xsettings_name, name) == 0)
{
new_event.setting.name = g_strdup (settings_map[i].gdk_name);
new_event.setting.name = settings_map[i].gdk_name;
break;
}
+28 -5
View File
@@ -54,6 +54,13 @@ update_keyrange (void)
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
/* OSF-4.0 is apparently missing this macro
*/
#ifndef XkbKeySymEntry
#define XkbKeySymEntry(d,k,sl,g) \
(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
#endif
gboolean _gdk_use_xkb = FALSE;
gint _gdk_xkb_event_type;
static XkbDescPtr xkb_desc = NULL;
@@ -147,7 +154,7 @@ update_keymaps (void)
XFreeModifiermap (mod_keymap);
keymap = XGetKeyboardMapping (gdk_display, min_keycode,
max_keycode - min_keycode,
max_keycode - min_keycode + 1,
&keysyms_per_keycode);
@@ -157,7 +164,7 @@ update_keymaps (void)
* we we fudge the map here.
*/
keycode = min_keycode;
while (keycode < max_keycode)
while (keycode <= max_keycode)
{
KeySym *syms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
/* Check both groups */
@@ -211,6 +218,21 @@ update_keymaps (void)
{
gint j = 0;
KeySym *syms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
/* GDK_MOD1_MASK is 1 << 3 for example, i.e. the
* fourth modifier, i / keyspermod is the modifier
* index
*/
guint mask = 1 << ( i / mod_keymap->max_keypermod);
/* Some keyboard maps are known to map Mode_Switch as an extra
* Mod1 key. In circumstances like that, it won't be used to
* switch groups.
*/
if (mask == GDK_CONTROL_MASK || mask == GDK_SHIFT_MASK ||
mask == GDK_LOCK_MASK || mask == GDK_MOD1_MASK)
goto next;
while (j < keysyms_per_keycode)
{
if (syms[j] == GDK_Mode_switch)
@@ -222,14 +244,15 @@ update_keymaps (void)
* index
*/
group_switch_mask |= (1 << ( i / mod_keymap->max_keypermod));
group_switch_mask |= mask;
break;
}
++j;
}
}
next:
++i;
}
}
@@ -407,7 +430,7 @@ gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
gint keycode;
keycode = min_keycode;
while (keycode < max_keycode)
while (keycode <= max_keycode)
{
const KeySym *syms = map + (keycode - min_keycode) * keysyms_per_keycode;
gint i = 0;
+74
View File
@@ -112,6 +112,78 @@ GdkArgDesc _gdk_windowing_args[] = {
{ NULL }
};
/*
* XLib internal connection handling
*/
typedef struct _GdkInternalConnection GdkInternalConnection;
struct _GdkInternalConnection
{
gint fd;
GSource *source;
Display *display;
};
static gboolean
process_internal_connection (GIOChannel *gioc,
GIOCondition cond,
gpointer data)
{
GdkInternalConnection *connection = (GdkInternalConnection *)data;
GDK_THREADS_ENTER ();
XProcessInternalConnection ((Display*)connection->display, connection->fd);
GDK_THREADS_LEAVE ();
return TRUE;
}
static GdkInternalConnection *
gdk_add_connection_handler (Display *display,
guint fd)
{
GIOChannel *io_channel;
GdkInternalConnection *connection;
connection = g_new (GdkInternalConnection, 1);
connection->fd = fd;
connection->display = display;
io_channel = g_io_channel_unix_new (fd);
connection->source = g_io_create_watch (io_channel, G_IO_IN);
g_source_set_callback (connection->source,
(GSourceFunc)process_internal_connection, connection, NULL);
g_source_attach (connection->source, NULL);
g_io_channel_unref (io_channel);
return connection;
}
static void
gdk_remove_connection_handler (GdkInternalConnection *connection)
{
g_source_destroy (connection->source);
g_free (connection);
}
static void
gdk_internal_connection_watch (Display *display,
XPointer arg,
gint fd,
gboolean opening,
XPointer *watch_data)
{
if (opening)
*watch_data = (XPointer)gdk_add_connection_handler (display, fd);
else
gdk_remove_connection_handler ((GdkInternalConnection *)*watch_data);
}
gboolean
_gdk_windowing_init_check (int argc, char **argv)
{
@@ -127,6 +199,8 @@ _gdk_windowing_init_check (int argc, char **argv)
gdk_display = XOpenDisplay (_gdk_display_name);
if (!gdk_display)
return FALSE;
XAddConnectionWatch (gdk_display, gdk_internal_connection_watch, NULL);
if (gdk_synchronize)
XSynchronize (gdk_display, True);
+6 -6
View File
@@ -162,14 +162,14 @@ gdk_pixmap_new (GdkWindow *window,
GdkColormap *cmap;
gint window_depth;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (window));
@@ -215,12 +215,12 @@ gdk_bitmap_create_from_data (GdkWindow *window,
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
@@ -256,7 +256,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
GdkDrawableImplX11 *draw_impl;
GdkPixmapImplX11 *pix_impl;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);
@@ -266,7 +266,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
if (depth == -1)

Some files were not shown because too many files have changed in this diff Show More