Commit Graph

484 Commits

Author SHA1 Message Date
Kristian Rietveld
22554a161f when !separator, don't add the focus_line_width to width/height (happens
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_row): when !separator, don't add
	the focus_line_width to width/height (happens in
	_column_cell_get_size), but do add the vertical-separator to height,
	we weren't taking this into account before.

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
	take vertical-separator into account. (#309137, Ross Burton).
2005-07-13 11:57:10 +00:00
Kristian Rietveld
78c52d7141 add binding entry for ctrl + backspace (move focus to parent without
2005-07-11  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_class_init): add binding entry
	for ctrl + backspace (move focus to parent without affecting
	selection),
	(gtk_tree_view_real_select_cursor_parent): implement ctrl+backspace
	and simplify the function a bit. (#309296, Kathy Fernandes).
2005-07-11 18:52:33 +00:00
Kristian Rietveld
4b28e78a48 remove unneeded check for negative window_y.
2005-07-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): remove
	unneeded check for negative window_y.
2005-07-10 17:19:01 +00:00
Kristian Rietveld
53db7cc902 also move to the next match when ctrl+g is pressed. (#156657, Matt T.
2005-07-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): also move
	to the next match when ctrl+g is pressed. (#156657, Matt T. Proud).
2005-07-10 15:55:10 +00:00
Kristian Rietveld
2ebd7d1567 rework function to make page up/down behave the same as in GtkTextView.
2005-07-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): rework
	function to make page up/down behave the same as in GtkTextView.
	(Fixes #101220, Owen Taylor).
2005-07-10 15:47:18 +00:00
Kristian Rietveld
6a5ac16898 when open_all is TRUE, traverse the newly built tree to emit row_expanded
2005-07-09  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): when
	open_all is TRUE, traverse the newly built tree to emit
	row_expanded for the subitems. (rev 1.444, patch in #172319
	broke this). Fixes #305582, reported by Billy Biggs.
2005-07-09 13:20:10 +00:00
Kristian Rietveld
7f5b9100ed Fixes #165034, reported by Jorn Baayen.
2005-07-08  Kristian Rietveld  <kris@gtk.org>

	Fixes #165034, reported by Jorn Baayen.

	* gtk/gtkrbtree.[ch] (_gtk_rbtree_set_fixed_height): add a
	mark_valid parameter (so we can mark all nodes as valid when we
	are setting them to the fixed height).

	* gtk/gtktreeview.c (initialized_fixed_height_mode): mark all
	nodes as valid when setting the fixed height,
	(do_validate_rows): update call to _set_fixed_height,
	(gtk_tree_view_row_inserted): mark node as valid when fixed
	height mode is enabled and a height has been set,
	(gtk_tree_view_build_tree): if fixed height mode is enabled,
	mark new nodes as valid in addition to setting the height.
2005-07-08 19:17:10 +00:00
Kristian Rietveld
45c7c2b0ca in the 'main' expose loop, add back the calls to _set_cell_data removed
2005-07-05  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): in the
	'main' expose loop, add back the calls to _set_cell_data
	removed earlier. (#309221, Matthias Clasen).
2005-07-05 21:11:32 +00:00
Matthias Clasen
6cc79068cf Stop column header drag operations if the grab is broken.
2005-06-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_grab_broken): Stop column
	header drag operations if the grab is broken.
2005-06-26 06:51:55 +00:00
Matthias Clasen
a7c8b44628 Change the keynav for header reordering and resizing to Alt-arrows and
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Change the
	keynav for header reordering and resizing to Alt-arrows and
	Shift-Alt-arrows, following a proposal by the keynav
	authority. (#308666, Calum Benson)
2005-06-23 20:19:21 +00:00
Kristian Rietveld
d7cfee4b16 added a check which avoids processing updates on bin_window and scrolling
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_clamp_node_visible): added a
	check which avoids processing updates on bin_window and scrolling
	if the node is already visible. (#170600, Billy Biggs).
2005-06-19 19:22:46 +00:00
Kristian Rietveld
1bdf71943f only keep the row at the same position if the full row is visible.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_visible_area): only keep the
	row at the same position if the full row is visible. (#304623,
	Jorn Baayen).
