Commit Graph

688 Commits

Author SHA1 Message Date
Havoc Pennington
08add3cd50 convert the X coordinates so they're with respect to the line, rather than
2001-02-15  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): convert
	the X coordinates so they're with respect to the line, rather than
	with respect to the layout.

	* gtk/gtkalignment.c: Convert to new property API, patch from Lee
	Mallabone

	* gtk/testgtk.c (create_range_controls): add vscale tests,
	and inverted test

	* gtk/gtkrange.c (gtk_range_set_inverted): new function to fix
	#50806

	* gtk/gtkentry.c (gtk_entry_get_text): add G_CONST_RETURN

	* gtk/gtktextiter.h (gtk_text_iter_is_last): rename
	gtk_text_iter_is_end

	* gtk/gtktextbuffer.h (gtk_text_buffer_get_last_iter):
	rename gtk_text_buffer_get_end_iter

	* gtk/testgtk.c (create_labels): Add test for selectable

	* gtk/gtkentry.c (gtk_entry_draw_text): Use new GDK API to draw
	the selection stuff. This code is kind of broken since it doesn't
	use the theme engine.

	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region):
	fix infinite loop and y offset problem
	(gdk_draw_layout_line_with_colors): fix foreground color handling

        * gtk/gtklabel.h, gtk/gtklabel.c: Implement a "selectable" flag
	that makes the label selectable.

	* gtk/gtklabel.c (gtk_label_style_set): recreate the label's
	layout when the style is set, since fonts etc. could have changed.
2001-02-17 00:11:03 +00:00
Alexander Larsson
73c5da419c Add a shortcut if the window and the current clip_region doesn't overlap.
2001-02-13  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
	Add a shortcut if the window and the current clip_region doesn't
	overlap. This is needed when there are a lot of windows in a
	window. The layout test in testgtk is a good test.

	* gdk/linux-fb/gdkwindow-fb.c:
	Whitespace fix.
2001-02-13 16:22:11 +00:00
Alexander Larsson
e86265ecf3 Don't reference last_cursor if it is null. Fixes crash when rotating the
2001-02-13  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkcursor-fb.c (gdk_fb_cursor_unhide):
	Don't reference last_cursor if it is null. Fixes crash when rotating
	the screen before having moved the mouse.

	* gdk/linux-fb/gdkcc-fb.c: Zapp!

	* gdk/linux-fb/Makefile.am: Don't compile gdkcc-fb.c

	* gdk/linux-fb/gdkwindow-fb.c: Fix typo. width->height. Fixes redraw when
	using 90 or 270 degrees rotation.
2001-02-13 13:35:48 +00:00
Havoc Pennington
2097d764a7 fix bug where it always set the foreground, even if we were only using a
2001-02-12  Havoc Pennington  <hp@pobox.com>

	* gdk/gdkpango.c (gdk_pango_get_gc): fix bug where
	it always set the foreground, even if we were only using
	a stipple.
	(gdk_draw_layout_line_with_colors): new function, allow
	override colors
	(gdk_draw_layout_with_colors): new function, allow override
	colors
	(gdk_pango_layout_line_get_clip_region): function to get the clip
	region for a logical text range
	(gdk_pango_layout_get_clip_region): get the clip region for a
	logical text range

	* gdk/x11/gdkcolor-x11.c: forward declare gdk_colormap_sync(),
	(gdk_colormap_new): fix call to gdk_colormap_sync() so it has
	the right number of arguments.

	* gtk/gtktextbtree.c (gtk_text_btree_node_check_consistency):
	enhance the function to check that node data corresponds to a
	view still belonging to the tree.

	* gtk/gtktreeview.c (gtk_tree_view_changed): we were leaking the
	GtkTreePath
	(gtk_tree_view_inserted): ditto
	(gtk_tree_view_child_toggled): ditto

	* gtk/gtktreemodel.c (gtk_tree_path_append_index): use realloc to
	simplify this code.

	* gtk/gtkcellrenderertext.c (get_layout): fix leak of
	a PangoAttrList

	* demos/gtk-demo/main.c (load_file): Fix leak of a GString

	* gtk/gtkentry.c (gtk_entry_realize): Fix leak of a GdkCursor

	* gtk/gtkmenubar.c (gtk_menu_bar_size_request): consider toggle
	size in the size request
	(gtk_menu_bar_size_allocate): consider toggle size here

	* gtk/gtkimagemenuitem.h, gtkimagemenuitem.c: Menu item
	that displays a widget in the toggle slot

	* gtk/testgtk.c: test GtkImageMenuItem

	* gtk/Makefile.am, gtk/gtk.h: Add GtkImageMenuItem

	* gtk/gtkmenuitem.h: Use "gint" not "guint16" for toggle size
	request and allocation

	* gtk/gtkmenu.c (gtk_menu_size_request): use gint not guint16

	* gtk/gtkcheckmenuitem.c
	(gtk_check_menu_item_toggle_size_request): ditto
2001-02-13 05:44:47 +00:00
Tor Lillqvist
730a2bdc6b Remove gdkcc-win32.c from here, too.
2001-02-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/Makefile.am: Remove gdkcc-win32.c from here, too.
2001-02-11 11:06:59 +00:00
Tor Lillqvist
e8aacae47d New function, copied from X11 version.
2001-02-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkcolor-win32.c (gdk_colormap_query_color): New
	function, copied from X11 version.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Eliminate
	DestroyCursor failures. The reason for the problem (despite the
	inconsistent messages from GetLastError()) was that
	DestroyCursor() cannot be called while a cursor is set in a
	window. Set the new cursor first and then destroy the old one.
	Thanks to jpe@archaeopteryx.com.

	* gdk/win32/gdkcc-win32.c: Removed.

	* gdk/gdk.def
	* gdk/makefile.mingw.in: Update. Godbye GdkColorContext.

	* gtk/gtk.def
	* gtk/makefile.mingw.in: Updates.
