Commit Graph

129 Commits

Author SHA1 Message Date
Matthias Clasen
14ed2beff5 Jump through a few hoops to make the tooltip on the filter combo box work
2004-11-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (file_pane_create): Jump through
	a few hoops to make the tooltip on the filter combo box work
	a bit better. This fixes #157273 and #157074.
2004-11-07 04:10:01 +00:00
Matthias Clasen
55a372042f Add the ComboCellInfo to the list. (#157528, Carlos Garnacho Parro)
2004-11-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
	Add the ComboCellInfo to the list.  (#157528, Carlos Garnacho
	Parro)
2004-11-06 20:16:40 +00:00
Matthias Clasen
08ef258df5 Remove this unneeded function, as it breaks state propagation.
2004-11-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_button_state_changed):
	Remove this unneeded function, as it breaks state propagation.
2004-11-05 21:20:09 +00:00
Matthias Clasen
f41c59cce3 Don't crash if the active_row reference has become invalid. (#157156,
2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_get_active): Don't crash
	if the active_row reference has become invalid.  (#157156,
	Christophe Fergeau)
2004-11-03 06:16:43 +00:00
Matthias Clasen
5675f113c8 Update the state of the cell view when the state of the button changes (to
2004-10-31  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_button_state_changed): Update the
	state of the cell view when the state of the button changes (to
	get prelighted drawing right).  (#138650, Frances Keenan, Christian Persch)
2004-11-01 04:38:24 +00:00
Matthias Clasen
b6aa6f0fa9 Use g_signal_connect_object() to prevent premature finalization of the
2004-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_start_editing): Use
	g_signal_connect_object() to prevent premature finalization
	of the cell_editable while the key_press_event signal is
	handled.  (#156325, Olivier Andrieu)
2004-10-28 16:50:10 +00:00
Matthias Clasen
d966036d4d Resize the popup if a new model is set. (#154129, Bernd Damian)
2004-10-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_set_model): Resize the
	popup if a new model is set.  (#154129, Bernd Damian)
2004-10-05 04:37:29 +00:00
Matthias Clasen
49174ac1be Add a comment regarding cell renderers to the docs.
2004-10-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_set_model): Add a comment regarding
	cell renderers to the docs.
2004-10-01 19:00:47 +00:00
Matthias Clasen
f50cab885a Document the return value.
2004-09-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_get_popup_accessible):
	Document the return value.
2004-09-01 21:26:35 +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
Matthias Clasen
a15842e68e Don't crash if model is not set. Noted by Mariano Suarez-Alvarez.
Thu Aug 26 23:58:11 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't crash
	if model is not set. Noted by Mariano Suarez-Alvarez.
2004-08-27 03:59:05 +00:00
Matthias Clasen
e4e4aca0fc Fix #150125:
Mon Aug 16 01:35:25 2004  Matthias Clasen  <maclas@gmx.de>

	Fix #150125:

	* gtk/gtkcombobox.[hc]: Add a ::focus-on-click property and
	change the default behaviour to focus on click.

	* gtk/gtkbutton.c (gtk_button_set_focus_on_click): Typo fix.
2004-08-16 05:43:50 +00:00
Matthias Clasen
95239fca67 Remove leftover debugging output 2004-08-13 17:03:13 +00:00
Matthias Clasen
c92d4d6786 Make re-sensitivation work in menu mode.
2004-08-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c: Make re-sensitivation work
	in menu mode.
2004-08-13 16:50:32 +00:00
Matthias Clasen
fa966c6aa7 Fix #149547, Markus Lausser:
Thu Aug 12 23:52:12 2004  Matthias Clasen  <maclas@gmx.de>

	Fix #149547, Markus Lausser:

	* gtk/gtkcombobox.c (gtk_combo_box_size_allocate):
	* gtk/gtkcombobox.c (gtk_combo_box_size_request): Don't
	crash if size_request or size_allocate are called early.

	* gtk/gtkcombobox.c (gtk_combo_box_size_allocate): Protect
	against being allocated too small.
2004-08-13 04:00:29 +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
0c42eed2de Ref and sink the column. (gtk_combo_box_menu_destroy): Unref the column.
Sun Aug  8 23:36:55 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_setup): Ref
	and sink the column.
	(gtk_combo_box_menu_destroy): Unref the column.

Sun Aug  8 23:35:00 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkdnd.c (gtk_drag_source_add_text_targets):
	(gtk_drag_dest_add_text_targets): Don't leak a reference
	to the target list.
2004-08-09 03:39:06 +00:00
Matthias Clasen
b04a72a5d8 Don't stumble over separators which are not backed by model rows.
Sun Aug  8 22:52:26 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (find_menu_by_path): Don't stumble over
	separators which are not backed by model rows.
2004-08-09 02:53:31 +00:00
Matthias Clasen
0528aeae3a Oops. 2004-08-09 02:46:46 +00:00
Matthias Clasen
c1af2aa6b2 Don't leak the path.
Sun Aug  8 11:01:23 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_set_active): Don't leak
	the path.
