Commit Graph

370 Commits

Author SHA1 Message Date
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
Jonathan Blandford
f19af6f49c Massive reordering/sorting work. Now pretty much works.
Thu Mar 29 16:29:12 2001  Jonathan Blandford  <jrb@webwynk.net>

	* gtk/gtkliststore.c (gtk_list_store_iter_changed): Massive
	reordering/sorting work.  Now pretty much works.

	* gtk/gtkrbtree.c (_gtk_rbtree_reorder): Lots of work to make
	reorder mostly work.  Still need to get the parity correct.

	* gtk/gtktreeviewcolumn.c: Listen for "model" property changed
	signal, so I can listen for the sort_column_changed signal so I
	can change my "sort_indicator" property.  Cool.
2001-03-29 21:30:05 +00:00
Chookij Vanatham
1c537e5853 Added Thai UTF-8 text which also has the wrong written syntax. 2001-03-29 18:18:46 +00:00
Owen Taylor
1586ade9c5 Add missing NULL on valist.
Wed Mar 28 19:20:43 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/testtext.c (create_buffer): Add missing NULL on
	valist.

	* gtk/gtkcheckmenuitem.c (gtk_check_menu_item_class_init): Fix
	c-n-p problem with INCONSISTENT property.

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

	* gtk/gtkentry.h (struct _GtkEntryClass): add same populate_popup
	hook.

	* gtk/gtktextview.h (struct _GtkTextViewClass): add populate_popup
	signal as a hook for extending the default popup menu

	* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
	use radio menu items for the input method menuitems

	* gtk/gtkimcontextsimple.c (check_hex): do better validation of
	inserted unicode from Ctrl-Shift-hex input method

	* gtk/gtktextbtree.c (_gtk_text_btree_insert): remove utf8
	validatation here, already done at GtkTextBuffer level.

	* gtk/gtkwidget.c (gtk_widget_class_init): add binding set, add
	popup_menu run action signal and Shift+F10 and Menu keybindings.

	* gtk/gtkentry.c: implement a default handler for popup_menu

	* gtk/gtktextview.c: implement a default handler for popup_menu

	* gtk/gtkmenu.c (gtk_menu_popup): select first item if popup is
	from a key event

	* gtk/gtklabel.c: remove "trailer" cruft
2001-03-29 00:24:58 +00:00
Jonathan Blandford
ed6076b2e0 new function to handle reordering of trees. Seems to mostly work w/ the
Wed Mar 28 17:27:12 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkrbtree.c (_gtk_rbtree_reorder): new function to
	handle reordering of trees.  Seems to mostly work w/ the exception
	of the parity flag.

	* gtk/gtktreeview.c (gtk_tree_view_reordered): handle "reordered"
	signal.
2001-03-28 22:27:20 +00:00
Jonathan Blandford
6e7b8a6722 Fix arguments to reordered signal.
Tue Mar 27 22:07:44 2001  Jonathan Blandford  <jrb@webwynk.net>

	* gtk/gtkliststore.c (gtk_list_store_sort): Fix arguments to
	reordered signal.

	* tests/testtreesort.c (main): fix spelling.
Bad Jonathan.  Don't break the tree.
2001-03-28 03:09:03 +00:00
Jonathan Blandford
88bbc2a534 More work on implementing sortable interface.
Tue Mar 27 20:55:29 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkliststore.c: More work on implementing sortable
	interface.