2005-06-19 18:40:35 +00:00
Kristian Rietveld
9d1a05c3b9 set dy to zero if treeview's height is smaller than the current page_size
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): set dy to zero
	if treeview's height is smaller than the current page_size (just
	like we do elsewhere).
2005-06-19 18:00:56 +00:00
Kristian Rietveld
e02fe68aeb Make mousewheel scrolling possible in typeahead mode, suggestion from
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	Make mousewheel scrolling possible in typeahead mode, suggestion
	from Reinout van Schouwen (#307898).

	* gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
	connect treeview search window to scroll_event signal,
	(gtk_tree_view_search_scroll_event): implement.
2005-06-19 17:37:07 +00:00
Kristian Rietveld
afc4b03c73 pass the event on to treeview, so it has a change of selecting a row, etc.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_search_button_press_event): pass
	the event on to treeview, so it has a change of selecting a row, etc.
	(#169677, Kirk Bridger).
2005-06-19 13:42:13 +00:00
Kristian Rietveld
d4fdc6b7a9 This commit includes a fix for #169463, Stefan Kost.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	This commit includes a fix for #169463, Stefan Kost.

	* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
	when cell_area is set, return cell_area width/height as width/height,
	so the focus rectangle will be drawn correctly.

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
	of focus-line-width property,
	(validate_row): take focus_line_width into account.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	also take focus_line_width into account when calculating the cell_area
	y and height (before, we only took it into account when calculating
	x and width).
2005-06-19 12:44:12 +00:00
Kristian Rietveld
6db99a9b8f undo merging of the separate loop setting cell data with cell drawing loop
2005-06-18  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
	of the separate loop setting cell data with cell drawing loop
	(introduced in revision 1.280), since this breaks focus handling
	wrt special cells.
2005-06-18 12:11:26 +00:00
Manish Singh
2122756189 remove unused variable height_old.
Sat Jun 18 04:21:58 2005  Manish Singh  <yosh@gimp.org>

        * gtk/gtktreeview.c (do_presize_handler): remove unused variable
        height_old.
2005-06-18 11:22:44 +00:00
Matthias Clasen
7645a361ba Typo fixes 2005-06-18 05:33:55 +00:00
Kristian Rietveld
015b3c5671 Fix #160281, testcase from Peter Bloomfield.
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	Fix #160281, testcase from Peter Bloomfield.

	* gtk/gtktreeview.c (do_presize_handler): always size request
	and update adjustments in fixed height mode,
	(gtk_tree_view_build_tree): if a fixed height is set, set this
	height on newly added nodes.
2005-06-17 19:44:53 +00:00
Kristian Rietveld
0771297449 make sure the row above 'above_path' is always in a validated state, so it
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_visible_area): make sure the row
	above 'above_path' is always in a validated state, so it does
	not mess up scrolling. (#303319, testcase from Billy Biggs).
2005-06-17 17:34:40 +00:00
Kristian Rietveld
b060f6e12d don't try to update the top_row rowref ourselves here, but just have
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_visible_area): don't try to update
	the top_row rowref ourselves here, but just have _dy_to_top_row()
	do it,
	(gtk_tree_view_scroll_to_cell): handle scrolling via
	validate_visible_area() if the treeview is not visible or needs
	reallocation. (#165246, Nickolay V. Shmyrev).
2005-06-17 14:11:19 +00:00
Kristian Rietveld
51f11dd497 Fixes #307914 (Alexander Larsson), fixing some breakage caused by my
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	Fixes #307914 (Alexander Larsson), fixing some breakage caused
	by my previous commit.

	* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
	when it fits on a single page,
	(scroll_sync_handler): same here.
2005-06-17 11:38:22 +00:00
Kristian Rietveld
5641d252be Patch for #163214 (reported by Tommi Komulainen) and fixes some other
2005-06-15  Kristian Rietveld  <kris@gtk.org>

	Patch for #163214 (reported by Tommi Komulainen) and fixes some
	other scrolling/validation related bugs along the why.

	* gtk/gtktreeview.c (gtk_tree_view_size_request): run
	do_validate_rows once and don't queue a size request there,
	(gtk_tree_view_size_allocate): don't update vadj value without
	reason, sync top_row/dy after the window sizes and adjustments
	are in sync again,
	(validate_visible_area): always update dy when scrolling,
	manually set top_row here after changing the vadj (don't depend
	on _adjustment_changed and top_row/dy sync to do this), since we
	now always set top_row here correctly, we can always free
	scroll_to_path at the end which avoids infinite expose loops,
	(do_validate_rows): add queue_resize boolean, remove top_row/dy
	sync here, we cannot do it safely at this place since the
	window sizes and adjustments are out of sync,
	(validate_rows), (validate_rows_handler): update call to
	do_validate_rows().
2005-06-14 22:26:04 +00:00
Matthias Clasen
793591fcf0 Check start_button_mask before starting a drag. (#149058, Andreas Volz)
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row):
	Check start_button_mask before starting a drag.  (#149058,
	Andreas Volz)
2005-06-12 05:13:54 +00:00
Matthias Clasen
d53bffc04d Don't crash if search_window is NULL. (#304914, Victor Osadci, testcase by
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
	Don't crash if search_window is NULL.  (#304914, Victor Osadci,
	testcase by Olaf Vitters)