2004-08-09 02:45:18 +00:00
Matthias Clasen
f82ca65b81 Use GtkTreeViewRowSeparatorFunc instead of GtkCellRendererSepText.
Sat Aug  7 18:19:03 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkfilechooserdefault.c (save_folder_combo_create):
	(shortcuts_list_create): Use GtkTreeViewRowSeparatorFunc
	instead of GtkCellRendererSepText.  (#147864)

	* gtk/gtkcellrendererseptext.[hc]: Removed.

	* gtk/Makefile.am: Remove gtkcellrendererseptext.[hc]

Sat Aug  7 18:15:15 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_row_deleted):
	(gtk_combo_box_menu_row_inserted):
	(gtk_combo_box_menu_row_changed): Correctly handle
	insertion and deletion of separators in menu mode.
2004-08-07 22:21:25 +00:00
Matthias Clasen
5829010c64 Remove accidentally committed debug code.
Tue Aug  3 14:29:49 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_fill): Remove
	accidentally committed debug code.
2004-08-03 18:30:53 +00:00
Matthias Clasen
2cd7feb3b9 Optimize for the case that row_column and col_column are unset. (#148868,
Tue Aug  3 01:19:12 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_relayout_item): Optimize
	for the case that row_column and col_column are unset.
	(#148868, Lorenzo Gil Sánchez)
2004-08-03 05:22:21 +00:00
Matthias Clasen
7d2758aa52 Rework the combo box to handle tree models. (#139582, Matt Walton)
2004-08-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c: Rework the combo box to handle
	tree models.  (#139582, Matt Walton)
2004-08-02 19:15:05 +00:00
Matthias Clasen
f56daaf167 *** empty log message *** 2004-07-30 22:55:28 +00:00
Matthias Clasen
1f93c4359c Change the api for separators to use a separator function instead of a
2004-07-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.h:
	* gtk/gtkcombobox.c: Change the api for separators to use a
	separator function instead of a boolean column.

	* tests/testcombo.c: Update to match the api change.
2004-07-30 20:55:17 +00:00
Matthias Clasen
6eca20f5c4 New function necessary to make GtkComboBox accessible. (#132847, Padraig
2004-07-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.h:
	* gtk/gtkcombobox.c (gtk_combo_box_get_popup_accessible): New
	function necessary to make GtkComboBox accessible.  (#132847,
	Padraig O'Briain)
2004-07-27 16:37:37 +00:00
Matthias Clasen
9ccad0c92a Make the GtkComboBox in list mode scroll if the list is too large to fit
Mon Jul 26 00:38:27 2004  Matthias Clasen  <maclas@gmx.de>

	Make the GtkComboBox in list mode scroll if the list is too
	large to fit in the popup.  (#135543)

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Add a
	scrolled window to the popup in list mode.
	(gtk_combo_box_list_position): Calculate the height of the
	popup so that it fits on the screen, set the scrollbar policy
	of the scrolled window appropriately.
	(gtk_combo_box_popup): Use the height calculated by
	gtk_combo_box_list_position().
	(gtk_combo_box_remeasure): Don't add unnecessary padding.
	(gtk_combo_box_size_request): But add the focus with here.
	(gtk_combo_box_list_setup): Connect to enter notify on the
	popup window to activate auto scrolling.
	(gtk_combo_box_list_enter_notify): Activate auto scrolling.
	(gtk_combo_box_list_button_pressed): Setup a timeout for
	auto scrolling.
	(gtk_combo_box_list_scroll_timeout): Timeout function for
	auto scrolling.
	(gtk_combo_box_list_auto_scroll): Scroll the list when the
	pointer leaves the window.
2004-07-26 04:50:07 +00:00
Matthias Clasen
8912c654ef Avoid compiler warnings. 2004-07-22 05:16:58 +00:00
Matthias Clasen
b23415ee8b Don't leak the list store. (#148135, Crispin Flowerday)
Wed Jul 21 22:54:33 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new_text):
	Don't leak the list store.  (#148135, Crispin Flowerday)
2004-07-22 03:00:48 +00:00
Matthias Clasen
3d484599d8 Don't leak the list store. (#148134, Crispin Flowerday)
* gtk/gtkcombobox.c (gtk_combo_box_new_text): Don't leak the
	list store.  (#148134, Crispin Flowerday)
2004-07-22 02:48:11 +00:00
Matthias Clasen
79ace2b389 Don't leak the menu. (#148110, Tommi Komulainen)
Wed Jul 21 22:35:47 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcellview.c (gtk_cell_view_finalize): Don't leak the
	menu.  (#148110, Tommi Komulainen)
2004-07-22 02:36:54 +00:00
Matthias Clasen
fe842a5496 Make GtkCellView public, since people seem to have uses for it, it is
2004-07-19  Matthias Clasen  <mclasen@redhat.com>

	Make GtkCellView public, since people seem to have uses for it,
	it is clean API and we were just conservative in not making it
	public initially. At the same time, get rid of GtkCellViewMenuItem,
	which doesn't have any function which can't be served by a
	GtkMenuItem with a GtkCellView child.

	* gtk/gtk.h: Include gtkcellview.h

	* gtk/Makefile.am (gtk_public_h_sources):

	* gtk/Makefile.am (gtk_private_h_sources):
	(gtk_c_sources): Remove gtkcellviewmenuitem.[hc]
	* gtk/gtkcombobox.c: Replace all uses of GtkCellViewMenuItem by
	GtkMenuItem with a GtkCellView child.

	* gtk/gtkcellviewmenuitem.[hc]: Removed.
2004-07-19 19:07:27 +00:00
Soeren Sandmann
1952300896 Create an empty target list if targets is NULL.
Sun Jul 18 15:28:24 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkdnd.c (gtk_drag_source_set, gtk_drag_dest_set): Create an
	empty target list if targets is NULL.

	* configure.in: Add check for X11/extensions/sync.h. (#147416,
	Morten Welinder)
2004-07-18 15:14:05 +00:00
Matthias Clasen
1d45cbd831 Make scrolling work if no item is selected. (gtk_cell_editable_key_press):
2004-07-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_scroll_event): Make
	scrolling work if no item is selected.
	(gtk_cell_editable_key_press): Don't eat space.
2004-07-16 21:13:21 +00:00
Matthias Clasen
c0af1c1aaa Add a combo box cell renderer. 2004-07-16 20:27:40 +00:00
Matthias Clasen
d8df361813 Don't iterate multiple times over some of the children.
2004-07-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_forall): Don't iterate
	multiple times over some of the children.
2004-07-16 14:33:21 +00:00
Matthias Clasen
20efb51b01 Ugh, another compile error. 2004-07-13 14:50:11 +00:00
Matthias Clasen
dcffb53f0a Don't crash if unrealized.
2004-07-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_popdown): Don't
	crash if unrealized.
2004-07-13 13:54:13 +00:00
Matthias Clasen
4a6f874558 Forgotten file. 2004-07-12 16:15:55 +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
Matthias Clasen
6a9e67331f Unset the displayed row when unsetting the model. (#138560, Christian
Fri Jul  2 23:34:33 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
	row when unsetting the model.  (#138560, Christian Persch)
2004-07-03 03:37:44 +00:00
Matthias Clasen
e1a243138a Reflect the last change in the docs.
Sat Jun 26 00:04:36 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model):
	* gtk/gtkcombobox.c (gtk_combo_box_set_model): Reflect the
	last change in the docs.
2004-06-26 04:05:25 +00:00
Matthias Clasen
57e15782ff Allow passing NULL to unset the model. (#137211, patch by Mariano
Fri Jun 25 23:35:42 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model):
	* gtk/gtkcombobox.c (gtk_combo_box_set_model): Allow passing
	NULL to unset the model.  (#137211, patch by  Mariano Suárez-Alvarez)

Fri Jun 25 23:33:05 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below): Fix the
	placement policy for GtkComboBoxEntry to be: if it fits below,
	place below, if it fits above place above, else place in the
	larger space and scroll so that the scroll arrow appear at the
	far end.  (#144362, David A. Knight)
2004-06-26 03:39:35 +00:00
Matthias Clasen
3d8b7d14db Make GtkComboBox work without model. (#144198, Mariano Suárez-Alvarez)
Tue Jun 15 01:10:32 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c: Make GtkComboBox work without model.
	(#144198, Mariano Suárez-Alvarez)
2004-06-15 05:12:27 +00:00
Matthias Clasen
8eade402cc Handle priv->model being NULL. (#143856, Mariano Suárez-Alvarez)
Mon Jun  7 23:07:40 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_remeasure): Handle
	priv->model being NULL.  (#143856, Mariano Suárez-Alvarez)
2004-06-08 03:14:58 +00:00
Matthias Clasen
4d33f2c956 Fix the al lowed values and default value for the ::active property.
Thu Jun  3 20:51:23 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_class_init): Fix the al lowed
	values and default value for the ::active property.  (#143669,
	Olivier Andrieu)
2004-06-04 00:57:03 +00:00
Matthias Clasen
d5f3cb1409 Rename function parameters from index to index_ to prevent clash with BSD
Tue Jun  1 23:14:46 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktoolbar.h:
	* gtk/gtktoolbar.c:
	* gtk/gtkentrycompletion.h:
	* gtk/gtkentrycompletion.c:
	* gtk/gtkcombobox.h:
	* gtk/gtkcombobox.c: Rename function parameters from
	index to index_ to prevent clash with BSD index().  (#143001)
2004-06-02 03:16:03 +00:00
Jonathan Blandford
d61e4f7440 only remove the signal if the box exists.
Thu May 27 00:07:47 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): only remove the
        signal if the box exists.
2004-05-27 04:08:26 +00:00
Matthias Clasen
310fd268e7 Support insensitive cells in tree views and combo boxes. 2004-05-27 03:31:17 +00:00