Commit Graph

511 Commits

Author SHA1 Message Date
Tim Janik
fb12bbcebb added GtkArrow::arrow-scaling style property to control the arrow/border
Tue Sep 19 17:00:04 2006  Tim Janik  <timj@imendio.com>

        * gtk/gtkarrow.c: added GtkArrow::arrow-scaling style property to
        control the arrow/border ratio within the allocation.

        * tests/testgtk.c: added a GtkArrow to handle box test.

        * tests/testgtkrc: test ::arrow-scaling property.
2006-09-19 15:51:19 +00:00
Tim Janik
2c0d76bfa2 fixed compiler warnings.
Mon Sep 11 14:22:39 2006  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c: fixed compiler warnings.
2006-09-11 12:24:32 +00:00
Tim Janik
219dc5bdee allow (most) windows to be resizable. added ellipsization settings to
Tue Aug 29 11:57:40 2006  Tim Janik  <timj@imendio.com>

        * tests/testgtk.c: allow (most) windows to be resizable.
        added ellipsization settings to progress bars.
2006-08-29 10:01:02 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
a469257a23 Add an expander example.
2006-01-10  Matthias Clasen  <mclasen@redhat.com>

	* tests/testgtk.c: Add an expander example.
2006-01-11 04:18:19 +00:00
Matthias Clasen
10bde14d06 Fix the build 2005-09-09 18:19:48 +00:00
Matthias Clasen
244d41b94a Add tests for extra virtual modifiers.
2005-09-06  Matthias Clasen  <mclasen@redhat.com>

	* tests/testgtk.c (create_key_lookup): Add tests for extra virtual
	modifiers.

	* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Try to match both against
	Mod2 - Mod5 and against Super, Hyper, Meta.

	* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
	* gtk/gtkaccelgroup.c (gtk_accelerator_parse)
	(gtk_accelerator_name): Support Super, Hyper Meta and Mod2 - Mod5.
2005-09-06 18:13:56 +00:00
Matthias Clasen
df517cb1d5 Add two new settings, gtk-cursor-theme-name and gtk-cursor-theme-size to
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c: Add two new settings,
	gtk-cursor-theme-name and gtk-cursor-theme-size to
	control the cursor theme.

	* gdk/x11/gdkevents-x11.c: Add two new X settings,
	Gtk/CursorThemeName and Gtk/CursorThemeSize, and map
	these to the gtk settings.

	* tests/testgtk.c (create_cursors): Add a cursor theme
	testcase.
2005-06-15 19:25:49 +00:00
Owen Taylor
aada841db8 Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
2005-05-11  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
        to draw the swatch in to avoid having an extraneous window.
2005-05-12 01:12:19 +00:00
Owen Taylor
485fd85179 Fill in unused bits so they can be used for the depth-32 target case.
2005-05-09  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_convert_0888_br, gdk_rgb_convert_8880_br):
        Fill in unused bits so they can be used for the depth-32 target case.
        Rewrite so that that gives a marginal speedup rather than a
        marginal slowdown. (on x86)

        * gdk/gdkscreen.h gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkvisual-x11.c:
        Add gdk_screen_get_rgba_colormap/visual to get a visual for
        windows with an alpha channel, if one exists.

        * gdk/win32/gdkscreen-win32.c gdk/linux-fb/gdkscreen-fb.c:
        Stub out gdk_screen_get_rgba_colormap/visual.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors): computation of
        "unused" wasn't right for depth == 32, since it depended on
        shifting by 32.

        * gdk/gdkrgb.c: Fill in alpha bits with 1s. (Based on patch from
        Keith Packard,
        http://mail.gnome.org/archives/gtk-devel-list/2004-June/msg00080.html)

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture):
        Implement again, without using Xft.

        * tests/testgtk.c: Add a test for windows with an alpha channel.
2005-05-09 22:54:10 +00:00
Hans Breuer
0ba6aed77e [merged from gtk-2-6 branch] let dash_offset shift the start of the line
2005-04-03  Hans Breuer  <hans@breuer.org>

	[merged from gtk-2-6 branch]
	* gdk/win32/gdkdrawable-win32.c : let dash_offset shift the start of
	the line pattern not the start of the line. Fixes bug #171641.

	* gtk/makefile.msc.in : follow .symbols changes

	* gdk/win32/gdkwindow-win32.c : declare and resolve GetAncestor()
	dynamically. (It is not available in _WIN_VER <= 0x0400)

	* gdk/win32/makefile.msc : removed gdkpango-win32.obj

	* gtk/gtkhsv.c gtk/gtkstyle.c : use G_PI instead of M_PI

	[also applied to gtk-2-6 branch]
	* gdk/makefile.msc gdk-pixbuf/makefile.msc : handle gdk*alias.def

	* gdk/makefile.msc.in : add gtkmnemonichash.obj

	* test/testgtk.c(set_parent_signal) : use g_message instead of
	g_print to keep the 'testgtk --bench=all' output clean
2005-04-03 21:03:08 +00:00
Owen Taylor
3d737ee8ba Add GdkPangoRenderer, a subclass of PangoRenderer targeting GDK drawables.
Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of
	PangoRenderer targeting GDK drawables. Use to implement the old
	gdk_draw_layout() and friends.

	* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkwindow.c gdk/gdkpixmap.c:
	Add gdk_draw_glyphs_transformed() gdk_draw_trapezoids() and
	the corresponding members of GdkDrawableClass. Add a fallback
	implementation of gdk_draw_trapezoids() in terms of pixbufs.

	* gdk/gdkwindowing.h gdk/x11/gdkg-x11.h: Add
	_gdk_windowing_gc_get_foreground() to enable the fallback
	trapezoid implementation.

	* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkdisplay-x11.h: Implement
	draw_glyph_transformed,	draw_trapezoids.

	* gdk/x11/gdkdrawable-x11.[ch]: Add
	_gdk_x11_drawable_draw_xtrapezoids, _gdk_x11_drawable_draw_xft_glyphs
	for use of GdkX11Renderer.

	* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Implement
	GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED in the RENDER codepath.

	* gdk/gdkpango-x11.c: Add GdkX11Renderer... a subclass of
	PangoXftRenderer that does tiles/stipples and fallback rendering
	of trapezoids without the RENDER extension.

	* gdk/gdkpango-x11.c gdk/x11/gdkscreen-x11.[ch] _gdk_x11_renderer_get:
	Add _gdk_x11_renderer_get() to get a singleton GdkX11Renderer
	for the screen.

	* gdk/x11/gdkdrawable-x11.c (get_impl_drawable): Fix a None/NULL
	confusion.

	* gtk/gtklabel.[ch] gtk/gtk.symbols: Add gtk_label_set/get_angle(),
	and an ::angle property.

	* gtk/gtklabel.c: Remove #if 0'd dead code gtk_label_paint_word().

	* gtk/gtktextdisplay.c: Switch to using a GtkTextRenderer subclass
	of GdkPangoRenderer for drawing.

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Switch to using
	gtk_attr_shape_new_with_data() to store backreferences to
	embedded pixmaps and widgets. Leave line_display->shaped_objects
	around for backwords compatibility.

	* gdk/gdkpango.[ch] (gdk_pango_context_set_colormap): Describe
	as deprecated, remove implementation.

	* gtk/gtkwidget.c (gtk_widget_create_pango_context): Remove
	call to gdk_pango_context_set_colormap.

	* demos/gtk-demo/Makefile.am demos/gtk-demo/rotated_text.c: Add
	a demo showing drawing rotated text.

	* tests/testgtk.c: Add a rotated-label test, and also a rotated
	drawing test (differs from demos/gtk-demo/rotated_text by also
	using a tile)
2004-11-21 16:24:01 +00:00
Manish Singh
54b45a19b9 modules/engines/ms-windows/msw_rc_style.c
Fri Nov 19 15:18:51 2004  Manish Singh  <yosh@gimp.org>

        * modules/engines/ms-windows/msw_rc_style.c
        * modules/engines/ms-windows/msw_style.c
        * modules/engines/ms-windows/msw_theme_main.c
        * modules/engines/pixbuf/pixbuf-main.c
        * modules/engines/pixbuf/pixbuf-rc-style.c
        * modules/input/gtkimcontextime.c
        * modules/input/gtkimcontextxim.c
        * modules/input/imam-et.c
        * modules/input/imcedilla.c
        * modules/input/imcyrillic-translit.c
        * modules/input/iminuktitut.c
        * modules/input/imipa.c
        * modules/input/imthai-broken.c
        * modules/input/imti-er.c
        * modules/input/imti-et.c
        * modules/input/imviqr.c
        * tests/prop-editor.c
        * tests/testentrycompletion.c
        * tests/testfilechooser.c
        * tests/testmerge.c
        * tests/testtoolbar.c
        * tests/testtreecolumns.c
        * tests/testtreeview.c: get rid of unnecessary casts.

        * tests/testgtk.c (create_labels): add GTK_LABEL() casts for
        gtk_label_set_ellipsize() calls.

        * tests/testicontheme.c (main): remove unused pixbuf variable.
2004-11-19 23:30:47 +00:00
Matthias Clasen
dd3948538b Apply a patch by Soeren Sandmann to test long statusbar texts.
2004-11-09  Matthias Clasen  <mclasen@redhat.com>

	* tests/testgtk.c: Apply a patch by Soeren Sandmann to
	test long statusbar texts.
2004-11-09 06:14:11 +00:00
Matthias Clasen
d5f92150d4 Fix many sparse warnings. 2004-10-28 15:00:05 +00:00
Owen Taylor
3895bea4df #136672, reported by Christian Persch; fixes based on a patch by Soeren
Sun Mar 14 19:26:48 2004  Owen Taylor  <otaylor@redhat.com>

        #136672, reported by Christian Persch; fixes based
        on a patch by Soeren Sandmann.

        * gtk/gtkmenu.c: Change the handling of mixed gridded
        and non-gridded menu items; the old method was causing
        major performance problems even with the "avoid relayout
        on destruction" hack put in recently.

        Now we first lay out the gridded items and then put the
        non-gridded items into empty rows / after the gridded items.
        Layout is done in a central menu_shell_ensure_layout(). Also
        avoid emitting property notifications when we initially
        insert or attach items.

        * gtk/gtkmenushell.[ch] gtk/gtkmenu.c: Stop setting the
        unused menu_shell->menu_flag, and document it as unused
        in the header.

        * tests/testactions.c: Add a test of creating/removing
        lots of items.

        * test/testgtk.c: Add some more cruft to the menu test.
2004-03-15 02:03:59 +00:00
Owen Taylor
3e69627146 Use gtk_entry_set_width_chars() rather than gtk_widget_set_size_request().
Thu Mar 11 15:59:05 2004  Owen Taylor  <otaylor@redhat.com>

        * tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
        rather than gtk_widget_set_size_request().
2004-03-11 21:06:16 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Owen Taylor
d52caae6d1 Add gtk_drag_source_set/get_target_list(). (#127499, based on patch from
Mon Mar  1 19:30:25 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.[ch]: Add gtk_drag_source_set/get_target_list().
        (#127499, based on patch from Michael Natterer)

        * tests/testgtk.c: Fix bidi strings to display correctly
        with new auto-bidi.
2004-03-02 00:45:33 +00:00
Federico Mena Quintero
9a98cd8f87 Fix #59707.
2004-02-04  Federico Mena Quintero  <federico@ximian.com>

	Fix #59707.

	* gtk/gtklabel.c (gtk_label_focus): Removed, so we don't ignore
	the focus chain.
	(gtk_label_button_press): Fix prototype.
	(gtk_label_button_release): Likewise.
	(gtk_label_motion): Likewise.

	* tests/testgtk.c (create_message_dialog): For the dialog with
	only GTK_BUTTONS_CLOSE, make GTK_RESPONSE_CLOSE the default.
2004-02-04 21:55:33 +00:00
Hans Breuer
2d19ee19be new GTK_STOCK_NETWORK ... gtk/gtkstock.[hc] : ... define ...
2004-01-28  Hans Breuer  <hans@breuer.org>

	* gtk/stock-icons/stock_network_(16|24).png : new GTK_STOCK_NETWORK ...
	  gtk/gtkstock.[hc] : ... define ...
	  gtk/gtkiconfactory.c : ... register ...
	  gtk/stock-icons/Makefile.am gtk/stock-icons/makefile.msc : ... compile ...
	* gtk/gtkfilesystemwin32.c : ... and use. Also adapt to recent
	IFace changes.

	* gtk/gtk.def : added a bunch of new exported symbols

	* tests/testfilechooser.c (no_backup_files_filter) : don't crash
	on filter_info->display_name being NULL

	* tests/testgtk.c : make testgtk --bench=all work again
2004-01-28 21:46:02 +00:00
Soeren Sandmann
accc299dfa Set a small size request and make the window resizable, to test
Sun Jan 18 13:16:34 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/testgtk.c (create_toolbar): Set a small size request and
	make the window resizable, to test mapping/unmapping of buttons.

	* gtk/gtktoolbar.c (gtk_toolbar_remove_content,
	gtk_toolbar_insert_tool_item): remove these functions.

	* gtk/gtktoolbar.c (gtk_toolbar_show_all,
	toolbar_content_show_all, gtk_toolbar_hide_all,
	toolbar_content_hide_all): New functions.

	Ignore show_all/hide_all for buttons created in compatibility mode.

	* gtk/gtktoolbar.c (internal_insert_element, gtk_toolbar_show_all,
	gtk_toolbar_hide_all): Make sure buttons are ignored by
	gtk_toolbar_show_all() and gtk_toolbar_hide_all().

	* gtk/gtktoolbar.c: s/regular_widget/compatibility/g

	* gtk/gtktoolbar.c (struct _ToolbarContent): Allocate
	GtkToolbarChild inline. Get rid of GtkToolbarChildSpace.

	* gtk/gtktoolbar.c (toolbar_content_expose): Fix bug where widget
	could become NULL.

	* gtk/gtktoolbar.c (gtk_toolbar_add): Append new tool items
	instead of prepending them.

	* gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Use the same
	'elapsed' for all items.

	* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): Turn booleans
	into bitfields.

	* gtk/gtktoolbar.c: Many formatting fixes
2004-01-18 12:28:38 +00:00
Matthias Clasen
6f81c10a54 Add table menu tests.
2003-09-11  Matthias Clasen  <maclas@gmx.de>

	* tests/testgtk.c: Add table menu tests.

	* gtk/gtkmenu.c (gtk_menu_free_private): Don't forget to free the
	GtkMenuPrivate struct itself. Pointed out by valgrind.

	* gtk/gtkuimanager.c (gtk_ui_manager_finalize): Clean up
	properly.  (#121998)
2003-09-11 21:02:24 +00:00
Alexander Larsson
0217c9dbfb Implement gtk_event_box_get/set_input_only()
2003-09-08  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkeventbox.[hc]:
	Implement gtk_event_box_get/set_input_only()

	* tests/testgtk.c:
	Tests for the new input only event boxes
2003-09-08 20:04:49 +00:00
Soeren Sandmann
c8a9d2839c Make the layers in the paint stack have their own pixmap instead of
Wed Aug 20 22:04:47 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/gdkwindow.c: Make the layers in the paint stack have their
	own pixmap instead of sharing one.

	* tests/testgtk.c (create_get_image): Fixes to make the window fit
	on an 800x600 screen
2003-08-20 21:11:25 +00:00
Matthias Clasen
424433f1a4 Add support for EWMH "Above" and "Below" window states. (105100, Manuel Clos) 2003-08-10 23:37:37 +00:00
Matthias Clasen
0df78ed774 Use g_setenv() instead of putenv(). 2003-08-02 21:35:44 +00:00
Matthias Clasen
a12306e621 Add a test for GtkFontButton and GtkColorButton. 2003-07-01 20:02:31 +00:00
Soeren Sandmann
171fd90cd3 Make it compile with C89 compilers
Tue Jun 10 00:58:23 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/testgtk.c: Make it compile with C89 compilers
2003-06-09 22:50:54 +00:00
Matthias Clasen
4363aee1b1 Install boolean child properties "resize" and "shrink".
2003-06-09  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkpaned.c (gtk_paned_class_init): Install boolean child
	properties "resize" and "shrink".
	(gtk_paned_[gs]et_child_property): Implementations of
	GtkContainer::[gs]et_child_property.
	* tests/testgtk.c (toggle_resize, toggle_shrink): Use the new
	paned child properties instead of remove/add hacks.  (#114667,
	Soeren Sandmann)
2003-06-09 22:04:34 +00:00
Manish Singh
dd74be94c6 demos/gtk-demo/main.c demos/gtk-demo/tree_store.c gdk/x11/gdkscreen-x11.c
Thu Feb 27 17:44:24 2003  Manish Singh  <yosh@gimp.org>

        * demos/gtk-demo/main.c
        * demos/gtk-demo/tree_store.c
        * gdk/x11/gdkscreen-x11.c
        * gtk/gtkcellrenderertoggle.c
        * gtk/gtkcolorsel.c
        * gtk/gtkdnd.c
        * gtk/gtkeditable.c
        * gtk/gtkentry.c
        * gtk/gtkmenu.c
        * gtk/gtkmenubar.c
        * gtk/gtkmenuitem.c
        * gtk/gtkmenushell.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktextbuffer.c
        * gtk/gtktextview.c
        * gtk/gtktreeviewcolumn.c
        * tests/testgtk.c
        * tests/testtext.c
        * tests/testtreeedit.c
        * tests/testtreefocus.c
        * tests/testtreeview.c: remove unnecessary G_OBJECT() casts.
2003-02-28 01:45:51 +00:00
Manish Singh
bd6ac8c69c #include <stdlib.h> for putenv, <string.h> for strlen.
Wed Jan  8 18:43:03 2003  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkdisplay-x11.c: #include <stdlib.h> for putenv,
        <string.h> for strlen.

        * gdk/x11/gdkscreen-x11.c: #include <stdlib.h> for getenv,
        <string.h> for strrchr.

        * tests/testgtk.c (create_saved_position): "x" and "y" properties
        for widgets no longer exist, use gtk_window_move instead.

        * test/testtextbuffer.c (check_get_set_text): cast strlen to
        int for g_error.
2003-01-09 02:38:13 +00:00
Owen Taylor
f9d1107b60 Use octal escapes rather than literal UTF-8.
Fri Dec  6 19:00:59 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/gtk-demo/testview.c tests/testgtk.c
        tests/testtext.c tests/testtextbuffer.c: Use
        octal escapes rather than literal UTF-8.
2002-12-07 00:03:34 +00:00
Manish Singh
bc035915e9 add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh  <yosh@gimp.org>

	* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
	top of gtktypebuiltins.c.

	* gtk/gtkclist.c
	* gtk/gtkcombo.c
	* gtk/gtkctree.c
	* gtk/gtklist.c
	* gtk/gtklistitem.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpixmap.c
	* gtk/gtkpreview.c
	* gtk/gtksignal.c
	* gtk/gtktext.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c
	* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
	and compat code.

	* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
	to set_color_internal, and use that. The deprecated function now
	merely wraps it.

	* gtk/gtkfontsel.c: same as above, except with
	gtk_font_selection_get_font.

	* gtk/gtknotebook.c: same as above, except with
	gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
	hborder,vborder}.

	* gtk/gtkprogressbar.c: same as above, except with
	gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
	activity_blocks}.

	* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.

	* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.

	* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
	GtkMenuFactory stuff if GTK_COMPILATION, since they are used
	internally by the compat code.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
	use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
	now).

	* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.

	* gtk/gtkobject.c: replaced various deprecated functions. In set and
	get_property, use g_object_{set,get}_data with "user_data" instead
	of gtk_object_{set,get}_user_data.

	* gtk/gtkprogress.h: API declared if GTK_COMPILATION

	* gtk/gtkprogress.c: port get_type to GObject API.

	* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
	if GTK_COMPILATION.

	* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
	gtk_widget_queue_draw instead of the other way around.

	* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED

	* tests/testgtk.c
	* tests/testselection.c
	* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
	deprecated stuff.
2002-11-20 01:07:33 +00:00
Matthias Clasen
fccd38337e Add a dummy widget and pass it as first argument to the various create
* tests/testgtk.c (do_bench):
	(do_real_bench):
	(bench_iteration): Add a dummy widget and pass it as first
	argument to the various create functions when in --bench mode,
	since these call gtk_widget_get_screen () on their first argument.
2002-11-19 21:18:23 +00:00
Soeren Sandmann
6bd08ac815 - comment out check_inconsistent_aa_bits[].
Wed Nov 13 14:01:44 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstyle.c:

          - comment out check_inconsistent_aa_bits[].

          - use fg/bg with a generated aa color to draw check and option
	    marks in menu items.

	  - use text/base to draw check and option buttons, except when
	    state is ACTIVE, in which case we use fg/bg with a generated
	    aa color.

	* tests/testgtk.c (menu_items): Add three check items.
2002-11-13 12:58:43 +00:00
Matthias Clasen
ab4d6935ef Don't start a drag on double click. (#98189) Also test moving.
* gtk/gtkstatusbar.c (gtk_statusbar_button_press): Don't start
	a drag on double click.  (#98189)
	* tests/testgtk.c (grippy_button_press): Also test moving.
2002-11-10 22:38:03 +00:00
Matthias Clasen
d98e464ba2 Draw grips in all edges.
* tests/testgtk.c (create_resize_grips): Draw grips in all edges.
2002-11-08 23:54:10 +00:00
Owen Taylor
b179b5eba4 Use g_get_application_name() instead of g_get_prgname() as the default
Fri Nov  8 17:08:54 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_new): Use
        g_get_application_name() instead of g_get_prgname()
        as the default window title when set.

        * gdk/x11/gdkwindow-x11.c gdk/x11/gdkdisplay-x11.[ch]:x
        Set g_get_application_name() as the title for the
        leader window the first time we create a window
        pointing to it.

        * tests/testgtk.c (main): Call g_set_application_name();

        * configure.in (GDK_PIXBUF_VERSION): Require GLib-2.1.3
2002-11-08 22:29:33 +00:00
Anders Carlsson
74bab1cc42 Add resize grips test.
2002-11-07  Anders Carlsson  <andersca@gnu.org>

	* tests/testgtk.c (create_resize_grips): Add resize grips test.
2002-11-07 10:06:07 +00:00
Owen Taylor
e49f5d891f Warn if loading <ImageItem> image fails.
Fri Oct 25 10:50:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkitemfactory.c (gtk_item_factory_create_item):
        Warn if loading <ImageItem> image fails.

        * tests/testgtk.c: Fix data for "apple" inline pixbuf
        to be valid.
2002-10-25 15:00:55 +00:00
Owen Taylor
3d4c27d06a 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.

        * tests/testgtk.c (create_list): Make the initial
        setting of the selection mode correspond to the option
        menu.
2002-10-23 00:45:18 +00:00
Owen Taylor
de89785a28 Make the widgets work reasonably when they don't have children -- draw the
Thu Oct 17 16:13:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcheckbutton.c gtk/gtkradiobutton.c: Make
        the widgets work reasonably when they don't have
        children -- draw the focus around the indicator,
        and position the indicator symmetrically.
        (#74830, Dave Camp)

        * tests/testgtk.c: Add no-child portions to check and radio
        button tests.
2002-10-17 20:20:52 +00:00
Manish Singh
37278865e1 Deprecation cleanup
Sun Oct 13 16:20:41 2002  Manish Singh  <yosh@gimp.org>

        * tests/pixbuf-randomly-modified.c tests/prop-editor.c
        tests/testcalendar.c tests/testdnd.c tests/testgtk.c tests/testinput.c
        tests/testmultidisplay.c tests/testmultiscreen.c tests/testrgb.c
        tests/testselection.c tests/testsocket.c tests/testsocket_common.c
        tests/testtext.c tests/testtextbuffer.c tests/testtreecolumns.c
        tests/testtreeedit.c tests/testtreeflow.c tests/testtreefocus.c
        tests/testtreesort.c tests/testtreeview.c tests/testxinerama.c
        tests/treestoretest.c: Deprecation cleanup

        * tests/Makefile.am: Added disable deprecation flags
2002-10-13 23:22:33 +00:00
Soeren Sandmann
c7346aa2f5 remove references to non-existing properties GtkWindow::allow_shrink and
Sun Oct 13 17:21:15 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/testgtk.c (window_controls), tests/testgtk.c
	(create_tooltips): remove references to non-existing properties
	GtkWindow::allow_shrink and GtkWidget::width
2002-10-13 15:24:40 +00:00
Owen Taylor
7eecad56f8 Add GO_FORWARD and GO_BACK with both left and right arrows depending on
Wed Oct  9 17:06:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):
        Add GO_FORWARD and GO_BACK with both left and right
        arrows depending on the direction. (#92211,
        Kenneth Christiansen)

        * tests/testgtk.c (create_flipping): Add forward/back button
        pairs in default, RTL, LTR configurations.