2001-03-28 01:54:14 +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
ac68581f96 added rc-style argument GtkSpinButton::shadow_type. removed
Sun Mar 18 01:15:30 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkspinbutton.[hc]: added rc-style argument
        GtkSpinButton::shadow_type.
        removed spin_button->shadow_type, gtk_spin_button_set_shadow_type()
        and ARG_SHADOW_TYPE as it doesn' make much sense to try to override
        rc-style settings.

        * gtk/gtkfixed.c: removed gtk_fixed_paint() (was unused).

        * gtk/gtkwidget.c: quark cleanups.

        * gtk/gtkrc.[hc]: added gtk_rc_scanner_new() to create an rc-file
        scanner with appropriate configuration, renamed GtkRcStyleClass.clone
        to create_rc_style() (we don't do cloning in standard OO sense).
        added per rc style properties.

        * gtk/gtkstyle.[hc]: added code to retrive pspec conformant rc-style
        property values and for caching those. some cleanups.

        * gtk/Makefile.am: -DG_DISABLE_CONST_RETURNS.

        * gtk/gtksettings.[hc]: new file for global rc-file properties
        (at least currently, should get extended to support X properties
        and other communication mechanisms).

        * gtk/gtkwidget.[hc]: added style property support:
        (gtk_widget_class_install_style_property_parser): install style
        property pspec with parser function for rc-file values other
        than LONG, DOUBLE or STRING.
        (gtk_widget_class_install_style_property): same as above without
        parser (parsers are going to be needed quite infrequently).
        (gtk_widget_style_get_property): retrive style property value.
        (gtk_widget_style_get_valist): same as above with varargs support,
        has NOCOPY semantics.
        (gtk_widget_style_get): wrapper around gtk_widget_style_get_valist().
2001-03-18 04:50:34 +00:00
Jonathan Blandford
4d4af2941e s/GTK_TREE_COLUMN/GTK_TREE_VIEW_COLUMN
Fri Mar 16 18:01:17 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeviewcolumn.[ch]: s/GTK_TREE_COLUMN/GTK_TREE_VIEW_COLUMN

	* gtk/gtktreeview.c (gtk_tree_view_row_activated): New signal.

	* gtk/gtktreeview.c (gtk_tree_view_destroy): moved pretty much
	everything into the ::destroy function, and freed a lot more.
2001-03-16 22:59:24 +00:00
Havoc Pennington
e7a21a2eec add varargs for properties to set on the tag.
2001-03-15  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_create_tag): add varargs
	for properties to set on the tag.

	* gtk/testtext.c: fixups to reflect create_tag change

	* gtk/gtktexttag.c (gtk_text_tag_set_property):
	background/foreground stipple are objects, not boxed.

	* demos/gtk-demo/textview.c: intellihancing
2001-03-16 19:32:20 +00:00
Jonathan Blandford
e4d1660042 Changed prototype to allow for getting the location of the cell relative
Thu Mar 15 18:22:44 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderer.h: Changed prototype to allow for getting
	the location of the cell relative to its area.
	* gtk/gtkcell*: modified for above change
	* gtk/gtktreeview.c: modified for above change.

Wed Mar 14 13:58:32 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Ref the model.
	 (gtk_tree_view_finalize): actually unref the model.  Thanks to
	Jamie Strachan <frostfreek@yahoo.com> for noticing this error.
2001-03-15 23:21:39 +00:00
Jonathan Blandford
cf89a05f07 Fix up focus code a lot.
Mon Mar 12 21:02:08 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_header_focus): Fix up focus
	code a lot.

	* gtk/gtktreedatalist.c (_gtk_tree_data_list_free): use
	g_mem_chunk.
	(_gtk_tree_data_list_alloc): use g_mem_chunk.
	(_gtk_tree_data_list_node_to_value): Fix to switch on
	G_TYPE_FUNDAMENTAL.
	(_gtk_tree_data_list_value_to_node): Fix to switch on
	G_TYPE_FUNDAMENTAL.
	(_gtk_tree_data_list_node_copy): Fix to switch on
	G_TYPE_FUNDAMENTAL.
2001-03-13 02:00:37 +00:00
Jonathan Blandford
bd10a077cd add support for invisible cells. (gtk_tree_view_bin_expose): ditto
Thu Mar  8 17:40:09 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon): add
	support for invisible cells.
	 (gtk_tree_view_bin_expose): ditto

also, forgot to commit tests/testtreeview.c last commit
2001-03-08 22:38:59 +00:00
Jonathan Blandford
ce9d9a4a56 add prerequesite on gobjects.
Thu Mar  8 16:36:00 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c (gtk_tree_model_get_type): add prerequesite
	on gobjects.

	* tests/testtreefocus.c (main): New test file.

	* tests/testtreeview.c: update to latest glib changes.

	* tests/testtreecolumns.c: update to latest glib changes.