2005-06-08 20:14:03 +00:00
Matthias Clasen
083e509487 Draw the background of rows insensitive when the treeview is insensitive.
2005-05-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Draw the
	background of rows insensitive when the treeview is insensitive.
	(pointed out by Billy Biggs)
2005-05-25 17:19:56 +00:00
Matthias Clasen
633a08fa4e Remove an unused variable. (#305130, Jaap A. Haitsma)
2005-05-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_init): Remove
	an unused variable.  (#305130, Jaap A. Haitsma)
2005-05-23 21:03:15 +00:00
Matthias Clasen
763452a14f Fix some errors in the handling of drop columns. (#143355, John Finlay)
2005-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
	(gtk_tree_view_set_column_drag_info): Fix some errors in the
	handling of drop columns.  (#143355, John Finlay)
2005-05-18 16:32:38 +00:00
Matthias Clasen
1d50b80aed Always initialize child-visible to FALSE, otherwise we may end up with the
2005-05-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_insert_page_menu): Always
	initialize child-visible to FALSE, otherwise we may end up
	with the wrong page visible initially.  (#302283, Patrik Fimml)

	* gtk/gtktreeview.c (gtk_tree_view_draw_arrow): Make expanders
	appear insensitive in insensitive treeviews.
2005-05-06 19:36:41 +00:00
Matthias Clasen
d0b22eb542 Another one 2005-05-06 03:05:51 +00:00
Matthias Clasen
04f0490872 typo fix 2005-05-06 03:05:17 +00:00
Matthias Clasen
6d0627cb0d Set background upon state changes. (#301651, Billy Biggs)
2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_state_changed): Set
	background upon state changes.  (#301651, Billy Biggs)
	(gtk_tree_view_get_path_at_pos): Take RTL into account
	when iterating over the columns.  (#302163)
2005-04-29 18:50:03 +00:00
Matthias Clasen
eb92e0784a Set background upon state changes. (#301651, Billy Biggs)
2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_state_changed): Set
	background upon state changes.  (#301651, Billy Biggs)
2005-04-29 18:17:10 +00:00
Matthias Clasen
3962c1166f Fix double-click to autosize treeview columns. This was probably broken
2005-04-08  Matthias Clasen  <mclasen@redhat.com>

	Fix double-click to autosize treeview columns. This was
	probably broken since 2.2 ! (#169675)

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Leave the
	"user-resized" state of the column on a double-click to
	autosize.
	(gtk_tree_view_button_press, gtk_tree_view_motion_resize_column):
	Enter the "user-resized" state of the column only if a drag
	actually changes the column width, not on any click.
2005-04-08 12:53:09 +00:00
Matthias Clasen
a9cdbf0fb5 Add a hint about hiding expanders.
2005-04-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_expander_column): Add
	a hint about hiding expanders.
2005-04-07 13:36:48 +00:00
Matthias Clasen
25c468dfbb Pass the target list to the underlying dnd implementation, otherwise we
2005-04-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_enable_model_drag_source)
	(gtk_tree_view_enable_model_drag_dest): Pass the target list
	to the underlying dnd implementation, otherwise we miss the
	target info in the drag-data-received signal.  (#164085, Jorn
	Baayen)
2005-04-07 03:55:13 +00:00
Matthias Clasen
d1dd40d9ae Document -1 as possible value.
2005-04-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_search_column): Document
	-1 as possible value.
2005-04-07 02:41:27 +00:00
Matthias Clasen
88eb09d633 Avoid a few unnecessary calls to gdk_window_get_pointer(). (#168015, Billy
2005-04-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_motion_resize_column)
	(gtk_tree_view_bin_expose): Avoid a few unnecessary calls
	to gdk_window_get_pointer(). (#168015, Billy Biggs)
2005-04-06 16:47:01 +00:00
Matthias Clasen
3372325195 Add some more docs on interactive search.
2005-04-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_search_column): Add some
	more docs on interactive search.
2005-04-05 12:52:17 +00:00
Jonathan Blandford
77bc53053b change to use gtk_tree_view_real_expand_row() instead of doing this by
Mon Apr  4 19:13:23 2005  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_expand_all): change to use
        gtk_tree_view_real_expand_row() instead of doing this by hand.
2005-04-04 23:41:19 +00:00
Federico Mena Quintero
e1fc6b423d Merged from gtk-2-6:
2005-03-30  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fix #170755:

	* gtk/gtktreeview.c (gtk_tree_view_row_changed): Only stop editing
	if the row which changed is the same as the row being edited.
2005-03-30 21:48:10 +00:00
Matthias Clasen
15ea081b5f Make enable_search control only typeahead, not C-f. (#170435, Sven
2005-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
	Make enable_search control only typeahead, not C-f.  (#170435,
	Sven Neumann)
	(gtk_tree_view_start_interactive_search): Pass keybinding == TRUE.
2005-03-30 18:20:59 +00:00
Matthias Clasen
c1eb6133d4 Don't pop up the context menu of the search entry if it is not visible.
2005-03-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Don't pop up
	the context menu of the search entry if it is not visible.
	(#169534, Billy Biggs)
2005-03-28 06:03:42 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
263bce4445 x
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init):
	* gtk/gtkrange.c (gtk_range_class_init):
	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
	* gtk/gtktexttag.c (gtk_text_tag_class_init):
	* gtk/gtktextview.c (gtk_text_view_class_init):
	* gtk/gtkscrollbar.c (gtk_scrollbar_class_init):
	* gtk/gtknotebook.c (gtk_notebook_class_init):
	* gtk/gtkentry.c (gtk_entry_class_init):
	* gtk/gtkexpander.c (gtk_expander_class_init):
	* gtk/gtkarrow.c (gtk_arrow_class_init):
	* gtk/gtkalignment.c (gtk_alignment_class_init):
	* gtk/gtkbutton.c (gtk_button_class_init):
	* gtk/gtklabel.c (gtk_label_class_init):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init):
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init): x
	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init):
	* gtk/gtktreeview.c (gtk_tree_view_class_init):
	* gtk/gtkbox.c (gtk_box_class_init):
	* gtk/gtkwindow.c (gtk_window_class_init, gtk_window_class_init):
	* gtk/gtkcontainer.c (gtk_container_class_init):
	* gtk/gtkwidget.c (gtk_widget_class_init):
	* gtk/gtkobject.c (gtk_object_class_init): Use canonical names
	when registering param specs.
2005-03-09 04:04:40 +00:00
Jonathan Blandford
20113848dd Patch from jorn@nl.linux.org (Jorn Baayen) to notice changes to
Wed Feb 23 17:34:01 2005  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_node_queue_redraw): Patch from
        jorn@nl.linux.org (Jorn Baayen) to notice changes to fixed-height
        widgets.
2005-02-23 22:38:49 +00:00
Matthias Clasen
a0c5253c26 Fixes for #143829, Tommi Komulainen, Christian Persch:
2005-02-16  Matthias Clasen  <mclasen@redhat.com>

	Fixes for #143829, Tommi Komulainen, Christian Persch:

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Remove the
	typeselect_flush_timeout when destroying the widgets
	it is operating on.
	(gtk_tree_view_ensure_interactive_directory): Add the
	popup to the window group of the toplevel it belongs to.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget)
	(gtk_combo_box_popup): Do the same here.
2005-02-16 16:37:24 +00:00