Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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
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
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
f00175cf07 new directory to contain tests, gtk/test* should move here sometime (with
2000-12-20  Havoc Pennington  <hp@redhat.com>

	* tests: new directory to contain tests, gtk/test* should move
	here sometime (with appropriate on-cvs-server hackery)

	* tests/testtreeview.c, tests/Makefile.am: a test

	* configure.in (AC_OUTPUT): add tests/Makefile

	* gtk/gtktexttag.c (gtk_text_tag_get_property): Add "invisible"
	and "invisible_set" which were missing

	* gtk/gtkrbtree.h: some cheesy indentation fix
2000-12-21 01:53:39 +00:00
4
3ff4a2c081 Checked in initial draft of the new tree widget.
2000-10-04    <jrb@redhat.com>

	* gtk/gtk{tree,cell}?*.[ch]: Checked in initial draft of the new
	tree widget.
2000-10-05 01:04:57 +00:00