2002-10-09 21:38:43 +00:00
Owen Taylor
123d1fb81c Use a pixbuf to set the drag icon, combine code to create drag icons
Mon Oct  7 16:28:11 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorsel.c (palette_drag_begin): Use
        a pixbuf to set the drag icon, combine code
        to create drag icons (Fixes #80092, #80093)

        * gtk/gtkcolorsel.c (get_screen_color): Don't warn
        on failure to grab keyboard/mouse. (#80085)

        * gtk/gtkcolorsel.c (palette_press): Return FALSE,
        so DND initiation is possible.

        * gtk/gtkcolorsel.c (palette_release): Set the color
        from the palette on release, not press.

        * tests/testgtk.c (create_color_selection): Use
        gtk_widget_show_all()
2002-10-07 21:53:59 +00:00
Owen Taylor
253458ec52 - Replace GdkPointerHooks with a multihead-safe GdkDisplayPointerHooks,
Mon Oct  7 15:10:00 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
        gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
        gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:

        - Replace GdkPointerHooks with a multihead-safe
          GdkDisplayPointerHooks, leave GdkPointerHooks
          around for singlehead.
        - Add gdk_display_get_pointer() to get the pointer
          location with the screen it is on.

        * gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
        Change gdk_screen_get_window_at_pointer() to
        gdk_display_get_window_at_pointer().

        * gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
        tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
        not gdk_screen_get_window_at_pointer().

        * gtk/gtkcolorsel.c: Fix grabbing color to be multihead
        safe.

        * gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
        since it is useful for writing code that doesn't
        know the dcurrent state but needs a clean colormap.

        * gtk/gtkrc.c: When loading the settings for a particular
        screen, only reset toplevels on that screen.

        * gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
        that should have been #ifndef GTK_MULTIHEAD_SAFE.
2002-10-07 19:42:49 +00:00
Owen Taylor
47bed428ff Improve checks on public entry points, including, among other things
Fri Oct  4 17:13:03 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c: Improve checks on public entry points,
        including, among other things checking whether drag
        contexts passed in are source or dest. (Fixes
        #76762, Alexey A. Malyshev)

        * tests/testtext.c tests/testgtk.c tests/testdnd.c:
        Fix uninstalled operation for new pixbuf changes.

        * gtk/stock-icons/Makefile.am (pixbuf_csource):
        Fix makefile for uninstalled operation.
2002-10-04 21:25:47 +00:00
Owen Taylor
ef33adff83 Add a 'type' parameter, make public.
Thu Oct  3 14:13:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkevents.c (gdk_event_new): Add a 'type'
        parameter, make public.

        * gdk/gdkevents.c (gdk_event_copy): Copy the screen.

        * gdk/gdkevents.c gdk/linux-fb/gdkmain-fb.c
        gdk/x11/gdkevents-x11.c gdk/win32/gdkevents-win32.c:
        _gdk_event_new() => gdk_event_new().

        * gdk/win32/gdkevents-win32.c (real_window_procedure):
        Fix event_private->screen breakage that results from evil
        encapsulation breakage here.

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcontainer.c
        gtk/gtkdialog.c gtk/gtkdnd.c gtk/gtkdrawingarea.c
        gtk/gtkimcontextsimple.c gtk/gtklist.c gtk/gtkmenu.c
        gtk/gtknotebook.c gtk/gtkplug.c gtk/gtkselection.c
        gtk/gtktext.c gtk/gtktreeitem.c gtk/gtktreeview.c
        gtk/gtkviewport.c gtk/gtkwindow-decorate.c gtk/gtkwindow.c
        tests/testgtk.c: Remove most usage of stack-allocated
        GdkEvent structures.

        * gtk/gtktreeview.c: Use a cut-and-paste of the full
        send_focus_event() from gtkwindow.c that does the necessary
        notification of the ::has-focus property and setting of
        the HAS_FOCUS flag.x

        * gtk/gtkdnd.c: Clean up some mess/duplicated code; removing
        an extraneous use of a GdkEvent.
2002-10-03 20:53:30 +00:00
Havoc Pennington
1689117cf7 fix GtkWindowMnemonic to have a separate typedef
2002-09-24  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwindow.c: fix GtkWindowMnemonic to have a separate
	typedef

	* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed): monitor
	FULLSCREEN state

	* tests/testgtk.c (get_state_controls): add
	fullscreen/unfullscreen test

	* gdk/gdkdisplay.c (gdk_display_finalize): fix unused variable

	* gdk/x11/gdkscreen-x11.c (init_xinerama_support): fix unused
	variable

	* gdk/x11/gdkevents-x11.c (gdk_xsettings_watch_cb): mop up unused
	variable

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_window_manager_changed): emit
	window_manager_changed signal

	* gdk/x11/gdkscreen-x11.h (struct _GdkScreenX11Class): add
	window_manager_changed signal

	* gdk/x11/gdkevents-x11.c
	(gdk_x11_screen_get_window_manager_name): new function

	* gtk/gtkwindow.c (gtk_window_class_init): add type_hint,
	skip_taskbar_hint, skip_pager_hint properties
	(gtk_window_set_skip_taskbar_hint):
	(gtk_window_get_skip_taskbar_hint):
	(gtk_window_set_skip_pager_hint):
	(gtk_window_get_skip_pager_hint):
	(gtk_window_fullscreen):
	(gtk_window_unfullscreen): new functions

	* gdk/gdkevents.h (GdkWindowState): add FULLSCREEN state

	* gdk/gdkwindow.h (GdkWindowTypeHint): add missing type hint
	values

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_skip_taskbar_hint):
	(gdk_window_set_skip_pager_hint):
	(gdk_window_fullscreen):
	(gdk_window_unfullscreen): new functions
	(set_initial_hints): set fullscreen here if appropriate