2001-02-11 11:00:14 +00:00
Havoc Pennington
45510aefc3 better error message if you try to add a widget to a bin that already has
2001-02-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkbin.c (gtk_bin_add): better error message if you try to
	add a widget to a bin that already has a child.

	* gdk/gdkcc.h, gdk/gdkcc-x11.c: Remove GdkColorContext, #50512

	* docs/Changes-2.0.txt: note that GdkColorContext is gone.

	* gdk/x11/Makefile.am (libgdk_x11_la_SOURCES): remove gdkcc-x11.c

	* gdk/gdk.h: remove gdkcc.h

	* gdk/Makefile.am (gdk_public_h_sources): remove gdkcc.h

	* gtk/gtkpixmap.c (build_insensitive_pixmap): rewrite using
	GdkPixbuf, since the previous implementation was GdkColorContext
	dependent.

	* gtk/testgtk.c (create_pixmap): add test for insensitive GtkPixmap
2001-02-09 00:40:48 +00:00
Owen Taylor
ad6a316ee5 Fix syntax error introduced with earlier commit) (pointed out by Ollie
Mon Feb  5 22:05:57 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image): Fix syntax
	error introduced with earlier commit) (pointed out by
	Ollie Lho)
2001-02-06 03:08:34 +00:00
Tor Lillqvist
90359c8234 gdk/gdk.def Provide dummy implementations.
2001-02-04  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def
	* gdk/win32/gdkim-win32.c (gdk_ic_attr_new, gdk_ic_attr_destroy):
	Provide dummy implementations.
2001-02-04 11:06:48 +00:00
Tim Janik
89a0a894bc removed gtk_signal_init() compat define.
Sun Feb  4 07:55:17 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.h: removed gtk_signal_init() compat define.

        * gtk/gtktypeutils.[hc]: gtk_tpye_init() take an additional argument
        GTypeDebugFlags debug_flags and pass it on to g_type_init ();
        deprecated this function.

        * gdk/gdk.c (gdk_init_check): call g_type_init () with 0 as
        argument.

Sun Feb  4 07:45:45 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkdebug.h: nuke GTK_DEBUG_OBJECTS and GTK_DEBUG_SIGNALS.

Sun Feb  4 07:59:57 2001  Tim Janik  <timj@gtk.org>

        * gdk-pixbuf.h: DOH! don't include glib/gobject.h but glib-object.h,
        we finally need the gobject->gruntime rename.

        * *.c: scratched calls to g_type_init(), there's simply no point in
        doing that, use gtk_init().
2001-02-04 07:05:29 +00:00
Owen Taylor
d3e4e59214 Remove confusing comment about X11.
Sat Feb  3 11:28:03 2001  Owen Taylor  <otaylor@redhat.com>

	* configure.in: Remove confusing comment about X11.

