Commit Graph

71 Commits

Author SHA1 Message Date
Tim Janik
6070d96d1d get this to compile.
Thu Apr 12 21:04:26 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeview.c (_gtk_tree_view_column_start_drag): get
        this to compile.
2001-04-12 19:04:08 +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
Jonathan Blandford
461216d45b Bug fix to make trees work again when not sorted.
Mon Apr  2 19:36:57 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.c (gtk_tree_store_init):  Bug fix to make trees
	work again when not sorted.

	* gtk/gtktreeview.c (gtk_tree_view_class_init): Add "collapse_row"
	and "expand_row" signal, closing bug 52578.

	* gtk/gtktreeview.c (gtk_tree_view_expand_row): Add signal
	support.

	* gtk/gtktreeview.c (gtk_tree_view_collapse_row): Add signal
	support.
2001-04-02 23:38:54 +00:00
Jonathan Blandford
29985af0fa BOXED,BOXED,BOXED,BOXED): new marshaller.
Mon Apr  2 16:56:15 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
	marshaller.

	* gtk/gtktreemodel.c (gtk_tree_model_range_changed): change
	"changed" signal to "range_changed".

	* gtk/gtktreeview.c (gtk_tree_view_set_model): fix small bug where
	removing a tree from one model would remove all trees from that
	model.
	* gtk/gtktreeview.c (gtk_tree_view_range_changed): use range
	changed signal instead.
2001-04-02 20:56:55 +00:00
Jonathan Blandford
fe8eecdf75 Now we listen to the reorder signal.
Thu Mar 29 20:20:38 2001  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreemodel.c (gtk_tree_row_ref_reordered_callback): Now we
        listen to the reorder signal.
2001-03-30 01:26: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
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
207e3bb977 make this somewhat key-navigable
2001-03-23  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkhsv.c: make this somewhat key-navigable

	* gtk/gtkfontsel.c: mnemonics

	* gtk/gtkgamma.c: mnemonics

	* gtk/gtkcolorsel.c: add mnemonics to labels

2001-03-22  Havoc Pennington  <hp@pobox.com>

	Applied big patch from Seth Lytle to fix event handler return
	values, slightly modified.

	* gtk/gtkcalendar.c (gtk_calendar_button_press): return TRUE if
	handled.
	(gtk_calendar_key_press): return TRUE for GDK_space triggers
	select_day

	* gtk/gtkclist.c (gtk_clist_button_press): return TRUE if handled
	(gtk_clist_button_release): return TRUE if handled

	* gtk/gtkcolorsel.c (mouse_release):
	(palette_activate):
	(palette_press):
	(palette_new):
	(mouse_press):
	(get_screen_color):
	fixed return type (void to gboolean), return TRUE,
	added GTK_SIGNAL_FUNC cast

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): fixed return type
	(void to gboolean), and return TRUE
	(gtk_combo_button_release): changed return value to TRUE after
	gtk_grab_add on combo->popwin

	* gtk/gtkctree.c (gtk_ctree_button_press): return TRUE if triggers a
	collapse or expand

	* gtk/gtkcurve.c (gtk_curve_graph_events): return TRUE for
	button/motion

	* gtk/gtkdnd.c (gtk_drag_source_event_cb): return TRUE for button
	press/release and motion that trigger act

	* gtk/gtkentry.c (gtk_entry_button_release): return TRUE

	* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): return TRUE
	for GDK_Return

	* gtk/gtklist.c (gtk_list_button_press): return TRUE mostly
	(gtk_list_button_release): return TRUE if selection

	* gtk/gtklistitem.c (gtk_list_item_button_press): return TRUE on
	press

	* gtk/gtkmenushell.c (gtk_menu_shell_button_press):
	(gtk_menu_shell_button_release): chain parent_menu_shell retval

	* gtk/gtknotebook.c (gtk_notebook_button_press): return FALSE if
	nothing triggered
	(gtk_notebook_button_release): return TRUE if we do anything

	* gtk/gtkspinbutton.c (gtk_spin_button_button_press):
	(gtk_spin_button_button_release): return TRUE or chained retval

	* gtk/gtktext.c (gtk_text_button_press):
	(gtk_text_button_release): return TRUE
	(gtk_text_key_press): remove redundant retval code

	* gtk/gtktreeitem.c (gtk_tree_item_button_press): return TRUE if button
	and sensitive
	(gtk_tree_item_subtree_button_click): changed type to gint, and return
	TRUE if sensitive

	* gtk/gtktooltips.c (gtk_tooltips_event_handler): deactivate implies
	return TRUE