2002-09-25 19:16:46 +00:00
Owen Taylor
fceae3c3bb 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:15 +00:00
Owen Taylor
28c2b0a31f Renames:
Thu Jun 20 19:41:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
        tests/*.c: Renames:

         gdk_get_default_display => gdk_display_get_default
         gdk_get_default_screen  => gdk_screen_get_default
         gdk_open_display        => gdk_display_open
2002-06-20 23:59:27 +00:00
Owen Taylor
621fb7466a Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
Tue Jun 18 14:41:48 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
        gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
        gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
        (#85671)

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
        gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
        gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
        gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
        Adapt to above change.
2002-06-18 20:59:44 +00:00
Owen Taylor
a80d4be5a4 Set the private LEAVE_PENDING flag to fix problem where with menu items
Mon 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:41 +00:00
Owen Taylor
70d78734c5 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:46:42 +00:00
Owen Taylor
087fd22c50 Make it work, even if the window is already realized or mapped.
Tue Apr 30 18:42:25 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_set_screen): Make it
        work, even if the window is already realized or
        mapped.

        * tests/testgtk.c: Erwann's multihead changes, slightly
        dumbed down. (Removed logic for pulling windows onto
        the current screen, people can click twice on the demo
        to destroy and create again.)

        * tests/prop-editor.c: Set the screen on the property
        editor if the edited object is a widget.
2002-04-30 23:44:14 +00:00
Manish Singh
4862c90b75 really revert testgtk.c
2002-04-08  Manish Singh  <yosh@gimp.org>

        * tests/testgtk.c: really revert testgtk.c
2002-04-08 19:32:38 +00:00
Soeren Sandmann
e61fd79f19 revert accidentally commited change to testgtk.c
Thu Apr  4 22:35:42 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/testgtk.c (menu_items): revert accidentally commited
	change to testgtk.c
2002-04-04 20:49:03 +00:00
Soeren Sandmann
3c52eba0b5 Fix problem with menu titles being clipped (#75948)
Thu Apr  4 22:28:08 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
	titles being clipped (#75948)
2002-04-04 20:28:47 +00:00
Owen Taylor
d3a43f73b3 Fix to properly take the default window into account by setting a flag and
Sun Mar  3 18:47:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_parse_geometry): Fix
        to properly take the default window into account by
        setting a flag and in gtk_window_compute_configure_request_size ()
        multiplying by the increments and adding in the base
        size. (#72393)

        * tests/testgtk.c (create_gridded_geometry): Add a
        test for gridded geometry and for gtk_window_parse_geometry().
2002-03-04 00:11:25 +00:00
Owen Taylor
b47b15f6ba Fixes for uninstalled operation with module suffixes other than .so and in
Sat Mar  2 23:08:23 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for uninstalled operation with module suffixes
        other than .so and in general for platforms like AIX where
        the module suffix isn't predictable. (#72185, problems
        reported by Miroslaw Dobrzanski-Neumann)

        * modules/input/Makefile.am (gtk.immodules): Query .la
        files rather than shared objects in .libs when creating the
        uninstalled gtk.immodules file.

        * gtk/gtkmain.c (_gtk_find_module): Look for .la files
        after looking for the normal soname extension to handle
        cases where the soname extension isn't predictable,
        like AIX.

        * gtk/gtkthemes.c (gtk_theme_engine_load): Don't
        call g_module_build_path... leave that to
        gtk_rc_find_module_in_path.

        * demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
        tests/testgtk.c (test_init): tests/testtext.c (test_init)
        tests/testdnd.c (test_init): Point gdk-pixbuf to .la
        files rather than poking in .libs for .so files.

        * gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
        .libs from GDK_PIXBUF_MODULEDIR.
2002-03-03 04:16:30 +00:00
Owen Taylor
76cf3d95f6 Handle NO_WINDOW widgets with windows that are children of widget->window.
Sat Mar  2 20:58:30 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
	widgets with windows that are children of widget->window.
	(#50279)

	* tests/testgtk.c: Add eventboxes to the example so that
	we are reparenting between different GdkWindows.
2002-03-03 02:52:56 +00:00
Owen Taylor
fce84d0535 include gdkkeysysms.h if compiling gdk_keyval_convert_case.
Thu Feb 28 19:55:01 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkkeys.c: include gdkkeysysms.h if
        compiling gdk_keyval_convert_case.

        * gtk/gtkmenubar.c (gtk_menu_bar_cycle_focus): Implement
        <Control>Tab <Control><Shift>Tab to cycle between
        all menu bars in a toplevel once one is up.

        * tests/testgtk.c: Add a second menubar, this
        example is already full of crack anyways.

        * gtk/gtkmenushell.c (gtk_menu_shell_key_press): Padd
        unhandled events up to the parent menu shell.

        * gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): Only
        pop up the menu if the parent menu shell is still active.

        * gtk/gtkcontainer.[ch] (_gtk_container_focus_sort): Add a
        old_focus argument, export privately.
2002-03-01 01:05:11 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Manish Singh
cfca364ba3 hm, check buttons look better for below.
2002-02-16  Manish Singh  <yosh@gimp.org>

        * tests/testgtk.c: hm, check buttons look better for below.
2002-02-17 01:26:52 +00:00
Manish Singh
0adb1b260a redid the filesel test. Added a way to set select multiple as a toggle
2002-02-16  Manish Singh  <yosh@gimp.org>

        * tests/testgtk.c: redid the filesel test. Added a way to set select
        multiple as a toggle button, and made show/hide fileops toggle
        buttons as well. get_selections() is called on OK and all the
        filenames selected are printed.
2002-02-17 01:16:24 +00:00
Hans Breuer
6d33d1c7e3 don't reduce the scroll rect size by the scroll amount
2002-02-10  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
	rect size by the scroll amount

	* gdk/win32/gdkwindow-win32.c
	* gdk/win32/gdkselection-win32.c : added some casts to
	make it compile with msvc's strict type checking

	* gtk/fnmatch.c : #include <ctype.h> again for tolower
	prototype. The fnmatch() code assumes to be in the crt
	locale though it is feeded by utf8 strings from gtkfilesel.c

	* gtk/gtkfilesel.c : let ->cmpl_text be a strdup managed by
	_CompletionDir instead of referencing already freed memory

	* gtk/gtktooltips.c (gtk_tooltips_init) : fix typo to
	gtk_rc_parse_string (theDefaultTooltipColor) once as it
	was intended

	* tests/makefile.msc : added more tests

	* tests/testgtk.c (create_list) : don't try to load gtkenums.h
	from the current directory use ../gtk/gtkenums.h instead
2002-02-10 13:18:51 +00:00
Soeren Sandmann
f38b529c6a Keyboard navigation for GtkPaned F6: cycle between panes. F8: focus handle
Sat Feb  9 13:58:41 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkpaned.[ch]: Keyboard navigation for GtkPaned
	F6: cycle between panes.
	F8: focus handle (#53584)

	* tests/testgtk.c: Add test cases for GtkPaned keyboard
	navigation.
2002-02-09 13:05:02 +00:00
Owen Taylor
5288e07931 Fix ordering of priorities so that priorities take precendence over the
Fri Feb  1 17:48:51 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c (gtk_rc_get_style): Fix ordering of
        priorities so that priorities take precendence over
        the ordering by type. (#70205)

        * test/testgtkrc tests/testgtk.c (create_rc_file): Add
        some labels to test priorities in testgtkrc.
2002-02-02 00:44:52 +00:00
Owen Taylor
ff95eb051b Handle reparsing any strings if the theme changes. (#69465)
Fri Feb  1 14:50:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c (gtk_rc_parse_string): Handle reparsing
        any strings if the theme changes. (#69465)

        * tests/testgtk.c: Add a test for gtk_rc_parse_string().
2002-02-01 20:14:02 +00:00
Owen Taylor
2947596ca5 Try to make sure that we have some focused widget on map. (#50339)
Wed Jan 30 13:55:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_show): Try to make
        sure that we have some focused widget on map. (#50339)

        * gtk/gtkdialog.c (gtk_dialog_map): Handling picking
        a focus widget here differently so that if a
        response button gets picked, it's the default one.

        * tests/testgtk.c (make_message_dialog): Set the
        default response for the dialogs.
2002-01-31 16:13:12 +00:00
Owen Taylor
389bc8ebad Only draw for events on the bin window.
Tue Dec 11 19:18:21 2001  Owen Taylor  <otaylor@redhat.com>

        * tests/testgtk.c (layout_expose_handler): Only draw
        for events on the bin window.
2001-12-12 00:23:45 +00:00
Anders Carlsson
744e6f6fb7 Don't return TRUE since then the default GtkLayout expose handler won't be
2001-12-08  Anders Carlsson  <andersca@gnu.org>

	* tests/testgtk.c (layout_expose_handler): Don't return TRUE
	since then the default GtkLayout expose handler won't be called.
2001-12-08 15:44:45 +00:00
Owen Taylor
c860866dd7 Ref-sink the tooltips object. Ref-sink the tooltips object. Fix some
Wed Nov 21 11:41:29 2001  Owen Taylor  <otaylor@redhat.com>
	* tests/testgtk.c (create_tooltips): Ref-sink the tooltips object.
	* gtk/gtktoolbar.c (gtk_toolbar_init): Ref-sink the tooltips object.
	* gtk/gtkfilesel.c (open_new_dir): Fix some constness warnings.
	* gtk/gtkaccelgroup.c: Rename gtk_accel_groups_from_acceleratable()
	back to gtk_accel_groups_from_object(), change @acceleratable
	parameter to gtk_accel_groups_activate() accordingly.
	* gtk/gtkaccelmap.c (gtk_accel_map_lookup_entry): Remove
	left-over comment about quark return.
	* gtk/gtkaccelmap.h: Fix spelling of gtk_accel_map_foreach_unfiltered().
 	* gtk/gtk-boxed.defs (GtkIconSource): added as a boxed type.
        (Patch from Matt Wilson)
	* gtk/gtkobject.c (gtk_object_finalize): Warn if a floating
	object is finalized.
2001-11-21 17:04:35 +00:00
Owen Taylor
86dbeabc40 Include glib-object.h instead of gobject/gsignal.h
Sat Nov 17 21:07:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkenums.h: Include glib-object.h instead of
	gobject/gsignal.h

	* gdk/{gdkinternals.h,gdkwindow.c,gdkwindow.[ch],
	  x11,{fb,win32,x11/gdkwindow-*.c}: Add a dummy GdkScreen
	argument to the window_at_pointer() field of
	GdkPointerHooks. (Patch from Erwann Chenede)

	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Up
	to 6 pointers.
2001-11-18 02:15:52 +00:00
Jacob Berkman
976a5b3100 move the separator to the right place in the radio buttons window 2001-11-16 22:58:32 +00:00
jacob berkman
8d99d6af28 add some no-indicator radio buttons
2001-11-16  jacob berkman  <jacob@ximian.com>

	* tests/testgtk.c (create_radio_buttons): add some no-indicator
	radio buttons

	* gtk/gtkradiobutton.c (gtk_radio_button_init): since we are
	initially active, also initially be depressed
	(gtk_radio_button_clicked): also update our depressed state
2001-11-16 22:56:21 +00:00
Sven Neumann
a1361b57e1 make it compile without warnings.
2001-11-15  Sven Neumann  <sven@gimp.org>

	* tests/testgtk.c: make it compile without warnings.
2001-11-14 23:20:31 +00:00
Tim Janik
d07573c090 added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001  Tim Janik  <timj@gtk.org>

        * added gtkaccelmap.sgml. other updates.

Mon Nov 12 23:08:37 2001  Tim Janik  <timj@gtk.org>

	* gtk/maketypes.awk: fix type utils generation on unix.

	* gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator
	registry.

	* gtk/gtkaccelgroup.[hc]: major API/implementation revamp:
	removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default,
	gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry,
	gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove,
	gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object.
	introduced ::accel_changed signal for change notification, and
	gtk_accel_group_connect/disconnect to connect closures to accel groups.
	made gtk_accel_group_attach/detach and gtk_accel_group_activate private
	functions.
	deprecated gtk_accel_group_ref/unref.

	* gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention
	to accel group changed notification and basically operate on closures.
	removed gtk_accel_label_get_accel_object and
	gtk_accel_label_set_accel_object.
	introduced gtk_accel_label_set_accel_closure, and for convenience,
	gtk_accel_label_set_accel_widget.

	* gtk/gtkitemfactory.[hc]: removed accelerator propagation code
	which mostly moved into gtkaccelmap.[hc].
	removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_*
	and gtk_item_factory_print_func.

	* gtk/gtkmain.c: call _gtk_accel_map_init().

	* gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(),
	that associates an accelerator path with menu items, through which
	persistent accelerator settings on menu items are enabled.

	* gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator
	paths of menu item can be default constructed to allow installation
	of accelerators on menu items that don't come with an accelerator
	binding by default.

	* gtk/gtksettings.c: fix STRING type rc settings by special casing
	them appropriately in the parser.

	* gtk/gtksignal.[hc]: allow a class function offset of 0 for
	gtk_signal_newv().

	* gtk/gtkwidget.[hc]: accelerator API revamp.
	removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal,
	gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and
	gtk_widget_(un)lock_accelerators.
	accelerators maintained through gtk_widget_add/remove_accelerator()
	are not runtime changable now, the correct sequence to setup a
	widget for runtime changable accelerators is now:
	  gtk_accel_map_add_entry(accel_path, key, mods);
	  _gtk_widget_set_accel_path(widget, accel_path, accel_group);

	* gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel
	group changes (as well as mnemonic changes) through the new signal
	::accels_changed.

Sat Nov 10 12:08:56 2001  Tim Janik  <timj@gtk.org>

	* gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle
	GString->string conversions.
2001-11-13 00:53:47 +00:00
Owen Taylor
8a31888a04 Clamp max window width/height to 32767, not 32768 since we have to be able
Mon Nov  5 10:01:49 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position):
	Clamp max window width/height to 32767, not 32768 since
	we have to be able to deal with a dx/y of -32768 without
	getting a width of 65536 when guffaw scrolling.

	* gdk/x11/gdkgeometry-x11.c: Implement gdk_window_scroll()
	for the guffaw scrolling case, fixing some problems with
	copy-area case as well. Fix BadValue bug with moving windows
	by large amounts.

	* gdk/x11/gdkgeometry-x11.c (gdk_window_clip_changed): Update
	clip in window structue before calling gdk_window_invalidate_region
	since that trims new invalidations to the window's visible
	region.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_gravities):
	Really set the static window gravity on the children, not
	repeatedly on the window.

	* gtk/testgtk.c: Add a torture test for big windows and
	gdk_window_scroll().
2001-11-05 15:56:50 +00:00
Anders Carlsson
78fca9fd05 Set up destroy signals so that all windows will be destroyed when one is.
2001-10-27  Anders Carlsson  <andersca@gnu.org>

	* tests/testgtk.c
	(create_window_states): Set up destroy signals so that
	all windows will be destroyed when one is. This fixes
	bug #58133.
2001-10-26 23:37:21 +00:00
Anders Carlsson
dc0772a2b9 Don't set a fixed height on the hscale widget. This fixes "bug" #55840.
2001-10-27  Anders Carlsson  <andersca@gnu.org>

	* tests/testgtk.c (create_range_controls): Don't set a
	fixed height on the hscale widget. This fixes "bug"
	#55840.
2001-10-26 23:06:43 +00:00
Owen Taylor
dfb3a1b0f8 Call setlocale (LC_ALL, ""). (#60606)
Wed Oct 10 12:48:38 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_init_check): Call setlocale (LC_ALL, "").
	(#60606)

	* gtk/gtkmain.c (gtk_disable_setlocale): Add function
	to disable calling setlocale (LC_ALL, "").

	* gtk/gtkmain.c (gtk_set_locale): Indicate in the
	docs that this function is not typically useful.

	* gdk/x11/{gdkim-x11.c,gdkmain-x11.c,gdkprivate-x11.h}:
	Automatically initialize GDK for the current locale
	on gdk_init(). Don't reset locale to C when
	XSupportsLocale() fails.

	* gdk/linux-fb/gdkim-fb.c (gdk_set_locale): Remove
	useless checks for UTF-8 locale breakage that mattered
	only for X.

	* examples/calendar/calendar.c
	tests/{testgtk.c,testtext.c,testcalendar.c}: Remove calls to
	gtk_set_locale().

	* gtk/gtkiconfactory.c gtk/gtkitemfactory.c:
	gdk_pixbuf_new_from_stream => gdk_pixbuf_new_from_inline.
2001-10-10 16:56:54 +00:00
Kristian Rietveld
a35654e97d CVS got a broken pipe signal, the ChangeLog change has already been
checked in.
2001-09-20 16:50:46 +00:00
Owen Taylor
a15d5c36f6 Fix up for changes to PangoFontDescription.
Wed Sep 12 11:21:14 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
	  gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
	PangoFontDescription.

	* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
	gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
	structure.

	* gtk/gtkfontsel.c: Fix up for new Pango font listing API.

	* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
  	direct access to style->font. Deprecate gtk_style_ref/unref.

 	* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
  	Remove gtk_style_ref/unref with g_object_ref/unref.

  	* gtk/gtkcalendar.c: Remove leftover macros accessing
  	style->font.

  	* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
  	variable.

  	* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
	style->font.
2001-09-18 20:06:48 +00:00
Tim Janik
91aa2d9234 slight fix for g_object_set() not usable for nesting anymore.
Mon Sep 10 20:47:22 2001  Tim Janik  <timj@gtk.org>

        * tests/testgtk.c (create_idle_test): slight fix for
        g_object_set() not usable for nesting anymore.

        * gtk/gtkhandlebox.c (gtk_handle_box_class_init):
        * gtk/gtkframe.c (gtk_frame_class_init): deprecate ::shadow
        properties, supply ::shadow_type properties instead as most
        other widgets do.
2001-09-10 18:54:20 +00:00
Owen Taylor
807c619d82 Use autoconf 2.13/2.50 compat macro.
Sun Aug 26 20:00:00 2001  Owen Taylor  <otaylor@redhat.com>

	* configure.in acinclude.m4: Use autoconf 2.13/2.50 compat
	macro.

         (patch from ERDI Gergo  <cactus@cactus.rulez.org>, #58920)

	* gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Change
	interface to be a standard setter from gtk_menu_item_right_justify.
	(gtk_menu_item_get_right_justified): a getter to go with the setter

	* gtk/gtkmenuitem.h: Add a deprecated compat macro for
	gtk_menu_item_right_justify.

	* demos/gtk-demo/menus.c tests/testgtk.c: Switch to
	gtk_menu_item_set_right_justified.
2001-08-27 15:17:51 +00:00
Alexander Larsson
9176be34d5 Ressurect the properties test. I don't care if it is inferior, I just want
2001-08-26  Alexander Larsson  <alla@lysator.liu.se>

	* tests/testgtk.c:
	* tests/Makefile.am:
	Ressurect the properties test.
	I don't care if it is inferior, I just want to test my property code.
2001-08-26 22:23:28 +00:00
Matthias Clasen
cf79ce5137 tests/testgtk.c (create_handle_box):
(create_toolbar): Replace gtk_window_set_policy calls by
gtk_window_set_resizable.
2001-08-16 14:38:46 +00:00
Havoc Pennington
f37a0627fc fix a typo.
2001-08-07  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkfilesel.c (open_ref_dir): fix a typo.

	* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
	some fixage is needed here, but nothing simple. Owen understands
	it. ;-)

        * gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
	sizing and positioning.  Also, fix bug in compute_geometry_hints
	(width/height confusion for setting min size).
	(gtk_window_move): new function
	(gtk_window_resize): new function
	(gtk_window_get_size): new function
	(gtk_window_get_position): new function
	(gtk_window_parse_geometry): new function

 	* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
 	(gtk_widget_get_size_request): new function
 	(gtk_widget_get_usize): delete, that was a short-lived function
 	;-)
 	(gtk_widget_set_usize): deprecate
 	(gtk_widget_set_uposition): deprecate, make it a trivial
	gtk_window_move() wrapper
	(gtk_widget_class_init): remove x/y/width/height properties,
	add width_request height_request

        * demos/*: update to avoid deprecated functions

	* gtk/gtklayout.c: add x/y child properties

	* gtk/gtkfixed.c: add x/y child properties, and get rid of
	uses of "gint16"

	* tests/testgtk.c (create_window_sizing): lots of tweaks to window
	sizing test

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
	configure events on toplevel windows are always in root window
	coordinates, following ICCCM spec that all synthetic events
	are in root window coords already, while real events are
	in parent window coords. Previously the code assumed that
	coords of 0,0 were parent window coords, which was
	really broken.

 	* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
 	warning

 	* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
 	and GDK_HINT_USER_SIZE so we can set USSize and USPosition
 	hints in gtk_window_parse_geometry()

 	* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
 	new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
Owen Taylor
9166ba51a1 Patch from Hans (with various modifications), to add the ability to use
Sat Aug  4 19:28:21 2001  Owen Taylor  <otaylor@redhat.com>

	* tests/testgtk.c: Patch from Hans (with various modifications),
	to add the ability to use testgtk as a rough-and-ready
	benchmark. Try, 'testgtk --bench all:5' (if you want decent
	numbers, run without a window manager)
2001-08-04 23:30:11 +00:00
Sven Neumann
bc5273de88 demos/gtk-demo/appwindow.c demos/gtk-demo/item_factory.c
2001-07-31  Sven Neumann  <sven@gimp.org>

	* demos/gtk-demo/appwindow.c
	* demos/gtk-demo/item_factory.c
	* tests/testgtk.c: gtk_accel_group_attach() takes a GObject.
2001-07-31 09:42:35 +00:00
Owen Taylor
0b6c3f5497 Patch from Gregory Merchan to add gtk_button_box_set_secondary(), which
Thu Jul  5 21:53:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkbbox.[ch] gtk/gtkbox.[ch] gtk/gtk[hv]bbox.c:
	Patch from Gregory Merchan to add
	gtk_button_box_set_secondary(), which separates
	the child into a separate group from the normal
	buttons. (#56331)

	* gtk/gtkdialog.c: Make help buttons secondary by
	default.

	* gtk/gtkbbox.c: Added a child property "secondary".

	* gtk/testgtk.c: Turn on the help button for the
	color selector to check that it properly appears
	as secondary.
2001-07-06 02:10:32 +00:00
Owen Taylor
fbfc305174 Allow %NULL for style to mean "revert to default style"
Tue Jun 26 19:39:03 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_set_style): Allow %NULL
	for style to mean "revert to default style"

	* gtk/gtkwidget.[ch] (gtk_widget_set_rc_style,
	  gtk_widget_restore_default_style): Make this functions
	deprecated aliases for gtk_widget_set_style (widget, NULL).

	* gtk/gtkwidget.[ch]: Remove:
	   gtk_widget_set_default_style ()
	   gtk_widget_push_style ()
	   gtk_widget_pop_style ()
	These functions interact are overriden by RC files, and
	thus virtually useless, and complicated.

Fri Jun 22 18:49:48 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c: Add a GtkRcContext structure to hold
	most of the previous global variables in gtkrc.c. This is
	in preparation for multi-head, since each screen can
	have different GtkSettings and RC information.

	* gtk/gtkrc.[ch]:

	* gtk/gtkrc.h (struct _GtkRcStyleClass): Add a
	GtkSettings parameter to GtkRcStyle::parse.

	* gdk/x11/gdkevents-x11.c gtk/gtksettings.c gtk/gtkrc.c:
	Add two new settings gtk-theme-name, gtk-key-theme-name,
	for RC files that are loaded by name after reading
	the default RC files.

	* gtk/gtkrc.c: Allow priorities for styles, as wll as
	bindings.

	* gtk/gtkenums.h gtk/gtkrc.c: Add GTK_PATH_PRIO_THEME,
	and use it by default for RC files loaded via
	gtk-theme-name, gtk-key-theme-name.

	* gtk/gtkiconfactory.c (gtk_icon_source_set_filename)
        gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string)
	tests/testgtkrc: Require pathnames to be absolute.

	* gtk/gtkrc.c gtk/gtkiconfactory.c: Look up the full filename for
	the source when parsing, since the operation of looking up a
	pixmap from an RC file depends on the parsing context.

	* gtk/gtkrc.c (gtk_rc_context_reparse_all): Automatically
	reset RC styles on all widgets when files are reparsed.

	* tests/testgtk.c (create_rc_file)
	  gtk/gtkwindow.c (gtk_window_read_rcfiles):
	Simplify, now that gtk_rc_reparse_all() resets styles on
	all widgets itself.

	* gtk/gtkmain.c (gtk_get_default_language): Fix broken
	return value.

	* gtk/gtksettings.[ch] (gtk_settings_install_property[_ch]): Remove
	GtkSettings argument.

	* gtk/gtksettings.[ch] (gtk_settings_get_default): Rename from
	gtk_settings_get_global().

	* gtk/gtkwidget.[ch]: Add a function gtk_widget_Get_settings()
	to get the appropriate GtkSettings for a widget. (For now,
	just gets the default GtkSetttings.)

	* gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtkmenubar.c
	  gtk/gtktextview.c gtk/gtktoolbar.c: Fixes for GtkSettings
        changes.

	* gtk/gtkrc.[ch]: Add gtk_rc_get_style_by_paths() to allow
	getting a style for a path without actually having a widget.
	(Allows using a style for a subpart of a widget, for
	example.)

	* gtk/gtkrc.[ch]: Add gtk_rc_reparse_all_for_setting() to allow forcing
	the RC files to be reloaded for just one GtkSettings
	(not sure how useful this really is.)

	* gtk/gtkrc.h: Deprecate
	gtk_rc_add_widget_name/widget_class/class_style
2001-06-30 16:08:25 +00:00
Tim Janik
33e0b6e428 use gdk_pixbuf_new_from_stream(). fixed up item factory so inlined pixbufs
Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkiconfactory.c:
        * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
        item factory so inlined pixbufs actually work.
2001-06-26 20:57:27 +00:00
Owen Taylor
837b7120a8 Revert inline-pixbuf changes until Tim comes back to fix missing files 2001-06-26 16:19:01 +00:00
Tim Janik
0b7418572e hm, second attempt. it's fight CVS time again.
Tue Jun 26 09:48:02 2001  Tim Janik  <timj@gtk.org>

        * Makefile.am (noinst_PROGRAMS): get rid of make-inline-pixbuf

        * gdk-pixbuf-data.[hc]: provide gdk_pixbuf_new_from_stream()
        instead from gdk_pixbuf_new_from_inline().

        * gdk-pixdata.[hc]: auxillary GdkPixdata structure, public
        installed API for applications that need to serialize/deserialize
        on their own (gimp, BEAST).

        * gdk-pixbuf/gdk-pixbuf-csource.c: provide publically installed
        program that can dump images in CSource format and Pixbuf
        stream format. supports RLE encoding, MACRO formatting etc...
        invoke with --help.

Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkiconfactory.c:
        * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
        item factory so inlined pixbufs actually work.
2001-06-26 08:34:26 +00:00
Havoc Pennington
0e0ee24bea s/RESIZEABLE/RESIZABLE/
2001-06-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
	s/RESIZEABLE/RESIZABLE/

	* gtk/gtkwindow.c, gtk/gtkwindow.h: s/resizeable/resizable/
2001-06-25 23:48:51 +00:00
Owen Taylor
cc223eeff6 Fix stupid error introduced last night that was making things decidedly
Sun Jun 24 11:29:35 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
	introduced last night that was making things decidedly not work.

	* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
	so that we have getter/setter pairing everywhere it makes
	sense. (#55767)

	* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
	Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
	deprecated compat macro. (#55516)

	* gtk/gtklabel.[ch]: Add functions
	gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
	gtk_label_set_label(), which mirror the property API for GtkLabel.
	Make gtk_label_get_attributes() only reflect the attributes
	set by gtk_label_set_attributes.

	* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
	from gtk_notebook_set_page().
2001-06-24 15:34:48 +00:00
Tim Janik
5ebd1d022a fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.

        * gtk/Makefile.am:
        * gtk/gtk.h: disabled GtkPacker compilation.

        * gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.

        * gtk/gtknotebook.c:
        * gtk/gtktable.c:
        * gtk/gtkbox.c: ported this over to child properties.

        * gtk/gtksettings.c: fetch class properties via
        g_object_class_list_properties().

        * gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
        child arg interface. use gobjectnotifyqueue.c for child property
        notification.

        * gtk/gtkwidget.[hc]: provide necessary means for container child
        properties, i.e. ::child_notify signal,
        gtk_widget_freeze_child_notify(),
        gtk_widget_child_notify(),
        gtk_widget_thaw_child_notify().

        * tests/testgtk.c: removed inferior property handling code, for
        property editing, a generic module should be used, and GLE
        coincidentally fullfills that purpose.

        * docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
        needs to be adapted to g_object_class_list_properties() before this
        builds again.
2001-06-19 12:54:10 +00:00
Owen Taylor
22491fd6a4 Add missing gdk_rectangle_get_type() prototype.
Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.

	* gtk/gtk[hv]scale.c: Include math.h, stdlib.h

	* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
	  gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
	  gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
	  gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
	  to recent changes in Pango.

	* tests/testgtk.c: Set language tags with gtk_label_set_markup()
	  to test whether the basic engine honors them.
2001-06-14 20:41:44 +00:00
Alex Larsson
56984ab277 Don't crash when the properties window is destroyed.
2001-06-05  Alex Larsson  <alexl@redhat.com>

	* tests/testgtk.c (destroy_properties):
	Don't crash when the properties window is destroyed.

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
	Use with_mnemonics to handle the case of stock items with
	underscores in them.
2001-06-05 21:48:24 +00:00
Owen Taylor
192c1756f6 Deprecate gtk_widget_set().
Mon Jun  4 12:41:25 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.h: Deprecate gtk_widget_set().

	* tests/testgtk.c (create_tooltips): Remove usage of
	gtk_widget_set().
2001-06-05 18:51:52 +00:00
Havoc Pennington
1b3c921437 Handle case where we need to parse the xsetting as if it were an RC file
2001-05-10  Havoc Pennington  <hp@redhat.com>

	* gtk/gtksettings.c (gtk_settings_get_property): Handle case where
	we need to parse the xsetting as if it were an RC file string.

	* gtk/gtkcolorsel.c (gtk_color_selection_class_init): load initial
	value of palette from settings, not from static variable

	* gdk/x11/gdkevents-x11.c: add color palette, toolbar mode to
	xsettings translation table

	* gtk/gtktoolbar.c (gtk_toolbar_new): Remove arguments, because
	hardcoding the toolbar style conflicts with new customizable
	toolbar style philosophy
	(gtk_toolbar_class_init): add settings for default toolbar style;
	these are used unless the app specifically forces a toolbar style

	* gtk/gtksettings.c (settings_install_property_parser): only
	return at the start if we warn and parser == NULL

	* gtk/gtkcolorsel.c (gtk_color_selection_finalize): disconnect the
	palette changed handler so we don't notify dead color selections

	* gtk/gtkstyle.c (gtk_default_draw_shadow): handle
	xthickness/ythickness of 0 or 1 properly
	(gtk_default_draw_resize_grip): clear the background behind the
	resize grips, and align to bottom right if we square the
	area to be drawn.

	* gtk/gtkstatusbar.c (gtk_statusbar_init): set horizontal usize on
	statusbar label to 1, so it doesn't make toplevels resize oddly
	(gtk_statusbar_size_request): add grip size to request
	(gtk_statusbar_size_allocate): hack so the hbox still works with
	the grip size in the request

	* gtk/gtktoolbar.c (gtk_toolbar_show_all): override to fix
	bug where showing all on a toplevel makes the toolbar
	button text appear despite the toolbar mode

	* gtk/gtkmenubar.c: add internal padding style property

	* gtk/gtktoolbar.c: Add internal padding style property; add
	shadow type style property

	* gtk/gtkmenubar.c (gtk_menu_bar_paint): paint box with widget
	state; and put Container::border_width outside the frame

	* gtk/gtktextview.c: don't draw focus rectangle if we're in
	interior focus mode, we just use blinking cursor
2001-06-04 23:15:51 +00:00
Havoc Pennington
5c7c11cec8 Get rid of stupid g_return_if_fail on digits greater than 6. If there
2001-06-04  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkspinbutton.c: Get rid of stupid g_return_if_fail on
	digits greater than 6. If there actually are limits (which there
	likely aren't), should clamp to them not warn.
	(gtk_spin_button_new_with_range): don't take log of 0
	(gtk_spin_button_size_request): use digits to compute size
	request, rather than step increment.

	* tests/testgtk.c (create_spins): test larger values of digits

	* gtk/gtkfontsel.c (gtk_font_selection_init): scroll to selected
	font on map not expose, so we don't get weirdness during scrolling
2001-06-04 22:32:10 +00:00
Havoc Pennington
42f429be76 make this special-case hscale/vscale details, so we can use it for
2001-06-03  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkstyle.c (gtk_default_draw_slider): make this special-case
	hscale/vscale details, so we can use it for scrollbar as well.

	* tests/testgtk.c (reformat_value): honor digits from GtkScale

	* gtk/gtkenums.h (GtkTroughType): Remove this enum
	(GtkScrollType): add START and END from GtkTroughType

	* gtk/gtkstyle.c (gtk_default_draw_slider): was not properly using
	its x/y arguments

	* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkscrollbar.h,
	gtk/gtkscrollbar.c, gtk/gtkscale.h, gtk/gtkscale.c,
	gtk/gtkhscrollbar.h, gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.h,
	gtk/gtkvscrollbar.c, gtk/gtkhscale.h, gtk/gtkhscale.c,
	gtk/gtkvscale.h, gtk/gtkvscale.c: Rewrite GtkRange and subclasses.

	Notable changes in the process:

	- stepper_size style property is the height for vertical
	  ranges, width for horizontal; the other dimension matches
	  the trough size
	- add ability to do NeXT-style steppers (and several other styles
	  that don't make any sense)
	- added min_slider_length, fixed_slider_length properties to
          GtkScrollbar
        - cleaned some private (or at least useless) functions out of
          gtkscale.h
        - moved bindings to GtkScale from subclasses, even arrow keys,
	  since blind users don't know scale orientation.
        - change move_slider action signal to use new GtkScrollType,
	  remove GtkTroughType argument
	- digits rounds the values a range will input to the given
	  number of decimals, but will not try to force adjustment
	  values set by other controllers. That is, we no longer
	  modify adjustment->value inside a value_changed handler.
	- added getters for GtkScale setters
        - middle-click begins a slider drag
2001-06-04 02:31:12 +00:00
Havoc Pennington
87684f9549 get sizes an icon set can render without falling back to missing image
2001-05-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
	set can render without falling back to missing image icon

	* gtk/gtktextview.c (gtk_text_view_size_request): request full
	size of text, instead of random values

	* gtk/gtktreeview.c (gtk_tree_view_size_request): request full
	size of tree view, instead of random values

	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon): render fallback
	image in an appropriate size

        * gtk/gtkstock.h: Rename the stock items including _BUTTON_,
	etc. not to include that. i.e. s/GTK_STOCK_BUTTON_OK/GTK_STOCK_OK/

        Throughout: fix GTK_STOCK_BUTTON_ instances

	* gtk/gtkstock.h, gtk/gtkstock.c, gtk/gtkiconfactory.h,
	gtk/gtkiconfactory.c, gtk/stock-icons/Makefile.am:
	Add a bunch of new stock items/icons

	* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
	new function, convenience for inserting columns with a data func

	* gtk/gtkiconfactory.c: keep a list of all existing icon factories
	(_gtk_icon_factory_list_ids): use list of all factories to
	generate a list of all known IDs

	* gtk/gtkstock.c (gtk_stock_list_ids): replace
	gtk_stock_list_items() with a function that returns all IDs known
	including those for GtkIconFactory.
2001-05-25 20:41:46 +00:00
Owen Taylor
50512ddcd2 Remove reallocate-redraws property. This is something that only a widget
Fri May 18 14:25:20 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcontainer.c: Remove reallocate-redraws property.
	This is something that only a widget writer would ever want
	to change.

	* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
	gtk_signal_emit_by_name().

	* gtk/gtkviewport.c: Fix some warnings.

	* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
	allowing the requisitions of multiple widgets to be grouped
	together.

	* tests/testgtk.c: Add GtkSizeGroup test

	* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.

	* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
	warnings.

	* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-05-18 18:30:59 +00:00
Martin Baulig
60530b8a8e Renamed gtk_image_menu_item_add_icon() to gtk_image_menu_item_set_icon()
2001-04-28  Martin Baulig  <baulig@suse.de>

	* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
	to gtk_image_menu_item_set_icon() and made it work if there's already
	an image.
	(gtk_image_menu_item_new): This function doesn't take any arguments anymore.
	(gtk_image_menu_item_new_with_label): New function.
2001-05-18 17:35:20 +00:00
Alexander Larsson
6ee1ae13ad Add properties, based on patch by Lee Mallabone.
2001-05-17  Alexander Larsson  <alla@lysator.liu.se>

	* gtk/gtkbbox.c:
	Add properties, based on patch by Lee Mallabone.

	* gtk/gtknotebook.c:
	* gtk/gtktoolbar.c:
	Convert from GtkArg to GParam, based on patch by John Margaglione.

	* gtk/gtkhscale.c:
	* gtk/gtkvscale.c:
	* gtk/gtkhscrollbar.c:
	* gtk/gtkvscrollbar.c:
	* gtk/gtkrange.c:
	Move adjustment property to GtkRange.

	* gtk/gtklabel.c:
	Setup mnemonics on property changes

	* gtk/gtkwidget.c (gtk_widget_get_property):
	GdkExtensionMode is an enum, not a flag. Set it with
	g_value_set_enum ().

	* tests/prop-editor.c:
	Better propery editor.

	* tests/testgtk.c:
	Add new property test. Pass zero to the property editor to
	get properties from all derived types.
2001-05-17 16:22:06 +00:00
Owen Taylor
6d2ce70689 Block against redundant changes.
Mon May 14 14:56:21 2001  Owen Taylor  <otaylor@redhat.com>

	* tests/prop-editor.c: Block against redundant changes.

	* gtk/gtkpaned.c gtk/gtk[hv]paned.c: Add position, position_set
	properties.
2001-05-14 19:14:57 +00:00
Havoc Pennington
b4e4a0ed9d fix some shell typos
2001-05-04  Havoc Pennington  <hp@redhat.com>

	* configure.in: fix some shell typos

	* gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix

	* gtk/gtkimage.c: handle animations

	* gtk/gtkcheckbutton.c (gtk_check_button_size_request): request
	border_width * 2, not just border_width

	* gtk/gtkscale.c: add "format_value" signal to allow people
	to override the way values are drawn.
	(gtk_scale_get_value_size): fix width/height mistake,
	and compute size from actual displayed text, not
	from made-up text.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in
	signal registration

	* tests/testtext.c: Add "Remove all tags" menu item for testing

	* gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement

	* demos/gtk-demo/main.c (main): add hack so we can find modules
	without installing gtk

	* demos/gtk-demo/textview.c (insert_text): demo font scaling

	* gtk/gtkcellrenderertext.c: Add "scale" property (font scaling
	factor)
	(gtk_cell_renderer_text_set_property): remove some bogus
	g_object_notify

	* gtk/gtktexttag.c: add "scale" property which is a font scaling
	factor

	* gtk/gtktextlayout.c (add_text_attrs): add font scale attribute
	to layout

	* gtk/gtktextiter.c (gtk_text_iter_is_start): rename from
	gtk_text_iter_is_first

2001-05-04  Havoc Pennington  <hp@redhat.com>

	* pixops/pixops.c (pixops_process): merge fix from stable: Patch
	 from hoshem@mel.comcen.com.au to fix nonzero X offsets.  Fixes
	 bug #50371.

        * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge
	from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix
	confusion of using "src" instead of "p".
        (pixops_composite_color_nearest): Use a more accurate (and
	correct, to begin with) compositing method.  This cures checks
	showing through on images with no alpha.

	* gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing
	bytes unfilled.

	* gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints

	* gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change
	area_updated signal to use signed ints.  Removed animation-related
	signals.

	* io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive
	rewrite action

	* gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract
	all the pesky details. Remove old frame-based API. Make
	GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
Owen Taylor
4c2a74b79d Reduce new_text_length appropriately when we run into the size limit for
Wed May  2 20:36:38 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_real_insert_text): Reduce
	new_text_length appropriately when we run into the
	size limit for the entry. (#53445, reported by Jeff Franks)

	* tests/testgtk.c (create_entry): Remove most of the
	property toggle buttons. Replace with a "Props" button
	that brings up a property editor.

	* tests/prop-editor.[ch] test/testtreeview.c tests/Makefile.am:
	Split the property editor code out for reuse, improve.
2001-05-03 00:46:19 +00:00
Havoc Pennington
7ad3641353 voc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_previous_line):
	(gtk_text_layout_move_iter_to_next_line): fix these two for
	invisible text, lots of other stuff still hosed.

	* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
	new function, replaces the get/set palette stuff. This function
	is intended for use by libgnomeui which should set the hook to a
	thing which sets the palette in GConf, and we need the
	GConf-to-xsettings proxy which will result in the change being
	propagated back to the GTK app.

	* gtk/gtkaccelgroup.c (gtk_accel_group_add): add note to warning
	about unusable signals that it may be because the signal has
	parameters.

	* gtk/gtkwidget.c (gtk_widget_modify_style): always copy the
	style, otherwise gtkrc.c won't know to create a new GtkStyle for
	it.
	(gtk_widget_modify_color_component): call
	gtk_widget_modify_style() so the rc style will get copied.
	(gtk_widget_modify_font): ditto

	* gtk/gtkrc.c: make a couple variables static

	* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): hide
	help button by default, since it does nothing

	* gtk/gtkcolorsel.c: add tooltips, work on key navigation, fool
	around with UI

	* gtk/gtkentry.c (gtk_entry_realize): request enter/leave notify
	so we can have tooltips

	* gtk/gtkhsv.c (gtk_hsv_realize): request enter/leave notify so we
	can have tooltips

	* gdk/gdkimage.h: mark gdk_image_new_bitmap with
	GDK_ENABLE_BROKEN, because its memory behavior is completely
	hosed.

	* gtk/gtknotebook.c: remove key press handler, replace with
	binding set, add numeric keypad support

	* gtk/gtktextview.c (gtk_text_view_class_init): accept KP_Delete

	* gtk/gtktext.c (gtk_text_key_press): add a bunch of KP keysyms

	* gtk/gtkentry.c (gtk_entry_class_init): accept GDK_KP_Delete in
	addition to plain Delete

	* gtk/gtktextview.c (gtk_text_view_key_press_event): accept
	GDK_KP_Enter in addition to GDK_Return

	* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): connect to
	activate on entry instead of key press
	(gtk_font_selection_on_clist_key_press): get
	rid of this signal handler, not needed with new font sel.

	* gtk/gtkfilesel.c (gtk_file_selection_key_press): remove a
	no-longer-needed emit_stop_by_name(), just return TRUE

	* gtk/gtkhscrollbar.c, gtk/gtkvscrollbar.c: remove keybindings
	cruft, this widget is no longer focusable.

	* gtk/gtkrange.h, gtk/gtkrange.c, gtk/gtkvscale.c,
	gtk/gtkhscale.c: Get rid of trough_keys virtual function, add
	move_slider action signal, add binding set for vscale/hscale, in
	the process support numeric keypad

	* gtk/gtkentry.c (gtk_entry_class_init): Add keypad bindings;
	make GDK_Return and GDK_KP_Enter activate the entry via
	binding set, instead of hardcoded.
2001-04-28 20:18:29 +00:00
Havoc Pennington
7e9b154f0c fix warning
2001-04-27  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning

	* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable

	* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
	line/para separators
	(gtk_entry_create_layout): set single paragraph mode on the layout

	* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
	spacing between the image and label; instead, inside a button box
	the button will get extra space that will go there, but if people
	configure button box for 0 chubbiness, then there's no spacing.

	* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
	and min/max size style properties, so people can tune their
	chubbiness.

	* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
	functions

	* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
	space_style, and button_relief into style properties, remove
	functions for setting them

	* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
	it back down

	* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
	types from gtk_widget_style_get

	* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
	with a style property.

	* gdk/x11/gdkevents-x11.c: namespace the settings

	* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.

	* gtk/gtksettings.c (gtk_settings_class_init): remove code with
	side effects from inside g_assert(), so that G_DISABLE_ASSERT can
	be used. Also, translate doc strings for settings. Also, namespace
	the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
Alexander Larsson
ca20af0b31 API Change. Take GdkColor arguments instead of gdouble *. Leave the old
2001-04-20  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkcolorsel.[ch]:
	API Change. Take GdkColor arguments instead of gdouble *.
	Leave the old gtk_color_selection_set_color for compatibility,
	but marked deprecated.
	Do correct rounding when converting RGB <-> HSV.

	* gtk/gtkcolorseldialog.c:
	* tests/testgtk.c:
	Use new GtkColorSelection API.

	* gtk/gtkhsv.c:
	Fix problem selecting colors in triangle when Hue is 330.
	Fix some black dots around the HSB triangle.

	* gtk/gtkfilesel.c:
	return FALSE from the focus_in_event handler to fix focus problems.
2001-04-20 10:59:48 +00:00
Havoc Pennington
c01a1c7363 allow shrinking the image window to test that we clip to allocation.
2001-04-18  Havoc Pennington  <hp@redhat.com>

	* tests/testgtk.c (create_image): allow shrinking the image window
	to test that we clip to allocation.

	* gtk/gtkimage.c (gtk_image_expose): clip to allocation,
	#9845

	* gtk/gtkenums.h: move GtkWrapMode in here, #50472
2001-04-18 19:56:48 +00:00
Owen Taylor
12aa8608ed Remove explicit pointer grabs, since they are no longer necessary.
Mon Apr 16 14:38:41 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklist.c gtk/gtklistitem.c: Remove explicit pointer
	grabs, since they are no longer necessary.

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): Fix #52926
	by signal_connect() and call gtk_button_pressed() rather
	than signal_connect_after().

	* tests/testgtk.c: Restore radio menu items to combos
	since they'll look OK with Raleigh, and it is easier
	than finishing the process of removing them that was
	started earlier.
2001-04-16 20:33:03 +00:00
Jonathan Blandford
31210813cb fix a fixme.
Sun Apr  8 05:36:06 2001  Jonathan Blandford  <jrb@webwynk.net>

        * gtk/gtktextview.c (gtk_text_view_class_init): fix a fixme.

        * gtk/gtkcellrendertoggle.c: change GTK_TYPE_POINTER to
        GTK_TYPE_STRING.

        * gtk/gtktreeview.c: New functions to allow initial column
        dragging work.

        * gtk/gtktreeviewcolumn.c: Initial column dragging support.

        * tests/testtreefocus.c: give dave some love.

        * tests/testtreesort.c: Modify test to check really long samples.
2001-04-12 16:11:54 +00:00
Sven Neumann
3bc782bdfa corrected path to gtk.immodules
2001-04-04  Sven Neumann  <sven@gimp.org>

	* tests/testgtk.c (test_init): corrected path to gtk.immodules
2001-04-04 18:28:37 +00:00
Owen Taylor
af5c897e4b Updated.
Tue Apr  3 13:55:37 2001  Owen Taylor  <otaylor@redhat.com>

	* NEWS: Updated.

	* configure.in: Remove support for uninstalled glib.

	* gtk/gtkdnd.c (gtk_drag_highlight_expose): Return FALSE as
	so as not to stop emission.

	* gtk-config-2.0.in: Exit with an error message that gtk-config-2.0
	is no longer supported.

	* Makefile.am gtk/Makefile.am tests/*: Moved all tests
	into tests, change build order to build modules before
	gtk/.

	* modules/input/Makefile.am: Move gtk-query-immodules-2.0 invocation
	to here.
2001-04-03 18:48:46 +00:00
Owen Taylor
b52b326d5f Add GdkEventSetting event for notification of changes to system settings,
Mon Apr  2 18:18:07 2001  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkevents.h: Add GdkEventSetting event for notification
	of changes to system settings, gdk_setting_get() to retrieve
	a single system setting.

	* gdk/x11/gdkevents-x11.c: Bridge gdk_setting_get() and GdkEventSetting
	to the draft XSETTINGS mechanism.

	* gdk/x11/xsettings-{common,client}.[ch]: Sample-implementation of
	XSETTINGS.

	* gtk/gtkmain.c gtk/gtksettings.[ch]: Propagate notification
	of GDK settings changes to the GtkSettings object.

	* gdk/gdkevents.[ch] gdk/gtk/gtksettings.c: Hook up the
	double-click-timeout property to GDK.

	* gdk/gdkcolor.[ch] gdk/gdkvisual.h gdk/gdkevent.[ch] gdk/gdkfont.[ch]:
	Define GDK boxed types here.

	* gdk/Makefile.am gdk/makeenums.pl: Generate source files
	gdk/gdkenumtypes.[ch] for enum definitions.

	* gtk/gtkcompat.h: Add defines for GTK_TYPE_GDK_*
	* gtk/gtk-boxed.defs: Comment out GDK types
	* gtk/gtktypeutils.h: Remove GDK types
	* gtk/Makefile.am: No longer scan GDK headers for enumerataions
2001-04-02 23:33:47 +00:00
Tim Janik
1f7e5c0610 fixed a bunch of notifications, added reference counts around emissions
Sun Apr  1 03:28:14 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c: fixed a bunch of notifications, added
        reference counts around emissions where the widget is used afterwards.
        added freeze/thaws around multiple properties being notified.
        (_gtk_widget_get_aux_info): cleanups.

        * gtk/gtksettings.c (gtk_settings_install_property): provide
        default parsing functions for gdkcolor, enums and flags.

        * gtk/gtkwindow.[hc]: partially reverted patch from havoc,
        applied by owen.
        kept a flag in GtkWindowGeometryInfo to handle user
        resetting default sizes.
        cleaned up ZVT comments.
        bunch of assorted bug fixes, notification fixes.
        (_gtk_window_reposition): make this a really internal function.

        * gtk/testgtk.c: fixups.
2001-04-01 04:05:42 +00:00
Mike Kestner
c80b705470 added value_changed signal which proxies for the adjustment. Cleaned
Thu Mar 29 21:20:38 2001  Mike Kestner  <mkestner@ameritech.net>

	* gtk/gtkspinbutton.c : added value_changed signal which proxies for the
	adjustment. Cleaned redundant preconditions (spin != NULL). Added
	inline API function docs.
	(gtk_spin_button_new_with_range): New convenience constructor.
	(gtk_spin_button_set_increments): New adjustment helper.
	(gtk_spin_button_set_range): New adjustment helper.

	* gtk/testgtk.c : added test of the new convenince constructor and
	value_changed signals.

docs/reference/ChangeLog
2001-03-29  Mike Kestner  <mkestner@ameritech.net>

	* gtk/tmpl/gtkspinbutton.html: killed function docs that are now
	inline.
2001-03-30 03:35:47 +00:00
Owen Taylor
f67ae736ee Add private function to get the aux info structure fo the widget.
Wed Mar 28 20:30:26 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.[ch] (_gtk_widget_get_aux_info): Add private function
	to get the aux info structure fo the widget.

	* gtk/gtklabel.c gtk/gtkscrolledwindow.c gtk/gtkwindow.c: Use
	above function.

        [ Patch from  Havoc Pennington  <hp@redhat.com> ]

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): function
	to get the size of the window manager frame, basically the same
	code that gdk_window_get_root_origin() had
	(gdk_window_get_root_origin): use gdk_window_get_frame_extents()

	* gtk/gtkwindow.c (gtk_window_set_default_size): use
	gdk_window_resize() if the window is realized and resizeable

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): fix
	typo so that setting gravity works

	* gtk/gtkwindow.c (gtk_window_move_resize): don't ever use
	allocation if auto_shrink is on, even if the default size
	has not changed.

	* gtk/gtkwidget.c (gtk_widget_render_icon): remove bogus
	g_return_if_fail
2001-03-29 23:02:30 +00:00
Havoc Pennington
891cd55ee3 make motion around the ring much slower but finer-grained (gtk_hsv_focus):
2001-03-24  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
	slower but finer-grained
	(gtk_hsv_focus): get initial focus on the ring or triangle
	according to tab direction

	* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-24 06:41:28 +00:00
Havoc Pennington
b6b4e13fd8 fix warnings
2001-03-23  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c: fix warnings

	* gtk/gtktoolbar.c (gtk_toolbar_insert_element): fix return value

	* gtk/gtktextview.c: fix warnings

	* gtk/gtktext.c (find_cursor_at_line): fix warning

	* gtk/gtkselection.c (gtk_selection_notify): fix warning

	* gtk/gtkitemfactory.c (gtk_item_factory_menu_pos): fix signature
	of this function

	* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
	fix warning

	* gtk/gtkhandlebox.c (gtk_handle_box_style_set): fix warning

	* gtk/gtkfontsel.c: fix warning

	* gtk/gtkcolorsel.c: fix warnings
2001-03-24 00:07:16 +00:00
Havoc Pennington
23b98cc1ec Add ability to override the focus chain for a container explicitly
2001-03-22  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkcontainer.c (gtk_container_set_focus_chain):
	(gtk_container_unset_focus_chain): Add ability to override the
	focus chain for a container explicitly
2001-03-22 20:59:37 +00:00
Tim Janik
c2c98d9e12 some cleanups, fixed mnemonic_widget handling, added PROP_MNEMONIC_WIDGET.
Thu Mar 22 13:01:44 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtklabel.[hc]: some cleanups, fixed mnemonic_widget handling,
        added PROP_MNEMONIC_WIDGET.

        * gtk/gtkwindow.c (gtk_window_activate_mnemonic):
        (gtk_window_remove_mnemonic):
        (gtk_window_add_mnemonic): fixed assertions.
        (gtk_window_activate_mnemonic): constrain modifier checks to those
        permitted by gtk_accelerator_get_default_mod_mask().
        got rid of gtk_window_get_default_accel_group().

        * gtk/gtkwidget.c (gtk_widget_real_activate_mnemonic): handle non
        activatable widgets either by focussing or a warning.
        added a signal accumulator to ::activate_mnemonic which stops the
        emission once a handler returned TRUE.
2001-03-22 13:44:00 +00:00
Alexander Larsson
e042310560 Add support for stock and normal imagemenuitems.
2001-03-21  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkitemfactory.[ch]:
	Add support for stock and normal imagemenuitems.

	* gtk/testgtk.c:
	Add some tests for mnemonics, stock toolbars, stock
	and image menuitems in itemfactory and gdk_window_scroll.
2001-03-21 19:22:58 +00:00
Alexander Larsson
de5eafede2 Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed
2001-03-21  Alexander Larsson  <alexl@redhat.com>

        * gtk/gtkbutton.[ch]:
	* gtk/gtkdialog.c:
	Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
	removed accel_group argument. Renamed gtk_button_new_accel() to
	gtk_button_new_with_mnemonic() and removed accel_group argument.

	* gtk/gtkcheckbutton.[ch]:
	New function gtk_check_button_new_with_mnemonic().

	* gtk/gtkentry.c:
	Override activate_mnemonic and just grab focus.

	* gtk/gtkitemfactory.c:
	Don't add menu uline accel group, instead use mnemonics support.

	* gtk/gtklabel.[ch]:
	New support for mnemonics.

	* gtk/gtkmarshal.list:
	Needed BOOLEAN:BOOLEAN for activate_mnemonic.

	* gtk/gtkmenu.[c]:
	* gtkmenushell.c:
	Use mnemonics instead of accel groups for uline
	support in menu items.
	Removed gtk_menu_get_uline_accel_group() and
	gtk_menu_ensure_uline_accel_group().

	* gtk/gtkmenuitem.c:
	Override activate_mnemonic to handle switching between
	menu items if there are collisions.

	* gtk/gtknotebook.c:
	Connect to activate_mnemonic on the tab_label, so that
	activating it switches to that notebook page.

	* gtk/gtkwidget.[ch]:
	Add activate_mnemonic signal. New function
	gtk_widget_activate_mnemonic() to emit it.
	Default implementation does activate/grab_focus.

	* gtk/gtkwindow.[ch]:
	Add support for mnemonics in windows.
	New functions:
	gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
	gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier

	* gtk/testgtk.c:
	Update to function name changes.
2001-03-21 18:58:28 +00:00
Owen Taylor
489c376bf4 Handle quoting of / with \; properly handle __ in paths, quote " and \n in
Mon Mar 19 15:53:36 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkitemfactory.c gtk/testgtk.c: Handle quoting of / with \; properly
	handle __ in paths, quote " and \n in gtk_item_factory_dump_items().

	* gtk/gtkadjustment.[ch] gtk/gtkclist.c gtk/gtkhruler.c gtk/gtklayout.c
	  gtk/gtklist.c gtk/gtkprogress.[ch] gtk/gtkprogressbar.[ch] gtk/gtkrange.[ch]
	  gtk/gtkruler.[ch] gtk/gtkscale.c gtk/gtkscrolledwindow.c gtk/gtkspinbutton.[ch]
	  gtk/gtktext.c gtk/gtktextview.c gtk/gtkvruler.c gtk/testgtk.c:
	Change float to double everywhere with the exception of 0<->1.0 alignment
	and GtkCurve.
2001-03-19 21:06:38 +00:00
Tim Janik
73789e5aa7 re-enabled event watcher emission hooks.
Thu Mar  8 18:13:20 2001  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c: re-enabled event watcher emission hooks.
2001-03-08 17:13:11 +00:00
Havoc Pennington
d85dd6bd98 uglify so that size request gets tested.
2001-03-07  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_spins): uglify so that size request gets
	tested.

	* gtk/gtkspinbutton.c (gtk_spin_button_size_request): Base size
	request on values for upper/lower, completes #6152
2001-03-08 01:55:28 +00:00
Tim Janik
7ae2326acb removed old emission hook API.
Thu Mar  8 00:18:29 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]: removed old emission hook API.

        * docs/Changes-2.0.txt: fixed sections.

        * gtk/gtktextbuffer.c: signal arg fixups.
2001-03-07 23:41:00 +00:00
Havoc Pennington
29b902a481 remove trailer (gtk_entry_set_property): remove trailer
2001-03-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkentry.c (gtk_entry_get_property): remove trailer
	(gtk_entry_set_property): remove trailer

	* gtk/gtkentry.c (gtk_entry_set_width_chars):
	(gtk_entry_get_width_chars): new functions, to set size request to
	a given number of characters

	* gtk/testgtk.c (create_dialog): beef up the dialog test slightly

	* gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
	(gtk_dialog_get_has_separator): new function
        (run_delete_handler): fix to not emit "response" signal
	because we already did in the delete event handler installed
	at dialog creation time.

	* gtk/gtkdialog.h: add a has_separator property,
	add GTK_DIALOG_NO_SEPARATOR flag
2001-03-07 21:32:51 +00:00
Havoc Pennington
9d1e2a1323 new function, turns off decorations for a window.
2001-03-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
	off decorations for a window.

	* demos/gtk-demo/button_box.c (create_bbox): adapt to button box
	changes

	* gtk/gtklabel.c (gtk_label_get_layout_offsets): new function
	to get location of PangoLayout inside the label, closes #51198

	* gtk/testgtk.c (create_bbox): fix up button box usage

	* gtk/testcalendar.c (create_calendar): fix up button box usage

	* gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage

	* gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage

	* gtk/gtkhbbox.h: deprecations

	* gtk/gtkvbbox.h: deprecations

	* gtk/gtkbox.c (gtk_box_get_spacing): new function, used to
	emulate deprecated gtk_button_box_get_spacing

	* gtk/gtkbbox.h: deprecate some useless functions, remove entirely
	the "set global default" functions
	(struct _GtkButtonBox): remove "spacing" field, use the one from
	GtkBox base class

	* gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore

	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to
	render the icon, return the missing image icon.

	* gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing
	image icon if the load fails.

	* gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use
	when no image is found; should be the Netscape "missing image"
	icon eventually but for now is a random image

	* gtk/gtkwindow.c (gtk_window_set_role): new function, sets the
	role for the session manager

	* gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG

	* gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define
	GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL

	* gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
Tim Janik
35af5c4eba marshaller fixes.
Wed Mar  7 13:24:57 2001  Tim Janik  <timj@gtk.org>

        * gtk/*.c: marshaller fixes.

        * gtk/gtkmarshal.list: extreme cleanup.

        * gtk/gtktreeview.c (gtk_tree_view_class_init): disable interface
        param spec for now.

        * gtk/gtktexttag.c (gtk_text_tag_set_property): use g_value_get_boxed()
        where appliable.

        * gtk/gtktypeutils.[hc]: updates to GLib API changes.
        special cased autogenerated boxed types from gtktypebuiltins_ids.c
        which are not reference counted:
        GtkSelectionData, GdkEvent, GdkColor, GtkTextIter, PangoTabArray,
        PangoFontDescription, GtkTreeIter and GtkTreePath.

Thu Mar  1 03:58:56 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeselection.h:
        * gtk/gtktreemodel.c:
        * gtk/gtktreedatalist.[hc]: fixed includes. no gobject/*
        file should be included directly, and gobject/gmarshal.h
        as well as gtk/gtkmarshal.h even can't be included directly.

        * Makefile.am: grr, install gtk-config-2.0.

        * gtk/testgtk.c:
        * gtk/simple.c:
        * gtk/gtkmenu.c:
        * gtk/gtkitemfactory.c: use g_object_connect() instead of
        passing "*signal*::*" args to gtk_widget_set().

        * gtk/gtktypeutils.[hc]: got rid of GTK_TYPE_SIGNAL.

        * gtk/*.c: removed trailer arg from property setters and getters.
        macro fixups.

Thu Mar  1 04:01:57 2001  Tim Janik  <timj@gtk.org>

        * test-gdk-pixbuf.c: fixed includes.
2001-03-07 14:49:21 +00:00
Havoc Pennington
8860615d9a use _gdk_region_get_xrectangles()
2001-03-02  Havoc Pennington  <hp@redhat.com>

	* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
	_gdk_region_get_xrectangles()

	* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function

	* gtk/testgtk.c (create_shapes): add test for shape_combine_region

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
	function, contributed by Ron Steinke

	* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
	gdk_net_wm_supports

	* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
	New function, contributed by Ron Steinke

	* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
	used to line up the text in the entry when using the entry for
	editable sheet cell hacks

	* gtk/testgtk.c (create_entry): test the activate_default setting
	on GtkEntry

	* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
	cause the entry to activate the default button for a dialog when
	activated
	(gtk_entry_get_activates_default): new function
2001-03-02 20:02:17 +00:00
Havoc Pennington
75d79abf98 test the window state stuff
2001-02-26  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c: test the window state stuff

	* gtk/gtkwindow.c (gtk_window_present): new function, makes a
	window come to the user's attention as if it were just created
	(gtk_window_iconify): new function
	(gtk_window_deiconify): new function
	(gtk_window_stick): new function
	(gtk_window_unstick): new function
	(gtk_window_maximize): new function
	(gtk_window_unmaximize): new function

	* gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal

	* gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE

	* gdk/x11/gdkevents-x11.c: create window state events when
	appropriate
	(gdk_wmspec_supported): new function

	* gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle
	iconification before showing the window
	(gdk_window_deiconify): new function
	(gdk_window_stick): new function
	(gdk_window_unstick): new function
	(gdk_window_maximize): new function
	(gdk_window_unmaximize): new function

	* gdk/gdkwindow.c: store the window state in the window;
	change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of
	window->mapped.
	(gdk_window_get_state): return the current window state

	* gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE
	(gdk_event_get_state): handle GDK_WINDOW_STATE
	(gdk_synthesize_window_state): function to create the window state
	events

	* gdk/gdkevents.h (struct _GdkEventWindowState): new type of
	event, for changes to "window state" such as maximized, sticky,
	etc.

	* gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function,
	focuses a window

	* gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function,
	finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
Jonathan Blandford
334a40e893 Changed name to be set_cell_data_func to make it clear what the functino
Wed Feb 21 14:23:05 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data_func):
	Changed name to be set_cell_data_func to make it clear what
	the functino does.  Close bug #51069.

Tue Feb 20 16:49:00 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/testgtk.c (main): Remove turning on of profiling malloc,
	have memory actually freed.  Keeps box running longer.
2001-02-21 19:59:23 +00:00
Havoc Pennington
f4fa22da55 test was backward, so deprecated functions were excluded by default
2001-02-19  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkcolor.h: test was backward, so deprecated functions were
	excluded by default

	* gtk/gtkstyle.c (gtk_default_draw_diamond): draw etched in/out,
	clean up the old code a bit

	* gtk/gtkradiobutton.c (gtk_radio_button_draw_indicator): draw
	inconsistent state

	* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_draw_indicator):
	draw inconsistent state

	* gtk/testgtk.c (create_toggle_buttons): add test for inconsistent
	(create_menu): add inconsistent test

	* gtk/gtkcheckmenuitem.c (gtk_check_menu_item_set_inconsistent):
	new function
	(gtk_check_menu_item_get_inconsistent): new function
	(gtk_real_check_menu_item_draw_indicator): draw the inconsistent
	state (using etched in for now)

	* gtk/gtkcheckbutton.c (gtk_real_check_button_draw_indicator):
	draw inconsistent state

	* gtk/gtktogglebutton.c (gtk_toggle_button_set_inconsistent): new
	function, used when the user has selected a range of stuff in
	different states
	(gtk_toggle_button_get_inconsistent): accessor for that
	(gtk_toggle_button_paint): draw inconsistent state (etched in?
	don't know what else to do)
2001-02-19 22:25:30 +00:00
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
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
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
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
Havoc Pennington
2c5d938ff8 CVS is doing its broken pipe thing, this is more of the previous commit
2001-02-02  Havoc Pennington  <hp@redhat.com>
2001-02-03 01:09:41 +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
Havoc Pennington
f7d593c99d bracket in #ifdef GTK_ENABLE_BROKEN.
2001-01-30  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktreeitem.h, gtk/gtktree.h, gtk/gtktext.h: bracket in
	#ifdef GTK_ENABLE_BROKEN.

	* gtk/gtktreeitem.c, gtk/gtktree.c, gtk/gtktext.c: #define
	GTK_ENABLE_BROKEN just before including the broken headers.

	* gtk/gtktypeutils.c: #define GTK_ENABLE_BROKEN, so we can get the
	deprecated types registered.

	* gtk/testgtk.c, gtk/testselection.c: #define GTK_ENABLE_BROKEN,
	we have to test the broken stuff.

        * docs/Changes-2.0.txt: explain GTK_ENABLE_BROKEN

2001-01-30  Havoc Pennington  <hp@pobox.com>

        Also committed a bunch of automatic changes made by gtk-doc,
	after reviewing for correctness.

	* gtk/tmpl/gtktext.sgml: add warning about deprecation and note
	about what to use instead

	* gtk/tmpl/gtktree.sgml: ditto

	* gtk/Makefile.am (scan): pass --deprecated-guards option to
	gtk-doc; requires new version of gtk-doc from CVS

	* gtk/gtk-docs.sgml: move GtkText to the deprecated section
	instead of the GtkTextView section. Oops.
2001-01-31 03:51:14 +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
4
9234d91146 Splitted gtk_image_clear into gtk_image_clear() and gtk_image_reset().
2001-01-24    <alexl@redhat.com>

	* gtk/gtkimage.c:
	Splitted gtk_image_clear into gtk_image_clear() and
	gtk_image_reset(). Call gtk_image_clear() in ::destroy
	to avoid leaks.

	* gtk/gtklabel.c (set_markup):
	Don't leak text.

	* gtk/gtktextlayout.c:
	Always free display->shaped_objects.

	* gtk/testgtk.c (create_clist):
	Don't leak custom style.
2001-01-24 08:25:41 +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
Tim Janik
53d7e43060 get rid of object_signal:: GtkObject argument uses, use GObject
Tue Dec 12 08:24:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c:
        (create_tooltips):
        (create_statusbar): get rid of object_signal:: GtkObject argument uses,
        use GObject swapped_signal:: properties instead.

        * gtk/gtkcellrenderertoggle.c:
        * gtk/gtkcellrenderertextpixbuf.c:
        * gtk/gtkcellrenderertext.c:
        * gtk/gtkcellrendererpixbuf.c:
        * gtk/gtkcellrenderer.c:
        * gtk/gtktreeviewcolumn.c: s/[sg]et_param/[sg]et_property/, fixed
        missing warnings for invalid property ids, install properties
        with g_object_class_install_property() now.

        * gtk/gtksignal.c:
        (gtk_signal_emit): let g_signal_emit_valist() collect the values for us.
2000-12-12 07:32:32 +00:00
Owen Taylor
0cdc00ec0b Add a function to determine if a window is the focus widget within its
Wed Oct 25 14:17:43 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.[ch] (gtk_widget_is_focus): Add a function
	to determine if a window is the focus widget within
	its toplevel.

	* gtk/gtkcontainer.[ch]: Fix the return type of ::focus
	to be boolean.

	* gtk/gtkcontainer.c (gtk_container_real_focus): Move handling
	of the case where the container CAN_FOCUS to here instead
	of having it in each individual move-the-focus place.

	* gtk/gtkcontainer.c: Rewrite handling of left-right and up-down
	focusing to be geometric in a much more obvious sense. Arrowing
	around is still non-intuitive because it isn't perfect and
	because entries, etc, grab the arrow keys, but it at least
	usually will do what you expect now.

	* gtk/gtknotebook.[ch]: Many cleanups. Moved docs inline in this
	file.

	* gtk/gtknotebook.c: Change tabs to be a single item in
	the focus chain. Make movement of focus on tabs with arrow
	keys wrap around.

	* gtk/gtknotebook.c (gtk_notebook_find_child): Add
	CHECK_FIND_CHILD macro to give informative error messages
	instead of silent returns.

	* gtk/gtknotebook.c (gtk_notebook_init): Set the RECEIVES_DEFAULT
	flag since we handle GdkReturn on the tabs.

	* gtk/gtknotebook.c (gtk_notebook_expose_tabs): Invalidate
	windows rather than sending expose events directly.

	* gtk/gtknotebook.[ch] docs/Changes-2.0.txt: Move structure
	definition for GtkNotebookPage into .c file, since it is private.

	* gtk/testgtk.c (create_notebook): Add option for
	testing borderless notebook.

	* gtk/testgtk.c (page_switch): Removed egregious poking
	around in GTK+ internals.

	* docs/widget-system.txt: Remove references to GTK_REDRAW_PENDING.

	* gtk/gtkclist.[ch]: Remove key press handler, handle focusing
	properly through gtk_clist_focus. Make the title headers a
	single item in the tab-focus chain, and make left-right wrap
	around.

	* gtk/gtkwindow.c (gtk_window_focus): Add a custom
	focus method so that wrapping around works properly.

	* gtk/gtktreeview.c: Remove calls to gtk_container_set_focus_child() -
	that is handled for the widget now.
2000-12-11 17:47:24 +00:00
Havoc Pennington
fe8da19f2a Draw underlines one pixel higher.
2000-11-14  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkpango.c (gdk_draw_layout_line): Draw underlines one pixel
	higher.

	* gtk/gtktextdisplay.c (render_layout_line): Take rise into
	account. Also, render rise, underline, background, etc. for
	pixbufs as well as text. Also, draw underlines one pixel higher.

	* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): Add a
	PangoAttribute for the rise, so it gets drawn properly. Also,
	add the GtkTextAppearance attribute for pixbuf/widget segments
	as well; we should go ahead and have rise, underline, background,
	stipple work for those

	* gtk/gtktexttag.c: Rename "offset" property to "rise" to match
	Pango
2000-11-15 00:23:37 +00:00
Havoc Pennington
7768d1dfb4 Add an "invisible_char" argument to set the char displayed when visibility
2000-11-09  Havoc Pennington  <hp@pobox.com>

* gtk/gtkentry.c (gtk_entry_class_init): Add an "invisible_char"
argument to set the char displayed when visibility == FALSE
(gtk_entry_create_layout): If !entry->visible, replace
all chars with the "invisible char"

* gtk/testgtk.c: Test the invisible_char deal
2000-11-13 03:29:14 +00:00
Owen Taylor
2cb2d33b20 Fix problem with using result of g_get_charset() backwards - pointed out
Sun Nov 12 14:10:09 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): Fix
	problem with using result of g_get_charset() backwards -
	pointed out by Mikael Hermansson <mikeh@bahnhof.se>.

	* gtk/gtkwindow.c (gtk_window_compute_hints): Support
	negative min_width/height and max_width/height to
	mean "requisition"; this allows setting a window
	to be user-resizable in only one direction easily.

	* gtk/testgtk.c (create_main_window): Remove hard-coded
	usize - set a default size in the vertical direction.
2000-11-12 19:16:11 +00:00
Owen Taylor
dfba226908 Make parent_class static.
Sun Nov  5 04:24:53 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcellrenderertextpixbuf.c: Make parent_class
	static.

Tue Sep 19 10:54:22 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontext*.[ch] gtk/gtkimmulticontext.[ch]
	gtk/gtktextlayout.[ch] gtk/gtktextview.c gtk/gtkentry.c:
	Add support for positioning the cursor within the preedit string.

Mon Sep 18 23:56:32 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextview.c: Check for bindings after passing
	events to im context filter.

Mon Sep 18 11:50:51 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (add_preedit_attrs): Handle
	empty attribute lists properly.

Sun Sep 17 10:08:16 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/queryimmodules.c (main): Return non-zero exit
	status if errors were encountered querying any
	modules.

Sat Sep 16 14:01:52 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtk.h: include gtkmodule.h gtkoldeditable.h,
	don't include gtkthemes.h.

	* gtk/testgtk.c gtk/testtext.c: Set environment variables
	to point

	* gtk/Makefile.am: Add new .c and .h files, build
	gtk-query-immodules and use it to create a gtk.immodules
	file for use of test programs.

	* gtk/gtkpreview.c: remove extra blank line.

Sat Sep 16 13:21:04 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontextsimple.c (gtk_im_context_simple_add_table):
	Add the ability to add extra tables beyond the default
	one, and also the ability to have compose sequences
	that are prefixes of other compose sequences.

	* gtk/gtkimcontextsimple.c: Export a preedit string which
	consists of possible candidates for keystrokes that have
	been entered but not yet committed.

	* gtk/gtkimcontext.[ch] gtk/immulticontext.[ch]
	gtk/gtkimcontextsimple.[ch]: add gtk_im_context_reset()

	* gtk/gtkmulticontext.[ch] (gtk_im_multicontext_append_menuitems):
	Add a function to add input-method switching menu items
	to a menu.

	* gtk/gtkimmulticontext.[ch]: Properly handly set_client_window
	when switching input methods.

	* gtk/gtkimcontextsimple.[ch]: Change the format of
	the compose table to allow compose tables of different
	lengths / sequence.

Sat Sep 16 13:05:48 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimmodule.[ch]: Support routines for loading
	GtkIMContext implementations dynamically at runtime.

	* gtk/queryimmodules.c: Program to query the available
	input modules and write the results into a file.

	* gtk/gtkrc.[ch] (gtk_rc_get_im_module_file): Add
	extra config options "im_module_file" (cache file for
	input method modules), and "im_module_path" - path
	to look for modules when generating cache file.

	This doesn't scale.

Sat Sep 16 13:09:06 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkthemes.[ch] gtk/gtkmodule.[ch]: Move most of the
	generic	code from gtkthemes into a new abstraction
	GtkModule which has the logic for implementing
	a loadable module which implements a number of
	GObject types.

Sat Sep 16 13:07:13 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkeditable.[ch]: Convert GtkEditable from
	a class into an interface

	* gtk/gtkoldeditable.[ch]: Move the old editable
	implementation into here, so legacy widgets can
	still rely on the implemenation. GtkOldEditable
	exports GtkEditable. Make selection handling
	code use new text conversion functions (and
	handle UTF-8 as a side-effect). Use GtkClipboard
	for CLIPBOARD.

	* gtk/gtktext.[ch] gtk/gtkcombo.c gtk/gtkspinbutton.c:
	Adopt to match above changes.

	* gtk/gtkentry.[ch]: Implement GtkEditable directly,
	avoid GtkOldEditable implementation. Restructure
        to reduce number of places that modify state directly.
	Move to GtkBindingSet. Display the preedit string.
	Queue recomputation of PangoLayout and scroll position
	to improve effiency of doing complex changes naively.
	Add a menu with cut/copy/paste and input method selection.

Thu Sep 14 22:11:05 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.[ch]: Add gtk_text_layout_set_preedit_string()
	to set preedit string and attributes; display preedit string by
	inserting string and attributes at cursor when creating the
	GtkTextLineDisplay.

	* gtk/gtktextlayout.c: Move all conversions between byte
	positions in PangoLayout and GtkTextIter into new functions
	line_display_iter_to_index/index_to_iter that properly
	handle the preedit string.

	* gtk/gtktextmark.[ch]: Restore gtk_text_mark_get_name, modify
	it to return const char * (eventually will end up
	as GCONST char *, most likely.)

	* gtk/gtktextview.[ch]: Handle the preedit string, call
	gtk_im_context_reset() as necessary, add a menu to switch
	input methods.

	* gtk/gtktextlayout.[ch]: Remove useless
	gtk_text_layout_get_log_attrs() function.
2000-11-12 03:43:24 +00:00
Alexander Larsson
814957b46e Add note about GtkMenuPositionFunc API changes.
2000-11-08  Alexander Larsson  <alexl@redhat.com>

	* docs/Changes-2.0.txt: Add note about GtkMenuPositionFunc
	API changes.

	* gtk/gtkmenu.c: Add support for scrolling menus.
	Remove gtk_menu_append/prepend/insert, these have been moved to
	gtkcompat.h as #defines.

	* gtk/gtkcompat.h.in:
	Add compatibility #defines for gtk_menu_append/prepend/insert

	* gtk/gtkmenu.h: Add data needed for scrolling menus.
	GtkMenuPositionFunc gets an extra argument push_in.
	gtk_menu_append/prepend/insert removed.

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Change menu
	positioning behaviour to fit to scrolling menus.

	* gtk/gtkmenuitem.c (gtk_menu_item_forall): Don't recurse
	into menuitem->submeny. That is wrong, and broke torn
	off submenus of torn off menus, since they were unrealized
	when the first menu was unrealized.

	* gtk/gtkmenushell.[ch]: Virtualize gtk_menu_shell_insert() and
	gtk_menu_shell_select_item() since these need to be overridden in
	GtkMenu.

	* gtk/gtkoptionmenu.c (gtk_opttion_menu_position): Change menu
	positioning behaviour to fit to scrolling menus.
	(gtk_option_menu_key_press, gtk_option_menu_button_press): Select
	the current item so that it is prelighted when the menu pops up.
	This is a workaround to the fact that the menu doesn't get the
	initial enter event (due to grabs).

	* gtk/gtkfilesel.c, gtk/gtkinputdialog.c, gtk/testgtk.c:
	s/gtk_menu_append/gtk_menu_shell_append/

	* gtk/gtknotebook.c:
	s/gtk_menu_insert/gtk_menu_shell_insert/

	* gtk/testgtk.c (create_menu, create_menus):
	Create the first menu with 50 items so that menu scrolling
	can be tested.


	Patch from Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkmenuitem.[ch] (gtk_menu_item_toggle_size_request): new
	system to handle size requests.  First, we ask what the size of
	the toggle is.  Then, when allocating the size, we allocate the
	toggle_size first.  This way we can have multiple menu-item
	classes w/o needing a seperate class for each.

	* gtk/gtkmenu.c (gtk_menu_size_request): Actually use the new system.
	* gtk/gtkmenu.c (gtk_menu_size_allocate): Use the new system.

	* gtk/gtkcheckmenuitem.c
	(gtk_check_menu_item_toggle_size_request): New function to handle
	the toggle size-request.
2000-11-08 17:34:52 +00:00
Tim Janik
ab6b184e9d provide a toggle button to temporarily disable position recording in the
Sun Nov  5 05:32:39 2000  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c (uposition_stop_configure): provide a toggle
        button to temporarily disable position recording in the
        "saved position" test.

Sat Nov  4 05:37:17 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtkthemes.c: added compat code that temporarily implements
        GtkThemeEnginePlugin as a GObject exporting GTypePlugin. this is
        going to be revamped by owen's upcoming GtkModule patches, but
        untill then people want gtk to build, right? ;)
2000-11-05 05:08:05 +00:00
Havoc Pennington
0ee86faa3c had a test backward
2000-11-02  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_labels): had a test backward

	* gdk/x11/gdkgc-x11.c (gdk_gc_copy): Copy the client-side GC
	fields, so the dest GC ends up with the correct clip origin,
	etc. Fixes a bug where colored labels didn't redraw
	properly.
2000-11-02 17:18:53 +00:00
Havoc Pennington
e667f04912 Test set_markup_with_accel()
2000-11-01  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_labels): Test set_markup_with_accel()

	* gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
	before returning it.
2000-11-01 23:56:18 +00:00
Havoc Pennington
fe9f9d03f4 New function to create a pixbuf pointing to a subregion of another pixbuf.
2000-11-01  Havoc Pennington  <hp@pobox.com>

* gdk-pixbuf.c (gdk_pixbuf_new_subpixbuf): New function to create
a pixbuf pointing to a subregion of another pixbuf.

2000-11-01  Havoc Pennington  <hp@pobox.com>

* gtk/gtklabel.c (gtk_label_set_attributes): Set a PangoAttrList
on a label
(gtk_label_finalize): unref the attr list if any.

* gtk/testgtk.c (create_get_image): close test on second click
(make_message_dialog): close dialog if it exists

* gdk/gdkpango.c (gdk_draw_layout): Handle rise attribute

* gdk-2.0.pc.in (Requires): Make it require gdk-pixbuf-2.0 not
gdk-pixbuf

* gtk/gtklabel.c (gtk_label_set_markup): new function to set label
from Pango markup format
(gtk_label_set_markup_with_accel): ditto but with accelerator
parsing

* gtk/gtkimage.c (gtk_image_expose): reformatting.

* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Hack to
reflect current state of GDK - use gdk_drawable_get_colormap, etc.
Check GDK_IS_WINDOW() not !GDK_IS_PIXMAP() to decide whether to
call gdk_window_get_origin().

* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
implement GDK_PIXBUF_ALPHA_FULL
2000-11-01 07:07:46 +00:00
Havoc Pennington
86b5c82a97 Re-enable the "find" dialog
2000-10-23  Havoc Pennington  <hp@redhat.com>

        * gtk/testtext.c: Re-enable the "find" dialog

	* gtk/testgtk.c: Add test for gdk_drawable_get_image

	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Fix bug where
	the arguments to gdk_draw_drawable were in the wrong order
	(gdk_window_paint_init_bg): This function was ignoring the
	init_region, instead of clipping to it, so the entire backing
	pixmap was cleared on every begin_paint()
	(gdk_window_begin_paint_region): Hmm, the same list-walking bug
	was in here again, the loop kept using the same GtkWindowPaint
	over and over.
	(gdk_window_begin_paint_region): Fix a bug where we had two
	x_offset instead of x_offset and y_offset

	* gdk/gdkdraw.c (gdk_drawable_get_image): get composite drawable
	before we get the image.
	(gdk_draw_drawable): get the composite before we draw the drawable.
	(gdk_drawable_real_get_composite_drawable): default
	get_composite_drawable implementation that returns the drawable
	itself

	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Add
	get_composite_drawable virtual function

	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Fix a cheesy
	list-walking bug

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_drawable): Add a hack to
	make this work if the source drawable is a GdkDrawableImplX11
	instead of a public drawable type. This is really broken; the
	problem is that GdkDrawable needs a virtual method get_xid(), but
	of course that doesn't work in practice. Enter RTTI.

	Also, improve mismatched depth message.

	* gdk/gdkpixmap.c (gdk_pixmap_get_image): Implement get_image for
	GdkPixmap

	* gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_class_init):
	install _gdk_x11_get_image as our implementation of get_image

	* gdk/x11/gdkimage-x11.c (gdk_image_get): Rename to
	_gdk_x11_get_image and export for use in gdkdrawable-x11.c

	* gdk/gdkimage.c (gdk_image_get): Make this just a wrapper around
	gdk_drawable_get_image

	* gdk/gdkdraw.c (gdk_drawable_get_image): call virtual get_image

	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Virtualize
	get_image

	* gtk/gtktreestore.c (gtk_tree_store_get_node): remove weird
	trailing semicolon after for loop
2000-10-24 00:15:14 +00:00
Tor Lillqvist
5fd61965e4 gtk/makefile.mingw.in Updates.
2000-10-22  Tor Lillqvist  <tml@iki.fi>

	* gtk/makefile.mingw.in
	* gtk/gtk.def: Updates.

	* gtk/testgtk.c: sleep() is called _sleep in MS's C
	library.

	* gtk/gtkimcontextsimple.c: Include <stdlib.h> for bsearch().

	* gtk/makefile.msc: Remove

	* gtk/makefile.msc.in: New file, like makefile.mingw.in.

	* gtk/Makefile.am: Add it.

	* configure.in: Generate it.

	* gtk/gtktextbuffer.c (gtk_text_buffer_create_child_anchor)
	* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
	something even if not implemented, to satisfy picky MSVC.
2000-10-22 16:01:20 +00:00
Havoc Pennington
1c9f0c0bac create some stock buttons with the default accel group (create_image):
2000-10-04  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_buttons): create some stock buttons
	with the default accel group
	(create_image): test some new GtkImage features
	(make_message_dialog): test GtkMessageDialog
	(create_modal_window): fix someone's bizzarro indentation

        * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement
	GTK_WIN_POS_CENTER_ON_PARENT.
	Add "destroy with parent" setting, which means the window goes
	away with its transient parent.
	(gtk_window_get_default_accel_group): get the default accel group
	for the window.
	(gtk_window_set_destroy_with_parent): set/unset destroy with
	parent flag
	(gtk_window_read_rcfiles): invalidate icon set caches
	after reloading rcfiles

	* gtk/gtkenums.h (GtkWindowPosition): add
	GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog
	on its parent window when the dialog is mapped for the first time.

        * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add
	a simple message dialog class

	* gtk/gtkdialog.c (gtk_dialog_init): Connect delete event
	handler to emit response signal, and maybe later it would
	honor a hide_on_delete flag - though that isn't there yet.
	Set border width on the vbox to 2, so we get some padding.
	Use a button box for the action area.
	(gtk_dialog_key_press): synthesize a delete event if Esc
	is pressed and the GtkWidget key press handler didn't
	handle the escape key.
	(gtk_dialog_new_with_buttons): new function creates a dialog
	with some default buttons in it.
	(gtk_dialog_add_action_widget): add an activatable widget
	as a button in the dialog - you can also add a non-activatable
	widget by accessing the action area directly.
	(gtk_dialog_add_button): add a simple button - stock ID or
	label - to the action area
	(gtk_dialog_response): emit response signal
	(gtk_dialog_run): block waiting for the dialog, return
	the response. Override normal delete_event behavior, so that
	delete_event does nothing inside gtk_dialog_run().

	* gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal
	emitted when an action widget is clicked or the dialog gets
	delete_event

	* gtk/gtk.h: add gtkmessagedialog.h

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

2000-10-20  Havoc Pennington  <hp@redhat.com>

	* gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
Jonathan Blandford
6b6e6763b7 Replaced with GTK_TREE_SELECTION_OLD to prevent conflict with
2000-10-05  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktree.h (GTK_TREE_SELECTION): Replaced with
	GTK_TREE_SELECTION_OLD to prevent conflict with gtktreeselection.c
	* gtk/testgtk.c: s/GTK_TREE_SELECTION/GTK_TREE_SELECTION_OLD/
	* gtk/gtktreeselection.[ch]: Replaced
	"node_selected"/"node_unselected" signal with "selection_changed"
	signal.
2000-10-06 00:06:00 +00:00
Owen Taylor
21b538970e Doc comment fixing. (Mostly non-matching parameter names.)
Thu Sep  7 11:47:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:
	Doc comment fixing. (Mostly non-matching parameter names.)

	* gtk/gtkcalendar.c gtk/gtklist.c gtk/gtknotebook.c: Modify
	comments a little to avoid looking like a doc comment.

	* gtk/gtkspinbutton.h (GTK_INPUT_ERROR): Change INPUT_ERROR to
	GTK_INPUT_ERROR. (Should the mechanism for erros in spin button
	conversions be changed to GError?)

	* gtk/gtkcolorsel.c (GTK_CUSTOM_PALETTE_WIDTH/HEIGHT):
	Move private #defines into .c file.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): Alphabetize
	order of argument addition, remove duplicates.

	* gtk/gtkaspectframe.h (struct _GtkAspectFrameClass):
	parent class is FrameClass, not BinClass.

	* gtk/gtk.h: Add gtkinvisible, which was missing.
	(It's occasionalyl useful for client apps, if seldom.)

	* gdk/gdktypes.h: Remove obsolete GDK_CORE_POINTER
	#define.
2000-09-07 18:07:59 +00:00
Owen Taylor
3f14b4598f Fix double free of font desc.
Tue Aug 22 12:33:24 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (create_styles): Fix double free of
	font desc.
2000-08-22 16:34:43 +00:00
Owen Taylor
92b2246581 Add gtk_widget_modify_{fg,bg,text,base,font}.
Mon Aug 21 22:39:18 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.[ch]: Add gtk_widget_modify_{fg,bg,text,base,font}.

	* gtk/testgtk.c (create_styles): Add a test for modifying
	the style through gtk_widget_modify_*.

	* gtk/gtkwidget.c (gtk_widget_get_modifier_style): Add
	a function to get the current modifier style.

	* gtk/gtkwidget.c (gtk_widget_modify_style): Make a copy
	of the passed in GtkRcStyle instead of ref'ing it.

	* gtk/gtkrc.[ch]: Add gtk_rc_style_copy().
2000-08-22 03:05:14 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Owen Taylor
e6be8f3f6a Use new PangoAttrShape to reserve space for pixmaps, add GSList *pixmaps
Fri Jul 21 15:28:13 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.[ch], gtk/gtktextdisplay.c: Use new
	PangoAttrShape to reserve space for pixmaps, add
	GSList *pixmaps to GtkTextLineDisplay, draw the pixmaps
	in the display functions.

	* gtk/testgtk.c (create_layout): Set some more exotic
	scrolled window options

	* gtk/gtkscrolledwindow.[ch] (gtk_scrolled_window_set_shadow_type):
	Add function to set the shadow type of a window, to allow
	putting a shadow around widgets such as GtkLayout or GnomeCanvas
	which don't draw their own frame.
2000-07-21 19:30:22 +00:00
Owen Taylor
b02ebc65e4 Call gtk_widget_size_request() on reparented child, if one. Otherwise,
Sun Jul  2 14:37:58 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_size_request): Call
	gtk_widget_size_request() on reparented child, if one. Otherwise,
	queue_resize() on the child never results in it getting size-requested
	at all.

	* gtk/testgtk.c (build_option_menu): Remove silly radio-menu-items
	in option menus, so that (with luck) people won't copy it into
	their apps in the future.

	* gtk/gtkoptionmenu.c: Connect ::size_request on the menu
	to gtk_option_menu_calc_size. This isn't perfect, but should fix
	a lot of problems with changing the size of the menu's menu
	items after adding it to the option menu.

	* gtk/gtktexttag.c: Include gtkmain.h for gtk_get_default_language().

	* gtk/gtkwidget.[ch]: Add a ::direction_changed that triggers when
	the text direction for a widget changes.

	* gtk/gtk{entry.c,label.[ch],textview.[ch]} gtk/testgtk.c: Use
	::direction_changed to get rid of various hacks.
2000-07-02 18:41:29 +00:00
Owen Taylor
4f1ccca594 Add gdk_rgb_find_color() to get a pixel value using GdkRGB functionality
Sun Jul  2 12:45:50 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
	value using GdkRGB functionality given GdkColormap and GdkColor.
	(name not final, waiting for inspiration.)

	* gdk/gdkgc.[ch] (gdk_gc_set_rgb_fg/bg_color): New functions to
	set the foreground/background of a GC using the GC's colormap
	and GdkRGB. (name not final, waiting for inspiration.)

	* gdk/gdkcompat.h gdk/gdkrgb.c (gdk_rgb_get_colormap): Rename from
	gdk_rgb_get_cmap(), put #define in gdkcompat.h.

	* gtk/gtkwidget.[ch] gtkcompat.h: Make visuals for
	gtk_widget_get_visual(), gtk_widget_get_default_visual, etc,
	purely a function of the corresponding colormap. Make
	gtk_widget_set_visual(), etc, noop macros in gtkcompat.h.

	* gdk/gdkpixmap.c gdk/x11/gdkpixmap-c11.c: Rewrite
	gdk_pixbuf_*create_from_xpm_* in terms of
	gdk_pixbuf_new_from_xpm_data(), move into platform independent
	code.

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Take
	advantage of the new draw_rgb_32_image_dithalign.

	* gdk/gdkrgb.c (gdk_draw_rgb_32_image_dithalign): Added.

	* gtk/gtkgc.c (gtk_gc_new): Set the appropriate colormap
	on each created GC.

	* gdk/gdkgc.[ch]: Add gdk_gc_get/set_colormap.

	* gdk/gdkgc.[ch]: Add a colormap field to the GdkGC structure
	which we initialize from the drawable when the GC is created,
	if the drawable has a colormap.

	* gdk/x11/gdkgc-x11.c: include string.h for memset.

	* gdk/x11/gdkinput-x11.c: include string.h for strlen, etc.

	* gtk/gtklayout.[ch]: Remove unsed configure serial member.
2000-07-02 17:03:21 +00:00
Tim Janik
100c9594d6 make the current version number 1.3.1 (binary age 0, interface age 0).
Fri Jun 23 17:54:23 2000  Tim Janik  <timj@gtk.org>

        * configure.in: make the current version number 1.3.1 (binary age 0,
        interface age 0).

        * gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
        gtkcompat.h is all we want.

        * gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
        GLib primitive types. fixed g_type_register_fundamental() argument
        ordering.

        * gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
        compiles.

        * gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
        object code cleanup, comment trigraph fixes, etc...
2000-06-24 22:32:05 +00:00
Owen Taylor
c319839d8e Finish the job Elliot started of removing font setting test for text
Wed Jun 21 12:24:28 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (create_text): Finish the job Elliot started
	of removing font setting test for text widget. (Since text widget
	and GdkFont are not deprecated, and cause portability problems.)
2000-06-21 16:26:50 +00:00
Owen Taylor
2a98bc6a31 Remove use of libunicode in favor of new GLib functions.
Wed Jun 21 11:41:43 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtkimcontextsimple.c gtk/gtklabel.c
	gtk/gtktexttypes.c gtk/testtext.c modules/linux-fb/basic.c:
	Remove use of libunicode in favor of new GLib functions.

	* gtk/gtkcolorsel.c: Remove conditional includes for FB, win32,
	nano-x, framebuffer. The X11 include is just a hack until we get
	the necessary functions in gdkcolor.h, so there is no reason to
	add other includes of platforms.

	* gtk/gtkwindow.c (gtk_window_compute_default_size): Revert
	window bigger than the screen change.

        * gtk/testgtk.c: Revert some random changes from Elliot
	that had no particular point and were causing testgtkrc
	not to function correctly.

	* gdk/gdkregion-generic.h: Revert change from Elliot. Just
	because GdkSegment and GdkRegionBox have the same fields,
	it doesn't mean that 'typedef GdkSegment GdkRegionBox'
	results in clearer code.

	* gdk/x11/gdkinput-x11.c (gdk_input_common_select_events,
	gdk_input_translate_coordinates): Fix missed GdkObjectification
2000-06-21 16:19:59 +00:00
Elliot Lee
8f4f35b392 (follow-on from previous commit)
(follow-on from previous commit)
2000-06-18  Elliot Lee  <sopwith@redhat.com>

* gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.

* gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
problem by calculating event position relative to the trough
rather than the slider.
* gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.

* gdk/gdkgc.h: Add GDK_NOR.
* configure.in, Makefile.am: Add modules top level dir
* configure.in: Only use pangox library if building x11 target.
* gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
2000-06-20 20:22:05 +00:00
Owen Taylor
bae5667ca3 Call gdk_window_withdraw rather than gdk_window_hide; this makes things
Mon Jun 12 16:58:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_unmap): Call gdk_window_withdraw
	rather than gdk_window_hide; this makes things work
	correctly if the window is programmatically hidden while
	iconified.
2000-06-12 21:08:07 +00:00
Havoc Pennington
9ae724bf4d Remove all references to offscreen flag which was no longer used.
Thu Jun  1 23:05:13 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Remove all references to
	offscreen flag which was no longer used.

	* gtk/gtkprivate.h (enum): Remove unused flags and compress.

	* gtk/gtkframe.c (gtk_frame_set_label_widget): Check
	for non-null label_widget->parent.

	* gtk/gtkentry.c: Get rid of code to deal with PangoAttribute
	which no longer was used.

	* gdk/gdkpango.c (gdk_pango_context_get_info): make static.

	* gdk/gdkpango.c (gdk_draw_layout[_line]): Add checks
	for null arguments.

	* gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): add
	check for destroyed windows.

Thu Jun  1 13:48:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimmulticontext.c: Add a finalize method and unref
	the slave context there.

	* gtk/gtkinvisible.[ch]: Make reference counting behavior
	identical to GtkWindow.

Thu Jun  1 01:54:11 2000  Owen Taylor  <otaylor@redhat.com>

	* Makefile.am gdk/gdkpango.c: Copy the layout render function from
	pangox to here, so we can write them independent of rendering
	system, using GDK primitives.

	* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c
	gdk/x11/gdkdrawable-x11.c: Remove draw_layout() from the vtable,
	since we have a rendering-system independent implementation in
	terms of draw_glyphs().

	* gdk/gdkpango.c gdkdrawable.h (gdk_draw_layout_line): New
	function to render a single line.

	* gdk/x11/gdkpango.c: Move the guts of this file mostly
	into ../gdkpango.c, which simplifies things, since we
	don't have to deal with raw X gc's.

Fri May 19 04:28:16 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.[ch]: Add get_log_attrs() function to
	get the logical attributes for a given GtkTextLine.

Tue May 30 16:05:39 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Track
	g_locale_get_codeset() to g_get_codeset() change.

Tue May 30 15:03:19 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testcalendar.c (calendar_font_selection_ok): Use font
	descriptions.

	* gtk/gtkentry.c (gtk_entry_draw_text): Center text within
	the entry.

	* gtk/gtkfontsel.c (gtk_font_selection_dialog_init): Start of
	redoing (vastly simplifying) for Pango. Still needs quite
	a bit of work. (Size selection is currently poor. List of
	predefined sizes is not a good idea, since all of these
	sizes won't necessarily be distinct.)

Tue May 30 13:50:19 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Handle
	CODESET results for LANG=C.

Mon May 29 15:49:10 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.[ch]: Add a 'font_name' declaration to RC
	which takes a stringized pango font description;
	ignore the older 'font' and 'fontset' declarations.

	* gtk/gtkstyle.c gtk/gtkrc.c: Fill in the style->font
	field with a GdkFont derived via gdk_font_from_description(),
	for compatibility. (Should we just remove it entirely?
	Probably too much compatibility breakage, but people
	should be migrating to the new Pango stuff as quickly
	as possible.)

Mon May 29 15:47:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtkclist.c: s/pango_font_unref/g_object_unref/.

Mon May 29 15:44:46 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcalender.c: Roughly pango-ized. Really needs
	redoing; there are some bugs in size allocation right
	now, the semi-existant distinction between header / day
	fonts was removed, but, with Pango, could actually
	be made functional in a nice way.

	* gtk/testcalender: Move calender from examples into this
	directory as a test program. (We really need to restrcture
	testgtk into a whole directory full of tests for every
	widget or functionality group, separated into multiple .c
	files.)

Mon May 29 15:19:56 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (file_exists): Fix stupid typo that
	was keeping RC file from being loaded.

	* gtk/testgtkrc gtk/testgtkrc2: Test new pango-ized
	RC file font code.

Mon May 29 14:31:27 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkfont.h gdk/x11/gdkfont-x11.c (gdk_font_from_description):
	Add function to load a GdkFont from a PangoFontDescription.

Fri May 26 17:16:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/frame.[ch] gtkaspectframe.c: Make frame widgets able
	to have any widget for the label, use a GtkLabel widget
	to display the text. (Based partially on a patch from
	Anders Carlson.)

	(Quite a bit of code reorganization - strip 90% of the
	guts out of gtkaspectframe and add a single virtual
	func to GtkFrameClass - compute_child_allocation.)

Fri May 26 12:00:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkctree.c gtk/gtkclist.[ch]: Pangoized.
	(Removed clist->row_center_offset field because caching
	it wasn't saving time or code, added private function
	_gtk_clist_create_cell_layout()).

Wed May 24 15:59:37 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkaccellabel.c: Pangoized.

	* gtk/[hv]ruler.c: Pangoized

Mon May 22 19:23:59 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfilesel.c (gtk_file_selection_init):
	Use gtk_clist_set_column_auto_resize() to remove need
	need for manual column width computations.

Mon May 22 18:50:26 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktooltips.[ch]: Replace custom drawing with a GtkLabel,
	ensuring Pango correctness, and considerably simplifying the
	code.

	* gtk/gtklabel.c gtk[hv]scale.c: 1000 => PANGO_SCALE.

	* gtk/gtklabel.c (gtk_label_size_request): Fixed incorrect
	getting of numbers of lines.

	* gtk/gtklabel.c (gtk_label_size_request): Set the requisition
	to the actual requested width of the lable, not to the wrap
	width we set.

	* gtk/gtktextchild.h: Remove extraneous include of gtk/gtk.h.

	* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextlayout.c
	  gtk/gtktextview.c gtk/gtktextview.[ch]: Fix up includes.

	* gtk/gtktextview.c: Fix structure inheritance.

	* gtk/gtkprogressbar.c: Pangoize.

Mon May 22 15:47:30 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_get_first_para_iter): Encapsulate
	in a function.

	* gtk/gtktextlayout.c (find_display_line_above): Fixed
	bug with computing line tops.

	* gtk/gtktextview.c (changed_handler): Fix < , <= confusion.

Thu May 18 18:53:31 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix up the x_offset
	and y_offset coordinates to do what we need now. (The offset between
	buffer and layout coordinates has been reintroduced, but is a
	bit different than before.)

	* gtk/gtktextview.[ch]: No longer inherit from GtkLayout; instead
	handle the adjustments ourselves, and scroll as necessary using
	the new gdk_window_scroll().

	The advantage of this is that when we are incrementally revalidating,
	we are essentially rearranging things around the visible portion
	of the screen. With the old setup, the visible portion of the
	screen was moved around in the layout, so scrolling and redrawing
	to track that caused jumping of the display. Since we now
	control the scrolling ourselves, we can suppress this and
	only redraw when things actually change.

Thu May 18 18:47:25 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextbtree.c (redisplay_mark): We need to invalidate
	the region not just redisplay it after-all, since we store the
	cursors in the LineDisplay. (Ugly interactions here between
	GtkLayout and GtkTextBTree here.)

	* gtk/gtktextbtree.c (redisplay_region): Fixed reversed comparison.

Thu May 18 18:43:21 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.h gdk/x11/gdkgeometry-x11.c (gdk_window_scroll):
	Added function to scroll contents of a window while keeping the
	window constant. Works by XCopyArea or guffaw-scrolling depending
	on the details of how the window is set up. (guffaw-scrolling
	still needs to be filled in.)

Wed May 17 22:36:53 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextiter.c gtk/gtkmain.c: Add a debug key for the text widget,
	move the debugging that was tied to a global variable
	to that.

	* gtk/gtkmarshal.list: Add NONE:INT,INT,INT

	* gtk/gtktextbtree.[ch] gtk/gtktextlayout.c: Keep a separate
	validated flag, in line data instead of setting height/width to
	-1. This allows us to perform operations with partially invalid
	buffer (using the old size for invalid lines) and thus to do
	incremental vaidation. Keep height/width aggregates up to date
	when deleting text and rebalancing the tree.

	* gtk/gtktextbtree.[ch]: Add functions validate a line
	(gtk_text_btree_validate_line), and to validate up
	to a number of pixels (gtk_text_btree_validate).

	* gtk/gtktextlayout.[ch]: Add an ::invalidated signal
	that indicates that something is changed and a revalidation
	pass is needed. Change ::need_repaint to ::changed, and
	make it take old and new yranges instead of a rectangle.

	* gtk/gtktextbtree.[ch] gtk/gtktextlayout.[ch]: Move
	the line_data_destroy() function from
	gtk_text_btree_add_view() to a virtual function in
	GtkTextLayout

	* gtk/gtktextbtree.[ch]: Remove gtk_text_btree_get_damage_range(),
	since we are handling partial repaints in a different fashion
	now.

	* gtk/gtktextbtree.[ch]: Only repaint the changed portion
	of the selection instead of queueing a repaint on the
	entire widget.

	* gtk/gtktextbuffer.[ch] gtk/gtktextbtree.[ch]: Move
	get_selection_bounds() down to btree, make the function
	in buffer a wrapper around the btree function.

	* gtk/gtktextlayout.[ch]: Add functions to check if the
	layout is valid and to recompute either a range of pixels
	aroudn a line or a certain total number of pixels.

	* gtk/gtktextlayout.[ch]: Cache a single line display;
	now that we only redraw the needed portions, the hit rate
	for this cache is quite high.

	* gtk/gtktextview.[ch]: Keep track of the first paragraph
	on the screen so that when re-laying-out the buffer, we can
	keep the same place. This requires connecting to ::value_changed
	on the adjustments

	* gtk/gtktextview.[ch]: Add idle functions to revalidate
	the buffer after we receive an ::invalidated signal.

Wed May 17 22:10:47 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c (gtk_layout_size_allocate): Set upper
	to max of allocation and layout size, not just to the
	layout size.

	* gtk/gtk[hv]scrollbar.c (gtk_[hv]scrollbar_calc_slider_size):
	Invalidate window so it gets redrawn properly.

	* gdk/gdkwindow.c (gdk_window_invalidate_rect): Allow rect == NULL
	to mean the entire window.

	* gdk/gdkevents.h: Move definition for GDK_PRIORITY_REDRAW
	into public header.

Mon May 15 14:51:31 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextmark.c (gtk_text_mark_get_name): Add function
	to get the name of a mark.

	* gtk/gtktextlayout.c (gtk_text_layout_get_line_at_y): Add a function
	to find the paragraph from a y position.

Thu May 11 12:57:20 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_node_invalidate_upward): Valid
	nodes have width/height >= 0, not > 0.

Tue May  9 21:29:06 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c (gtk_text_layout_get_line_display):
	Add a size_only flag, so when we only need the size, we don't create
	useless appearance attributes.

	* gtk/gtktextview.c (gtk_text_view_ensure_layout): Remove
	duplicate setting of font description.

	* gtk/gtkscale.c: Use PANGO_SCALE instead of 1000

Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
	EXTRA_DIST. It does not work well when the file that
	everything depends on is not in the tarball.

Wed Apr 26 00:56:14 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c: Some hacks and fixes so that it basically
	works when not sitting in the GTK+ build tree.

2000-05-03  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_line_next_could_contain_tag):
	Properly determine the ordering of the tag root and the current
	line within the tree. Previous algorithm only worked if the tag
	root's immediate parent was the common root of both the current
	line and the tag root.

Wed Apr 26 00:43:00 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (set_para_values): Fix some bugs in
	alignment.

	* gtk/gtktextview.c (gtk_text_view_ensure_layout): Track
	the widget text directional dynamically.

	* gtk/gtktextview.[ch]: Added functions to get and set default
	wrap mode.

Tue Apr 25 23:47:38 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_get_iter_location): Fix bug
	in cursor location computation.

Tue Apr 25 23:22:59 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c (gtk_layout_set_size): Clamp hadjustment/
	vadjusment values properly when layout gets smaller.

	* gtk/gtktextview.c (need_repaint_handler): Areas being
	passed in are far completely inaccurate, and sometimes
	too small, so, for now, just queue a redraw on the
	whole visible region.

2000-04-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (summary_destroy): new function to
	destroy tag summary nodes
	(gtk_text_line_next_could_contain_tag): this function was
	totally broken if the line passed in wasn't below the tag
	root. Fix it.
	(gtk_text_btree_first_could_contain_tag): In the tag == NULL
	"wildcard" case, we have to do a linear scan. Blah.
	(gtk_text_btree_last_could_contain_tag): In tag == NULL case,
	we have to do the linear scan
	(tag_removed_cb): When a tag is removed from the tag table,
	remove the GtkTextTagInfo node from the btree.
	(gtk_text_btree_spew): Implement the spew function, for
	our debugging pleasure.

Tue Apr 25 19:40:18 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_set_buffer): Fix
	a problem with referring to the wrong buffer.

	* gtk/gtkentry.c: Fix focus-in/focus-out confusion.

	* gtk/gtkrc.c gtk/gtkstyle.c: Moving setting default
	font description to gtk_style_new() - otherwise things
	don't work without a .gtkrc file.

	* gtk/gtktextbuffer.c (gtk_text_buffer_new): Sink the
	tags table if we create it ourself, too.

	* gdk/gdktypes.h (enum): Move GDK_RELEASE_MASK, since
	it was conflicting with XKB modifiers.

	* gtk/gtktextview.[ch]: Add simple support for
	GtkIMContext.

Mon Apr 24 19:34:18 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_move_cursor_visually): Fix problem
	with deletion from last commit.

Mon Apr 24 19:29:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_create_pango_context): Set the language
	in the context from the current locale.

	* gtk/gtkentry.c (gtk_entry_size_request): Use language from the
	context, not hardcoded value.

	* gtk/gtkentry.c (gtk_entry_move_cursor): Make character movement visual,
	not logical.

Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtktextdisplay.c: Don't handle selections as
	attributes - that doesn't handle partial-glyph selection
	properly. Instead use new pango_layout_line_get_x_ranges()
	functionality to draw the selection.

	* gtk/gtkentry.c: Simplify code since pango_layout_line_index_to_x()
	now properly handles out-of-range coordinates.

	* gtk/gtktextbuffer.c: Emit "mark_set" when the cursor is moved.

	* gtk/gtktextiter.h gtk/gtktextiterprivate.h: Make gtk_text_iter_get_line_byte()
	public.

	* gtk/gtktextlayout.[ch]: Properly set the direction in the PangoContext
	for paragraphs opposite to the base direction of the widget.

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Fixes for alignment.

	* gtk/gtktextlayout.c: Don't split segments on marks, since that
	causes Arabic words to reshape as you cursor through.

	* gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Implement virtual
	cursor position when moving vertically with the arrow keys and
	scrolling with page-up/page-down. (Arrow keys save only the X,
	scrolling saves both X and Y.)

	This means you can line-up / line-down or page-up / page-down
	without losing your place, and also that moving vertically
	with the cursor keys keeps the same X position, not the same
	character count:

	* gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Make vertical
	arrow keys move by display lines, not paragraphs.

Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c: Make sure that the bin window is at least
	as big as the allocation. (Should we also make sure that the
	bin window is big enough to completely cover widget->window?)

	* gtk/gtktextview.c (gtk_text_view_get_visible_rect): Add
	function to get the onscreen rectangle.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_pointer): Correctly account
	for offsets in window coordinates.

Sun Apr 16 16:13:27 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_get_cursor_locations): Fix index/offset
	confusion.

	* gtk/gtktextview.c (gtk_text_view_ensure_layout): Set the default direction
	from the widget direction.

	* gtk/gtktexttag.c gtk/gtktexttagprivate.h (gtk_text_tag_set_arg):
	Add a "direction" attribute.

	* gtk/gtktextview.c: global s/tkxt/text_view/.

	* gtk/testtext.c: Added long block of text in Arabic, to test out
	the direction attributes. (Some problems with the shaping system
	for arabic become obvious - like the fact the cursor splits words
	into unjoined pieces.)

Fri Apr 14 12:54:34 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextdisplay.c (render_layout): Add overstrike handling.

	* gtk/gtktextlayout.c: Fix up alignment.

	* gtk/testtext.c: Add some tests for centering, wrapping.

Fri Apr 14 09:26:22 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c:
	Add a draw_glyphs() operation to the drawable vtable and gdk_draw_glyphs().
	If we wrote GTK+-specific layout-render function this could just replace
	the draw_layout() operation in the vtable.

	* gtk/gtkentry.c: Move guts of gtk_entry_get_cursor_locations to
	pango_layout_get_cursor_pos() and use that function.

	* gtk/gtktextchild.[ch]: add gtk_ onto pixmap_segment_new(), since it
	is a non-static symbol.

	* gtk/gtktextbtree.[ch]: Replace gtk_text_btree_find_line_data_by_y()
	with gtk_text_btree_find_line_by_y()

	* gtk/gtktextdisplay.c: Rewrote for Pango - uses a custom layout
	renderer that handles GtkTextAppearance attributes.

	* gtk/gtktexttag.[ch] gtk/gtktexttagprivate.h:

	  - Move the values in the style that don't affect geometry into a
	    GtkTextAppearance structure.
	  - Change underline to take a PangoUnderline and "font" a string
	    representation of a font description
	  - Add a "font_desc" attribute which takes a FontDescription structure.

	* gtk/gtktextlayout.[ch]:

	  - Get rid of the display-line list per each line. Instead, we
	    generate, on demand, a GtkTextLineDisplay structure which]
	    contains a PangoLayout * and other necesary information
	    (offsets, cursor locations) for displaying a paragraph.
	  - Get rid of the code to wrap lines, create display chunks,
	    etc. Instead, we just go through a paragraph and convert
	    it into the necessary inputs to a PangoLayout.
	  - Implement a new attribute type, GtkTextAttrAppearance. This
	    holds a GtkTextAppearance, and is used to pass colors,
	    stipple, etc, through from the layout to the display without
	    having to use lots and lots of individual attributes.
	  - Reimplement gtk_layout_get_iter_at_pixel() gtk_layout_get_iter_pos()
	    in terms of PangoLayout functions.

	* gtk/gtktextview.c:

	  - Handle passing the necessary PangoContext to the layout
	  - Some fixups in painting to deal with the automatic backing store
	    and offsetting of GTK+-1.4
	  - Add a style_set handler so that the default style reacts
	    properly to theme changes.

	* gtk/gtktext?*.[ch]: Random code-style fixes.

	* gtk/testtext.c: Substitute in languages that Pango handles now for Thai

Mon Apr 10 10:33:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext?*.[ch]: Check in Havoc's port of the Tk text widget,
	in original form preparatory to Pango-ization and gdkimcontext-ization.

Thu Apr  6 19:25:39 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontext.c: Move default implementations to real_* vfuncs,
	so that we can derive from gtkimcontext in language bindings properly.

Thu Apr  6 16:02:52 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontextsimple.[ch]: Use gdk_keyval_to_unicode to gdk_unicode_to_keyval.
	Add a compose table including (almost) all the compose combinations
	from X. This is 6k of static, shared data as opposed to 50k or so of dynamic
	data in the XIM implementation.

	* gdk/gdk.h gdk/gdkkeyuni.c gdk/win32/gdkevents-win32.c (gdk_keyval_to_unicode, gdk_unicode_to_keyval):
	Moved functions to convert keyvalues from and to unicode here from
	the win32 port and made them public.

Wed Apr  5 16:37:29 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkeditable.c (gtk_editable_insert_text): Allow new_text_length == -1.

Wed Apr  5 16:27:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontext.[ch]: Base class for new input context system

	* gtk/gtkimmulticontext.[ch]: Proxy input context that allows
	the real input context implementation to be loaded from modules
	and switched on the fly.

	* gtk/gtkcontextsimple.[ch]: Simple implementation of an input
	context that just does direct keysymbol => unicode translation.

	* gtk/gtkentry.[ch]: Start switching editing over to using
	GtkInputContext. (No handling of preedit yet.)

Wed Apr  5 15:48:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktypeutils.h (GTK_CHECK_GET_CLASS): Fix problem with one too
	many substitutions. (klass should not be subsituted.)

Wed Apr  5 00:18:14 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in: Add checks for Pango

	* configure.in docs/Makefile.am: Add test for sgml2html
	and allow 'make dist' without building html, but print out
	warnings in that case. (For making snapshots)

	* gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am:
	Add Pango libraries and C flags

	* gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c:
	Add function (gdk_draw_layout) to draw a pango layout.

	* gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions
	for getting Pango contexts for GDK.

	* gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set()

	* gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional
	editing.

	* gtk/gtkentry.c: Hack in simple Hebrew input with direct
	keysym => unicode translations. More languages can be added
	here, but real input-method support is needed.

	* docs/Changes-1.4.txt: Added note about entry behavior.

	* gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions
	to set the reading direction for a widget and the global direction.
	Add test which allows toggling the global direction. Two private
	flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR)

	* gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c
	  gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c

	* gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango

	* gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking,
	underlining now handled by Pango.

	* gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription
	to RCStyle and Style. (Having both this and the old font name and GdkFont
	is temporary.)

	* gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added
	convenience functions for creating contexts and layouts for widgets.

	* gtk/testgtk.c: Enhance label tests with multilingual labels.
2000-06-02 03:14:07 +00:00
Owen Taylor
b9d4205044 Patch from David Santiago <mrcooger@cyberverse.com> to change things so
Wed May 17 10:52:12 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorsel.c: Patch from David Santiago
	<mrcooger@cyberverse.com> to change things so that the
	indicator of the active palette entry is done independently,
	not via the focus, since it should always be visible.
2000-05-17 14:56:11 +00:00
Owen Taylor
386ae20970 A bit of editing.
Fri May 12 18:46:51 2000  Owen Taylor  <otaylor@redhat.com>

	* docs/Changes-1.4.txt: A bit of editing.

	* gdk/gdkwindow.c (_gdk_window_clear_update_area)
	* gdk/x11/gdkwindow-x11.c (gdk_window_hide): Add a function
	to clear the update area for the window, and clear it
	when hiding a window.

	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Ignore
	if window destroyed.

	* gdk/gdkwindow.c (gdk_window_end_paint): Likewise.

	* gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c gdk/gdkinternals.h: Move
	gdk_window_destroy() to the generic code, since there was a lot of
	window-system-independent logic it in. Add a function:

	 _gdk_window_destroy()

	to the internal API to destroy a window without unreferencing it.
	Add a function:

	 _gdk_windowing_window_destroy()

	That does the windowing-system-dependent part of destroying
	the window.

Fri May 12 11:07:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c: Fix various memory leaks of pixmaps.

Fri May 12 11:06:10 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c docs/Changes-1.4.txt (gtk_widget_shape_combine_mask):
	Make gtk_widget_shape_combine_mask() keep a reference count on
	the pixmap since it keeps it around.

Fri May 12 10:53:29 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix refcount
	leak.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix refcount
	leak with event filters.

Thu May 11 14:29:44 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_dest_set_internal): Remove the
	signal handlers with the right data arguments. (Fixes
	some warnings when a widget was repeatedly set as a drag
	destination.)

	* gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd): Set data on the
	window so we can avoid avoid setting the DND properties on the
	toplevel window repeatedly.
2000-05-15 16:09:53 +00:00
Tim Janik
9595c55184 documented necessary changes for 1.4 transition.
Fri May 12 17:13:32 2000  Tim Janik  <timj@gtk.org>

	* docs/Changes-1.4.txt: documented necessary changes for 1.4 transition.

	* gtk/gtktext.c: made the adjustments no-construct args, simply
	provide default adjustments.
	(gtk_text_destroy): release adjustments.

	* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): made the
	adjustment argument non-construct.

	* gtk/gtkprogress.c (gtk_progress_destroy): release adjustment here,
	instead of in finalize.
	(gtk_progress_get_text_from_value):
	(gtk_progress_get_current_text):
	(gtk_progress_set_value):
	(gtk_progress_get_percentage_from_value):
	(gtk_progress_get_current_percentage):
	(gtk_progress_set_percentage):
	(gtk_progress_configure): ensure an adjustment is present.

Thu May 11 01:24:08 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtkcolorsel.[hc]:
	* gtk/gtkcolorseldialog.[hc]:
	* gtk/gtkhsv.[hc]: major code cleanups, destroy handlers need to chain
	their parent implementation, use bit fields for boolean values, don't
	create unused widgets, usage of glib types, braces go on their own
	lines, function argument alignment, #include directives etc. etc. etc..

	* gtk/Makefile.am (gtk_public_h_sources): install gtkhsv.h.

Wed May 10 23:29:52 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtktoolbar.c (gtk_toolbar_destroy): don't unref a NULL tooltips.

	* gtk/gtkfilesel.c (gtk_file_selection_destroy): don't free a cmpl_state
	of NULL.

	* gtk/gtkcombo.c (gtk_combo_item_destroy): don#t keep references
	to freed data.
	(gtk_combo_destroy): don't keep a pointer to a destroyed window.

	* gtk/gtkmenu.c (gtk_menu_init): reset the menu's toplevel pointer
	to NULL when the toplevel is getting destroyed.
	(gtk_menu_set_tearoff_state): same here for the tearoff_window.
	(gtk_menu_destroy):
	(gtk_menu_init): store the information of whether we have to
	readd the initial child ref_count during destruction in a new
	GtkMenu field needs_destruction_ref_count.

	* gtk/gtkviewport.c: SHAME! ok this one is tricky, so i note it
	here, those reading: learn from my mistake! ;)
	in order for set_?adjustment to support a default adjustemnt if
	invoked with an adjustment pointer of NULL, the code read (pseudo):
	if (v->adjustment) unref (v->adjustment);
	if (!adjustment) adjustment = adjustment_new ();
	if (v->adjustment != adjustment) v->adjustment = ref (adjustment);
	now imagine the first unref to actually free the old adjustment and
	adjustment_new() creating a new adjustment from the very same memory
	portion. here, the latter comparision will unintendedly fail, and
	all hell breaks loose.
	(gtk_viewport_set_hadjustment):
	(gtk_viewport_set_vadjustment): reset viewport->?adjustment to NULL
	after unreferencing it.

	* gtk/gtkcontainer.[hc]: removed toplevel registration
	functions: gtk_container_register_toplevel(),
	gtk_container_unregister_toplevel() and
	gtk_container_get_toplevels() which had wrong semantics
	anyways: it didn't reference and copy the list.

	* gtk/gtkwindow.c: we take over the container toplevel registration
	bussiness now. windows are registered across multiple destructions,
	untill they are finalized. the initial implicit reference count
	users are holding on windows is removed with the first destruction
	though.
	(gtk_window_init): ref & sink and set has_user_ref_count, got
	rid of gtk_container_register_toplevel() call. add window to
	toplevel_list.
	(gtk_window_destroy): unref the window if has_user_ref_count
	is still set, got rid of call to
	gtk_container_unregister_toplevel().
	(gtk_window_finalize): remove window from toplevel list.
	(gtk_window_list_toplevels): new function to return a newly
	created list with referenced toplevels.
	(gtk_window_read_rcfiles): use gtk_window_list_toplevels().

	* gtk/gtkhscale.c (gtk_hscale_class_init): made the GtkRange
	adjustment a non-construct arg.
	* gtk/gtkvscale.c (gtk_vscale_class_init): likewise.
	* gtk/gtkhscrollbar.c (gtk_vscrollbar_class_init): likewise.
	* gtk/gtkvscrollbar.c (gtk_vscrollbar_class_init): likewise.

	* gtk/gtkrange.c: added some realized checks.
	(gtk_range_destroy): get rid of the h/v adjustments in the
	destroy handler instead of finalize. remove timer.
	(gtk_range_get_adjustment): demand create adjustment.

	* gtk/gtkviewport.c: made h/v adjustment non-construct args.
	we simply create them on demand now and get rid of them in
	the destroy handler.
	(gtk_viewport_destroy): get rid of the h/v adjustments in the
	destroy handler instead of finalize.
	(gtk_viewport_get_hadjustment):
	(gtk_viewport_get_vadjustment):
	(gtk_viewport_size_allocate): demand create h/v adjustment
	if required.

	* gtk/gtkwidget.c (gtk_widget_finalize): duplicate part of the
	gtk_widget_real_destroy () functionality.
	(gtk_widget_real_destroy): reinitialize with a new style, instead
	of setting widget->style to NULL.

Fri May  5 13:02:09 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtkcalendar.c:
	* gtk/gtkbutton.c: ported _get_type() implementation over to
	GType, either to preserve memchunks allocation facilities,
	or because Gtk+ 1.0 GtkTypeInfo was still being used.

	* gtk/gtkobject.[hc]: derive from GObject. ported various functions
	over. prepare for ::destroy to be emitted multiple times.
	removed reference tracer magic. chain into GObjectClass.shutdown()
	to emit ::destroy signal.

	* gtk/gtksignal.c: removed assumptions about GTK_TYPE_OBJECT being
	fundamental.

	* gtk/gtkmain.c: removed gtk_object_post_arg_parsing_init()
	cludge.

	* gtk/gtksocket.c:
	* gtk/gtkplug.c:
	* gtk/gtklayout.c:
	* gtk/gtklabel.c:
	* gtk/gtkargcollector.c:
	* gtk/gtkarg.c: various fixups to work with GTK_TYPE_OBJECT
	not being a fundamental anymore, and to work with the new
	type system (nuked fundamental type varargs clutter).

	* gtk/*.c: install finalize handlers in the GObjectClass
	part of the class structure.
	changed direct GTK_OBJECT()->klass accesses to
	GTK_*_GET_CLASS().
	changed direct object_class->type accesses to GTK_CLASS_TYPE().

	* gtktypeutils.[hc]: use the reserved fundamental ids provided by
	GType. made most of the GTK_*() type macros and Gtk* typedefs
	simple wrappers around macros and types provided by GType.
	most notably, a significant portion of the old API vanished:
	GTK_TYPE_MAKE(),
	GTK_TYPE_SEQNO(),
	GTK_TYPE_FLAT_FIRST, GTK_TYPE_FLAT_LAST,
	GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST,
	GTK_TYPE_ARGS,
	GTK_TYPE_CALLBACK,
	GTK_TYPE_C_CALLBACK,
	GTK_TYPE_FOREIGN,
	GtkTypeQuery,
	gtk_type_query(),
	gtk_type_set_varargs_type(),
	gtk_type_get_varargs_type(),
	gtk_type_check_object_cast(),
	gtk_type_check_class_cast(),
	gtk_type_describe_tree(),
	gtk_type_describe_heritage(),
	gtk_type_free(),
	gtk_type_children_types(),
	gtk_type_set_chunk_alloc(),
	gtk_type_register_enum(),
	gtk_type_register_flags(),
	gtk_type_parent_class().
	replacements, where available are described in ../docs/Changes-1.4.txt.
	implemented compatibility functions for the remaining API.

	* configure.in: depend on glib 1.3.1, use gobject module.
2000-05-12 15:25:50 +00:00
Owen Taylor
88286d32af Color selection dialog rewrite.
Wed May 10 16:38:17 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am docs/Changes-1.4.txt gtk/gtkcolorsel.[ch]
	gtk/gtkhsv.[ch]: Color selection dialog rewrite.

	(Original triangle color selector from Simon Budig
	<Simon.Budig@unix-ag.org>, Cleaned up and rewritten for GTK+ by
	from Jonathan, Havoc, and Federico. Merge into GTK+ done by David
	Santiago <mrcooger@cyberverse.com>)

	* gtk/gtkcolorseldialog.[ch]: Split color selection dialog
	out into a separate widget.

	* gtk/testgtk.c: Add some checkbuttons for toggling palette
	and opacity controls.

Wed May 10 16:08:09 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in (GTK_LIBS_EXTRA): Remove references to gobject that
	snuck in prematurely.
2000-05-10 21:39:03 +00:00
Owen Taylor
10ba4fd066 Merges from gtk-1-2 2000-03-14 19:57:25 +00:00
Tor Lillqvist
ec1e8f1f5d Internal GDK error reporting changes: (gdk_win32_gdi_failed) New function
2000-03-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkmain-win32.c: Internal GDK error reporting changes:
(gdk_win32_gdi_failed) New function for reporting errors from GDI,
for which it is no use to call GetLastError on Win9x.
(gdk_other_api_failed) New function, for
general error reporting without calling GetLastError.
(gdk_win32_api_failed) OTOH, this function always calls
GetLastError. (gdk_win32_last_error_string) Remove this function,
GLib has the equivalent now.

* gdk/win32/gdkprivate-win32.h: Declare the above, and macros to
call them with function name, file name and line number in the
arguments.

* gdk/win32/*.c: Use the new macros for reporting errors from GDI
functions.

* gtk/gtk.def: Add some missing entry points.

* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
gtk_paned_set_gutter_size, which don't exist any longer, as void.

Fixes by Hans Breuer:

* gdk/makefile.msc: Update for debugging.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Fake
implementation, just use the PS_DASH, PS_DOT, PS_DASHDOT or
PS_DASHDOTDOT or PS_DASH styles depending on the number of entries
in the dash_list.

* gdk/win32/gdkwin32.h (GDK_FONT_XFONT): New macro, similar as in
the x11 backend.

* gdk/win32/gdkprivate-win32.h (IS_WIN_NT): New macro.

* gtk/testgtk.c: Include config.h, guard inclusion of unistd.h.
2000-03-08 06:18:41 +00:00
GMT 2000 Tony Gale
6ab2659931 Spelling/grammar fixes from Martin Buchholz <martin@xemacs.org>
Tue Feb 29 13:10:00 GMT 2000  Tony Gale <gale@gtk.org>

        * gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
          gtk/gtkctree.c gtk/gtkmenu.h gtk/gtkwidget.c gtk/testgtk.c
          docs/styles.txt docs/refcounting.txt docs/gtkfaq.sgml
          docs/gtk_tut.sgml docs/gtk.texi TODO:
          Spelling/grammar fixes from Martin Buchholz <martin@xemacs.org>
2000-02-29 13:15:10 +00:00
Owen Taylor
c8a2382b65 Remove OwnerGrabButtonMask from button entries for GDK_BUTTON_PRESS /
Fri Feb 18 14:37:29 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
	OwnerGrabButtonMask from button entries for
	GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.

	* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
	to the event mask (which will result in button/press release
	being added to the event mask on Unix) so scrolling works
	for layouts in scroll windows.

	* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.

	Patch from Anders Carlsson  <andersca@picard.andersnet> to add
	a scroll event.

 	* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
 	scrolling to the "Test Scrolling" part of testgtk.

 	* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.

 	* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
 	it against GDK_SCROLL.

 	* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
 	way of mouse wheel scrolling.

 	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.

 	* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.

 	* gtk/gtkmain.c: Removed previous mouse wheel hack.

 	* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
 	gdk_event_mask_table.

 	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
 	GdkEventScroll handler.

 	* gdk/gdkevents.h: Added GdkEventScroll structure.
2000-02-18 20:02:24 +00:00
Havoc Pennington
4d48b106f0 use gdk_cursor_unref instead of destroy
2000-01-30  Havoc Pennington  <hp@pobox.com>

	* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
		destroy

			* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned

				* gdk/gdkprivate.h: declare
_gdk_cursor_destroy which is then
	implemented in platform-specific code

		* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c

			* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy):
rename with an
	underscore in front

		* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
			put an underscore in front

				* gdk/gdkcursor.c: new file, implements
					gdk_cursor_ref/gdk_cursor_unref

						* gdk/gdkcursor.h: Refcount GdkCursor

							* gdk/gdkcompat.h
(gdk_cursor_destroy): compat
2000-01-29 22:26:41 +00:00
Tor Lillqvist
9c00803e19 Must mark also gdk_error_warnings and gdk_error_code as GDKVAR, as they
1999-12-11  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkprivate.h: Must mark also gdk_error_warnings and
gdk_error_code as GDKVAR, as they are referred outside GDK.

* gdk/win32/gdkinput-win32.c: Remove debugging leftover.

* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
non-NULL.

* gtk/gtkdnd.c
* gtk/gtklayout.c
* gtk/gtkplug.c
* gtk/gtkselection.c
* gtk/gtksocket.c
* gtk/gtkwindow.c: Include x11/gdkx.h *or* win32/gdkwin32.c as
appropriate. There must be a cleaner way to handle this?

* gtk/gtkrc.c: Must include windows.h on Win32.

* gtk/testgtk.c: No need to include gdkx.h.

* gtk/makefile.cygwin: Correct invokation of genmarshal.pl.
1999-12-11 23:04:55 +00:00
Raja R Harinath
33da844e70 Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkgamma.h: Adapt cast macros to standard.

[ Merges from 1.2 ]

Tue Nov 16 10:15:54 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
	If translation does not include a '/', use entire
	translation instead of crashing.

Sun Oct 31 22:21:11 1999  Tim Janik  <timj@gtk.org>

	* docs/gtk_tut.sgml:
	s/gtk_accel_group_attach/gtk_window_add_accel_group/.

Sat Oct 30 09:09:09 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkselection.c (gtk_target_list_remove): Use
	g_list_remove_link, not g_list_remove.

	[ From Geert Bevin <gbevin@thunderstorms.org> ]

Sun Oct 24 07:41:40 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkclist.c (real_undo_selection): commented out g_print()
	statement upon unselection (how the heck did that slip in?).

Sat Oct 23 03:03:08 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtktext.c (gtk_text_freeze):
	(gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
	in frozen state (and aparently crashes). patch provided by Anders
	Melchiorsen <and@kampsax.dtu.dk>.

Sat Oct 23 02:53:20 1999  Tim Janik  <timj@gtk.org>

	* fix insensitive default/focus widget activation,
	reported by Matt Goodall <mgg@isotek.co.uk>.

	* gtk/gtkwindow.c (gtk_window_key_press_event):
	(gtk_window_activate_default):
	(gtk_window_activate_focus):
	return handled=FALSE for actiavtion of insensitive default
	widgets. return handled=TRUE for activation of insensitive
	focus widgets. don't activate in either case.

Tue Oct 19 09:55:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk-config.in (lib_gtk): Switch order of @x_cflags@
	and $glib_cflags to match library order and in the
	theory that an old version of GLib is more likely to
	be in the include directory for X then vice-versa.
	(Bug #2776)

Tue Oct 19 09:46:49 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
	to determine the locale for fontsets, not LC_MESSAGES;
	the user may want English messages with a handling
	for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
	will still be broken) (Bug #2891)

Tue Oct 19 20:36:42 1999  Changwoo Ryu  <cwryu@adam.kaist.ac.kr>

	* gtk/gtkrc.ko: Fixed the wrong number of "*"'s.

Tue Oct 19 12:15:13 1999  Changwoo Ryu  <cwryu@adam.kaist.ac.kr>

	* gtk/gtkrc.ko: Changed the Korean default fontset.

Fri Oct  8 02:32:47 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
	where when scrolling to the left or top double exposes
	were done, causing major slowdowns.

Thu Oct  7 18:31:55 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
	names to lowercase and alphanumeric, before looking
	them up.

	* gtk/Makefile.am: Install codeset variant gtkrc files
	with normalized names.

Thu Oct  7 22:52:42 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
	popup menus when the menu is already visible, but its parent
	is still hidden, (happens after tornoff window got hidden).

Thu Oct  7 11:09:55 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (install-data-local): Fix
	a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
	deleted, causing error messages on install.

Thu Oct  7 11:03:06 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
	the handle as well, since we now sometimes ignore
	exposes on the handle while resizing.

Wed Oct  6 18:02:31 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
	extra g_free introduced in one of the last one or two
	commits.

Wed Oct  6 16:38:36 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
	consistent, put each style that a gtkrc.* file creates
	in a unique namespace, remove old files before installing.

Wed Oct  6 14:31:16 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
	gtk_rc_init is called multiple times. (Yes, people who
	do that have bugs in their code.)

Tue Oct  5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>

	* gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
	Remove it since it's generated by the Makefile anyway

Tue Oct  5 02:43:41 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkinputcommon.h (gdk_input_device_new): Free
	device->info.axes for core pointer.

Thu Sep 30 13:55:25 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (destroy_idle_test): Rename idle to
	idle_id, to deal with obsolete, broken C libraries.

Mon Sep 27 02:50:15 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
	allocation->x/y twice!

	* gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
	consistent with gtk_vscale_pos_trough().

Sun Sep 26 19:44:34 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcontainer.c (gtk_container_queue_resize): We may
	be queueing a resize on a toplevel container between
	the time we show it and when we map it. So, we need
	to test GTK_WIDGET_VISIBLE() for toplevels, and only
	use GTK_WIDGET_DRAWABLE() for child windows.

Thu Sep 23 16:41:03 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
	(fixes bug #2144)

Fri Sep 24 00:51:45 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkcontainer.c (gtk_container_queue_resize): check for
	container DRAWABLE (instead of VISIBLE), so we don't queue
	resizes on non-toplevel containers.

Sun Sep 19 18:13:31 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkselection.[ch]: Make the data argument
	const guchar *.

Sat Sep 18 21:27:40 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c: Try to behave sensibly if
	the focus widget is the window itself. (Should
	we allow this at all?)

Fri Sep 17 09:57:15 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_set_sensitive):
	* gtk/gtknotebook.c (gtk_notebook_set_scrollable):
	* gtk/gtknotebook.c (gtk_notebook_set_show_border):
	* gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
	in prototypes and implementations consistent (Tomas Ogren).

	* gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
	before the widget is unparented (reported by damon).

	* gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
	since we provide unsigned data anyways.

Thu Sep 16 21:32:01 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
	the call to gtk_tooltips_layout_text() until later.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips):
	Call gtk_widget_ensure_style() before using the style.

Wed Sep 15 02:52:19 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_event): Added workaround
	for old widgets that don't propagate draws to all
	children. (Namely gnome-dock for gnome-libs <= 1.0.16)

Tue Sep 14 19:22:19 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
	for a redraw but just the widget that requested the resize.

Tue Sep 14 18:29:47 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkcontainer.c: added new widget level method
	gtk_container_set_reallocate_redraws() and a GtkContainer flag
	reallocate_redraws : 1 to reflect the setting, exported this through
	the argument system as a boolean ::reallocate_redraws.

	* gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
	on the widget because the allocation changes, do so as well for
	widget->parent if the parent has reallocate_redraws set to TRUE.
	with that containers requesting reallocation redraws get automatically
	redrawn if their children changed allocation (this unfortunately
	affects also other children that didn't change allocation, but we
	cannot work around that before 1.3).

Tue Sep 14 18:23:01 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
	_and_ height are >0 (not _or_).

	* gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
	instead of gtk_container_queue_resize(), which is a core gtk internal
	function (must have been on crack when i queued that).

	* gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
	we can check more reliably if we want to discard expose events.
	* gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
	flag.

	* gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
	we simply trust these events. for deciding whether to discard exposes,
	check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.

Mon Sep 13 15:01:21 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
	queues of areas that are completely off screen.

	* gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
	logic for handleboxes.

	* gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
	check on width/height.

Mon Sep 13 02:22:47 1999  Tim Janik  <timj@gtk.org>

	* gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
	we are fine with using $@ the way we do (if we actually encounter
	brokeness with $@ in VPATH builds because of additional path prefixes,
	we need to use $(@F) actually).

Mon Sep 13 01:34:53 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
	short lived bugs, that would allow language bindings to do surgeries
	to our guts.

Fri Sep 10 15:22:50 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
	where comparison was being done against an uninitialized
	value causing intermittant results depending on
	compiler flags. Also make it clearer that we aren't
	ever initializing the child as 0x0 (though this will
	be caught in gtk_widget_size_allocate())

Fri Sep 10 10:06:56 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
	gtk_window_unset_transient_for() call after we do checks
	involving the old transient parent.
	[ From Lance Capser <lmc@cyberhighway.net> ]

1999-09-07  Raja R Harinath  <harinath@cs.umn.edu>

	* gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
	an empty file.

Mon Sep  6 00:11:56 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
	no children. (Reported by: Chris Rogers <gandalf@pobox.com>)

1999-09-03  Raja R Harinath  <harinath@cs.umn.edu>

	* gtk/Makefile.am (gen_sources): Improve VPATH builds.
	`$@' is valid only in the build dir, not after we've done
	`cd $srcdir'.  Also use `test -f' instead of less portable
	`test -e'.

Fri Sep  3 15:59:56 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c (correct_cache_insert): Rewrite
	 for simplicity, and hopefully correctness.
	 (Fixes bug #1322, which was a segfault when
	  on some insertions with the properties around
	  the insertion set up just wrong.)

	* gtk/gtktext.c (gtk_text_adjustment): When we receive
	 a "changed" signal, clamp the new value to the adjustment
	 bounds to avoid segfaulting if someone tries to change
	 the adjustment to a bogus value. (Bug #1795)

Thu Sep  2 16:33:59 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c: Ignore unexpected destroy notifies
	for children, for toplevel windows handle them
	like delete_event.

	* gtk/gtkplug.c: Add an unrealize handler so that
	we unref plug->socket_window when we are done
	with it.

Fri Sep  3 14:52:54 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c (clear_area): Fix stupid signedness
	 problem that was causing background to sometimes
	 be misaligned.

Fri Sep  3 12:26:33 1999  Owen Taylor  <otaylor@redhat.com>

	[ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]

	* gtk/gtkmenu.c (gtk_menu_position): Make
	 sure we never position menus with negative x, y,
	 since gtk_widget_set_uposition() can't handle that.

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
	 Modify the positioning code a bit so that we always
	 put the top-left corner onscreen. (This is for
	 UI reasons, gtk_menu_position() now takes care of
	 gtk_widet_set_uposition() brokeness.)

Fri Sep  3 03:06:30 1999  Tim Janik  <timj@gtk.org>

	* gtk/Makefile.am: fixed up things for -jx, x > 1.

Sun Sep  5 08:48:51 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
	  RC style that is passed in. The lack of the ref
	  before was a bug. If people worked around this
	  bug, this will introduce a slight memory leak
	  in their code. The code should typically look like:

	    rc_style = gtk_rc_style_new ();
	    [...]
	    gtk_widget_modify_style (widget, rc_style);
	    gtk_rc_style_unref (rc_style);

	* gtk/gtkwidget.c (gtk_widget_modify_style): Reset
	  the style if it was already set.

	* gtk/gtkwidget.c (gtk_widget_set_name): Only set the
	  style if it was set before.

Thu Sep  2 19:02:37 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (main): Add a check to see if we
	  are being run from the correct directory and
	  to quit nicely if we are not.

	* gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
	  static.

Thu Sep  2 23:00:03 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.

	* gtk/gtkwindow.c:
	queue resizes unconditionally (gtk_widget_queue_resize will figure
	what to do if the window is not realized).
	(gtk_window_move_resize): only recenter the window
	for GTK_WIN_POS_CENTER_ALWAYS.
	(gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
	the same way as GTK_WIN_POS_CENTER.

Thu Sep  2 22:39:27 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c (gtk_window_reposition): check for the last position
	with (!(info->last_flags & GDK_HINT_POS)) instead of
	(!info->last_flags & GDK_HINT_POS).

	* gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
	new_height unconditionally, because we use these values even if
	!default_size_changed && !hints_changed.
	comented the (default_size_changed || hints_changed) case with
	respect to resize rejects from the window manager.

	* gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
	in the zvt condition hack, since this includes the window hints, set
	the hints after the handling_resize case.

	* gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
	window is initially shown with to the geometry.

Thu Sep  2 07:38:56 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c (gtk_window_move_resize):
	s/size_changed/default_size_changed/g so i know what's
	really going on (frying brain on smaller flame now).

Thu Sep  2 05:47:47 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
	we have size_changed upon handling_resize. this is a gross
	workaround for the broken zvt widget and should be removed in
	1.3 again (search for FIXME).
	Owen provided an accurate comment for this:

        /* We could be here for two reasons
         *  1) We coincidentally got a resize while handling
         *     another resize.
         *  2) Our computation of size_changed was completely
         *     screwed up, probably because one of our children
         *     is broken. It's probably a zvt widget.
         *
         * For 1), we could just go ahead and ask for the
         * new size right now, but doing that for 2)
         * might well be fighting the user (and can even
         * trigger a loop). Since we really don't want to
         * do that, we requeue a resize in hopes that
         * by the time it gets handled, the child has seen
         * the light and is willing to go along with the
         * new size. (this happens for the zvt widget, since
         * the size_allocate() above will have stored the
         * requisition corresponding to the new size in the
         * zvt widget)
         *
         * This doesn't buy us anything for 1), but it shouldn't
         * hurt us too badly, since it is what would have
         * happened if we had gotten the configure event before
         * the new size had been set.
         */