2001-03-08 21:36:34 +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
Tim Janik
06718ecfed added accumulator data argument to g_signal_newc() functions.
Thu Mar  8 16:51:21 2001  Tim Janik  <timj@gtk.org>

        * *.c: added accumulator data argument to g_signal_newc()
        functions.

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_model):
        * gtk/gtktreeview.c (gtk_tree_view_setup_model):
        * gtk/treestoretest.c (make_window):
        s/g_signal_connect/g_signal_connectc/.

        * gtk/gtktextbuffer.c: completed signal arg fixups,
        they also needed G_SIGNAL_TYPE_STATIC_SCOPE flag.
2001-03-08 16:36:17 +00:00
Owen Taylor
85af79635a Make G_CONST_RETURN.
Thu Mar  8 00:02:30 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.[ch] (gtk_widget_get_name): Make
	G_CONST_RETURN.

	* gtk/gtkwidget.[ch] gtk/gtkprivate.h: Add a
	::hierarchy-changed signal when a widget changes
	from anchored to unanchored or vice versa.
	(anchored means
	 gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW) != NULL.)
	Use a private flag to keep track of this efficiently.
2001-03-08 06:14:43 +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
Jonathan Blandford
3b2ffda1f5 renamed "child_toggled" to "has_child_toggled".
Mon Mar  5 14:38:54 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c: renamed "child_toggled" to
	"has_child_toggled".

	* gtk/gtktreeview.c: Handle removing columns better.  Updated to
	handle new signal name.

	* gtk/gtktreestore.c: Updated to handle new signal name.
	* gtk/gtklisttore.c: Updated to handle new signal name.
	* gtk/gtktreemodelsort.c: Updated to handle new signal name.
2001-03-05 19:43:24 +00:00
Owen Taylor
efefd9f0ba Add plug-socket tests. (Won't work worth a darn until I commit the rest of
Sat Mar  3 13:21:27 2001  Owen Taylor  <otaylor@redhat.com>

	* tests/Makefile.am tests/testsocket.c	tests/testsocket_child.c:
        Add plug-socket tests. (Won't work worth a darn until I commit
        the rest of the plug-socket changes, but no reason these
        can't go into CVS now.)
2001-03-03 18:23: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
Sven Neumann
ef08542c4f shut up CVS 2001-03-02 10:10:22 +00:00
Jonathan Blandford
193bed1896 Move handling of buttons fully in gtktreeviewcolumn. This code is less
Thu Mar  1 19:50:56 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_realize_button):
	Move handling of buttons fully in gtktreeviewcolumn.  This code is
	less interrelated then it was, but it still requires the
	GtkTreeView to map it.

	* test/testtreecolumn.c: Now I can add a column to one view,
	remove it, add it to the another view, remove it, then re-add it
	to the first.  Nifty.
2001-03-02 00:49:32 +00:00
Jonathan Blandford
c82dc58f7f Proxy out to _gtk_tree_row_reference_deleted. (inserted_callback): Proxy
Tue Feb 27 19:32:53 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c (deleted_callback): Proxy out to
	_gtk_tree_row_reference_deleted.
	(inserted_callback): Proxy out to
	_gtk_tree_row_reference_inserted.
	(_gtk_tree_row_reference_new_from_view): Somewhat yukky hack to
	get around signal emission ordering problem.

	* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
	fix to work with SINGLE
	(_gtk_tree_selection_internal_select_node): Major sanitization on
	selections.  SINGLE now seems to work.

	* tests/Makefile.am: add testtreecolumn.c:

	* tests/testtreecolumn.c: New test.  Mostly points out selection
	bugs currently, but will test columns later.

	* gtk/gtkrbtree.c (_gtk_rbtree_remove_node): Fix really nasty
	selection bug.  I hate touching this code -- it's scary.
2001-02-28 00:35:25 +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
Alexander Larsson
699c933422 Add a "markup" property.
2001-02-20  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkcellrenderertext.[ch]:
	Add a "markup" property.

	* gtk/treestoretest.c:
	Use the markup property, remove some leftover stuff from
	GtkTreeModelMapping.
2001-02-20 16:16:22 +00:00
Havoc Pennington
bc31a1bcca add insert_child_anchor signal, bug #50245
2001-02-19  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbuffer.h (struct _GtkTextBufferClass): add
	insert_child_anchor signal, bug #50245

	* gtk/gtktextbtree.c (_gtk_text_btree_insert_child_anchor): change
	from create_child_anchor, so the anchor is passed in

	* gtk/gtktextchild.c (gtk_text_child_anchor_new): new function
	(_gtk_widget_segment_new): have the child anchor object passed in,
	instead of creating it.

	* gtk/gtktextbuffer.c (gtk_text_buffer_modified): rename
	to gtk_text_buffer_get_modified
2001-02-19 23:27:27 +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
9
1f6effe99b Comment out property assignments, these don't work yet.
2001-02-19    <alla@lysator.liu.se>

	* gtk/testgtkrc:
	Comment out property assignments, these don't work yet.
2001-02-19 13:58:35 +00:00
Jonathan Blandford
b10825d537 removed gtk_*_store_get, and moved to GtkTreeModel.
Fri Feb 16 17:49:59 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.[hc], gtk/gtkliststore.[ch]: removed
	gtk_*_store_get, and moved to GtkTreeModel.

	* gtk/gtktreemodel.h (gtk_tree_model_set{v,}): Added

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_finalize): added.

	* gtk/Makefile.am: remove gtktreemodelmapping.[ch]

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_func): let you
	set the func.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data):
	freeze/thaw notify between setting all the properties for a cell.

	* gtk/gtk.h: remove gtktreemodelsimple.h, and gtktreemodelmapping.h