2001-03-24 06:10:40 +00:00
Jonathan Blandford
21fd434c5f fix braino. New interface to add cleanup sortable support.
Thu Mar 22 19:27:34 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	fix braino.
	* gtk/gtktreesortable.[ch]: New interface to add cleanup sortable
	support.

	* gtk/gtktreeview.c: Addition of initial sortable support.

	* gtk/gtktreestore.c: Addition of initial sortable support.

	* gtk/gtkliststore.c: Addition of initial sortable support.

	* gtk/gtkmarshal.list: yet another marshaller.

	* gtk/gtktreedatallist.[ch]: shared code between the store models
	for handling sorting headers.
2001-03-23 00:35:19 +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
Jonathan Blandford
73dc88d241 modified to use "row_activated" signal.
Fri Mar 16 18:24:53 2001  Jonathan Blandford  <jrb@redhat.com>

	* demos/gtk-demo/main.c (row_activated_cb): modified to use
	"row_activated" signal.

	* gtk/gtktreeview.c (gtk_tree_view_row_activated): oh, the
	stupidity.  Lets actually pass in the row with this signal...
2001-03-16 23:22:46 +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
Jonathan Blandford
1a72ab2560 Fixed some braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
Fri Mar 16 11:38:42 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
	braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 17:08:01 +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
351052e166 Make select_all not work if you're in SINGLE mode (it doesn't make that
Fri Mar  9 20:36:21 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeselection.c (gtk_tree_selection_select_all): Make
	select_all not work if you're in SINGLE mode (it doesn't make that
	much sense, anyway.)

	* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
	handle types more sanely.
	(_gtk_tree_data_list_value_to_node): handle types more sanely.
	(_gtk_tree_data_list_node_copy): handle types more sanely.

	* gtk/gtkliststore.c (gtk_list_store_set_cell): fix to work with
	GValue better. Converts the type as well.

	* gtk/gtktreestore.c (gtk_tree_store_set_cell): fix to work with
	GValue better. Converts the type as well.
2001-03-10 01:34:48 +00:00
Jonathan Blandford
8f35f03045 Add destroy function.
Thu Mar  8 19:40:28 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Add destroy function.
2001-03-09 00:40:18 +00:00
Jonathan Blandford
8401ea1a21 Actually unref the nodes. Fixes bug #50058.
Thu Mar  8 19:18:27 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): Actually
	unref the nodes.   Fixes bug #50058.

	* gtk/gtktreemodel.c (gtk_tree_model_ref_node): change
	"::ref_iter" to "::ref_node".
	(gtk_tree_model_unref_node): change "::unref_iter" to
	"::unref_node". Fixes bug #50064.
2001-03-09 00:19:11 +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
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
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
41ae8df2e9 Updated docs to be sane 2001-03-06 00:33:07 +00:00
Jonathan Blandford
d5e0710d68 Apply patch from John Margaglione to add object properties.
Mon Mar  5 15:07:05 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c: Apply patch from John Margaglione to add
	object properties.
2001-03-05 20:07:18 +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
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
f7382221cd Sanitize GtkRowReference.
Wed Feb 28 16:36:46 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c (gtk_tree_row_reference_*): Sanitize
	GtkRowReference.
2001-02-28 21:37:50 +00:00
Havoc Pennington
56a2f2c628 Remove draw_focus and draw_default (gtk_widget_draw_focus): remove this
2001-02-28  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwidget.h (struct _GtkWidgetClass): Remove draw_focus and
	draw_default
	(gtk_widget_draw_focus): remove this function; we could instead
	make it just gtk_widget_draw(), but in most cases I think the
	result would be broken user code, so think it's better to have
	that code not compile and get fixed
	(gtk_widget_draw_default): ditto

	* gtk/gtkwidget.c: Add default handlers for focus_in_event and
	focus_out_event that set/unset GTK_HAS_FOCUS and call queue_draw

	* gtk/gtkwindow.c (gtk_window_set_default): just queue a draw when
	widgets lose/get the default, instead of calling draw_default

	* docs/Changes-2.0.txt: note about all this

	Then fixed every widget in GTK, I won't list all the filenames.
2001-02-28 19:07:46 +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
Jonathan Blandford
1efdc10301 Only draw the column that is exposed.
Fri Feb 23 17:50:13 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Only draw the
	column that is exposed.

	(_gtk_tree_view_update_size): Changed name from set_size, and
	changed function to do more work, and not force people calling it
	to figure out the size.  Simplifies a lot of code elsewhere.