Wed Sep  1 20:46:11 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c: deal properly with the fact that RC
	  style lists may include rc styles more than once.

	* gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
	  unused static function.

	* gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
	  stack of directories of RC files currently being
	  parsed and implicitely add them to pixmap path.

	  This fixes a bug where the directory would get
	  appended then overwritten by pixmap_path declarations.

	  (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)

	* gtk/gtkthemes.c (gtk_theme_engine_unref): Call
	  theme's exit function. (Patch from Peter Wainwright,
	  bug #1454)

	* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
	  Add a destroy() handler to take care of removing
	  group for menu item. (Fixes bug #1197)

	* gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
	  in warning message.

Wed Sep  1 21:27:42 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
	roundtrip to figure window's width and height, since we know that
	anyways from widget->allocation.

Wed Sep  1 12:37:44 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_move_resize): Compute
	  the hints after we request the new size.

Wed Sep  1 10:38:37 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_compute_hints): Removed
	  GTK_WIDGET_REALIZED() assertion - we can compute the
	  hints before we are realized.

	* gtk/gtkwindow.c (gtk_window_move_resize): Reorder
	  hint changing so that we have a value of hints_changed
	  when we decide whether to constrain the window size.

	* gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.

	* gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
	change back to G_MAXINT.

Wed Sep  1 06:54:59 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
	new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
	contain uncluttered values.
	(gtk_window_compute_hints): simply assert that window is realized
	and that geometry_info is valid, since we rely on this anyways.
	(gtk_window_constrain_size): major cleanups to the code.
	if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
	for the base size, instead of the minimums. use 32767 as max width
	and height (like in gtkwindow.c) instead of G_MAXINT.

