Commit Graph

420 Commits

Author SHA1 Message Date
Matthias Clasen
0caefdebc0 Don't start a drag if we loose the grab.
2004-10-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a
	drag if we loose the grab.
2004-10-08 19:00:57 +00:00
Matthias Clasen
ca4f063f28 Set cell data unconditionally. (#152562, Federico Mena Quintero)
2004-10-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Set cell data
	unconditionally.  (#152562, Federico Mena Quintero)
2004-10-08 14:42:39 +00:00
Matthias Clasen
68b72ab7f8 Set the cursor before changing the selection to make the file chooser
2004-10-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_iter): Set the cursor
	before changing the selection to make the file chooser preview
	update work better.  (#143826, Tommi Komulainen)
2004-10-06 17:06:35 +00:00
Matthias Clasen
41f17245c5 Fix positioning near the monitor boundaries. (#154341, Ken Harris)
2004-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_position_func):
	Fix positioning near the monitor boundaries.  (#154341,
	Ken Harris)
2004-10-03 05:19:52 +00:00
Matthias Clasen
c7f30d069e Fix typo in docs. (#153811, Billy Biggs)
2004-09-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_append_column): Fix typo in
	docs.  (#153811, Billy Biggs)
2004-09-27 04:13:37 +00:00
Matthias Clasen
997980a122 Don't leak old_text. (#153467, Christian Persch)
2004-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Don't leak old_text.
	(#153467, Christian Persch)
2004-09-22 20:26:34 +00:00
Matthias Clasen
03a6952c48 Set the cursor to the first selected row instead of always to the first
2004-09-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_focus_to_cursor): Set the cursor
	to the first selected row instead of always to the first row if there
	is no cursor.  (#143270, Jean Bréfort)

	* tests/testfilechooser.c (main): Fix a few typos.
2004-09-14 19:37:48 +00:00
Matthias Clasen
221233a981 Change the default expander size to 12 to compensate for the recent change
2004-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkexpander.c:
	* gtk/gtktreeview.c: Change the default expander size to 12 to compensate
	for the recent change to gtk_default_draw_expander().

	* gtk/gtkstyle.c (gtk_default_draw_expander): Use a linewidth of one
	for expander sizes up to 16.
2004-09-13 18:25:48 +00:00
Matthias Clasen
5210bf17c6 Make it compile.
2004-08-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.

2004-08-27  Matthias Clasen  <mclasen@redhat.com>

	Fix #151112, Olexiy Avramchenko:

	* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout):
	* gtk/gtkiconview.c (scroll_timeout, layout_callback)
	(gtk_icon_view_item_accessible_idle_do_action):
	* gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle)
	(popup_idle): Protect idle callbacks and timeouts with
	GDK_THREADS_ENTER/_LEAVE.

	* gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
	call update_dialog() from an idle with the necessary protection.
2004-08-30 13:16:39 +00:00
Bill Haneman
3124567f18 Fix for #131226, allow selection of singleton list items in multi-select
lists, via keyboard.  [on behalf of Padraig O'Briain]
2004-08-26 14:12:31 +00:00
Manish Singh
95674320d9 initialize path so we don't potentially use an undefined pointer.
Wed Aug 25 17:14:58 2004  Manish Singh  <yosh@gimp.org>

        * gtk/gtktreeview.c (gtk_tree_view_search_activate): initialize
        path so we don't potentially use an undefined pointer.

        * gtk/gtkfilechooserdefault.c (shortcuts_list_create): add G_CALLBACK
        cast for tree_view_keybinding_cb.

        * gtk/gtkfilechooserdefault.c (location_entry_create): cast to
        GTK_FILE_CHOOSER_ENTRY for _gtk_file_chooser_entry_set_file_part()
        calls.

        * gtk/gtkcellrenderercombo.c (gtk_cell_renderer_combo_start_editing):
        cast to GTK_COMBO_BOX for gtk_combo_box_set_active_iter() call.

        * gtk/gtkselection.c (selection_get_text_plain): make len a gsize,
        since that's what g_convert_with_fallback() expects.
2004-08-26 00:20:25 +00:00
Jonathan Blandford
c2008c9a62 activate the typeahead entry on enter.
Wed Aug 25 16:14:34 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_search_activate): activate the
        typeahead entry on enter.
2004-08-25 20:15:45 +00:00
Jonathan Blandford
8bc41273f6 Don't handle the event if we have no children.
Tue Aug 24 02:06:37 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtktreeview.c
        (gtk_tree_view_real_expand_collapse_cursor_row): Don't handle the
        event if we have no children.

        * gtk/gtkfilechooserdefault.c (trap_activate_cb):
        (tree_view_keybinding_cb):Since GtkTreeView has a keybinding
         attached to '/', we need to catch keypresses before the TreeView
         gets them.
        (gtk_file_chooser_default_class_init): add '/' to be a keybinding
        to the C-l dialog.
        (location_entry_create): Clear the text to "" when loading a file.
        This has a much better feel than putting the currently selected
        in.
        * #include <errno.h>
2004-08-25 19:10:38 +00:00
Matthias Clasen
2f2dee4341 Take header height and adjustment into account. (#136496, Pawek Salek)
2004-08-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_node_queue_redraw): Take header
	height and adjustment into account.  (#136496, Pawek Salek)
2004-08-24 14:26:47 +00:00
Manish Singh
ba6fc3ccd8 Initialize height from fixed_height before we do anything, so it always
Wed Aug 18 16:18:00 2004  Manish Singh  <yosh@gimp.org>

        * gtk/gtktreeview.c (gtk_tree_view_row_inserted): Initialize height
        from fixed_height before we do anything, so it always has a valid
        value.

        * gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Fix call
        to gtk_tree_model_get (missing "," in param list).
2004-08-18 23:18:15 +00:00
Matthias Clasen
e1e86b06a1 Make fixed height mode handle insertions. (135955, Michael Vogt, testcase
Fri Aug 13 01:06:56 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_row_inserted):
	Make fixed height mode handle insertions.  (135955,
	Michael Vogt, testcase by Tim-Philipp Müller, fix by
	Pawel Salek)
2004-08-13 05:11:24 +00:00
Matthias Clasen
0151fe7ced Don't start a drag if the treeview is only a drag destination. (#149836,
Wed Aug 11 19:20:34 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row):
	Don't start a drag if the treeview is only a
	drag destination.  (#149836, Pawel Salek)
2004-08-11 23:21:05 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Matthias Clasen
f62365d27c Make the column drag code a bit more robust (still scary, though).
Sat Aug  7 01:26:08 2004  Matthias Clasen  <maclas@gmx.de>

	Make the column drag code a bit more robust (still scary,
	though).  (#106992, Christian Biere)

	* gtk/gtktreeview.c (_gtk_tree_view_column_start_drag): Assert
	that cur_reorder is NULL here.

	* gtk/gtktreeview.c (gtk_tree_view_button_release_drag_column):
	Reset cur_reorder to NULL, and only hide drag_highlight_window
	if it exists.
2004-08-07 05:28:43 +00:00
Matthias Clasen
1629735020 Fix an off-by-one error. (#141809, Markku Vire)
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): Fix
	an off-by-one error.  (#141809, Markku Vire)
2004-08-06 17:38:51 +00:00
Matthias Clasen
c9cf312cdd s/childs/children/g.
Wed Aug  4 01:37:57 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c:
	* gtk/gtktreestore.c:
	* gtk/gtktreemodelfilter.c:
	* gtk/gtknotebook.c: s/childs/children/g.
2004-08-04 05:38:58 +00:00
Matthias Clasen
d4853eb883 Add a new boolean property ::hover-expand and make the treeview
2004-08-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.h:
	* gtk/gtktreeview.c:
	* gtk/gtktreeprivate.h: Add a new boolean property
	::hover-expand and make the treeview expand/collapse rows
	on mouseover if it is set.
2004-08-02 19:11:32 +00:00
Jonathan Blandford
1541442d86 New arguments
Thu Jul 29 16:36:42 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreeprivate.h: New arguments

        * gtk/gtktreeview.c:
        (gtk_tree_view_class_init): Add key_release callback
        (gtk_tree_view_init): Initialize timeout handler
        (gtk_tree_view_unrealize): clear timeout if needed
        (gtk_tree_view_key_press): Typeahead support
        (gtk_tree_view_key_release): Not used yet -- will be needed for
        typeahead.
        (gtk_tree_view_search_entry_flush_timeout): Remove typeahead entry
        in a timeout.
        (gtk_tree_view_ensure_interactive_directory):
        (gtk_tree_view_real_start_interactive_search):
        (gtk_tree_view_search_init):
        (gtk_tree_view_start_interactive_search): Typeahead support added.
        (gtk_tree_view_search_dialog_hide): Clear timeout and text when we
        hide.
2004-08-01 03:32:19 +00:00
Matthias Clasen
b078e84b59 Replace the EXPANDER_MAX macro by ROW_HEIGHT. (#145528)
2004-07-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c: Replace the EXPANDER_MAX macro by
	ROW_HEIGHT.  (#145528)
2004-07-28 15:57:07 +00:00
Matthias Clasen
84060cafd0 Add a frame around the C-f popup to stop it from merging visually in
2004-07-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
	Add a frame around the C-f popup to stop it from merging visually
	in whatever is underneath.
2004-07-27 17:00:25 +00:00
Matthias Clasen
a35539698a Remove unnecessary checks. (#148175, Morten Welinder)
Fri Jul 23 10:28:43 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_finalize):
	* gtk/gtkradioaction.c (gtk_radio_action_finalize):
	* gtk/gtkfontsel.c (gtk_font_selection_finalize):
	* gtk/gtkcellview.c (gtk_cell_view_finalize):
	* gtk/gtkcalendar.c (gtk_calendar_finalize):
	* gtk/gtkactiongroup.c (gtk_action_group_finalize): Remove
	unnecessary checks.  (#148175, Morten Welinder)
2004-07-23 14:45:50 +00:00
Matthias Clasen
0ca18d150f Don't leak the adjustments. (#148073, Tommi Komulainen)
Wed Jul 21 21:20:21 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't leak
	the adjustments.  (#148073, Tommi Komulainen)
2004-07-22 01:22:54 +00:00
Matthias Clasen
c506c1954a Set drag_pos before grabbing the focus, since we may reenter into
Tue Jul 20 00:45:38 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Set drag_pos
	before grabbing the focus, since we may reenter into
	gtk_tree_view_motion_resize_column() which requires drag_pos
	to be set.  (#147913, Guilherme Salgado, patch by John Finlay)
2004-07-20 04:48:15 +00:00
Matthias Clasen
838497e8ac Don't use uninitialized node pointer. (#147911, Peter Zelezny)
Mon Jul 19 23:51:50 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_enter_notify): Don't
	use uninitialized node pointer.  (#147911, Peter Zelezny)
2004-07-20 04:05:42 +00:00
Matthias Clasen
c0af1c1aaa Add a combo box cell renderer. 2004-07-16 20:27:40 +00:00
Matthias Clasen
bd8d72d948 Correct the declared default values of several properties to be in sync
2004-07-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_class_init):
	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init):
	Correct the declared default values of several properties
	to be in sync with the actual initial values.
2004-07-15 17:52:34 +00:00
Federico Mena Quintero
547261fc6d Fix #126295:
2004-07-14  Federico Mena Quintero  <federico@ximian.com>

	Fix #126295:

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Draw a focus
	indicator along the edge of the bin_window when the tree is empty.
	(grab_focus_and_unset_draw_keyfocus): New helper function.
	(gtk_tree_view_button_press): Remove a bit of superfluous code.
	Use the helper function to save on duplicated code.
	(gtk_tree_view_button_press): Grab the focus if the tree is empty.
	(gtk_tree_view_focus): Allow focusing into an empty tree.
2004-07-15 01:36:29 +00:00
Matthias Clasen
fa349466ec Fix build error. 2004-07-13 19:15:09 +00:00
Matthias Clasen
57101256f2 Prepare to handle composite implementations of GtkCellEditable, but
2004-07-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed):
	Prepare to handle composite implementations of
	GtkCellEditable, but recursively poking at
	allocation->y (hack stolen from GtkCList).
2004-07-13 17:56:29 +00:00
Matthias Clasen
0e0a2bc0e6 Improve the EXPANDER_MAX warning.
Thu Jul  8 22:38:58 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c: Improve the EXPANDER_MAX warning.
2004-07-09 02:44:24 +00:00
Matthias Clasen
57e8c48a0c Allow to restore the default search function. (#145365, John Finlay)
* gtk/gtktreeview.c (gtk_tree_view_set_search_equal_func): Allow
	to restore the default search function.  (#145365, John Finlay)
2004-07-08 21:19:23 +00:00
Matthias Clasen
39fb304f97 Stop editing when a new model is set. (#145566, Dmitry M. Shatrov)
Thu Jul  8 00:33:15 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeview.c (gtk_tree_view_set_model):  Stop editing
	when a new model is set.  (#145566, Dmitry M. Shatrov)
2004-07-08 04:33:50 +00:00
Matthias Clasen
f2ac32337e Small documentation fixes.
2004-07-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c:
	* gtk/gtktreeview.h: Small documentation fixes.
2004-07-07 16:24:55 +00:00
Matthias Clasen
84a6adf83c Small documentation fixes.
2004-07-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c:
	* gtk/gtktreeview.h: Small documentation fixes.
2004-07-07 15:55:28 +00:00
Matthias Clasen
1aa00e5215 Support separators in combo boxes and more generally in tree views
2004-07-07  Matthias Clasen  <mclasen@redhat.com>

	Support separators in combo boxes and more generally in tree
	views  (#135873):

	* gtk/gtkcombobox.h:
	* gtk/gtkcombobox.c (gtk_combo_box_get_row_separator_column):
	* gtk/gtkcombobox.c (gtk_combo_box_set_row_separator_column):
	Add a ::row-separator-column property with getter and setter,
	which can indicate a boolean model column to determine which
	rows are separators.

	* gtk/gtkcombobox.c: Display separator rows as separator menu
	items in menu mode, and by using the new treeview separator
	functionality in list mode.

	* gtk/gtktreeview.h:
	* gtk/gtktreeview.c (gtk_tree_view_get_row_separator_func):
	* gtk/gtktreeview.c (gtk_tree_view_set_row_separator_func):
	Add a callback to determine whether a row is a separator.

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose):
	* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
	* gtk/gtktreeview.c (validate_row): Use the new callback
	to determine whether a row is a separator, and draw it
	as a separator then. Since separators should take up less
	vertical space than regular rows, this requires removing
	the redundant MAX(...,expander_size) calls which appear in
	many places. Instead, the MAX() is now only done in
	validate_row(), and only if the row is not a separator.
	To catch possible side effects of this intrusive change,
	I have left EXPANDER_MAX() calls in place of the MAX() calls
	which will emit a warning if something breaks. They should
	be removed before 2.6.

	* gtk/gtktreeselection.c (row_is_selectable): Don't let
	separator rows be selected.

	* tests/testcombo.c (create_blaat): Add a separator column.
2004-07-07 15:15:35 +00:00
Jonathan Blandford
f80b81db14 Fix for #136496, Pawel Salek:
Tue Jul  6 10:00:22 2004  Jonathan Blandford  <jrb@redhat.com>

	Fix for #136496, Pawel Salek:

	* gtk/gtktreeview.c (gtk_tree_view_row_changed): Queue a redraw on
	a node when it changes in fixed_height mode.

	(gtk_tree_view_node_queue_redraw): new function to queue a redraw
	on a node.
2004-07-06 14:32:18 +00:00
Anders Carlsson
ee15a7b948 Make sure we check for a NULL model first.
2004-07-02  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_set_model):
	Make sure we check for a NULL model first.
2004-07-02 11:32:03 +00:00
Anders Carlsson
e1020f9523 Use g_return_if_fail to make sure that the model is a GtkTreeModel.
2004-06-30  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Use
	g_return_if_fail to make sure that the model is a GtkTreeModel.
2004-06-30 10:07:49 +00:00
Federico Mena Quintero
5af5cc5a1a Revert the patch from 2003/Sep/12. This kept DnD in tree views within
2004-06-07  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Revert the patch
	from 2003/Sep/12.  This kept DnD in tree views within modal
	dialogs from working, which is especially bad for the file
	chooser.  Fixes #135168.
2004-06-08 02:31:04 +00:00
Federico Mena Quintero
aff289b83a Bail out if the model is empty. Fixes #143536.
2004-06-02  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_init): Bail out if the
	model is empty.  Fixes #143536.
2004-06-02 19:21:06 +00:00
Matthias Clasen
6ce035aecc New function to go from tree window to tree coordinates, kept static for
2004-05-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords):
	New function to go from tree window to tree coordinates, kept
	static for now until we figure out the multiple coordinate
	system mess in GtkTreeView API-wise.
	(gtk_tree_view_scroll_to_cell): Transform the coordinates
	from tree window to tree coordinates, using the new function.
	Previously, the x coordinate was wrongly transformed. (#142494)
2004-05-14 18:05:07 +00:00
Matthias Clasen
4c2dd05c96 Use GTK_SELECTION_BROWSE.
2004-05-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
	GTK_SELECTION_BROWSE.

	* gtk/gtktreeview.c: Make hover selection work for
	GTK_SELECTION_BROWSE as well.
2004-05-11 13:44:09 +00:00
Matthias Clasen
16a4dc2415 Add a note about COLUMN_FIXED restriction.
2004-05-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_fixed_height_mode): Add a
	note about COLUMN_FIXED restriction.
2004-05-10 20:27:27 +00:00
Matthias Clasen
b301315706 Use hover selection mode. (#127648, Dave Bordoley)
2004-05-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_init):
	* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use hover selection
	mode.  (#127648, Dave Bordoley)

	* gtk/gtktreeview.h:
	* gtk/gtktreeview.c: Add a new property "hover_selection", which
	when TRUE makes the selection follow the mouse. Also add setter
	and getter for the fixed_height property.
2004-05-10 17:15:14 +00:00
Jonathan Blandford
11eaf5a97c propagate expose events to children.
Wed Apr 14 03:45:39 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose
        events to children.
2004-04-14 07:49:10 +00:00