2001-02-23 23:00:52 +00:00
Jonathan Blandford
ef084e87e5 removed signals. Moved to inherit from GObject instead of GtkObject.
Wed Feb 21 15:41:34 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.c: removed signals.  Moved to inherit from
	GObject instead of GtkObject.

	* gtk/gtkliststore.c: ditto.

	* gtk/gtktreemodelsort.c: ditto.

	* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
	GtkTreeModelIface, instead of in each model.
2001-02-21 23:49:22 +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
Tim Janik
ca26902c65 default initialize the generated ENTER_NOTIFY event with 0, otherwise not
Sat Feb 17 06:47:27 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenu.c (gtk_menu_motion_notify): default initialize the
        generated ENTER_NOTIFY event with 0, otherwise not explicitely
        setup fields contain garbage (e.g. subwindow, breaking
        gdk_drawable_ref() upon event copy).
        (gtk_menu_stop_navigating_submenu_cb): same here.

        * gtk/gtklist.c (gtk_list_vertical_timeout):
        * gtk/gtklist.c (gtk_list_horizontal_timeout):
        * gtk/gtkclist.c (vertical_timeout):
        * gtk/gtkclist.c (horizontal_timeout): change direct assignment
        default-zero-intialization for unions to memset(,0,), as unions are
        not fully default-zero-initialized by compilers (GdkEvent x = { 0, };
        has to become GdkEvent x; memset (&x, 0, sizeof (x)); )

        * gtk/gtktreeview.c (gtk_tree_view_set_rows_drag_source): scratch
        g_closure_sink() warning.

        * gtk/gtktreemodel.c (gtk_tree_model_get_valist):
        * gtk/gtktreestore.c (gtk_tree_store_set_valist):
        * gtk/gtkliststore.c (gtk_list_store_set_valist):
        fix G_VALUE_COLLECT() and G_VALUE_LCOPY() calls.
2001-02-17 06:04:40 +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
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
Jonathan Blandford
589b472609 moved back to a sane value!
Thu Feb  8 19:00:00 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (TREE_VIEW_VERTICAL_SEPARATOR): moved back to
	a sane value!
2001-02-08 23:59:40 +00:00
Havoc Pennington
a87d840595 let's darken colors, not lighten them.
2001-02-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkstyle.c (get_darkened_gc): let's darken colors, not
	lighten them.
2001-02-08 23:54:02 +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
Havoc Pennington
5cd2993201 fix bug in here where prev pointer was set to the wrong thing
2001-01-30  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkliststore.c (gtk_list_store_insert_before): fix bug in
	here where prev pointer was set to the wrong thing

	* gtk/gtktreemodel.c (gtk_tree_path_is_ancestor): new function
	(gtk_tree_path_is_descendant): new function

	* gtk/gtkliststore.c (gtk_list_store_iter_n_children): return
	cached length
	(gtk_list_store_get_iter): don't modify iter if we can't get the
	path.

	* gtk/gtkliststore.h (struct _GtkListStore): cache the length

	* gtk/gtktreednd.h: add virtual function row_drop_possible() to
	GtkTreeDragDest

	* gtk/gtktreestore.c (copy_node_data): fix varargs type error that
	was causing segfault

	* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_copy): set next
	pointer to NULL

	* gtk/gtktreestore.c (gtk_tree_store_append): fix memleak

	* gtk/gtkliststore.c (gtk_list_store_iter_next): don't modify iter
	on returning FALSE
	(gtk_list_store_iter_children): ditto
	(gtk_list_store_iter_nth_child): ditto
	(gtk_list_store_iter_nth_child): ditto
	(gtk_list_store_iter_parent): ditto

	* gtk/gtktreestore.c (gtk_tree_store_get_path): g_return_if_fail
	on iter->user_data != NULL instead of silently accepting it.
	(gtk_tree_store_iter_next): ditto. Also, don't modify iter unless
	we are returning TRUE.
	(gtk_tree_store_iter_children): ditto
	(gtk_tree_store_iter_nth_child): ditto
	(gtk_tree_store_iter_parent): ditto
	(gtk_tree_store_insert): remove handling of parent->user_data ==
	NULL, replace with parent == NULL

	* gtk/gtktreemodel.c (inserted_callback): put some fixes in here,
	and a comment explaining things

	* gtk/gtktreestore.c: add GtkTreeDragSource/GtkTreeDragDest
	interface support to GtkTreeStore.

	* gtk/gtktreemodel.c (gtk_tree_path_prev): didn't properly return
	FALSE if no prev, fix

	* gtk/gtktreeview.c (set_source_row): use a row reference
	(set_dest_row): use a row reference