Wed Sep  1 04:41:25 1999  Tim Janik  <timj@gtk.org>

	* cleaned up the GtkContainer.need_resize flag handling mess, we
	only need to force resize requests when we were prematurely
	realized, or our widget tree was modified when we were temporarily
	hidden. handling these cases directly upon showing the window (i.e.
	while the GdkWindow is still unmapped) avoids the need to wait for
	a configure event response and therefore makes the GUI more snappier
	and avoids blank windows during the roundtrip.

	* gtk/gtkwidget.c:
	(gtk_widget_hide):
	(gtk_widget_show): don't queue resizes on toplevels, they know how
	to deal with matters.

	* gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
	flag directly for not visible resize containers and spare us unecessary
	signal emissions.

	* gtk/gtkwindow.c:
	(gtk_window_realize): if we need to enforce premature size allocation,
	queue a container resize so we are correctly resized later on.
	(gtk_window_init):
	(gtk_window_size_request):
	don't freak around with the ->need_resize flag,
	gtk_container_queue_resize() will care about that.
	(gtk_window_show):
	handle initial resizing issues here, we can handle matters better in
	this place, especially since we know that our GdkWindow is still
	unmapped.
	(gtk_window_move_resize):
	don't care about ->need_resize at all.
	handle size changes properly that occoured while we waited for a
	configure event.