Fri Feb  2 19:21:23 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
	regions with HAVE_SHAPE_EXT. (#50511, Eric Ding)

Fri Feb  2 18:31:54 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkimage-x11.c: Remove definition of _XOPEN_SOURCE, since
	it breaks things on BSD. If you want to compile GTK+ with
	-ansi -pedantic, you should supply CPP_FLAGS=_XOPEN_SOURCE
	when configuring, since GTK+ simply can't be "pure ANSI"
	in the header files it uses. (#8170, Greg Hudson)
2001-02-03 16:31:35 +00:00
Owen Taylor
a2d1299475 Make gdk_colormap_sync private since it was never exported in a header
Fri Feb  2 17:16:09 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_sync): Make
	gdk_colormap_sync private since it was never exported
	in a header file.

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_new): Fill in
	colormap->colors[] for StaticGray, StaticColor colormaps.

	* gdk/gdkpixbuf-drawable.c: Fix problems where image->bpp
	was being used as if it was image->bits_per_pixel.

	* gdk/gdkimage.h, gdk/x11/gdkimage-x11.c: Save the bits-per-pixel
	for the image in the GdkImage structure since it isn't
	reconstructable, and we need it to handle packed types

	* gdk/win32/gdkimage-win32.c: Set image->bits_per_pixel. (I'm making
	the assumption that on Win32 image->bits_per_pixel == image->depth,
	always.

	* gdk/linux-fb/gdkimage-fb.c: Set image->bits_per_pixel.

	* gdk/gdkrgb.c (gdk_rgb_select_conv): Exit with an informative
	warning message if no converter can be found.
2001-02-02 22:19:31 +00:00
Owen Taylor
a1a252ce46 Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat().
Fri Feb  2 12:26:50 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Get rid of
	a bunch of g_strdup_printf("%s%s") in favor of g_strconcat().

	* gtk/gtkrc.c Makefile.am: Use $(libdir), not $(exe_prefix),
	since some people set $(libdir) separately. (#1290, David Kaelbling)

Thu Feb  1 18:25:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfilesel.c: If PATH_MAX and MAXPATHLEN are not
	defined, define MAXPATHLEN to 2048. (The Hurd doesn't have
	MAXPATHLEN, but the code here depends on a fixed value.)
	(#4524)

Wed Jan 31 22:01:04 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkhandlebox.c (gtk_handle_box_button_changed): Handle the case
	where child == NULL and handle_position == RIGHT or BOTTOM. (#8041g)

Wed Jan 31 21:20:39 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkctree.c (real_tree_move): If the node being moved isn't
	viewable there is no way that moving the node will cause the
	focus row to become not viewable, so omit check on the visibility
	of new_sibling, which is irrelevant. (Fixes #8002, David Helder)

Wed Jan 31 20:38:17 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_commit_cb): Delete the current
	selection before inserting new text.

Wed Jan 31 18:49:33 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_item_state_changed_cb):
	Make the sensitivity of the reparented child track that of
	the original parent menu item. (#34218, David Hodson)

	* gtk/gtkoptionmenu.c (gtk_option_menu_item_destroy_cb): Handle
	the case where the current item is destroyed properly.

	* gtk/gtkoptionmenu.c: Some additional code cleanups and fix
	some edge cases with child-less menuitems.

Wed Jan 31 17:16:13 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_window_key_press): Make Return
	key pop down window. (#12074, Jon K Hellan)

Wed Jan 31 16:21:42 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklist.c (gtk_list_signal_item_toggle): Don't allow
	toggling of rows off in BROWSE or EXTENDED mode. (#12072, Jon K Hellan)
	The solution here isn't perfect - you get an extraneous
	emission of "toggle", which could conceivably confuse an app,
	but better than the current situation. LXR search seems to
	indicate that no apps in GNOME CVS connect to "toggle".

Wed Jan 31 15:46:13 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/Makefile.am (libgtkinclude_HEADERS): Move gtkcompat.h from
        gtk_public_h_sources to directly here to avoid warning when
        building srcdir != builddir. (#9656)

Tue Jan 30 19:49:02 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrange.c: Patch from Kipp Hickman to make the event
	handlers in gtkrange.c return the proper values (TRUE == handled)
	(#10316).

	This is just the tip of the iceberg, but gtkrange.c is the
	most common place where the propagation is problematical,
	and also a place where it is almost certainly safe to change
	this in the stable branch.

	(You don't want right click popups on a range control or anything...)

Tue Jan 30 18:57:59 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c (clear_focus_area): We need to clear the focus
	area on focus out, even if a background pixmap isn't set.
	(#13941)

Tue Jan 30 18:24:10 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_shape): Fix from Sean Cunningham
	to deal with setting the shape properly when scrolling arrows are
	turned on, but not visible because there is sufficient space.
	(#13432)

Tue Jan 30 16:39:25 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkitemfactory.c (gtk_item_factory_delete_item): For menu
	items with submenus, destroy the item along with the submenu.
	(#7841, Brian Masney(?)) Also, handle paths of the form '<foo>/abcd...'
	properly.

	* gtk/testgtk.c (menu_items): Add a dummy branch that we delete
	later.

Tue Jan 30 15:51:25 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_real_set_focus): Fix a problem where
	the focus widget sometimes wasn't drawn with the default if there
	was no default widget.

	* gtk/gtkstyle.c (gtk_style_real_unrealize): free colors,
	unreference pixmaps.

	* gtk/gtkstyle.c (gtk_style_realize): Reference colormap
	for some extra safety.

Mon Jan 29 19:00:01 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtk{ctree.c,clist.c} (set_cell_contents): Handle setting
	the text of a cell to the old pointer value better, by
	copying the new text before freeing the old text. Some code
	cleanup. (#8079, Karl Nelson)

Mon Jan 29 16:50:19 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklabel.[ch] gtk/gtkframe.[ch]: Make gtk_label_get_text()
	gtk_frame_get_label() non strdup'ing, and G_CONST_RETURN.

Mon Jan 29 15:22:51 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_remove): When removing an
	item from a menu, check to see if it matches
	menu->old_active_menu_item, and if so, unref and clear
	old_active_menu_item (Patch from Pavel Cisler)

	* gtk/gtkmenushell.c (gtk_menu_shell_remove): Unset
	menu_shell->active_menu_item, if it is the child being
	removed. (Patch based on that of Gene Ragan, #50337)
2001-02-02 17:53:29 +00:00
Alexander Larsson
8373550e8c Added some strerror() to the g_warnings().
2001-01-31  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkmain-fb.c (gdk_fb_display_new):
	Added some strerror() to the g_warnings().
2001-01-31 15:31:48 +00:00
Alexander Larsson
57adee57ed A bunch of whitespace cleanup.
2001-01-31  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkselection-fb.c:
	* gdk/linux-fb/gdkcolor-fb.c:
	* gdk/linux-fb/gdkdrawable-fb2.c:
	* gdk/linux-fb/gdkfont-fb.c:
	* gdk/linux-fb/gdkim-fb.c:
	* gdk/linux-fb/gdkinput.c:
	* gdk/linux-fb/gdkkeyboard-fb.c:
	* gdk/linux-fb/gdkmain-fb.c:
	* gdk/linux-fb/gdkrender-fb.c:
	A bunch of whitespace cleanup.
2001-01-31 09:18:20 +00:00
Havoc Pennington
ef4356b567 adapt to handle PangoColor
2001-01-26  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextlayout.c (convert_color): adapt to handle PangoColor

	* gtk/gtktreeview.c (gtk_tree_view_widget_to_tree_coords): fix to
	not offset by TREE_VIEW_HEADER_HEIGHT
	(gtk_tree_view_tree_to_widget_coords): fix to not offset by
	TREE_VIEW_HEADER_HEIGHT

	* configure.in (included_loaders): for me, --with-included-loaders
	generates the error "the specified loader yes does not exist",
	i.e. the arg defaults to "yes", so change test for value ""
	to test for value "yes", and include all loaders in that case.

	* gtk/gtkrbtree.c (_gtk_rbtree_get_depth): new function

	* gtk/gtktreeview.c (gtk_tree_view_get_cell_rect): fix to properly
	handle TREE_VIEW_VERTICAL_SEPARATOR
	(gtk_tree_view_bin_expose): fix to consider the row offset as
	pointing halfway into vertical separator.
	(gtk_tree_view_draw_node_focus_rect): ditto

	* gtk/gtkdebug.h, gtk/gtkmain.c (gtk_init_check): Add
	--gtk-debug=updates, which causes gdk_window_set_debug_updates
	(TRUE) to be called.

	* gdk/gdkwindow.c (gdk_window_set_debug_updates): Allow enabling a
	debug mode where the invalid region is colored in on invalidate,
	so you can see the flicker and know whether your redraw code is
	doing a good job.

	* gtk/gtktreeview.c (gtk_tree_view_queue_draw_node): Work in
	tree window coordinates (clip rect is in tree window coords)

	* gtk/Makefile.am: add gtktreednd.[hc]

	* gtk/gtkliststore.c: implement gtktreednd interfaces.

	* gtk/gtktreednd.c, gtk/gtktreednd.h: New interface to support
	drag-and-drop data operations on a model (so we can set up tree
	drag-and-drop automatically)

	* gtk/testgtk.c: Add a window to change sensitivity in the
	GtkLabel test; add a way to change the entry frame in GtkEntry
	test

	* gtk/gtkentry.c (gtk_entry_set_has_frame):
	(gtk_entry_get_has_frame): new functions to remove the frame
	around an entry
	(gtk_entry_size_request): shrink requisition if no frame
	(gtk_entry_draw_focus): don't draw frame if no frame

	* gtk/gtkstyle.c (gtk_default_draw_check): draw custom look for
	checks inside a cell renderer
	(gtk_default_draw_option): ditto for options

	* gtk/gtktreeviewcolumn.c (update_button_contents): add/remove
	children from the alignment, not the button
	(gtk_tree_view_column_init): ref/sink the column, to emulate
	GObject refcounting.

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_init): ref/sink

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	Use theme functions to draw the toggles

	* gdk/gdkpango.c (gdk_pango_get_gc): use GdkRGB to alloc colors

	* gdk/gdkpango.h, gdk/gdkpango.c: Add GdkPangoAttrStipple and
	GdkPangoAttrEmbossed to use in rendering insensitive text

	* gdk/gdkpango.c (gdk_draw_layout_line): render new properties

	* gtk/gtkstyle.c (gtk_default_draw_layout): handle sensitivity
	using new GDK features
2001-01-26 21:12:05 +00:00
3
bedaf31f28 Don't leak image. Simplify using gdk_colormap_query_color().
2001-01-23    <alexl@redhat.com>

	* gtk/gtkcolorsel.c (grab_color_at_mouse):
	Don't leak image. Simplify using gdk_colormap_query_color().
	(gtk_color_selection_init): Don't leak dropper_pixmap and mask.

	* linux-fb/gdkcolor-fb.c:
	Implemented gdk_colormap_query_color.
2001-01-23 15:28:18 +00:00
3
c181cd8efc Don't leak built-in cursors.
2001-01-23    <alexl@redhat.com>

        * linux-fb/gdkcursor-fb.c:
	Don't leak built-in cursors.

	* linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_polygon):
	Don't leak tmp_points.

	* linux-fb/gdkfont-fb.c (gdk_font_from_description):
	Don't modify desc. Don't leak font if the PangoFont
	isn't found.

	* linux-fb/gdkgc-fb.c (gdk_fb_gc_finalize):
	Free dash_list.

	* linux-fb/gdkkeyboard-fb.c (gdk_fb_handle_key):
	Don't leak string.
2001-01-23 14:37:54 +00:00
2
a081fe7d54 Don't leak visible_region. Use visible_region instead of region.
2001-01-22    <alexl@redhat.com>

	* gdk/gdkwindow.c (gdk_window_invalidate_region):
	Don't leak visible_region. Use visible_region instead of region.

	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_new):
	Don't do extra gdk_drawable_ref(). This is not X.
	(gdk_fb_window_find_focus, gdk_fb_change_focus): make sure
	gdk_fb_focused_window is ref:ed.
	(gdk_fb_window_send_crossing_events): Watch out for destroyed
	windows.
2001-01-22 14:35:49 +00:00
9
e275f77943 Define EMULATE_GDKFONT. Add extra pango_font stuff to GfkFontPrivate.
2001-01-19    <alexl@redhat.com>

	* gdk/linux-fb/gdkprivate-fb.h:
	Define EMULATE_GDKFONT.
	Add extra pango_font stuff to GfkFontPrivate.

	* gdk/linux-fb/gdkdrawable-fb2.c:
	* gdk/linux-fb/gdkfont-fb.c:
	If EMULATE_GDKFONT defined, implement a slow lame GdkFont
	emulation using PangoFont.
2001-01-19 10:38:12 +00:00
Tor Lillqvist
576ef7f29a gtk/gtkmain.c Use the new
2001-01-18  Tor Lillqvist  <tml@iki.fi>

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

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

	* config.h.win32: Removed.

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

	* Makefile.am: Add it to EXTRA_DIST.

	* gtk/gtk.def: Update.

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

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

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

	* gdk-pixbuf-io.c (get_libdir): (Win32) Use the new
	g_win32_get_package_installation_subdirectory() function.
	(gtk_win32_get_installation_directory): Remove this then.
2001-01-17 22:26:19 +00:00
Owen Taylor
2a1e8b06b4 Remove unused variable.
Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdnd-x11.c: Remove unused variable.

	* gtk/gtkdnd.c: Encapsulate storing and retrieving info
	structures in functions. Fixes bug where gtk_dataset_*
	was accidentally still being used in one place, causing
        every dest side event to be treated independently.

	* gtk/gtkdnd.c: Remove last vestages of handling
	::draw (fixes warning)

	* gtk/gtkentry.[ch]: Add drag and drop support.

	* gtk/gtkdnd.[ch] gtk/gtktextview.c gtk/gtkentry.c: Add
	new function gtk_check_drag_threshhold() for checking
	to check if (dx,dy) has exceeded the threshhold for starting
	a drag and use it everywhere.
2001-01-17 20:05:08 +00:00
7
9012254c1e Doh! Mixed up x and y.
2001-01-17    <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_shadow_fb_draw_arc):
	Doh! Mixed up x and y.

	* gdk/linux-fb/gdkglobals-fb.c:
	Removed gdk_fb_pointer_grab_window_events,
	added _gdk_fb_pointer_grab_owner_events and
	_gdk_fb_keyboard_grab_owner_events.

	* gdk/linux-fb/gdkmain-fb.c (gdk_fb_pointer_grab):
	Set all button mask if GDK_BUTTON_MOTION_MASK set. Send
	crossing events before grabbing. Set _gdk_fb_pointer_grab_owner_events.
	(gdk_fb_pointer_ungrab): Unset _gdk_fb_pointer_grab_owner_events
	Send crossing events after ungrab finished.
	(gdk_keyboard_grab): Set ..._owner_events
	(type_masks): Move out of function.
	(gdk_fb_other_event_window, gdk_fb_pointer_event_window,
	gdk_fb_keyboard_event_window): New functions, return the
	window an event should be targeted at. Handles grabs and
	event propagation. Can return NULL.
	(gdk_event_make): Remove event_mask checking. Now always
	returns an event.

	* gdk/linux-fb/gdkkeyboard-fb.c:
	* gdk/linux-fb/gdkproperty-fb.c:
	* gdk/linux-fb/gdkselection-fb.c:
	Use new event_window/gdk_event_make() behaviour.

	* gdk/linux-fb/gdkmouse-fb.c:
	Use new event_window/gdk_event_make() behaviour.
	Only send motion events if in the same window.
	If grabbed, use cursor from window if sibling of grabbed
	window, and cursor from grabbed window otherwise.

	* gdk/linux-fb/gdkprivate-fb.h:
	Update gdk_fb_window_send_crossing_events, gdk_event_make
	and grab varaible declarations. Add gdk_fb_*_event_window().

	* gdk/linux-fb/gdkwindow-fb.c:
	Use new event_window/gdk_event_make() behaviour.
	Keep correct track of focus window.
	(gdk_window_set_events): Set all specific button motion masks
	if GDK_BUTTON_MOTION_MASK set.

	* gtk/gtkdnd.c (gtk_drag_update):
	Free info->last_event if gdk_drag_motion returned FALSE.
2001-01-17 15:52:22 +00:00
Alexander Larsson
268e636201 Some cleanups.
2001-01-16  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkdnd-fb.c:
	Some cleanups.
2001-01-16 12:21:08 +00:00
Tor Lillqvist
18e95c4e0f Include <stdlib.h> for getenv().
2001-01-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkvisual-win32.c: Include <stdlib.h> for getenv().

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't use
	GDK_COLORMAP_PRIVATE_DATA on a potentially NULL GdkColormap.

	* gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Adapt calls
	to g_{locale,filename}_{to,from}_utf8 to match current API.

	* gtk/makefile.msc.in (gtk_OBJECTS)
	* gtk/makefile.mingw.in (gtk_OBJECTS): Add gtkwindow-decorate.

	* gtk/gtk.def: Update.
2001-01-15 22:12:31 +00:00
Tor Lillqvist
420e4ee2f7 New implementaion that more closely mimics the events that an X server
2001-01-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (synthesize_crossing_events): New
	implementaion that more closely mimics the events that an X server
	would generate. Especially, properly generate GDK_NOTIFY_VIRTUAL and
	GDK_NOTIFY_NONLINEAR_VIRTUAL crossing events. This makes buttons
	with nested preview widgets, for instance, more responsive when
	you move the mouse quickly into them.
	(find_window_for_pointer_event): Make it actually compile.
	(gdk_event_translate): Set send_event to the value of
	InSendMessage (). This doesn't really mean the same as X11's
	send_event flag, but is close enough, says jpe@archaeopteryx.com
2001-01-15 19:48:53 +00:00
Alexander Larsson
b299835e86 Implemented drag and drop. Seems to be mostly working. I sometimes get an
2001-01-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdnd-fb.c:
	Implemented drag and drop.
	Seems to be mostly working. I sometimes get an assert from gtkdnd.c:2664
	when it tries to free and then copy the same event (info->last_event).
	I am not sure about why	this happens, but will continue looking.
2001-01-15 15:46:28 +00:00
Alexander Larsson
6a184ba228 Use gdk_window_invalidate_rect instead of gdk_window_invalidate_rect_clear
2001-01-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkwindow-fb.c:
	Use gdk_window_invalidate_rect instead of
	gdk_window_invalidate_rect_clear to minimise flashing.
	When hiding windows you need to clear the root window though.
2001-01-15 10:22:15 +00:00
Alexander Larsson
c288355ffd For optization, add an full_shapes argument to gdk_fb_clip_region. If this
2001-01-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c:
	For optization, add an full_shapes argument to gdk_fb_clip_region.
	If this is false, only the cliprects of the shapes are used.

	* gdk/linux-fb/gdkprivate-fb.h:
	Export gdk_fb_window_peek_shape.
	Add full_shapes to gdk_fb_clip_region.

	* gdk/linux-fb/gdkwindow-fb.c (gdk_fb_window_move_resize):
	When moving a window, don't clear everything under the it, just the
	root window. Makes stuff faster and flash less.
	(gdk_window_get_pointer): Correctly handle offseted shapes, due to
	USE_CHILD_SHAPE. (gdk_fb_window_peek_shape): Return the correct
	offset of the shape.
2001-01-15 09:54:28 +00:00
Havoc Pennington
f4b31ff5e6 offset the current invalid region, fixes redraw bug while scrolling the
2001-01-12  Havoc Pennington  <hp@redhat.com>

	* gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): offset the
	current invalid region, fixes redraw bug while scrolling the
	text widget

	* gtk/gtktextview.c, gtk/gtktextview.h:
	Rearrange the scrolling/validation/etc. code in a major way,
	so it seems to make sense to me. Probably isn't genuinely that
	much better, but...

	* gtk/gtktexttag.c (set_fg_color): fix name of property used for
	notifies

	* gtk/gtktextmark.c (gtk_text_mark_get_left_gravity): new function
2001-01-12 23:23:40 +00:00
Alexander Larsson
8e1a69c28b Hide mouse pointer while rotation. Show it afterwards.
2001-01-12  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkmain-fb.c (gdk_fb_set_rotation):
	Hide mouse pointer while rotation. Show it afterwards.
2001-01-12 15:55:56 +00:00
Alexander Larsson
058c2d9320 Take shaped windows in consideration when generating clip region.
2001-01-12  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region): Take shaped
	windows in consideration when generating clip region.

	* gdk/linux-fb/gdkfb.h:
	Huge HACK. Added GDK_FB_USE_CHILD_SHAPE.

	* gdk/linux-fb/gdkprivate-fb.h:
	Add shape to GdkWindowFBDatat.
	exported gdk_fb_window_get_abs_shape().
	removed gdk_fb_draw_lines declaration.

	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_impl_fb_init):
	Init shape to NULL. (gdk_fb_window_send_crossing_events): Don't
	send focus changes when there is a grabbed window.
	(gdk_window_get_pointer): Handle shaped windows.
	(gdk_fb_region_create_from_bitmap): Convert bitmap to region.
	(gdk_fb_window_peek_shape): Returns the shape for a window,
	handles GDK_FB_USE_CHILD_SHAPE.
	(gdk_fb_window_get_abs_shape): Returns the shape of the window,
	offseted to absolute positions. Handles GDK_FB_USE_CHILD_SHAPE.
	(gdk_window_shape_combine_mask): Implement.

	* gtk/gtkwindow-decorate.c:
	HACK! Set GDK_FB_USE_CHILD_SHAPE on window->frame to make sure
	setting the shape of a window makes the window transparent.
2001-01-12 15:45:26 +00:00
Alexander Larsson
b29eece81f Added ENABLE_SHADOW_FB
2001-01-11  Alexander Larsson  <alexl@redhat.com>

	* acconfig.h:
	Added ENABLE_SHADOW_FB

	* configure.in:
	Added --disable-shadowfb

	* gdk/linux-fb/gdkcursor-fb.c:
	Update shadowfb when updating cursor

	* gdk/linux-fb/gdkdrawable-fb2.c:
	Added wrappers for shadowfb that calls 	the normal drawable
	methods, but calls gdk_shadow_fb_update(bounding box) when
	GdkWindows are drawed to.
	Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
	which also returns the bounding box.

	* gdk/linux-fb/gdkfb.h:
	Added GdkFBAngle type and gdk_fb_set_rotation declaration.

	* gdk/linux-fb/gdkgeometry-fb.c:
	Update shadowfb when scrolling window.

	* gdk/linux-fb/gdkglobals-fb.c:
	Add _gdk_fb_screen_angle.

	* gdk/linux-fb/gdkkeyboard-fb.c:
	Test code for screen rotation. Shift-F2 in the xlate driver
	rotates the screen.

	* gdk/linux-fb/gdkmain-fb.c:
	Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.

	* gdk/linux-fb/gdkmouse-fb.c:
	Use fb_width/height instead of modeinfo.xres/yres.

	* gdk/linux-fb/gdkprivate-fb.h:
	Added fb_men, fb_width, fb_height & fb_stride. When using
	shadow fb these can differ from the framebuffer stuff.
	Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
	gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
	_gdk_fb_screen_angle. Removed CM, RP.

	* gdk/linux-fb/gdkrender-fb.c:
	Added code for shadowfb handling and screen rotation using
	shadowfb.

	* gdk/linux-fb/gdkwindow-fb.c:
	Use fb_mem, fb_stride, fb_width, fb_height.
	Added recompute_rowstride to reset the rowstride of all windows.
	Added gdk_fb_recompute_all() which recomputes rootwindow size,
	window abs positions and window rowstrides. Usefull when the
	rotation has changed.
2001-01-11 16:39:21 +00:00
Tor Lillqvist
0056107b5d Implement better mouse capturing. Do use SetCapture(). Thanks to
2001-01-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c: Implement better mouse
	capturing. Do use SetCapture(). Thanks to jpe@archaeopteryx.com.
	(find_window_for_pointer_event): New function.
	(gdk_event_translate): Use it when handling mouse events.
2001-01-09 16:45:44 +00:00
Alexander Larsson
7e3eadd61c Added --with-included-loaders option
2001-01-09  Alexander Larsson  <alla@lysator.liu.se>

	* configure.in:
	Added --with-included-loaders option

	* gdk-pixbuf/Makefile.am:
	* gdk-pixbuf/gdk-pixbuf-io.c:
	Add support for including selected gdk-pixbuf loaders only.

	* gtk/gtkwindow.c (gtk_window_set_frame_dimensions,
	gtk_window_set_has_frame):
	Added inline documentation.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
	* docs/reference/gdk/tmpl/windows.sgml:
	Added inline documentation.
2001-01-09 09:53:28 +00:00
Alexander Larsson
49bb8dfa19 Correct filename ~/.pangoft2_aliases
2001-01-08  Alexander Larsson  <alexl@redhat.com>

	* docs/README.linux-fb:
	Correct filename ~/.pangoft2_aliases

	* gdk/gdkwindow.h:
	Added new function gdk_window_get_decorations.

	* gdk/linux-fb/gdkfb.h:
	Removed _gdk_window_get_decorations declaration.
	Renamed _gdk_window_set_child_handler to
	gdk_fb_window_set_child_handler.

	* gdk/linux-fb/gdkwindow-fb.c:
	Renamed _gdk_window_set_child_handler to
	gdk_fb_window_set_child_handler.

	* gdk/x11/gdkwindow-x11.c:
	New function gdk_window_get_mwm_hints().
	Implemented gdk_window_get_decorations.

	* docs/reference/gdk/tmpl/windows.sgml:
	* docs/reference/gdk/gdk-sections.txt:
	Added gdk_window_get_decorations docs.
2001-01-08 16:42:08 +00:00
Alexander Larsson
94dfd3dd82 Possibly send focus events when the mouse moves from one window to
2001-01-08  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus,
	gdk_fb_window_find_focus, gdk_fb_send_focus_change,
	gdk_fb_window_send_crossing_events):
	Possibly send focus events when the mouse moves from one
	window to another.
2001-01-08 11:12:21 +00:00
Tor Lillqvist
c921abb888 Adapt calls to g_{locale,filename}_{to,from}_utf8 to match current API.
2001-01-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_title,
	gdk_window_new): Adapt  calls to g_{locale,filename}_{to,from}_utf8
	to match current API.

	* gdk/win32/gdkvisual-win32.c (gdk_visual_init): If a secret
	environment variable is set, don't call g_error when on a
	palettized (PseudoColor) display. Some people want to use GTK+
	in 256-colour mode even though works only partially.

	* gdk/gdk.def
	* gtk/gtk.def
	* gtk/makefile.mingw.in: Update.
2001-01-07 18:00:15 +00:00
Alexander Larsson
30888237b9 free colormap in here. Sync from X port. (gdk_fb_set_colormap): allow the
2001-01-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_drawable_finalize): free
	colormap in here. Sync from X port.
	(gdk_fb_set_colormap): allow the colormap to be NULL if you like.
	Sync from X port.
	(gdk_fb_clip_region): Comment out g_warning about empty clip region.
	This happens now and then, and i don't think it is a bug.
	(gdk_fb_draw_polygon): Correctly add extra point if startpoint
	!= endpoint.
	(gdk_fb_draw_lines): Don't draw dashed lines if line_style is
	GDK_LINE_SOLID.

	* gdk/linux-fb/gdkfont-fb.c: Return bogus GdkFont that has
	some of the fields filled in at least.

	* gdk/linux-fb/miwideline.c: The widths argument to miLineArcI, and
	miLineArcD is no more, remove it from the function definition.