2001-01-31 00:57:49 +00:00
Havoc Pennington
d8d019a1e9 add GtkTreeRowReference which holds a handle to a specific row (particular
2001-01-26  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreemodel.c, gtk/gtktreemodel.h: add GtkTreeRowReference
	which holds a handle to a specific row (particular set of values
	in the model, i.e. pointer-identity row).

	* gtk/gtktreeview.c, gtk/gtktreeprivate.h, gtk/gtktreeselection.c:
	use GtkTreeRowReference for anchor, cursor, and drag_dest_row.
	Still need to use it for the src/dest row saved on the drag context.
2001-01-27 00:50:38 +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
Jonathan Blandford
5f25ae3873 Make fail when not realized. (gtk_tree_view_scroll_to_cell): Make work
Sun Jan 21 09:58:00 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_point): Make fail
	when not realized.
	(gtk_tree_view_scroll_to_cell): Make work when not realized.
	(gtk_tree_view_realize): add scroll_to support
	(gtk_tree_view_finalize): add a finalize method.  Populate.
	(gtk_tree_view_insert_column): ref and sink the column.
	(gtk_tree_view_append_column): ref and sink the column.
	(gtk_tree_view_queue_draw_node): New function to handle redrawing
	individual nodes.  Should make the code much more efficient, if
	actually used.

gtk_tree_view_queue_draw_node isn't actually used yet, but it should start
making Owen less grumpy.
2001-01-21 18:45:20 +00:00
Havoc Pennington
e248e4e79e sync to tree changes
2001-01-19  Havoc Pennington  <hp@redhat.com>

	* demos/gtk-demo/main.c (button_press_event_cb): sync to tree changes

	* gtk/gtkrbtree.c (_gtk_rbtree_node_find_offset): fix this
	function

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_widget):
	implement

	* gtk/gtktreeview.c (gtk_tree_view_move_to): rename
	scroll_to_cell, matches TextView scroll functions better
	(gtk_tree_view_tree_to_widget_coords): new function
	(gtk_tree_view_widget_to_tree_coords): new function
	(gtk_tree_view_get_visible_rect): new function
	(gtk_tree_view_get_path_at_pos): accept negative coordinates
	(gtk_tree_view_draw_node_focus_rect): new function moved from
	draw_focus, also, use width of bin_window as width of the focus
	rect
	(gtk_tree_view_expand_row): fix bug where it didn't recognize
	already-expanded rows
	(gtk_tree_view_get_cell_rect): new function
	(gtk_tree_view_get_path_at_pos): return the click position
	relative to the passed-in cell
	(gtk_tree_view_set_expander_column): new function

	* configure.in: remove gtk-config-2.0 chmod

	* gtk/gtktextview.c (gtk_text_view_drag_motion): small cleanups,
	and properly handle drags with targets we don't understand
	(gtk_text_view_drag_end): don't stop scrolling, the source isn't
	scrolling anyway
	(gtk_text_view_drag_drop): stop scrolling here though, and set the
	mark invisible

	* gtk/gtkdnd.c (gtk_drag_dest_find_target): export as a public
	function
	(gtk_drag_dest_get_target_list): new function
	(gtk_drag_dest_set_target_list): new function

	* gtk/gtktreeview.c: Add a bunch of drag-and-drop implementation

	* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add fields
	related to drag-and-drop
2001-01-19 22:39:19 +00:00
Havoc Pennington
85267e9224 don't draw if label->layout is NULL due to a pending resize
2001-01-09  Havoc Pennington  <hp@redhat.com>

	* gtk/gtklabel.c (gtk_label_expose): don't draw if label->layout
	is NULL due to a pending resize

	* gtk/gtktreeview.c (gtk_tree_view_check_dirty): don't set the
	column width to values less than 1

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_width): clamp
	width to be between min/max width, and still set the width
	even if autosize is turned on, so the tree view can use this
	function in order to autosize.
	(gtk_tree_view_column_init): set initial width to 1 not 0

	* gtk/gtktreeview.c (gtk_tree_view_size_request_buttons): use
	setter function to modify column width, so we get notification
	(gtk_tree_view_insert_iter_height): ditto
	(gtk_tree_view_calc_size): ditto
	(gtk_tree_view_check_dirty): ditto

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init): Add
	properties to change all the interesting attributes of the tree
	view column.
	(gtk_tree_view_column_set_header_clickable): rename set_clickable
	(gtk_tree_view_column_get_clickable): add
	(gtk_tree_view_column_set_cell_renderer): don't unset the current
	attributes; assume a cell renderer with equivalent object
	properties has been swapped in. Do g_object_notify().
	(gtk_tree_view_column_set_visible): g_object_notify
	(gtk_tree_view_column_get_sizing): rename from get_col_type
	(gtk_tree_view_column_set_sizing): g_object_notify
	(gtk_tree_view_column_set_width): add g_object_notify
	(gtk_tree_view_column_set_min_width): ditto
	(gtk_tree_view_column_set_max_width): ditto
	(gtk_tree_view_column_set_title): ditto
	(gtk_tree_view_column_set_clickable): ditto
	(gtk_tree_view_column_set_widget): ditto
	(gtk_tree_view_column_set_justification): ditto