Tue Aug 31 15:58:46 1999  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_set_uposition):
        * gtk/gtkwindow.[hc] (gtk_window_reposition):
        Move the hint setting code from gtk_widget_set_uposition
        to here; set the hints so that we respect any previously
        set geometry hints.

        * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
        change the window hints here or move the window here,
        let that happen in gtk_window_move_resize().

Tue Aug 31 06:58:52 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
	to already queued resizes (and therefore redraws) on a widget, check
	its anchestry as well.

	* gtk/gtkcontainer.c:
	(gtk_container_queue_resize): clear resize widgets for resize
	containers before aborting prematurely. this is especially important
	for toplevels which may need imemdiate processing or their resize
	handler to be queued.
	(gtk_container_dequeue_resize_handler): added new internal function for
	gtkwindow.c.

	* gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
	configure event, take possible changes in window position into account
	as well.
	if we request a new window size, queue up a resize handler that will
	last until the configure event response arrives.
	combined the ->need_resize case (initial show) with the general size
	(hints) changed case and added even more comments.
	if !auto_shrink, only revert to the old allocation if the new size
	is smaller than the current allocation.

Tue Aug 31 11:55:20 1999  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
                           gtk_window_set_geometry_hints
                           gtk_window_set_default_size):
        When hints are set, queue a resize so that the hints will
        be eventually reset on the toplevel.

        * gtk/gtkwindow.c (gtk_window_show): Use
        gtk_window_compute_default_size(). Clear the need_resize flag
        on the initail map so that we don't unnecessarily trigger the
        resize code.

        * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
        into separate functions. Compare the hints we are setting
        with what we set last time so that we can accurately
        tell when we need to reset the hints.

        * gtk/gtkwindow.c (gtk_window_compute_default_size): New
        function to figure out the size from requisition
        and default_size.

        * gtk/gtkwindow.c (gtk_window_constrain_size): Function
        from fvwm to constrain a size to the geometry hints.

        * gtk/gtkwindow.c (gtk_window_compare_hints): New function
        to compare two sets of geometry hints.

        * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
        from gtk_window_set_hints(), just compute the hints,
        don't set them.

        * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
        code from gtk_window_move_resize() to separate function,
        rationalize a bit.