2001-01-05 14:01:36 +00:00
Havoc Pennington
c7826b5f63 Adapt to uscore-ification of gtktextiterprivate
2001-01-03  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c: Adapt to uscore-ification of gtktextiterprivate

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): remove use
	of private functions; remove inclusion of private headers.

	* gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_line): Add this
	function, so we don't need private functions in gtktextdisplay.c

	* gtk/gtktextiterprivate.h: underscore-ification

	* gtk/gtkwidget.c: Clean up a bunch of docs that said "INTERNAL"
	to instead say "only useful to implement widgets"

	* gtk/gtkenums.h (GtkMovementStep): Rename GTK_MOVEMENT_CHARS,
	GTK_MOVEMENT_POSITIONS to GTK_MOVEMENT_LOGICAL_POSITIONS,
	GTK_MOVEMENT_VISUAL_POSITIONS. Resolves bug 40249.

	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap):
	This function was completely broken

	* gtk/testtext.c (line_numbers_expose): use gtk_paint_layout

	* gtk/gtkvscale.c (gtk_vscale_draw_value): use gtk_paint_layout

	* gtk/gtkvruler.c (gtk_vruler_draw_ticks): use gtk_paint_layout

	* gtk/gtklabel.c (gtk_label_expose): use gtk_paint_layout

	* gtk/gtkhscale.c (gtk_hscale_draw_value): use gtk_paint_layout

	* gtk/gtkhruler.c (gtk_hruler_draw_ticks): use gtk_paint_layout

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render): use
	gtk_paint_layout

	* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): use
	gtk_paint_layout

	* gtk/gtkstyle.h: Add draw/paint expander to draw tree expanders.
	Progress on bug 40103. Add draw_layout to draw a PangoLayout.
	(struct _GtkStyleClass): Remove draw_cross, draw_oval, draw_ramp,
	which were not implemented.

	* gtk/gtktextbuffer.h (struct _GtkTextBufferClass): Add
	insert_pixbuf signal. Rename delete_text to delete_range since it
	also deletes pixbufs and child anchors. This almost closes bug
	40245 (still need to deal with child anchors)

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Add
	insert_pixbuf, change signal names as appropriate, change types of
	signals taking marks/tags to have the specific type, not just
	G_TYPE_OBJECT

	* gtk/gtkmain.c (gtk_get_current_event_state): Add this function;
	closes bug 40051

	* gtk/gtkoptionmenu.c (gtk_option_menu_set_history): clean up
	unnecessary remove_contents() call
	(gtk_option_menu_class_init): add a "changed" signal, closes
	bug 40039
	(gtk_option_menu_update_contents): emit "changed" if the
	active menu item changes

	* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done): fix bad
	cast to GtkObject, reported by Jonas Borgstrom
	(gdk_pixbuf_loader_finalize): don't close the loader on finalize;
	we can't do stuff with side effects in finalize. Instead, spew a
	warning if the loader isn't closed.

	* gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_finalize): free
	colormap in here, non-X ports probably need to sync to this change

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_set_colormap): remove
	assertion that colormap != NULL, you can set the colormap to NULL
	if you like.

	* Makefile.am: remove gtk-config-2.0

	* configure.in: Use pkg-config to locate GLib. Remove
	separated-out GMODULE_LIBS, GMODULE_CFLAGS; these were not used,
	and the gmodule libs/cflags were in GLIB_LIBS GLIB_CFLAGS anyhow.
	Use pkg-config to locate Pango. Output correct Pango libs to
	gdk-2.0.pc.in. Fix test for FREETYPE_CONFIG (typo fix).

	* Makefile.am (pkgconfig_DATA): install only target-specific pc
	files
	(install-data-local): symlink gtk+-2.0.pc and gdk-2.0.pc to the
	X11 pc files

	* gtk+-2.0.pc.in (Requires): require the GDK for the current target
	unref from here