2001-01-09 23:24:20 +00:00
Havoc Pennington
637c61da76 handle case where there are no rows in the model
2001-01-09  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_check_dirty): handle case where
	there are no rows in the model

	* gtk/gtkliststore.c (gtk_list_store_iter_children): if parent is
	NULL, then return the start of the list

	* gtk/gtktreeview.c (gtk_tree_view_setup_model): don't build tree
	if we can't get any rows from an empty model

	* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): remove
	extraneous * after function pointer typedef usage

	* Makefile.am: don't specify full path to cp and rm

	* gtk/gtkcellrenderertextpixbuf.c
	(gtk_cell_renderer_text_pixbuf_get_size): check width/height !=
	NULL before dereferencing, fixes a segfault that happened from
	time to time

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
	use gdk_pixbuf_render_to_drawable_alpha() to get alpha channel,
	and reindent the function
	(gtk_cell_renderer_pixbuf_get_size): indentation

	* gtk/gtkdialog.c (gtk_dialog_run): destroy main loop only after
	we quit it
	(gtk_dialog_add_buttons_valist): add g_return_if_fail
	(gtk_dialog_set_default_response): New function, to set default
	button
	(gtk_dialog_set_response_sensitive): New function, to set
	sensitivity of buttons

	* gtk/gtkcellrendererpixbuf.c
	(gtk_cell_renderer_pixbuf_get_property): allow getting a NULL pixbuf
	(gtk_cell_renderer_pixbuf_set_property): allow setting a NULL pixbuf

	* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
	handle any G_TYPE_OBJECT subclass, not just the base class, and
	also boxed types.
	(_gtk_tree_data_list_value_to_node): ditto

	* gtk/gtkrbtree.c: Run _gtk_rbtree_test at strategic points if
	--gtk-debug=tree

	* gtk/gtkmain.c: add GTK_DEBUG_TREE

	* gtk/gtkdebug.h: add GTK_DEBUG_TREE
2001-01-09 17:45:34 +00:00
Owen Taylor
a801ea7bf0 Doc fixups.
Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktreeview.[ch] gtktreemodelsort.[ch] gtknotebook.c
	gdk/gdk-pixbuf.h: Doc fixups.

	* gtk/gtkobject.h: Remove trailing , from enum
2001-01-09 16:23:57 +00:00
Jonathan Blandford
136232bcd6 Skip realizing buttons that have already been realized.
Mon Jan  8 14:42:06 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_realize_buttons): Skip
	realizing buttons that have already been realized.
2001-01-08 19:44:41 +00:00
Jonathan Blandford
15b23123f7 Show menu items before adding to option menu.
Mon Jan  8 14:06:29 2001  Jonathan Blandford  <jrb@redhat.com>

	* tests/testtreeview.c (main): Show menu items before adding to
	option menu.

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Keep the columns
	around if we kill them.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data):
	Return if we pass in a NULL model.
2001-01-08 19:07:51 +00:00
Havoc Pennington
5c37906778 hack on this a bit
2001-01-05  Havoc Pennington  <hp@redhat.com>

	* tests/testtreeview.c: hack on this a bit

	* gtk/gtktextlayout.c (gtk_text_layout_class_init):
	s/GTK_RUN_LAST/G_SIGNAL_RUN_LAST

	* gtk/gtktreemodelsimple.h (GTK_IS_TREE_MODEL_SIMPLE_CLASS):
	was spelled incorrectly
	(GTK_IS_TREE_MODEL_SIMPLE): ditto

	* gtk/gtktreeview.c (gtk_tree_view_set_headers_clickable): rename
	from gtk_tree_view_set_headers_active

	* gtk/gtktexttag.c:
	(gtk_text_tag_get_property): handle PROP_DIRECTION
	(gtk_text_tag_set_property): g_object_notify when we toggle the _set
	properties, bug 40235

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_delimiters): rename
	forward_to_line_end
2001-01-06 01:31:58 +00:00