Tue Aug 31 13:05:03 1999  Owen Taylor  <otaylor@redhat.com>

	* gtkrc.h: Move the ref_count member out of the GtkRcStyle
	structure into a new private structure.

	* gtkrc.c: Split GtkRcStyle into public/private.
	In the private part, add a list of pointers to the
	RcStyle lists this RcStyle participates in.

	* gtkrc.c: When a RcStyle is free, remove all
	lists referencing it from the
	realized_style_ht hash, and free those lists.

	* gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
	gtk_rc_init(), since that adds the default styles
	to the list of parsed RC files again.

	* gtk/gtkrc.c: Use gtk_rc_style_find() consistently.

Thu Aug 26 14:14:42 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
	checks that ensure that a widget's allocation is at least 1 in width
	and height. (GNOME note: this doesn't affect old panel code anymore,
	because GtkSocket will request width and height of at least 1 since
	Fri Jul 23).

	* gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
	allocated yet (happens if the user realizes the window prematurely),
	size request and allocate it.
	(gtk_window_size_allocate): guard against guint underflows.

Wed Aug 25 19:01:36 1999  Lars Hamann  <lars@gtk.org>

	* gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
 	in gtk_built_sources, so gtk.defs gets built prior to all other
 	sources.

Mon Aug 23 19:11:17 1999  Tim Janik  <timj@gtk.org>

	* gtk/Makefile.am:
	invoke indent on gtkmarshal.*.
	rewrote source generation rules, use COPYING as oldest source tag for
	a piggyback rule to generate all sources from (don't touch it ;).
	major cleanups, strip spaces on build rules for GNU Make.

	* gtk/genmarshal.pl: don't operate on hardcoded filenames but take
	source and target files from commandline arguments. don't invoke indent.

Sat Aug 21 14:07:36 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
	notebook after switch to avoid drawing problems.
	(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)

	(gtk_notebook_pages_allocate): don't map not visible tab_labels,
	show them instead.
	(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)

Sat Aug 21 14:07:36 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
	notebook after switch to avoid drawing problems.
	(Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)

	(gtk_notebook_pages_allocate): don't map not visible tab_labels,
	show them instead.
	(Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)

Wed Aug 18 09:20:10 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c:
	we use window->need_resize from configure_event now, to indicate that
	the gtkwindow should keep its allocation (e.g. because the user resized
	the window through window manager handles). resize_count is now reliably
	used to figure whether we got the allocation we requested from the
	window manager.
	configure events get queued as resizes now, the real stuff (size
	computation and allocation) now only goes on in gtk_window_move_resize().
	GtkWindow's requisition now contains its *real* requisition (like all
	other widgets), *not* taking usize into account.
	geometry_info->last_{width|height} is now updated from set_hints() only
	so it always contains the last hints we set for the window manager.
	made some event handlers return TRUE instead of FALSE.
	the overall code should be much more straight forward now, and the
	significant code portions are accompanied by comments now.
	(gtk_window_set_hints):
	removed requisition argument and made it
	fetch the requisition through gtk_widget_get_child_requisition.
	we also don't move the gdkwindow here anymore, gtk_window_move_resize()
	does that now.
	(gtk_window_show):
	ensure that the widget is realized before calling
	gtk_container_check_resize() (and thus gtk_window_move_resize()), also
	ensure that we got properly size requested and allocated before
	realization.
	(gtk_window_configure_event):
	ignore plain window moves, or reallocate the widget tree through the
	resize queue otherwise.
	(gtk_window_move_resize):
	mostly rewrote this function to figure window manager hints more
	reliably, coalesce window moves and resizes to reduce configure events
	and do actuall size allocations.