2001-02-17 00:16:08 +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
Alexander Larsson
29f16cc671 New files. Implement GtkTreeModelMapping.
2001-02-16  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtktreemodelmapping.[ch]:
	New files. Implement GtkTreeModelMapping.

	* gtk/Makefile.am:
	Add gtktreemodelmapping.[ch].

	* gtk/gtk.h:
	Add gtktreemodelmapping.h

	* gtk/treestoretest.c:
	Test the GtkTreeModelMapping
2001-02-16 18:16:14 +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
Havoc Pennington
4a3c8a367a remove validation idle
2001-02-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
	validation idle

	* demos/gtk-demo/main.c (create_tree): adjust to changes in text
	cell renderer

	* demos/pixbuf-demo.c (timeout): remove deprecated
	gtk_widget_draw

	* demos/testpixbuf-save.c (main): remove deprecated
	gtk_drawing_area_size

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
	buttons even if the model isn't setup. gtk_tree_view_check_dirty()
	at the start of the allocation.
	(gtk_tree_view_check_dirty): handle column->button == NULL, handle
	unsetup or NULL model.

	* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
	even/odd/sorted cells in the tree view.

	* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
	bugfixes

	* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
	backgrounds with draw_flat_box using different detail for even/odd
	rows.

	* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
	row, so we can draw the alternating colors thing

	* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
	property from a synonym property, notify for the synonym.
	Also, nuke the background_gdk_set and foreground_gdk_set synonyms
	(gtk_text_tag_get_property): Always return the font, even if
	all its fields aren't set

	* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
	store the attr list; it leaves us with no way to change attributes
	in _render according to the render flags, and no way to implement
	get_property. Instead store all the specific text attributes.
	Separate whether an attribute is enabled from its value. Sync all
	properties with GtkTextTag, make them all consistent, etc.

	* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
	renderers can highlight the sort row/column

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
	accessor functions to get values; this has the side effect of
	showing up which accessor functions were missing. Added those.

	* gtk/gtktreeviewcolumn.h: Replace set_justification with
	set_alignment, to be consistent with GtkLabel, GtkMisc

	* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
	arrow.

	* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h

	* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +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