1. 16 May, 2002 2 commits
    • Jonathan Blandford's avatar
      include missing #ifdef G_ENA\BLE_DEBUG · 100cde1c
      Jonathan Blandford authored
      Thu May 16 17:29:08 2002  Jonathan Blandford  <jrb@redhat.com>
              * gtk/gtkrbtree.c (_gtk_rbtree_remove): include missing #ifdef G_ENA\BLE_DEBUG
    • Owen Taylor's avatar
      Fixes for #78258 · 85a8bdb1
      Owen Taylor authored
      Thu May 16 14:51:14 2002  Owen Taylor  <otaylor@redhat.com>
              Fixes for #78258
              * gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
              Fix some 64-bit warning problems. (Patch from Matthias
              * gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
              a bunch of debug code with G_ENABLE_DEBUG.
              * configure.in demos/gtk-demo/main.c: Replace
              #ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
  2. 20 Mar, 2002 1 commit
    • Kristian Rietveld's avatar
      add _gtk_rbtree_set_fixed_height() · 92febe27
      Kristian Rietveld authored
      Wed Mar 20 22:59:23 2002  Kristian Rietveld  <kris@gtk.org>
              * gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
              * gtk/gtktreeprivate.h: add fixed_height_check field
              * gtk/gtktreeview.c (gtk_tree_view_init): initialize
              scroll_sync_timer and fixed_height_check
              (do_validate_rows): add fixed_height_check. If all validated rows
              in the first cycle have the same height, then we set that height for
              the entire tree. This is some sort of 'fake' optimization, but helps
              a lot for the common case. We keep validating the entire tree in
              the background though.
              (gtk_tree_view_set_model): reset fixed_height_check
  3. 27 Jan, 2002 1 commit
  4. 10 Dec, 2001 1 commit
  5. 08 Dec, 2001 2 commits
    • Jonathan Blandford's avatar
      Add debug spew to lots of places, so that people with crashy trees can · 6793f772
      Jonathan Blandford authored
      Sat Dec  8 10:04:54 2001  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew): Add debug spew to lots
      	of places, so that people with crashy trees can just run their
      	program with GTK_DEBUG=TREE.
    • Jonathan Blandford's avatar
      get logic right, #66249 · 82c5ace8
      Jonathan Blandford authored
      Fri Dec  7 20:06:14 2001  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtktreeview.c (validate_visible_area): get logic right,
      	* gtk/gtkrbtree.c (_gtk_rbtree_remove_node): fix bug where
      	removing a node ended up with a corrupt tree.  Really really nasty
      	(_gtk_rbtree_debug_spew): new debug helper function
      	(_fixup_validation): new inline function to clean up code
      	readability a lot.
  6. 04 Dec, 2001 1 commit
    • Jonathan Blandford's avatar
      Minor fix. · d1a858c8
      Jonathan Blandford authored
      Tue Dec  4 18:38:35 2001  Jonathan Blandford  <jrb@redhat.com>
      	* demos/gtk-demo/main.c: (create_tree): Minor fix.
      	* docs/tree-column-sizing.txt: Update
      	* gtk/gtkrbtree.[ch]: Massive work to support validation.
      	* gtk/gtktreemodel.c: Doc fixes.
      	* gtk/gtktreeview.c: Incremental reflow added.
      	* gtk/gtktreeviewcolumn.c: ditto
      	* gtk/gtktreeviewcolumn.h: ditto
  7. 02 Nov, 2001 2 commits
  8. 25 Oct, 2001 1 commit
    • Jonathan Blandford's avatar
      Add support for invalid nodes. (_gtk_rbnode_rotate_right): Ditto. · 889d64b4
      Jonathan Blandford authored
      Thu Oct 25 16:27:29 2001  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtkrbtree.c (_gtk_rbnode_rotate_left): Add support for
      	invalid nodes.
      	 (_gtk_rbnode_rotate_right): Ditto.
      	 (_gtk_rbtree_node_mark_invalid): New function.
      	 (_gtk_rbtree_node_mark_valid): New function.
      	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_class_init): We're a
      	GObject, not a GtkObject.
      	(gtk_tree_model_sort_row_has_child_toggled): Rewrote to be more
      	(gtk_tree_model_sort_row_deleted): ditto.
      	(gtk_tree_model_sort_{un,}ref_node): Fix.
      	* gtk/gtktreeview.c: Protean incremental reflow support (commented
      	* gtk/gtktreeview.h (GtkTreeViewSearchEqualFunc): change char *key
      	to const char *key.
      	* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
      	Important 1 line fix to fix a lot of refcounting woes.
  9. 01 Oct, 2001 1 commit
    • Jonathan Blandford's avatar
      change scroll_to_cell delayed code to happen in size_allocate. · 58ed9e8b
      Jonathan Blandford authored
      Mon Oct  1 14:07:02 2001  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): change
      	scroll_to_cell delayed code to happen in size_allocate.
      	* gtk/gtkstyle.c (gtk_default_draw_expander): change
      	prelight/normal arrow drawing.
      	* gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate
      	* gtk/gtktreestore.c: refactor.
  10. 01 Sep, 2001 1 commit
  11. 15 Jun, 2001 1 commit
    • Jonathan Blandford's avatar
      Rename gtk_tree_sortable_sort_column_id_set_func. It's much shorter now. · 67f8b5bd
      Jonathan Blandford authored
      Fri Jun 15 18:53:48 2001  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtktreesortable.c (gtk_tree_sortable_set_sort_func): Rename
      	gtk_tree_sortable_sort_column_id_set_func.  It's much shorter now.
      	* gtk/gtktreeview.c (gtk_tree_view_sort_iter_changed): WOOO!!!
      	Now I can really reorder/sort all Store widgets.  treesorttest
      	seems to just work now.
      	* gtk/gtklistview.c (gtk_list_store_iter_changed): Whoops.
      	testtreesort worked through a big coincidence all this time.
      	* gtk/gtkrbtree.c (_gtk_rbtree_reorder): Nasty bug fix in nasty
      	* tests/testtreecolumns.c: Big 'ol warning at the top letting
      	people know that this code should never ever ever be copied.
      While everyone else was busy flaming eash other over configuration
      engines, I secretly got sorting completely working with store widgets
      and GtkTreeView.  GtkTreeModelSort, here I come!!!!!
  12. 29 Mar, 2001 1 commit
    • Jonathan Blandford's avatar
      Massive reordering/sorting work. Now pretty much works. · f19af6f4
      Jonathan Blandford authored
      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.
  13. 28 Mar, 2001 1 commit
  14. 28 Feb, 2001 1 commit
    • Jonathan Blandford's avatar
      Proxy out to _gtk_tree_row_reference_deleted. (inserted_callback): Proxy · c82dc58f
      Jonathan Blandford authored
      Tue Feb 27 19:32:53 2001  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtktreemodel.c (deleted_callback): Proxy out to
      	(inserted_callback): Proxy out to
      	(_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.
  15. 08 Feb, 2001 1 commit
    • Havoc Pennington's avatar
      remove validation idle · 4a3c8a36
      Havoc Pennington authored
      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
      	* demos/testpixbuf-save.c (main): remove deprecated
      	* 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):
      	* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
      	backgrounds with draw_flat_box using different detail for even/odd
      	* 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
      	* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
      	* gtk/gtktreesortable.h: updates in here
  16. 26 Jan, 2001 1 commit
    • Havoc Pennington's avatar
      adapt to handle PangoColor · ef4356b5
      Havoc Pennington authored
      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
      	* 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
      	(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
      	* 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
  17. 19 Jan, 2001 1 commit
    • Havoc Pennington's avatar
      sync to tree changes · e248e4e7
      Havoc Pennington authored
      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
      	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_widget):
      	* 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
      	(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
      	(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
  18. 09 Jan, 2001 1 commit
    • Havoc Pennington's avatar
      handle case where there are no rows in the model · 637c61da
      Havoc Pennington authored
      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
      	(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/gtkmain.c: add GTK_DEBUG_TREE
      	* gtk/gtkdebug.h: add GTK_DEBUG_TREE
  19. 26 Oct, 2000 1 commit
    • Jonathan Blandford's avatar
      Got rid of GtkTreeNode, and changed it to GtkTreeIter. Added iterators · ef7b510f
      Jonathan Blandford authored
      Wed Oct 25 20:40:25 2000  Jonathan Blandford  <jrb@redhat.com>
      	* gtk/gtktreemodel.h: Got rid of GtkTreeNode, and changed it to
      	GtkTreeIter.  Added iterators everywhere.
      	* gtk/gtktreeviewcolumn.c: Changed to use the iterators.
      	* gtk/gtktreeviewselection.c: Changed to use the iterators.
      	* gtk/gtktreestore.c: Changed to use the iterators.
      	* gtk/gtkliststore.c: Commented out the code.  Will convert to
      	iterators tomorrow.
      	* gtk/gtkmodelsimple.c: Commented out the code.  Will convert to
      	iterators tomorrow.
      	* gtk/treestoretest.c: Changed to use iterators.
      	* demos/testgtk/main.c: Moved to use the new iterator system.
  20. 05 Oct, 2000 1 commit