Commit Graph

340 Commits

Author SHA1 Message Date
Soeren Sandmann
ad709dcfea Improve documentation. (#117306, Steve Chaplin)
Fri Sep 19 13:24:54 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktreeview.c (gtk_tree_view_get_cursor): Improve
	documentation. (#117306, Steve Chaplin)
2003-09-19 11:29:10 +00:00
Jonathan Blandford
9ded36af54 Merge from stable.
Fri Sep 12 16:32:53 2003  Jonathan Blandford  <jrb@redhat.com>

	Merge from stable.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): only save the
	pressed button (used to determine if we want to initiate a drag later
	on) if the current grab widget is either NULL or tree_view (Reported
	by Jeroen Zwartepoorte).
2003-09-12 14:46:50 +00:00
Kristian Rietveld
b78691f098 Big TreeView DnD fixage, makes drops on empty models work, makes TreeStore
Wed Sep 10 01:06:44 2003  Kristian Rietveld  <kris@gtk.org>

	Big TreeView DnD fixage, makes drops on empty models work, makes
	TreeStore DnD work and gets rid of gtk-tree-model-drop-append.
	Related bugs #95362 and #113314. I don't want to touch this code
	ever again.

	* gtk/gtktreeprivate.h (GtkTreePrivate): add empty_view_drop field.

	* gtk/gtktreednd.c (gtk_tree_get_row_drag_data): add check
	for selection_data->length.

	* gtk/gtktreeview.c (struct DestRow), (dest_row_free),
	(set_dest_row), (get_dest_row): we don't store just the row ref
	anymore, but a struct with the row ref and additional info,
	(set_destination_row): handle drops on empty space and some
	style fixes,
	(get_logical_dest_row): also return path_down_mode/drop_append_mode
	flags, handle dropping childs on their new parents, rewrite
	drop append handling into something saner,
	(gtk_tree_view_drag_motion): show a "drop possible arrow" on empty
	spaces,
	(gtk_tree_view_drag_drop): updates for updated backend,
	(gtk_tree_view_drag_data_received): updates for updated backend,
	path down mode (treestore DnD) handling,
	(gtk_tree_view_set_drag_dest_row): set empty_view_drop flag,
	when we are trying to drop a row on an empty model,
	(gtk_tree_view_get_drag_dest_row): handle empty_view_drop flag.

	* gtk/gtkliststore.c (gtk_list_store_drag_data_received),
	(gtk_list_store_row_drop_possible): style and drop-append fixes.

	* gtk/gtktreestore.c (gtk_tree_store_drag_data_received): ditto.
2003-09-09 23:13:39 +00:00
Kristian Rietveld
e5efd71486 Merge from stable.
Tue Sep  2 21:01:19 2003  Kristian Rietveld  <kris@gtk.org>

	Merge from stable.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): revert the change
	to only select when button 1 is pressed introduced in the fix of
	bug #120187.
2003-09-02 19:16:11 +00:00
Kristian Rietveld
43d9992934 Merge from stable.
Mon Aug 25 23:21:43 2003  Kristian Rietveld  <kris@gtk.org>

	Merge from stable.

	Fixes #115871, reported by Michael Natterer.

	* gtk/gtktreeprivate.h: added GtkTreeSelectMode enum,
	added ctrl_pressed and shift_pressed bitfields,
	(_gtk_tree_selection_internal_select_node): replace GdkModifierType
	arg with GtkTreeSelectMode.

	* gtk/gtktreeselection.c (gtk_tree_selection_set_mode),
	(gtk_tree_selection_select_path), (gtk_tree_selection_unselect_path),
	(_gtk_tree_selection_internal_select_node): all updated for
	GdkModifierType -> GtkTreeSelectMode move.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): set ctrl_pressed
	and shift_pressed around selection handling block,
	(gtk_tree_view_real_select_cursor_row),
	(gtk_tree_view_real_toggle_cursor_row),
	(gtk_tree_view_real_selection_cursor_parent),
	(gtk_tree_view_real_set_cursor): use ctrl_pressed and shift_pressed,
	instead of checking the event state. And also updates for the
	GdkModifierType -> GtkTreeSelectMode move.
