Commit Graph

536 Commits

Author SHA1 Message Date
Matthias Clasen
48f4f383f3 Fix an RTL problem with toggles in expander columns. (#341896, Roozbeh
2006-05-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Fix
	an RTL problem with toggles in expander columns.
	(#341896, Roozbeh Pournader)
2006-05-16 01:38:53 +00:00
Søren Sandmann
6cb19cf3ad gtk/gtklayout.c (gtk_layout_realize), gtk/gtkiconview.c
Mon May 15 15:12:05 2006  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtklayout.c (gtk_layout_realize),
	* gtk/gtkiconview.c (gtk_icon_view_realize),
	* gtk/gtktreeview.c (gtk_tree_view_realize): Set the background of
	the clip windows to NULL, since they are generally invisible and
	don't have EXPOSURE set, which means they temp-unvlicker code
	doesn't apply to them.

	* gdk/x11/gdkgeometry-x11.c (_gdk_window_move_resize_child): Unset
	the background of the parent window during resizing. Invalidate
	the uncoered area of the parent window. Bug 341332.
2006-05-15 19:17:30 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Kristian Rietveld
33cddd12d7 set tmpnode to the return value of the _gtk_rbtree_insert* functions,
2006-05-02  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_row_inserted): set tmpnode to
	the return value of the _gtk_rbtree_insert* functions, since that
	is the node we really want to check for visibilty.
2006-05-02 15:50:58 +00:00
Kristian Rietveld
9fd0d4b8b9 Fix for #340200, spotted by Torsten Schoenfeld.
2006-04-30  Kristian Rietveld  <kris@imendio.com>

	Fix for #340200, spotted by Torsten Schoenfeld.

	* gtk/gtktreeview.c (gtk_tree_view_get_cell_area): fix up logic
	calculating the level indentation,
	(gtk_tree_view_start_editing): remove code calculating the
	level indentation, since _get_cell_area() takes care of this for us.
2006-04-30 15:49:25 +00:00
Matthias Clasen
373cbb13be Don't force the standard DND icon if the user has a custom DND source.
2006-04-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_drag_begin): Don't force
	the standard DND icon if the user has a custom DND source.
	(#339522, Joe Wreschnig)
2006-04-28 14:32:09 +00:00
Kristian Rietveld
3ec54866c3 new function, (validate_visible_area): when a node is validated, only
2006-04-26  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktreeview.c (node_is_visible): new function,
	(validate_visible_area): when a node is validated, only queue a
	redraw for that node, not for the entire widget (a redraw for the
	entire widget is only needed when the sizes change, and
	_queue_resize() will take care of that),
	(do_validate_rows): do not queue a redraw, redraws are only needed
	for changes in the visible area and validate_visible_area() takes
	care of that,
	(gtk_tree_view_row_inserted): for fixed height mode, only queue
	a resize and redraw if the node is visible, else no redraw is needed.
2006-04-26 14:10:01 +00:00
Kristian Rietveld
d09c7c67af If this new "row-ending-details" property is turned on, more detailed
2006-04-26  Kristian Rietveld  <kris@imendio.com>

	If this new "row-ending-details" property is turned on, more
	detailed "details" will be passed to the theme engine for drawing
	the background, drop indicator and focus rectangle.  Requirement is
	that the theme engine supports these details. (#333760).

	* gtk/gtktreeview.c (gtk_tree_view_class_init): add row-ending-details
	style property,
	(gtk_tree_view_bin_expose): pass more detailed detail to
	gtk_paint_flat_box() if the property is turned on,
	(gtk_tree_view_bin_expose): likewise for the drop indicator,
	(gtk_tree_view_bin_expose): likewise for the focus rectangle.
2006-04-26 12:48:03 +00:00
Kristian Rietveld
ebe22cb38a (broken pipe) 2006-04-26 12:39:25 +00:00
Matthias Clasen
0d10969b9f Match parameter names with the headers.
2006-04-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkclipboard.h:
	* gtk/gtkprinter.c:
	* gtk/gtkprintsettings.h:
	* gtk/gtkprintsettings.c: Match parameter names with the headers.

	* gtk/gtkprintoperation-unix.c (gtk_print_run_page_setup_dialog):
	Add docs.

	* gtk/gtktextbufferrichtext.c (gtk_text_buffer_deserialize):
	* gtk/gtkstatusicon.c (gtk_status_icon_get_storage_type):
	* gtk/gtktreeview.c (gtk_tree_view_set_search_position_func):
	* gtk/gtktreeview.c (gtk_tree_view_get_headers_clickable):
	* gtk/gtkcellrendererspin.c (gtk_cell_renderer_spin_new):
	* gtk/gtkmenu.c (gtk_menu_get_for_attach_widget): Fix the docs.
2006-04-24 05:42:12 +00:00
Matthias Clasen
7b19dcbe79 Reorganize slightly to avoid a possible NULL dereference. (Coverity)
2006-04-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_header_focus): Reorganize slightly
	to avoid a possible NULL dereference.  (Coverity)
2006-04-13 04:31:51 +00:00
Matthias Clasen
3014a278ed Don't allow passing NULL for x1 or x2, adjust callers.
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_arrow_xrange): Don't
	allow passing NULL for x1 or x2, adjust callers.