2001-01-04 17:48:43 +00:00
Havoc Pennington
a7aa33f14e Havoc Pennington <hp@redhat.com>
* gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@

	* gdk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@

	* configure.in (LIBTOOL_EXPORT_OPTIONS): define
	LIBTOOL_EXPORT_OPTIONS with options to control symbol export
2001-01-02 16:15:35 +00:00
Tor Lillqvist
ee4c69b68e New function, as in the X11 backend. (gdk_window_new,
2000-12-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_impl_win32_get_visible_region): New function, as in
	the X11 backend.
	(gdk_window_new, gdk_window_set_title): Use g_locale_from_utf8()
	instead of duplicating the same code here.

	* gdk/win32/gdkwin32.h (GDK_COLORMAP_PRIVATE_DATA): Use
	GDK_COLORMAP macro.

	* gdk/win32/gdkevents-win32.c (gdk_event_funcs): Use NULL as
	destroy function.
	(gdk_event_translate): Use GDK_COLORMAP_PRIVATE_DATA to correctly
	access that.

	* gtk/gtk.def: Update.

	* gtk/makefile.mingw.in: Use glib-genmarshal from $(GLIB)/gobject.

2000-12-26  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkvisual-win32.c (gdk_visual_init): Call g_error if
	we are on a palettized display ("PseudoColor" in X11), as the code
	for that doesn't work anyway, and never has.