2003-08-25 21:33:00 +00:00
Kristian Rietveld
28a466a69c Slightly modified patch from Yann Rouillard to improve selection behavior
Thu Aug 21 20:53:46 2003  Kristian Rietveld  <kris@gtk.org>

	Slightly modified patch from Yann Rouillard to improve selection
	behavior with the mouse. Fixes #120187.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): only
	select/deselect items on the first button press of button 1,
	expand checks for row_activated to include triple clicks.
2003-08-21 19:00:29 +00:00
Kristian Rietveld
4254bdbb67 Merged from stable.
Fri Aug 15 21:57:34 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): stop editing
	on vertical scrolling. (#108035, reported by Tim Janik).
2003-08-15 20:07:40 +00:00
Kristian Rietveld
2e299387a7 (Note: This is not exactly the same as the patch which went in gtk-2-2).
Fri Aug 15 19:43:14 2003  Kristian Rietveld  <kris@gtk.org>

	(Note: This is not exactly the same as the patch which went in
	 gtk-2-2).

	* gtk/gtktreeview.c (gtk_tree_view_class_init),
	(gtk_tree_view_key_press), (gtk_tree_view_search_key_press_event):
	Also support the up, down, left, right, home, end, page up and
	page down keys on the numpad. (#119419, reported by Alex Larsson).
2003-08-15 17:47:18 +00:00
Kristian Rietveld
e733ed3e72 Merged from stable.
Thu Jul 17 19:24:51 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	Fixes issues pointed out by Morten Welinder in #115140.

	* gtk/gtktreeview.c (gtk_tree_view_size_request): fix comment,
	(do_validate_rows): update validated_area with a logic OR instead
	of a bitwise OR,
	(validate_rows_handler): make the if statement match the one in
	validate_rows(), so we don't leak the timeout.
2003-07-17 17:32:00 +00:00
Kristian Rietveld
fd9992d8e6 Merged from stable.
Thu Jul 17 19:12:02 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_remove_widget): the treeview
	should only grab focus back if the "cell_editable" widget still
	has focus. (Fixes #110104, testcase provided by Marco Pesenti
	Gritti).
2003-07-17 17:15:48 +00:00
Kristian Rietveld
bdce65ea3f Merged from stable.
Thu Jul 17 16:11:21 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_rows_reordered): stop editing
	if needed. (Fixes #115869, reported by Michael Natterer).
2003-07-17 14:15:03 +00:00
Kristian Rietveld
497de299e8 Merged from stable.
Sat Jul 12 16:16:04 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_drag_data_received): special
	case drags to "0", scroll to the top after dropping. (Fixes #94968,
	reported by Alp Toker).
2003-07-12 14:25:32 +00:00
Kristian Rietveld
1719b20af4 Merged from stable.
Sat Jul 12 15:51:33 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	Fixes #113904, testcase provided by Rene Seindal.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): set
	pressed_button to -1 when a row has been activated,
	(gtk_tree_view_motion_bin_window): only start a drag if there's
	a button being pressed.
2003-07-12 13:58:13 +00:00
Kristian Rietveld
97ddec66d6 Merged from stable.
Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
	gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
	to avoid a roundtrip (#110272, Owen Taylor).
2003-07-12 13:44:31 +00:00
Kristian Rietveld
e680d2f564 Merged from stable.
Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	This patch really really fixes scrolling. Related bugs: #81627,
	testcase provided by Timo Sirainen, #111500, testcase provided by
	manu, #113241, reported by Pedro Gimeno/Michael Natterer.

	*  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
	which is equal to the lower border of the window means scrolling
	to an invisible row, always update the dy when scrolling to an
	invisible row, corrected area_above/below calculations for
	invisible rows, when walking the tree correct the size
	subtracted for invalidated rows, fix wrong logic in comment.
2003-07-12 13:32:00 +00:00
Kristian Rietveld
e0e04dd847 Merged from stable.
Fri Jun  6 23:38:23 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (do_expand_collapse),
	(expand_collapse_timeout), (cancel_arrow_animation): made
	expand_collapse_timeout a wrapper with locks around
	do_expand_collapse, made cancel_arrow_animation use
	do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from
	Peter Bloomfield).