2006-04-13 03:40:48 +00:00
Matthias Clasen
e12d6657ee Remove some unused variables.
2006-04-11  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextview.c (selection_motion_event_handler): Remove
        some unused variables.

        * gtk/gtktreeview.c ((gtk_tree_view_search_position_func): Apply
        a patch from David Trowbridge to improve the positioning of the
        search popup.  (#338047)
2006-04-12 02:48:43 +00:00
Matthias Clasen
8a1478a58f Remove some accidentally committed stuff 2006-03-22 20:06:16 +00:00
Matthias Clasen
3fb3db9f7a Use fg_gc to draw the inter-row drop highlight. Also draw the line all the
2006-03-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Use fg_gc to
	draw the inter-row drop highlight. Also draw the line all the
	way across, and flip it in RTL mode. (#334906, Ian McDonald)
2006-03-22 18:46:08 +00:00
Federico Mena Quintero
bb7fd9549b Make Shift-P and Shift-N activate typeahead in GtkTreeView (i.e. they are
2006-03-10  Federico Mena Quintero  <federico@novell.com>

	Make Shift-P and Shift-N activate typeahead in GtkTreeView
	(i.e. they are just normal capital letters).  Fixes bug #334098.

	* gtk/gtktreeview.c (gtk_tree_view_add_move_binding): Add an
	"add_shifted_binding" argument which determines whether we'll add
	the same binding with GDK_SHIFT_MASK.
	(gtk_tree_view_class_init): Use add_shifted_binding=FALSE for GDK_p
	and GDK_n; use TRUE for all the rest.
2006-03-10 17:16:50 +00:00
Kristian Rietveld
2e6ba401cc rename to _gtk_tree_selection_row_is_selectable and export internally,
2006-03-01  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktreeselection.c (row_is_selectable): rename to
	_gtk_tree_selection_row_is_selectable and export internally,
	(gtk_tree_selection_real_select_node): changed so it is always
	possible to unselect insensitive nodes, changed the logic a bit to
	be more clear.

	* gtk/gtktreeprivate.h: add _gtk_tree_selection_row_is_selectable.

	* gtk/gtktreeview.c (gtk_tree_view_row_changed): Unselect a row if
	it became insensitive.
2006-03-01 12:18:57 +00:00
Kristian Rietveld
236760d04e fix compiler warning.
2006-02-06  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_get_search_entry): fix compiler
	warning.
2006-02-06 18:32:59 +00:00
Kristian Rietveld
58e77fe25b #322591, Jonathan Blandford.
2006-01-24  Kristian Rietveld  <kris@gtk.org>

	#322591, Jonathan Blandford.

	* gtk/gtktreeview.[ch] (gtk_tree_view_get_search_entry),
	(gtk_tree_view_set_search_entry),
	(gtk_tree_view_get_search_position_func),
	(gtk_tree_view_set_search_position_func): New functions,
	and small adaptions to the tree view code to allow for setting
	the entry and search position function.

	* gtk/gtktreeprivate.h: Removed GtkTreeViewSearchDialogPositionFunc
	typedef, which is now in gtktreeview.h as
	GtkTreeViewSearchPositionFunc.  Add/update fields.

	* gtk/gtk.symbols: Add new functions.

	* tests/testtreesort.c: Add a little test for _set_search_entry().
2006-01-24 10:49:29 +00:00
Kristian Rietveld
be80745aac Revert previous commit after more searching in the bugzilla archives (see
2006-01-22  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Revert previous
	commit after more searching in the bugzilla archives (see #309221).
2006-01-22 16:04:02 +00:00
Kristian Rietveld
d1337e1012 Remove second call to gtk_tree_view_column_cell_set_cell_data, since we
2006-01-22  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Remove second call
	to gtk_tree_view_column_cell_set_cell_data, since we also set the
	cell data before iterating over the columns for exposure. (Fixes
	#322471, Duncan Coutts).
2006-01-22 15:50:31 +00:00
Kristian Rietveld
f396a237dd fixup adjustments and top_row if the current dy + page_size exceeds the
2006-01-14  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate),
	(validate_visible_area): fixup adjustments and top_row if the
	current dy + page_size exceeds the new tree view height. (Fixes
	#316689, reported by Chris Lord).
2006-01-14 19:41:07 +00:00
Michael Natterer
eb8f23f90f don't animate the expander arrows if gtk-enable-animations is FALSE (bug
2006-01-13  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_expand_row)
	(gtk_tree_view_real_collapse_row): don't animate the expander
	arrows if gtk-enable-animations is FALSE (bug #142582).
2006-01-13 10:03:31 +00:00
Matthias Clasen
04eceaf621 Use the slice allocator for many small allocations.
2006-01-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelmap.c:
	* gtk/gtkactiongroup.c:
	* gtk/gtkdialog.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkgc.c:
	* gtk/gtkkeyhash.c:
	* gtk/gtkplug.c:
	* gtk/gtktextiter.c:
	* gtk/gtktextlayout.c:
	* gtk/gtkuimanager.c:
	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c:
	* gtk/gtkxembed.c: Use the slice allocator for many small
	allocations.

	* gtk/gtkcolorsel.c:
	* gtk/gtktreeview.c: Use IPN.

	* gtk/gtkwidget.c: Remove an unused field from the AccelPath
	struct.
2006-01-04 07:06:12 +00:00
Matthias Clasen
b540c366cc Add docs for the row-activated signal. (#324044, Davyd Madeley)
2005-12-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_class_init): Add docs
	for the row-activated signal.  (#324044, Davyd Madeley)
2005-12-14 18:12:36 +00:00
Matthias Clasen
da6a0bf6d8 Use the correct window when synthesizing the key event. (#323077, Sadrul
2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Use the correct
	window when synthesizing the key event.  (#323077,
	Sadrul Habib Chowdhury)

	(gtk_tree_view_search_key_press_event): Also listen for
	GDK_ISO_Left_Tab.  (#323077, Sadrul Habib Chowdhury)
2005-12-07 17:09:54 +00:00
Matthias Clasen
4174446a6d Fix refcounting issues with new_event and its window.
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Fix refcounting
	issues with new_event and its window.
2005-12-06 18:03:50 +00:00
Matthias Clasen
eb79da2f53 Free new_event after sending it to the search entry. (#323209, Crispin
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Free new_event
	after sending it to the search entry.  (#323209, Crispin Flowerday)
2005-12-05 20:12:33 +00:00
Matthias Clasen
924765a2fe Properly handle model changes in GtkTreeSelection: (#322569, Milosz
2005-11-29  Matthias Clasen  <mclasen@redhat.com>

	Properly handle model changes in GtkTreeSelection: (#322569,
	Milosz Derezynski)

	* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach):
	Get a reference to the model, and stop the iteration if the model
	of the treeview is changed on the way.

	* gtk/gtktreeprivate.h:
	* gtk/gtktreeselection.c (_gtk_tree_selection_emit_changed): New
	private function to emit the GtkTreeSelection::changed signal.

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Call
	_gtk_tree_selection_emit_changed() when the model changes.
2005-11-29 19:34:15 +00:00
Matthias Clasen
7014ef0032 Fix two memory handling problems in GtkTreeView: (#322350, Søren
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	Fix two memory handling problems in GtkTreeView: (#322350,
	Søren Sandmann)

	* gtk/gtktreeview.c (gtk_tree_view_destroy)
	(gtk_tree_view_set_model): Remove all references to nodes in
	the old model.
	(gtk_tree_view_real_collapse_row): Unmark expanded_collapsed_node
	before removing the children.
2005-11-27 20:36:15 +00:00
Tim Janik
fbb2e3f4f5 deprecated floating/sink API and implemented it in terms of the GObject
Wed Nov 23 18:55:47 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkobject.[hc]: deprecated floating/sink API and implemented it
        in terms of the GObject floating/sink API.

        * gtk/gtkaboutdialog.c:
        * gtk/gtkaction.c:
        * gtk/gtkcellview.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcombobox.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkiconview.c:
        * gtk/gtkinvisible.c:
        * gtk/gtkitemfactory.c:
        * gtk/gtklayout.c:
        * gtk/gtkmenu.c:
        * gtk/gtkmenutoolbutton.c:
        * gtk/gtknotebook.c:
        * gtk/gtkprogress.c:
        * gtk/gtkrange.c:
        * gtk/gtkspinbutton.c:
        * gtk/gtkstatusicon.c:
        * gtk/gtktext.c:
        * gtk/gtktextview.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktreeitem.c:
        * gtk/gtktreeview.c:
        * gtk/gtktreeviewcolumn.c:
        * gtk/gtkuimanager.c:
        * gtk/gtkviewport.c:
        * gtk/gtkwidget.c:
        * gtk/gtkwindow.c:
        ported to use GObject's g_object_ref_sink().

        * gtk/gtkcolorsel.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkaboutdialog.c:
        fixed compiler warnings.
2005-11-23 18:06:58 +00:00
Matthias Clasen
b94e9ee56a Another erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_motion_resize_column): Another
	erroneous semicolon.
2005-11-10 17:57:14 +00:00
Matthias Clasen
cfd7c13b6c Implement a getter for headers-clickable. (#163851, Richard Hult)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c: Implement a getter for headers-clickable.
	(#163851, Richard Hult)
2005-11-10 14:18:45 +00:00
Matthias Clasen
96335d4326 Handle Shift-G to go to the previous match, like firefox. (#320061,
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
	Shift-G to go to the previous match, like firefox.  (#320061, Christian
	Neumair)
2005-10-28 15:13:54 +00:00
Matthias Clasen
cfaa87847a Return FALSE, so we don't flush repeatedly. (#319151, Alexander Larsson)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): Return
	FALSE, so we don't flush repeatedly.  (#319151, Alexander Larsson)
2005-10-28 13:53:16 +00:00
Matthias Clasen
18f32d04d2 Be more careful about initializing cell_area. (#319382, Tommi Komulainen)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
	careful about initializing cell_area.  (#319382, Tommi
	Komulainen)
2005-10-27 04:51:25 +00:00
Matthias Clasen
ec76057b9b Don't crash on duplicate destroy. (#318953, Gustavo Carneiro)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't crash
	on duplicate destroy.  (#318953, Gustavo Carneiro)
2005-10-26 19:47:48 +00:00
Michael Natterer
d25d65852f check for the widget being realized, in addition to being visible, to
2005-10-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
	widget being realized, in addition to being visible, to avoid
	running into precondition check in gtk_tree_view_get_cell_area().
	(approved by Kris).
2005-10-22 21:08:23 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00
Matthias Clasen
676b09e798 Silently return NULL if the widget is not realized. (#316023, Guillaume
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
	* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
	return NULL if the widget is not realized.  (#316023,
	Guillaume Cottenceau)
2005-09-13 13:33:01 +00:00
Matthias Clasen
af89d145f7 Use gdk_atom_intern_static_string() where appropriate.
* gtk/*.c:  Use gdk_atom_intern_static_string() where
	appropriate.
2005-09-11 05:48:27 +00:00
Matthias Clasen
d8b026adb0 Document memory handling. (#314975, Torsten Schoenfeld)
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_visible_range): Document
	memory handling.  (#314975, Torsten Schoenfeld)
2005-09-09 16:24:49 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Jonathan Blandford
320c78ce86 clear scroll_to_path if the model changes.
Sat Aug 20 16:12:14 2005  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_set_model): clear
        scroll_to_path if the model changes.

        * gtk/gtkiconview.c: (gtk_icon_view_destroy),
        (gtk_icon_view_size_allocate), (gtk_icon_view_set_cursor),
        (gtk_icon_view_scroll_to_path): Handle scrolling to a path before
        we're realized, #312798
        (gtk_icon_view_set_model): clear scroll_to_path if the model
        changes.
2005-08-20 20:16:34 +00:00
Matthias Clasen
445b61e3e7 Return FALSE if the tree is empty. (#313891, Guillaume Cottenceau)
2005-08-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_visible_range): Return
	FALSE if the tree is empty.  (#313891, Guillaume Cottenceau)
2005-08-19 14:05:32 +00:00
Kristian Rietveld
48729ed118 queue a draw for the entire widget if any column changes width. (Fixes
2005-08-11  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate_columns): queue
	a draw for the entire widget if any column changes width. (Fixes
	#311026, reported by Frederic Crozat).
2005-08-11 17:47:18 +00:00
Kristian Rietveld
a6ecb70b14 new function. (fixes #105252, suggestion from Mikael Hallendal).
2005-07-14  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.[ch] (gtk_tree_view_get_visible_range): new
	function. (fixes #105252, suggestion from Mikael Hallendal).
2005-07-13 23:05:27 +00:00