2000-12-30  Tor Lillqvist  <tml@iki.fi>

	* gdk_pixbuf.def: Update.
2000-12-30 20:06:14 +00:00
Havoc Pennington
d5be411c7b Set the system colormap on input only windows, to avoid special cases all
2000-12-30  Havoc Pennington  <hp@pobox.com>

* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set the system
colormap on input only windows, to avoid special cases all over
the code for these windows.
2000-12-30 15:44:41 +00:00
Alexander Larsson
3944c2dbfc Don't use isprint() for chars > 255.
2000-12-22  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkkeyboard-fb.c (xlate_io):
	Don't use isprint() for chars > 255.
2000-12-22 12:33:07 +00:00
Alexander Larsson
ee053ddd2e Uh? What happed? My cvs checkin got broken pipe.. 2000-12-21 10:33:40 +00:00
Owen Taylor
c7755bc949 Check for FreeType using freetype-config, since we can't rely on Xft to
Tue Dec 19 23:47:27 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in gdk/x11/Makefile.am: Check for FreeType
	using freetype-config, since we can't rely on Xft
	to pull in the libraries for us, or rely on it being
	in the default include path first.

	* gtk/gtkframe.c: Fix some problems where the gap wasn't
	being drawn in the right place, especially for right-aligned
	frame labels.