2003-06-06 21:42:52 +00:00
Kristian Rietveld
5afcde9a25 Merged from stable.
Wed Jun  4 21:25:35 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_drag_begin): use a silent
	assert for get_info. (reported by Michael Natterer),
	(gtk_tree_view_expand_all_emission_helper),
	(gtk_tree_view_expand_all_helper): emit row_expanded for all
	expanded rows during an _expand_all operation. (Fixes #111280,
	reported by Benjamin Bayart).
2003-06-04 19:24:17 +00:00
Kristian Rietveld
763672696a Merged from stable.
Thu May 29 18:23:01 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
	grab separate, the user might clear the tree in the focus-in
	callback. (Fixes #113086, testcase from Felipe Heidrich).
2003-05-29 16:28:42 +00:00
Kristian Rietveld
d718b97350 Merged from stable.
Thu May 29 18:06:26 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
	of row reference when we unset the model. Also reset
	dy and top_row_dy. (Fixes #109289, patch from Owen Taylor).
2003-05-29 16:16:05 +00:00
Kristian Rietveld
7554c3dfae Merged from stable.
Thu May 29 17:12:19 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_set_cursor_on_cell): cancel
	the current editing, if it exists. (Fixes #108956, reported by
	Michael Natterer).
2003-05-29 15:16:00 +00:00
Kristian Rietveld
4a03ea2334 Merged from stable.
Thu May 29 17:06:09 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (check_selection_helper): new function,
	(gtk_tree_view_row_deleted): traverse the tree from the
	deleted node to see whether the selection changed, instead of
	just checking this node. (Fixes #107400, reported by 'Duncan').
2003-05-29 15:09:47 +00:00
Kristian Rietveld
c906acd086 Merged from stable.
Thu May 29 16:31:34 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
	(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
	instead of _maybe_begin_dragging_row, so the icon can be
	overridden by apps. (Fixes #104374, patch from Daniel Elstner).
2003-05-29 14:36:03 +00:00
Kristian Rietveld
bdff7cdb1a Merged from stable.
Thu May 29 16:14:04 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct
	cell_area x/width for the expander if needed. (Fixes #101748,
	reported by Dave Cook and Mariano Suarez-Alvarez).
2003-05-29 14:22:05 +00:00
Kristian Rietveld
fcabeed616 check if tree/node are still the same after _internal_select_node. (Fixes
Thu May 29 16:01:38 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): check
	if tree/node are still the same after _internal_select_node.
	(Fixes #92256, reported by edscott).
2003-05-29 14:06:20 +00:00
Kristian Rietveld
c378989102 Fixes #75745, reported by Richard Hult. Merged from stable.
Thu May 29 15:38:30 2003  Kristian Rietveld  <kris@gtk.org>

	Fixes #75745, reported by Richard Hult. Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): set/unset
	GTK_CELL_RENDERER_FOCUSED flag whether the current node is the
	cursor or not.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	if we are rendering a cursor row, and the cell the be
	processed has focus, then set the GTK_CELL_RENDERER_FOCUSED
	flag (else we unset it).
2003-05-29 13:47:32 +00:00
Jonathan Blandford
e6b9af39bf destroy the search data iff the destroy func isn't NULL.
Mon Apr 28 18:03:29 2003  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): destroy the search
	data iff the destroy func isn't NULL.
 ----------------------------------------------------------------------
2003-04-28 22:04:00 +00:00
Jonathan Blandford
331b692e05 remove infinite loop caused by not clearing the scroll_to_path.
Thu Apr 17 09:57:44 2003  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtktreeview.c (validate_visible_area): remove infinite loop
        caused by not clearing the scroll_to_path.
2003-04-17 14:00:45 +00:00
Matthias Clasen
c4dd1bd3f9 Fix numerous misspellings of possessive "its". (#110027, Doug Quale) 2003-04-07 00:16:43 +00:00
Sven Neumann
b33894c5a5 rewrote the function that does node and arrow prelighting, queue all
2003-03-26  Sven Neumann  <sven@gimp.org>

	* gtk/gtktreeview.c: rewrote the function that does node and arrow
	prelighting, queue all redraws from here (Fixes bug #108792).
2003-03-26 13:41:00 +00:00
Jonathan Blandford
1a8b864976 Ctrl/Shift [left/right] expands/collapses the tree, #108092
Tue Mar 11 12:01:07 2003  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_class_init): Ctrl/Shift
	[left/right] expands/collapses the tree, #108092
2003-03-11 17:06:11 +00:00
Jonathan Blandford
0d93b6432d handle rtl code.
Sun Mar  2 23:35:57 2003  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
	handle rtl code.

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size): ditto

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto

	* gtk/gtktreeview.c: (invalidate_column),
	(invalidate_last_column),
	(gtk_tree_view_get_real_requested_width_from_column),
	(gtk_tree_view_size_allocate_columns),
	(gtk_tree_view_size_allocate), (gtk_tree_view_button_press),
	(gtk_tree_view_button_release_drag_column),
	(gtk_tree_view_update_current_reorder),
	(gtk_tree_view_motion_drag_column), (gtk_tree_view_bin_expose),
	(gtk_tree_view_key_press), (gtk_tree_view_header_focus),
	(gtk_tree_view_get_background_xrange),
	(gtk_tree_view_get_arrow_xrange),
	(gtk_tree_view_is_expander_column),
	(gtk_tree_view_set_column_drag_info),
	(gtk_tree_view_move_cursor_left_right):
	Add RTL support.

	* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): add an
	expand flag.

	* gtk/gtktreeviewcolumn.c:
	(gtk_tree_view_column_class_init),
	(gtk_tree_view_column_set_property),
	(gtk_tree_view_column_get_property),
	(gtk_tree_view_column_set_expand),
	(gtk_tree_view_column_get_expand),
	(gtk_tree_view_column_cell_process_action):
	Add support for expand flag
2003-03-03 04:51:42 +00:00
Matthias Clasen
b414adc897 Replace uses of gtk_timeout_* and gtk_idle_* by their non-deprecated
GLib counterparts. Fully deprecate gtk_timeout_* and gtk_idle_*.
2003-02-05 23:48:11 +00:00
Kristian Rietveld
3804b7e64b ChangeLog too long to mention here. Bugs fixed: #100973, #83195, #87556,
#99803, #100458. And a couple of non-bugzilla'd bugs (I am soooo sure
I misspelled that).
2003-01-27 21:41:06 +00:00
Kristian Rietveld
f35b13f65f fix compiler warning.
Tue Jan 14 23:42:29 2002  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c: fix compiler warning.
2003-01-14 22:33:13 +00:00
Kristian Rietveld
1fb04c5f22 The full changelog for this commit is too long to paste here, so to avoid
annoying everybody I will write a short summary here.

Fixes for: #102890, #103198, #102618, #93629, #100172, #101235, #96650,
#102379.

Other than that also a ListStore fix and a TreeView scrolling fix.

Those interested in the hairy details can checkout gtk+/ChangeLog.
2003-01-14 22:30:41 +00:00
Kristian Rietveld
4a19c3da82 the rand variable should be static to avoid conflicts with rand().
Thu Dec 19 03:58:36 2002  Kristian Rietveld  <kris@gtk.org>

        * tests/testtreeflow.c: the rand variable should be static to
        avoid conflicts with rand(). (#100844, reported by Soeren Sandmann,
        fix pointed out by Matthias Clasen).

Thu Dec 19 03:56:23 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): if we
        started editing, we handled this key signal, so return TRUE.
        (#100532, reported by Soeren Sandmann).
2002-12-19 02:38:27 +00:00
Kristian Rietveld
bfb45391db x can be in the range [0, upper], which can be bigger than [0, page_size].
Tue Dec 10 02:14:12 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): x can be in
        the range [0, upper], which can be bigger than [0, page_size].
        (Fixed #99778, reported and testcase provided by Carlos Garnacho
        Parro).
2002-12-10 01:00:44 +00:00
Kristian Rietveld
5fb6d3b823 implement a working use_align = FALSE implementation (also mentioned in
Tue Dec 10 01:58:43 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (validate_visible_area): implement a working
        use_align = FALSE implementation (also mentioned in #91335, reported
        by Juri Pakaste).

        * gtk/gtktreeview.c (validate_visible_area): only free the
        scroll_to_path if we are done with validating (fixes #93584, reported
        and testcase provided by Erik Simonsen).

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        set the GTK_CELL_RENDERER_FOCUSED flag where appropriate. (fixes
        #75745, reported by Richard Hult).

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_get_position):
        initialize cellinfo to NULL to silence the compiler.
2002-12-10 00:47:32 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Kristian Rietveld
a09f497c36 add a gtk_list_store_sort_iter_changed line for some special case ...
Tue Nov 26 22:26:04 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
        add a gtk_list_store_sort_iter_changed line for some special
        case ... (#96647 (issue 1), testcases from Soeren Sandmann and
        Daniel Elstner).

Tue Nov 26 22:18:06 2002  Kristian Rietveld  <kris@gtk.org>

        Inconsistent state for toggle renderers, requested by Paolo Bacchilega
        in #88130.

        * gtk/gtktreeprivate.h: move GtkCellRendererInfo here.

        * gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
        fix some indentation issues.

        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
        (gtk_cell_renderer_toggle_set_property),
        (gtk_cell_renderer_toggle_get_property),
        (gtk_cell_renderer_toggle_render): add an inconsistent property.

        * gtk/gtkstyle.c (gtk_default_draw_check),
        (gtk_default_draw_option): support drawing inconsistent
        options/checks for cells.

Tue Nov 26 22:14:14 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
        (gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
        calling _editing_done twice (which has nasty side-effects). (#96647,
        (issue 2) testcase from Soeren Sandmann).

Tue Nov 26 22:12:21 2002  Kristian Rietveld  <kris@gtk.org>

        #82739, patch from Padraig O'Briain.

        * gtk/gtktreeviewcolumn.[ch]: add
        gtk_tree_view_column_cell_get_position()

Tue Nov 26 22:06:29 2002  Kristian Rietveld  <kris@gtk.org>

        Yes, this chunk breaks ABI compatibility. Owen knows about it and
        agreed with it. It doesn't break ABI that bad though, things will
        still work. Please keep it silent :P.

        This patch fixes some keynav issues reported by Narayana Pattipati
        in #81633. (Also mentioned in #92037 (Sun tracking bug)).

        * gtk/gtkmarshalers.list: add two silly marshalers

        * gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
        (gtk_tree_view_real_unselect_all),
        (gtk_tree_view_real_select_cursor_row),
        (gtk_tree_view_real_toggle_cursor_row),
        (gtk_tree_view_real_expand_collapse_cursor_row),
        (gtk_tree_view_real_start_interactive_search): change the return
        type from void to gboolean, update prototypes, functions, signals and
        entries in GtkTreeViewClass,
        (gtk_tree_view_class_init): add select_cursor_row binding for
        enter key,
        (gtk_tree_view_key_press): only navigate the header button if the
        header is also visible ...

Tue Nov 26 22:05:48 2002  Kristian Rietveld  <kris@gtk.org>

        API bit of #75745, reported by Richard Hult.

        * gtk/gtkcellrenderer.h (GtkCellRendererState): add
        GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
2002-11-26 21:28:01 +00:00
Matthias Clasen
76f5554f77 Fix doc comment typos. (#97432, Vitaly Tishkov)
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): Fix doc
	comment typos.  (#97432, Vitaly Tishkov)
2002-11-21 19:28:43 +00:00
Kristian Rietveld
83e9cd5320 return a value in the range of [-1, 1] instead [0, 1],
Wed Nov 20 19:29:50 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkrbtree.c (gtk_rbtree_reorder_sort_func): return a value
        in the range of [-1, 1] instead [0, 1],
        (gtk_rbtree_reorder_invert_func): ditto,
        This makes treeview reordering working on platforms as FreeBSD and
        solaris, thanks go to Heiner Eichmann for finding this out and
        sending in a patch (#98251).

Wed Nov 20 19:27:07 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (node_free): only free the data list if
        node->data is not NULL,
        (gtk_tree_store_remove): free the data list from the node if
        needed. (#94728, pointed out by Peter Bloomfield).

Wed Nov 20 19:23:13 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_remove_column): stop editing
        and set the edited_column to NULL if edited_column is set.
        (#91288, modified patch from Josh Parsons).

Wed Nov 20 19:20:34 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_size_allocate): do a full
        redraw if vadjustment->value is bigger than tree_view->priv->height,
        (gtk_tree_view_row_deleted): free the row ref if it isn't valid
        anymore. (#83726, reported by Robert Kinsella).
2002-11-20 18:15:28 +00:00
Kristian Rietveld
b977d5af8f modify and free tmp instead of path ... (patch from #97927).
Mon Nov 18 20:42:27 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_expand_to_path): modify and
        free tmp instead of path ... (patch from #97927).

Mon Nov 18 20:31:20 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
        only _set_text if celltext->text is not NULL. (#97815, reported
        and testcase provided by Vitaly Tishkov).

Mon Nov 18 20:28:28 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
        also update the anchor_path, makes behaviour consistent with the
        other selection modification functions. (#96801, reported and
        testcase provided by Vitaly Tishkov).

Mon Nov 18 20:17:56 2002  Kristian Rietveld  <kris@gtk.org>

        Hrm, this fixes up lots of mistakes in my swap/move code ... Some
        of these mistakes where pointed out by Vitaly Tishkov in bugs
        #97403, #97404, #97412, #97618.

        * gtktreestore.[ch]: gtk_tree_store_move is now private, use
        gtk_tree_store_move_{before,after} instead now. Lots of fixes
        (more like a rewrite :) in the _move and _swap functions.

        * gtkliststore.[ch]: likewise.
2002-11-18 19:33:28 +00:00
Kristian Rietveld
ca633e17f4 This fixes a scrolling bug. Shouldn't cause problems, but you never know
Sun Oct 27 15:58:30 2002  Kristian Rietveld  <kris@gtk.org>

        This fixes a scrolling bug. Shouldn't cause problems, but you
        never know ... (#81627, testcase by Timo Sirainen).

        * gtk/gtktreeview.c (validate_visible_area): add a temporary
        implemention for non use_align, always update dy and ->top_row
        if we scroll here,
        (gtk_tree_view_clamp_node_visible): reimplement using
        _scroll_to_cell (#73895).
2002-10-27 14:53:54 +00:00
Kristian Rietveld
ecb42dc789 Another feature to create truly ugly TreeViews!: style properties for the
Wed Oct 23 01:03:43 2002  Kristian Rietveld  <kris@gtk.org>

        Another feature to create truly ugly TreeViews!: style properties
        for the even/odd colors used for row hinting. (#71595, reported
        by Owen Taylor).

        * gtk/gtktreeview.c (gtk_tree_view_class_init): add even_row_color
        and odd_row_color style properties.

        * gtk/gtkstyle.c (get_darkened_gc): support darken_count == 0 case,
        (gtk_default_draw_flat_box): rework cell coloring code to support
        user-provided even/odd row colors.

Wed Oct 23 01:01:52 2002  Kristian Rietveld  <kris@gtk.org>

        Cache signal IDs to speed up signal emission. This is a good speedup
        because GtkTreeModel emits a big number of signals.

        * gtk/gtktreemodel.c (gtk_tree_model_base_init): save IDs returned
        by g_signal_new,
        (gtk_tree_model_row_changed): use g_signal_emit instead of
        g_signal_emit_by_name,
        (gtk_tree_model_row_inserted): ditto,
        (gtk_tree_model_row_has_child_toggled): ditto,
        (gtk_tree_model_row_deleted): ditto,
        (gtk_tree_model_rows_reordered): ditto.

Wed Oct 23 00:56:15 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeselection.c (model_changed): new function,
        (gtk_tree_selection_selected_foreach): monitor changes in the model,
        bail out if the model has been changed from the foreach func.
        (#50263, reported by Havoc Pennington).

        * gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
        free anchor if applicable (#94868, reported and testcase provided by
        Daniel Elstner).
2002-10-22 23:05:29 +00:00
Manish Singh
c77265d3a7 Deprecation cleanup
Sun Oct 13 12:29:15 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
        gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
        Deprecation cleanup

        * gtk/gtkcolorseldialog.c: make window not resizable (lost
        accidently in the previous cleanup)
2002-10-13 19:34:42 +00:00
Owen Taylor
253458ec52 - Replace GdkPointerHooks with a multihead-safe GdkDisplayPointerHooks,
Mon Oct  7 15:10:00 2002  Owen Taylor  <otaylor@redhat.com>

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

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

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

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

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

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

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

        * gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
        that should have been #ifndef GTK_MULTIHEAD_SAFE.
2002-10-07 19:42:49 +00:00
Soeren Sandmann
a92b7a99f4 docs/reference/gtk/tmpl/gtkfontseldlg.sgml, gdk/gdkwindow.c,
Sat Oct  5 16:47:03 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gtk/tmpl/gtkfontseldlg.sgml, gdk/gdkwindow.c,
	gdk/x11/gdkwindow-x11.c, gtk/gtkfontsel.h, gtk/gtkimcontext.c,
	gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c

	Documentation fixes:

	#75170, Dan Winship;
	#73220, Havoc Pennington;
	#70742, Boris Shingarov;
	#72007, Alexey A. Malyshev
2002-10-05 15:09:29 +00:00
Owen Taylor
ef33adff83 Add a 'type' parameter, make public.
Thu Oct  3 14:13:33 2002  Owen Taylor  <otaylor@redhat.com>

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

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

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

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

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

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

        * gtk/gtkdnd.c: Clean up some mess/duplicated code; removing
        an extraneous use of a GdkEvent.
2002-10-03 20:53:30 +00:00
Soren Sandmann
77eee887f3 Minor documentation fixes
2002-08-10  Soren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gtk/tree_widget.sgml,
	docs/reference/gtk/tmpl/gtkdialog.sgml,
	docs/reference/gtk/tmpl/gtkentry.sgml,
	docs/reference/gtk/tmpl/gtkfilesel.sgml,
	docs/reference/gtk/tmpl/gtkfontsel.sgml,
	docs/reference/gtk/tmpl/gtkfontseldlg.sgml,
	docs/reference/gtk/tmpl/gtktreemodel.sgml,
	docs/reference/gtk/tmpl/gtkwidget.sgml, gdk/x11/gdkdisplay-x11.c,
	gtk/gtkbbox.c, gtk/gtkbox.c, gtk/gtkbutton.c, gtk/gtkcellrenderer.c,
	gtk/gtkcellrendererpixbuf.c, gtk/gtkcellrenderertext.c,
	gtk/gtkcheckmenuitem.c, gtk/gtkcontainer.c, gtk/gtkcurve.c,
	gtk/gtkdialog.h, gtk/gtkentry.c, gtk/gtkfilesel.c, gtk/gtkfontsel.c,
	gtk/gtkframe.c, gtk/gtkhandlebox.c, gtk/gtkiconfactory.c,
	gtk/gtkimage.c, gtk/gtkinvisible.c, gtk/gtkitemfactory.c,
	gtk/gtklabel.c, gtk/gtklayout.c, gtk/gtkmenu.c, gtk/gtkprogress.c,
	gtk/gtkprogressbar.c, gtk/gtkscrolledwindow.c, gtk/gtksizegroup.c,
	gtk/gtktable.c, gtk/gtktextiter.c, gtk/gtktexttag.c,
	gtk/gtktexttag.h, gtk/gtktextview.c, gtk/gtktogglebutton.c,
	gtk/gtktoolbar.c, gtk/gtktreemodel.c, gtk/gtktreeselection.c,
	gtk/gtktreestore.c, gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c,
	gtk/gtkviewport.c, gtk/gtkwidget.c, gtk/gtkwidget.h,
	gtk/gtkwindow.c:

	Minor documentation fixes

	(#89254, patch from Brett Nash;
	 #85809, patch from daten@dnetc.org;
	 #76391, patch from Ross Burton;
	 #74559, Manuel Clos;
	 #73569, #72005, Alexey A. Malyshev;
	 #70061, patch from Dennis Bj"orklund;
	 #64566, #63388, #58328, #57499, #81007, #77349, Vitaly Tishkov;
	 #78932, Vitaly Tishkov, patch from Ross Burton;
	 #73306)
2002-08-10 09:55:41 +00:00