Tue Aug 17 07:43:04 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
	that have a resize pending, because a redraw is already queued for them.

	* gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
	hack to clear resize_widgets.

	* gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
	for resize containers prior to size allocation. (this is also a bit
	ugly, but avoids side effects for stopped emissions and is thus more
	reliable).
	(gtk_widget_unparent): removed disconnect call for clear_resize_widgets.

	* gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
	function from gtk_tooltips_expose, as we connect to ::expose_event
	*and* ::draw now.

1999-08-18  Federico Mena Quintero  <federico@redhat.com>

	* gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
	checks.
	(gtk_target_list_unref): Likewise.

	* gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.

Tue Aug 17 15:47:07 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
	guard against division by zero. (Fixes bug #1339)

Tue Aug 17 10:56:49 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_move_{forward,backward}_word):
	Prevent the trivial leak of information of allowing
	word motion when the entry is not visible.

Tue Aug 17 10:28:52 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
	modality to error dialog as well as confirmation dialogs.
	(Bug #1803, reported by Rosanna Wing Sze Yuen)

Wed Aug 11 01:04:57 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
	tree->view_lines.
	(gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)

	* gtk/Makefile.am (install-data-local): Solaris apparently
	has various troubles with ln -f; use rm first instead.
	(gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)

1999-07-30  Raja R Harinath  <harinath@cs.umn.edu>

	* gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
	use `cp' followed by `rm' (the `rm' was already there).

July 30, 1999 Elliot Lee <sopwith@redhat.com>

	* configure.in: Fix autoconf warnings about cross compilation by
	trying to provide sane defaults for AC_TRY_RUN.
	* gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
	put them into $(srcdir) when generated. Also add a dependency of
	gtksignal.h on gtkmarshal.h for -j builds.
	* gtk/gtk(dnd,style,gamma).c: Minor warning fixes.

Wed Jul 28 09:29:19 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_main_iteration_do): Added missing
	GDK_THREADS_{LEAVE,ENTER} pair.
	(From Paul Fisher <pnfisher@redhat.com>)

Fri Jul 23 01:00:15 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
	width and height are always >0 (owen).

Fri Jul 23 00:00:47 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
	change that assured that a widget's allocated with and height are
	always >1, since this breaks *buggy* panel code. unfortunately this
	back-breaks the gimp's color selector.

	* gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
	allocation is always >0 in width and height, before sending the
	configure event; this is a *gross* hack to get the gimp back to work.

	* marked both cases with TODO-1.3

Wed Jul 21 15:47:39 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c: Don't display wrap indicators when
	text is not editable and word wrap is on.

Wed Jul 21 08:21:40 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
	option menus here as they are not derived from menu shell, assure that
	the option menu has a menu we can add items to.

Tue Jul 20 23:29:48 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
	width/height to (gint) before calculations and check against < 0 to
	avoid guint wraparounds.

Sun Jul 18 00:35:49 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
	width and height is never zero. sanity check both dimensions against
	32767 and issue a warning if the allocation is greater than that.

Wed Jul  7 15:03:30 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_events_pending): Unlock around call
	to g_main_pending() as well.

Wed Jul  7 14:59:01 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_main_iteration): Unlock around
	call to g_main_iteration() - since that will regrab
	GTK+ lock to process events.

Thu Jul  1 15:01:55 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c
	- Regularize with the rest of GTK+ by making widget->requisition
	  not reflect the set_usize()
	- Always recompute geometry hints, then check if they
	  changed before sending them to the X server. The
	  previous checks for changes would fail in a number
	  of circumstances.

Thu Jul  1 11:55:59 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkstyle.c: Include <stdlib.h> for strcmp().

Wed Jun 30 19:26:36 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdnd.c:
	- Code cleanups
	- Instantaneously update on modifier key presses
	- Allow cancellation of the drag with Escape.

Tue Jun 29 17:04:09 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (create_handle_box): Set the policy
	to auto_shrink - otherwise the appearance is rather
	strange when flipping between horizontal and vertical.

Mon Jun 28 09:29:52 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
	(gtk_window_set_default_size): don't change a value if it's < 0.
	queue a resize.

Sun Jun 27 11:00:33 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.

Mon Jun 28 12:08:25 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
	add an extra "/" when concating "/" + filename.
	(From Matt Grossman <mattg@oz.net>)

Mon Jun 28 10:57:12 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
	for fg_gc if we set it for drawing pixmap.

Tue Jun 15 12:45:12 1999  Owen Taylor  <otaylor@redhat.com>

        Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>

	* gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
	already set, call old engine's destroy function and
	unref the old engine.

Thu Jun 10 17:59:38 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.

Wed Jun  9 15:13:16 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkaccelgroup.h: mark certain functions as internal.

Wed Jun  9 13:48:28 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
        expand behaviour changed.

        * gtk/gtklabel.c (gtk_label_set_pattern):
        (gtk_label_set_justify):
        (gtk_label_set_line_wrap):
        don't bother invoking queue_clear, the reallocation does
        that for us, always free_words so the upcoming resize will
        relayout the label's contents.

Wed Jun  9 12:50:48 1999  Tim Janik  <timj@gtk.org>

        * applied argument implementation patches from Elena Devdariani
        <elena@cogent.ca>.

        * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
        ::space_style, ::relief
        * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
        * gtk/gtkpreview.c: ::expand
        * gtk/gtkpaned.c: ::handle_size, ::gutter_size
        * gtk/gtknotebook.c: ::homogeneous
        * gtk/gtklabel.c: ::wrap
        * gtk/gtklist.c: ::selection_mode
        * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
        * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
        * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
        * gtk/gtkclist.c: ::sort_type
        * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
        * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child

Tue Jun  1 23:38:38 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkstyle.c: Removed ill-thought-out part of last
	comment.

Tue Jun  1 23:30:09 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkstyle.c (gtk_style_attach): Get the reference
	counting right when we have to attach a new style
	for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)

	* gtk/gtkstyle.c: Documented the refcounting
	peculularities of gtk_style_attach.

1999-06-01  Tim Janik  <timj@dhcpd7.redhat.com>

	* gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
	window types.

	* examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
	of GTK_TOPLEVEL for creating the window.

1999-06-01  Tim Janik  <timj@dhcpd7.redhat.com>

	* gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
	the last argument (reported by Per Winkvist).

Tue May 25 13:13:12 1999  Owen Taylor  <otaylor@redhat.com>

        Fixes for invisible XOR lines (Frank Loemker
	<floemker@TechFak.Uni-Bielefeld.DE>)

	* gtk/gtkclist.c (gtk_clist_realize): Always use
	a non-zero pixel for GDK_XOR.

	* gtk/gtkvpaned.c gtk/gtkhpaned.c:
	Use GDK_INVERT instead of GDK_XOR.

Wed May 12 21:56:40 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
	signals if h/voffsets differ from adjustment values.
	Reportet by Jerome Bolliet <bolliet@in2p3.fr>

Mon May 10 04:20:41 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
	::selection-done emissions up to the topmost menu shell.

Fri May  7 10:15:14 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
	the user data on the window before destroying it.

	* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
	unrealize handler to take care of destroying
	notebook->panel properly.
	(Bug #1198 - Morten Welinder <terra@diku.dk>)

	* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
	of g_new and g_realloc to stop memory leak. (Actually,
	we could just use g_realloc(), but I'm not 100% sure
	that is portable).
	(Bug #1196 - Morten Welinder <terra@diku.dk>)

Wed Apr 21 00:42:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.

	* gdk/gdkfont.c (gdk_text_measure): Fix the return value
        for fontsets.

	* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
	with bin/button confusion.

Thu May  6 04:53:26 1999  Tim Janik  <timj@gtk.org>

	* gtk/testgtk.c: in the ItemFactory test, link radio items together,
	and show how preselection of radio items is done.

Sun May  2 13:31:14 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
	* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
	* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
	* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
	* gtk/gtktable.c (gtk_table_attach):
	* gtk/gtklist.c (gtk_list_insert_items):
	* gtk/gtkmenushell.c (gtk_menu_shell_insert):
	* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
	* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
	* gtk/gtkbin.c (gtk_bin_add):
	* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
	* gtk/gtkfixed.c (gtk_fixed_put):
	* gtk/gtklayout.c (gtk_layout_put):
	general fixups to container_add logic. always realize child if
	child->parent is realized, only map the child and queue a resize
	if child and child->parent are both visible.

Fri Apr 30 09:02:28 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
	instead of gtk_container_foreach to walk and unrealize children, so
	composite children get also unrealized.
	(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
	(gtk_widget_map): assert that the widget is visible (basic constrain).
	(gtk_widget_real_map): assert that the widget is realized (basic
	constrain).

Fri Apr 29 00:53:20 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.

Tue May  4 09:32:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
	file for iso-8859-2 locales.

	* configure.in (ALL_LINGUAS): ALL_LINGUAS update.

Tue Apr 27 16:38:32 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
	 (Pointed out by andy@rz.uni-karlsruhe.de and others).
	 Remove some suspicious and useless lines.

Tue May  4 08:44:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
	width,height = 0, 0 to mean - here to edge of window,
	instead of -1, -1, since the former is all we support.

Tue May  4 08:34:43 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_main): Correctly free list nodes
	when removing from quit_functions list.

Tue Apr 27 14:17:16 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.

Tue Apr 27 18:23:35 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
	 When redrawing characters on non-visible entry, use appropriate
	 '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)

Tue Apr 27 01:31:40 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkclist.c (drag_dest_cell): compute destination cell
	from drag coordinates.
	(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
 	use drag_dest_cell.

	* gtk/gtktree (drag_dest_cell)
	(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
	(Bug #1129)

Wed Apr 21 21:26:11 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
	translate_* fields.
	(gtk_item_factory_finalize): invoke translate_notify independant from
	translate_data.
	(gtk_item_factory_set_translate_func): likewise.
	(gtk_item_factory_destroy): only remove ifactory pointer from those
	widgets that belong to us (stupid me).

Mon Apr 19 12:05:31 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
	rc_style list when lookup succeeeds.

Thu Apr 15 01:11:24 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkctree.c (resync_selection):
	* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
	* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
 	bug.

Fri Apr  9 19:22:19 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
	Add some missing GDK_THREADS_ENTER()/LEAVE around
	timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)

Thu Apr  8 20:10:33 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
	rather than emit_by_name.

	* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
	on the widget across multiple signal emissions.
	(gtk_editable_delete_text): same here.
	(gtk_editable_class_init): set widget_class->activate_signal after
	editable_signals[ACTIVATE] has been created.

Wed Apr  7 22:59:47 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
	position here prematurely -- we might not have the
	right ->min_position and ->max_position yet.

Tue Apr  6 16:38:51 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
	Add error traps so if the other end of the connection
	dies, we survive.

	* gtk/gtkselection.c (gtk_selection_notify): Clean
	up properly when selection property retrieval fails.

	* gtk/gtkselection.c (gtk_selection_request): Correctly
	reject SelectionRequest notifies where the handler
	returns no data.

Tue Apr  6 12:24:21 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
	when we've previously highlighted.

	* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
	emit two "drag_leave" signals for Motif drops.

	* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
	back the correct status messages when dropping from
	Motif onto a proxy window that is rejecting the
	drop.

Sat Mar 27 23:32:13 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
	the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
	to compare two argument values. added gtk_arg_to_valueloc() to set a
	variable from an arg through its location (pointer).

	* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
	gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
	as gfloat*, uchars are collected as guchar*, ints are collected as
	gint*, etc...

Mon Mar 29 17:45:47 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
	Include <string.h> instead of <strings.h>.

	* gtk/gtkstyle.c: Fix double include of gtkthemes.h
	(actually, a lot more duplicate includes occur if
	 you trace through the sequence of #include's)
	gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu

Mon Mar 29 17:02:58 1999  Owen Taylor  <otaylor@redhat.com>

        Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
	gtk-a-higuti-990322-[0-3]

	* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
	that was causing -DX_LOCALE not	to work.

	* gtk/gtkrc.c (gtk_rc_init):
	X_LOCALE will never have LC_MESSAGES defined

Thu Mar 25 12:38:31 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
	g_get_home_dir() (gtk-pmc-990123-0.patch.gz).

	* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
	left/right as well (gtk-michael-980726-0.patch.gz).

	* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
	for pointer values, use gchar instead of char. fixed uline allocation
	leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
	chunks instead of G_ALLOC_ONLY.
	(gtk_label_size_request): always alter requisition as passed and leave
	widget->requisition alone.
	(gtk_label_set_text): allow NULL strings.
	(gtk_label_new): likewise.

Wed Mar 24 09:24:03 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkdrawingarea.[hc]: type/macro fixups.

Mon Mar 22 05:51:34 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
	*and* mapped (i.e. drawable).
	(gtk_bin_expose): only send exposes to drawable children.

	* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
	(gtk_box_expose): only send exposes to drawable children.

	* gtk/gtkhscale.c (gtk_hscale_draw):
	* gtk/gtkvscale.c (gtk_vscale_draw):
	hm, this is an ugly one. we first compute the size of our trough area
	here (window relative) and then check intersection with the draw_area
	which is parent relative because we're a NO_WINDOW widget, so we need
	to offset the trough area by allocation.x and allocation.y before the
	check. (this must not be done for the background area though, since
	that's already computed parent relative).

Mon Mar 22 00:41:39 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
	unrealize title buttons.

Fri Mar 19 00:00:22 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkclist.c (gtk_clist_column_title_passive)
	(gtk_clist_column_title_active):
	only connect/disconnect to GtkWidgetClass::event to block mouse events.

	* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
	zero initialize event, removed superfluous gdk_window_get_pointer call

	* gtk/gtklist.c (gtk_list_vertical_timeout)
	(gtk_list_horizontal_timeout): removed superfluous
 	gdk_window_get_pointer call

Wed Mar 17 09:00:00 1999  Tim Janik  <timj@gtk.org>

	* plugging problems reported by "Bruce Mitchener, Jr."
	<bruce@puremagic.com> due to a purify session.

	* gtk/gtkstyle.c:
	(gtk_style_ref):
	(gtk_style_unref): assert ref_count to be > 0.

	* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
	the requisition.
	(gtk_clist_set_shift): likewise.

	* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
	adjustments.

	* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
	event before sending it and set send_event to TRUE (which needs to
	be done for *all* synthesized events).
	(gtk_list_vertical_timeout): likewise.

	* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
	leaks.

	* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
	to TRUE when synthesizing events.

[ *** end of merges from 1.2 *** ]
1999-11-22 21:52:50 +00:00
Owen Taylor
43529d911c Substitute gdkx.h => gdkprivate.h since we need to accesss only
Mon Nov  8 16:40:43 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Substitute gdkx.h => gdkprivate.h since
	we need to accesss only ->children. We need an accessor
	for the children.

	* gtk/gtkhandlebox.c gtk/testgtk.c: Substitute G
	DK_ROOT_PARENT() => NULL, in call to gtk_window_get_pointer()
	to get rid of gdkx.h include.

	* gtk/gtkctree.c: Get rid of #include <gdk/gdkx.h>
	and random references to 'None'.

	* gtk/gtkclist.c gtk/gtkeditable.c gtk/gtkpreview.c
	Get rid of unused #include <gdk/gdkx.h>

	* gtk/gtkrc.c gtk/gtkmain.c: Get rid of #include <gdk/gdkx.h>
	gdkx.h is _X_ specific stuff. GDK_WINDOWING comes from
	gdkconfig.h.
1999-11-08 22:33:28 +00:00
ÉRDI Gergo
b196167dbc This is an implementation of Idea #13 from
http://www.jcinteractive.com/gnome-ui/software/widgets/
basically, layouting the toolbar icon and label horizontally.
1999-10-02 17:13:09 +00:00
Tor Lillqvist
0b4d29fd6e Merge in Win32 version: Define macro GDKVAR for declaring gdk variables
* gdk/gdktypes.h: Merge in Win32 version: Define macro GDKVAR for
declaring gdk variables exported/imported from the DLL. New image
type enum, GDK_IMAGE_SHARED_PIXMAP, for gdk_imlib. New drag and
drop protocol enums, GDK_DRAG_PROTO_WIN32_DROPFILES and
GDK_DRAG_PROTO_OLE2.

* gdk/gdk.h: Merge in Win32 version: Two new functions,
gdk_pixmap_create_on_shared_image and gdk_image_bitmap_new. So far
declared only for the Win32 version, but could be in the X11
version as well. (Needed for a Xlib-less gdk_imlib.)
gdk_color_hash should have only one parameter. Declare
gdk_threads_mutex with GDKVAR.

* gdk/gdkcolor.c (gdk_color_hash): As a hash function should have
just one parameter.

* gdk/gdkimage.c (gdk_image_get): Initialize bpp correctly. Bytes
per pixel, not bits.

* gdk/gdkrgb.c: Mingle includes somewhat. (gdk_rgb_select_conv):
Fetch bpp (which means bits-per-pixel here) from another place on
Win32. Accept also depth==32 (which we might get on Win32) with
bpp==32.

* gtk/{gtkclist,gtkctree,gtkdnd,gtkditable,gtkfontsel,
gtkhandlebox,gtklayout,gtkmain,gtkplug,gtkpreview,gtkrc,
gtkselection,gtksocket,gtkstyle,gtkwidget,gtkwindow}.c:
Include gdx.h from "gdkx.h", not "gdk/gdkx.h", as gdkx.h will be
in the backend-dependent directory, not in the common gdk
directory.

* gtk/testgtk.c: Ditto. Also, don't use ../gdk patchs to gdk
headers.
1999-03-17 23:02:10 +00:00
Tim Janik
f045ba415a Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
Wed Mar 17 01:46:28 1999  Tim Janik  <timj@gtk.org>

        * merges from gtk-1-2:

Tue Mar 16 17:43:33 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
        item factory class has been created.
        (gtk_item_factory_parse_rc): likewise.

        * gtk/gtkmenu.c:
        keep proper references for old_active_menu_item.
        (gtk_menu_reparent): unset the usize of the new parent,
        so the menu can sanely be size requested and we don't get nasty screen
        artefacts upon next reparentation.
        (gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
        enter notify. only synthesize enter notifies if the pointer really is
        inside the event window.
        (gtk_menu_popdown): use gtk_menu_shell_deselect().
        (gtk_menu_popup): move the background setting stuff into
        gtk_menu_tearoff_bg_copy() so it can be called from other places as well.

        * gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
        gtk_menu_shell_select_item() to select the new item.
        (gtk_menu_shell_deselect): export this function, so gtkmenu.c can
        do the right thing for deselection as well.

Sat Mar 15 20:10:33 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.[hc]:
        (gtk_widget_accelerators_locked): return whether a widget's accelerators
        are locked.

        * gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
        existing accelerators if the widget's accelerators are locked.

Sat Mar 14 19:44:05 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.

        * gtk/gtkmenu.c: truely forward key press and key release events to
        the menu widget from the toplevel or tearoff window. we can't simply
        connect to that, we need to stop further processing of the events as
        well.

Sat Mar 13 13:14:17 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenu.c:
        (gtk_menu_key_press): pass event->keyval, event->state to
        gtk_accelerator_valid, instead of event->keyval twice.
        refuse to install single letter accelerators for menus that use
        single letter shortcuts.

        * gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
        gtk_menu_ensure_uline_accel_group().

        * gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
        which will always return an uline accel group, made
        gtk_menu_get_uline_accel_group() return NULL if the group isn't
        yet created.

Mon Mar 15 01:03:27 1999  Lars Hamann  <lars@gtk.org>

        * gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.

        * gtk/gtkclist.c (gtk_clist_column_title_passive):
        Leave button sensitive, trap  button_press, button_release,
        motion_notify, enter_notify and leave_notify events instead.
        (gtk_clist_column_title_active): disconnect event handler.
        (gtk_clist_drag_data_get): fixed memory leak. Reported by
        Guillaume Laurent <glaurent@worldnet.fr>

Wed Mar 10 23:49:55 1999  Lars Hamann  <lars@gtk.org>

        * gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
        width/height mixups.

        * gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
        if needed.

Wed Mar 10 00:11:32 1999  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c (create_item_factory): unref the item factory after
        window's destruction.

        * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
        count on the menu shell around the menu item's activation, since the
        signal emission may cause menu shell destruction.

        * gtk/gtkitemfactory.c:
        the previous code leaked one accel group per menu. we use
        gtk_menu_get_uline_accel_group() now to fix that, and with that
        also create the underline accelerator group of the menus only if
        required (i.e. an underline accelerator has been specified).
        (gtk_item_factory_construct):
        (gtk_item_factory_create_item): removed code that would create an
        extra accel group for the menu (and leak references).
        (gtk_item_factory_create_item): adapted the underline accelerator
        installation code to properly feature gtk_menu_get_uline_accel_group().

        * gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
        menu->accel_group, this may return NULL if the accelerator group
        hasn't been set yet.
        added gtk_menu_get_uline_accel_group() to retrive the underline
        accelerator group of the menu, this will be created on demand
        and proper care is taken about its reference count.

        * gtk/gtkitemfactory.h:
        * gtk/gtkitemfactory.c:
        dumped the approach of keeping a widgets by action list on the
        factory since the factory<->widget destroy negotiation didn't work
        and would be hard to get going at all. instead we keep a list of
        GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
        persistant throughout a program's life time).
        also, i removed the static const gchar *key_* variables, and made
        them inline strings (they weren't actually used anyways).
        (gtk_item_factory_add_item): update ifactory->items.
        (gtk_item_factory_destroy): destroy ifactory->items (and remove
        the item factory pointer from the remaining ifactory widgets).
        (gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
        list to find the widget.
        (gtk_item_factory_get_item): new function that works around
        gtk_item_factory_get_widget() limitations, this function will only
        return menu items, even for <Branch> entries.

Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>

        * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
        font hash table, if we have a GdkFontPrivate entry for this font
        already, simply increment its reference count, provided by Olaf Dietsche
        <olaf.dietsche+list.gtk@netcologne.de>.

        * gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
        provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.

Sun Mar  7 06:13:29 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkcontainer.c:
        (gtk_container_add_with_args):
        (gtk_container_addv):
        (gtk_container_add): before adding a child to a conatiner, make sure
        it is (default) constructed, this is neccessary because under certain
        circumstances the child will get relized and mapped immediatedly, in
        which case it has to be constructed already.

Mon Mar  1 17:58:21 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
        values > 1 as TRUE also.
1999-03-17 01:39:42 +00:00
Stefan Jeske
209f5d5cd4 Added two new signals to GtkSpinButton, "input" and "output", to make the
* gtk/gtkspinbutton.[c,h] gtk/testgtk.c: Added two new signals to
	GtkSpinButton, "input" and "output", to make the output more flexible.
 	The user has to provide a mapping between adjustment->value and the
 	output string (and vice versa, if the spin button is editable).
	See testgtk for examples.
1999-02-28 16:04:47 +00:00
CST 1999 Shawn T. Amundson
279e878bdd Added notice to look in AUTHORS and ChangeLog files for a list of changes.
Wed Feb 24 01:22:39 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * *.[ch]: Added notice to look in AUTHORS and ChangeLog files
	  for a list of changes.
1999-02-24 07:37:18 +00:00
Owen Taylor
bf39d4cda9 Use a ScrolledWindow test how Text widgets work within ScrolledWindow.
Mon Feb 15 23:55:27 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (create_text): Use a ScrolledWindow
	 test how Text widgets work within ScrolledWindow.
	 (POLICY_AUTOMATIC drew very badly, so it uses
	  POLICY_ALWAYS for the vscrollbar)

	* gtk/gtktext.c (gtk_text_unrealize): Free the cache
	 in the unrealize handler. Some code in gtktext.c
	 assumes that if text->line_start_cache is non-NULL,
	 the widget is realized. We'll recompute it again
	 anyways if we later re-realize.
1999-02-16 04:52:21 +00:00
Lars Hamann
1f85d83ef3 don't autoselect focus_row in case of GTK_SELECTION_EXTENDED
Fri Feb 12 00:08:01 1999  Lars Hamann  <lars@gtk.org>

        * gtk/gtklist.c (gtk_list_remove_items_internal): don't autoselect
        focus_row in case of GTK_SELECTION_EXTENDED

        * gtk/testgtk.c : few changes in list example.

        * gtk/gtklistitem.c (gtk_list_item_class_init):
        * gtk/gtkctree.c (gtk_ctree_class_init):
        * gtk/gtkclist.c (gtk_clist_class_init):
        fixed indentation, removed unused key bindings
1999-02-11 23:47:48 +00:00