Thu Dec 14 21:02:59 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfontsel.c (gtk_font_selection_select_font): Update
	the font_name entry as needed.
2000-12-20 04:49:49 +00:00
Havoc Pennington
d788d9b054 wow, that implementation was pretty non-working.
2000-12-18  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkevents.c (gdk_event_get_state): wow, that implementation
	was pretty non-working.

	* gtk/testtext.c (fill_file_buffer): make this a bit more robust
	by passing the length to g_utf8_validate().
2000-12-18 19:12:35 +00:00
Havoc Pennington
fde4fecfd2 Port to GObject, can go back in gdk-pixbuf after setting up a
2000-12-16  Havoc Pennington  <hp@pobox.com>

* gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c:
Port to GObject, can go back in gdk-pixbuf after setting up
a gdk-pixbuf-marshal.h header over there.

* gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g;
(gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal
args
(gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be
set
(gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons
here, do it when we create the buttons later
(gtk_tree_view_realize_buttons): add some g_return_if_fail
(gtk_tree_view_map): paranoia checks that column->button is shown
and unmapped
(gtk_tree_view_size_request): only request visible children.
Move header size calculation in here, for cleanliness, and
to maintain invariants for child widgets if we eventually
let users set different children inside the buttons
(gtk_tree_view_map_buttons): factor out code to map buttons,
since it was being called several times
(gtk_tree_view_size_allocate_buttons): move_resize the drag
windows instead of just moving them; their height may change
if we allow random widgets in there, or the theme changes.
(gtk_tree_view_size_allocate): move button size allocation
above emitting the scroll signals, to ensure a sane state when we
hit user code
(gtk_tree_view_button_release): remove queue_resize after
tree_view_set_size(), set_size() will handle any resize queuing
that's needed
(gtk_tree_view_focus_in): just queue a draw, don't fool with
draw_focus goo
(gtk_tree_view_focus): use gtk_get_current_event() and
gdk_event_get_state()
(gtk_tree_view_deleted): don't queue_resize() after calling set_size()
(gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove
semicolon
(gtk_tree_view_create_button): show the button here
(gtk_tree_view_button_clicked): actually emit the clicked signal
on the column
(_gtk_tree_view_set_size): return right away if the size is
unchanged, as a cheesy optimization
(gtk_tree_view_setup_model): rename set_model_realized to
setup_model to match the flag that indicates whether we've
called it
(gtk_tree_view_get_hadjustment): create adjustment if it doesn't
exist, because set_scroll_adjustment does that and it shouldn't
matter what order you call these in
(gtk_tree_view_get_vadjustment): ditto
(gtk_tree_view_set_headers_visible): canonicalize the bool,
for paranoia
(gtk_tree_view_set_headers_visible): call
gtk_tree_view_map_buttons() instead of using cut-and-paste code
(gtk_tree_view_append_column): clarify whether the return value
is the count of columns before or after, and do the increment
separately from the return statement so you can tell from the code.
(gtk_tree_view_remove_column): ditto
(gtk_tree_view_insert_column): ditto
(gtk_tree_view_get_column): remove g_return_if_fail for columns
outside the existing range, the docs say that outside-range
columns are allowed, so we handle them as documented. (Presumably
this allows a nice loop with column != NULL as test.)
(gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments
mean (left/right/center etc.).
(gtk_tree_view_collapse_all): only queue a draw if we're mapped
(gtk_tree_view_expand_row): add docs
(gtk_tree_view_collapse_row): add docs

* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new
function to emit the clicked signal on a column

* gdk/gdkevents.c (gdk_event_get_state): new function, to get the
state of an event
(gdk_event_get_time): don't treat GDK_SCROLL
as a button event, remove default case from switch so gcc
will whine if we don't explicitly handle all event types

* gtk/gtktreeselection.h: added some FIXME

* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename
"columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
Owen Taylor
6e5a269f38 Add two virtualized functions gdk_drawable_get_clip_region - to get the
Thu Dec 14 20:22:31 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/{gdkdrawable.[ch],gdkpixmap.c,gdkwindow.c,x11/gdkwindow.c}:
	Add two virtualized functions gdk_drawable_get_clip_region - to
	get the clip region when drawing.

	* gdk/gdkwindow.c (gdk_window_invalidate_rect): Rewrite to simple
	use invalidate_region.

	* gdk/gdkwindow.c (gdk_window_invalidate_region): Clip to visible
	region.

	* acconfig.h configure.in: Check for Xft. For now, assume
	that if Xft is found, Pango was compiled with Xft support
	as well.

	* gdk/gdkcolor.h gdk/x11/gdkcolor-x11.c: Add
	gdk_colormap_query_color().

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_glyphs): Draw
	with Xft if appropriate.

	* gdk/x11/gdkpango-x11.c (gdk_pango_context_get): Create
	a pangoxft context if we have XFT and the environment
	variable GD_USE_XFT is set.

	* gdk/x11/gdkx.h (struct _GdkGCX11): Cache the fg_pixel
	and also possibly an XftDraw structure.

        * gtk/gtkfontsel.c: Handle the case where the font from the
	style doesn't match any of the fonts a bit better.

	* gtk/testgtk.c: Add tabs between directional segments for
	hebrew/arabic test. (Not really necessary, just a little
	prettier.)
2000-12-15 01:46:41 +00:00
Tor Lillqvist
2e70f892cc Add gdkkeys.
2000-12-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/makefile.{mingw.in,msc} (gdk_OBJECTS): Add gdkkeys.

	* gtk/gtk.def
	* gdk/gdk.def: Update.

	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkkeys-win32.c: New file. Move some functions from
	gdkmain-win32.c here.

	* gdk/win32/makefile.mingw.in (all): No need to make
	gdk-win32res.o here, the makefile one step up will call us to make
	it.

	* gdk/win32/makefile.{mingw.in,msc} (gdk_win32_OBJECTS): Add
	gdkkeys-win32.

	* gdk/win32/gdkcolor-win32.c: Silence gcc -Wall.

	* gdk/win32/gdkevents-win32.c (gdk_events_init): Remove leftover
	call to g_source_add().

	* gdk/win32/gdkgc-win32.c (BitmapToRegion): Plug memory
	leak. Thanks to Andreas Kemnade.
2000-12-14 23:14:18 +00:00