Commit Graph

119 Commits

Author SHA1 Message Date
William Jon McCann
1d7d6997e8 docs: fix typo 2014-01-21 18:57:37 -05:00
William Jon McCann
98a5d3234d docs: fix link to DND info 2014-01-21 18:57:37 -05:00
Philip Withnall
380150361b gtktreeselection: Eliminate a dead assignment
This is technically a dead assignment, but is nice to retain for
clarity. Moving it to the variable definition shuts scan-build up.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Matthias Clasen
e4b5e94eb9 Make accessible implementations public
This commit exposes the get_type() functions and standard
headers for accessible implementations. This makes it possible
to derive from the GTK accessible implementations without
GType magic tricks. This is necessary, because we require the
a11y type hierarchy to be parallel to the widget type hierarchy.
So, if you derive a widget and need to adjust its a11y implementation,
you have to be able to derive its accessible implementation.

This commit probably exposes more than is absolutely necessary,
it also exposes accessibles of widgets that are unlikely candidates
for deriving from.
2012-12-27 11:23:22 -05:00
Matthias Clasen
ea479e6bb9 Trivial whitespace fix 2012-12-11 21:30:40 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Benjamin Otte
3112679a5e treeview: Signal selection changes to the accessible
And another signal gone.
2011-12-16 04:53:15 +01:00
Benjamin Otte
4dbedb7481 docs: Update code demo for newer glib 2011-12-10 08:00:26 +01:00
Benjamin Otte
806dca0677 treeview: Rename function
_gtk_tree_view_find_path() was not a name that not really described what
the function does. And I kept forgetting it. Also, it took the tree view
as an argument and that was completely unnecessary.
2011-11-29 20:44:57 +01:00
Benjamin Otte
c3056951db rbtree: Introduce _gtk_rbtree_first()
... and use it.
2011-11-22 03:32:56 +01:00
Juan Pablo Ugarte
d80d834be8 * gtk/gtktreeselection.c:
Added missing GtkTreeSelection:mode property.
   Closes bug #645960 "GtkTreeSelection has no property to set mode"
2011-03-31 19:17:17 -03:00
Javier Jardón
66e7915dc4 gtktreeselection: Move public members to a private structure 2010-12-19 05:01:22 +00:00
Tristan Van Berkom
4038cd76b3 Removed GtkTreeViewPrivate from gtktreeprivate.h and added a few more accessors.
This actually much simplifies interaction with GtkTreeSelection
(at least reduces code size where dealing width the treeview anchor path).
2010-12-05 22:11:37 +09:00
Javier Jardón
8d3b36d534 gtktreeselection: Move documentation to inline comments 2010-10-23 00:31:37 +02:00
Johan Dahlin
19cab17c22 Add a couple of missing annotations 2010-09-18 13:43:06 -03:00
Matthias Clasen
316b9da873 Allow to unset the tree selection function
This is not causing problems, and seems natural. Bug 626276.
2010-08-10 07:35:54 -04:00
Philip Withnall
3a34295b9c Add (transfer none) annotation to gtk_tree_selection_get_selected_rows()
Closes: bgo#625650
2010-08-05 00:53:43 +01:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Philip Withnall
0b51abbfdf Add (out) annotations to GtkTreeIter parameters 2010-07-07 18:20:37 +02:00
Ignacio Casal Quinteiro
fa752d156b Fix annotation. 2010-06-30 20:37:22 +02:00
Benjamin Otte
cd266cb8de Make declaration return a boolean when the function does that 2010-06-28 14:19:18 +02:00
John (J5) Palmieri
c707e445ca gtk_tree_selection_get_selected: added transfer none annotation to model out arg 2010-05-27 18:36:04 -04:00
Javier Jardón
7e11475298 [docs] Cast to GFunc in gtk_tree_selection_get_selected_rows() example code
Reported by Diego Escalante Urrelo here:
https://bugzilla.gnome.org/show_bug.cgi?id=502266
2009-12-19 02:09:18 +01:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Sven Neumann
e3c01cf601 gtk/gtktext.c gtk/gtktextbuffer.c gtk/gtktextlayout.c
2008-08-08  Sven Neumann  <sven@gimp.org>

	* gtk/gtktext.c
	* gtk/gtktextbuffer.c
	* gtk/gtktextlayout.c
	* gtk/gtktexttagtable.c
	* gtk/gtktextview.c
	* gtk/gtktipsquery.c
	* gtk/gtktoolbar.c
	* gtk/gtktoolitem.c
	* gtk/gtktreeitem.c
	* gtk/gtktreemodelfilter.c
	* gtk/gtktreemodelsort.c
	* gtk/gtktreeviewcolumn.c: use canonical signal names.


svn path=/trunk/; revision=21045
2008-08-08 14:23:32 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Johan Dahlin
e46eeab2a9 Add missing Since: gtk-doc markup for newly added GSEAL API. Change all
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkaccelgroup.c:
    * gtk/gtkcolorseldialog.c:
    * gtk/gtkcontainer.c:
    * gtk/gtkdialog.c:
    * gtk/gtkentry.c (gtk_entry_class_init):
    * gtk/gtkfontsel.c:
    * gtk/gtkhandlebox.c:
    * gtk/gtklayout.c:
    * gtk/gtkmenu.c (gtk_menu_class_init):
    * gtk/gtkmenuitem.c (gtk_menu_item_class_init):
    * gtk/gtkplug.c (gtk_plug_class_init):
    * gtk/gtkselection.c:
    * gtk/gtksocket.c:
    * gtk/gtktreeselection.c:
    * gtk/gtkwidget.c (gtk_widget_class_init):
    * gtk/gtkwindow.c:
    Add missing Since: gtk-doc markup for newly added GSEAL API.
    Change all Since: GSEAL-branch to Since: 2.14.


svn path=/trunk/; revision=20639
2008-06-20 13:54:31 +00:00
Tim Janik
1ba7f437bc Add gtk_tree_selection_get_select_function().
* gtk/gtktreeselection.[ch] (gtk_tree_selection_get_select_function): new
function.
* gtk/gtk.symbols: add new function.

svn path=/trunk/; revision=20527
2008-06-20 11:01:18 +00:00
Michael Natterer
fe8a946e87 deprecate GtkDestroyNotify.
2008-06-18  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktypeutils.h: deprecate GtkDestroyNotify.

	* gtk/gtkactiongroup.[ch]
	* gtk/gtkcombobox.[ch]
	* gtk/gtkcontainer.[ch]
	* gtk/gtkliststore.[ch]
	* gtk/gtkmain.[ch]
	* gtk/gtkmenu.c
	* gtk/gtkstock.[ch]
	* gtk/gtktreedatalist.[ch]
	* gtk/gtktreemodelfilter.[ch]
	* gtk/gtktreemodelsort.[ch]
	* gtk/gtktreeprivate.h
	* gtk/gtktreeselection.[ch]
	* gtk/gtktreesortable.[ch]
	* gtk/gtktreestore.[ch]
	* gtk/gtktreeview.[ch]
	* gtk/gtktreeviewcolumn.[ch]: s/GtkDestroyNotify/GDestroyNotify/g.


svn path=/trunk/; revision=20448
2008-06-18 09:12:32 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

        * */*.c: Use gtk-doc abbreviations for examples in docs.


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Matthias Clasen
c247b1bc4a Set model in all cases. (#357791, Andreas Köhler)
2006-10-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeselection.c (gtk_tree_selection_get_selected_rows):
	Set model in all cases.  (#357791, Andreas Köhler)
2006-10-02 01:29:24 +00:00
Kristian Rietveld
a70e666423 Separate sensitive/selectable properties.
2006-06-02  Kristian Rietveld  <kris@imendio.com>

	Separate sensitive/selectable properties.

	* gtk/gtktreeselection.c (tree_column_is_sensitive): remove,
	(_gtk_tree_selection_row_is_selectable): remove checks to see if at
	least one column is sensitive,
	(gtk_tree_selection_real_select_node): remove code which enables
	insensitive rows to always be unselected.

	* gtk/gtktreeview.c (gtk_tree_view_row_changed): remove code
	that unselects a node if it just became insensitive.

	* gtk/gtkcombobox.c (gtkcombo_box_list_select_func): new function,
	based on the at least one column sensitive check from
	_gtk_tree_selection_row_is_selectable(),
	(gtk_combo_box_list_setup): set selection function on tree selection.
2006-06-02 18:55:59 +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
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
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
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
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
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
Kristian Rietveld
ed5fe67f0e quit maintaining the iter on every iteration, only get the iter when we
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach): quit
	maintaining the iter on every iteration, only get the iter when
	we are about to call the foreach_func. Gives us a 10x speedup,
	since maintaining iters is a lot more expensive than maintaining
	paths. We lose a bit of sanity checking though. Thanks go to
	Billy Biggs for pointing this out.
2005-07-12 23:01:17 +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
Manish Singh
60b30ff513 gdk/linux-fb/gdkgc-fb.c gdk/win32/gdkgc-win32.c
Fri Nov 19 14:54:09 2004  Manish Singh  <yosh@gimp.org>

        * gdk/linux-fb/gdkgc-fb.c
        * gdk/win32/gdkgc-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gtk/gtkaboutdialog.c
        * gtk/gtkaction.c
        * gtk/gtkactiongroup.c
        * gtk/gtkcellrendererprogress.c
        * gtk/gtkcellview.c
        * gtk/gtkcolorbutton.c
        * gtk/gtkcombobox.c
        * gtk/gtkcomboboxentry.c
        * gtk/gtkentrycompletion.c
        * gtk/gtkfilechooserbutton.c
        * gtk/gtkmenutoolbutton.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktoggletoolbutton.c
        * gtk/gtktoolbutton.c
        * gtk/gtktoolitem.c
        * gtk/gtktreemodelfilter.c
        * gtk/gtktreeselection.c
        * gtk/gtktreeviewcolumn.c
        * gtk/gtkuimanager.c: get rid of unnecessary casts.

        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property):
        cast away the const for g_value_set_enum. This is after the g_warning,
        so this is a hack to begin with.

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property):
        add a cast to GTK_FILE_CHOOSER for impl here.
2004-11-19 23:18:38 +00:00
Matthias Clasen
d5f92150d4 Fix many sparse warnings. 2004-10-28 15:00:05 +00:00
Matthias Clasen
cd79561f8f Clear the iter instead of returning it unmodified. (#154186, Jonathan
2004-10-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Clear
	the iter instead of returning it unmodified. (#154186, Jonathan Blandford)
2004-10-06 18:51:03 +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
Federico Mena Quintero
b3fbcef831 Fix #139290:
2004-07-08  Federico Mena Quintero  <federico@ximian.com>

	Fix #139290:

	* gtk/gtkfilesystemmodel.c (_gtk_file_system_model_new): Add a
	GError argument.  Do check for errors when getting the
	GtkFileFolder:  get the folder and read the children before
	actually creating the model.  Removed obsolete code that handled
	roots-changed on the file system.
	(file_model_node_get_info): Assert that we don't reach the old
	case to display file system roots.
	(roots_changed_callback): Removed.

	* gtk/gtkfilechooserdefault.c (set_list_model): Add a GError
	argument, and a boolean return value.  Return an error if we
	cannot create the file system model.  On error, set a NULL model
	on the tree.
	(gtk_file_chooser_default_set_current_folder): Use the error value
	from set_list_model().
	(gtk_file_chooser_default_set_property): Set the show_hidden
	property only if the browse_files_model exists.
	(gtk_file_chooser_default_unselect_path): Only operate if the
	browse_files_model exists.
	(check_preview_change): Check whether we have the sort_model.
	(change_folder_and_display_error): Copy the path we get passed
	before using it.  There's a comment in there that explains why we
	need to copy it; basically, if the passed path belongs to the
	model, the model may go away in the middle of this function and
	we'll be left with a dangling pointer.
	(install_list_model_filter): Assert that the model is not NULL.
	(set_current_filter): Check whether the model exists.

	* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): Don't
	g_return_if_fail if the model is NULL.
	(gtk_tree_selection_get_selected_rows): Likewise.
	(gtk_tree_selection_count_selected_rows): Likewise.
	(gtk_tree_selection_selected_foreach): Likewise.
	(gtk_tree_selection_path_is_selected): Likewise; rather just
	return FALSE.
	(gtk_tree_selection_select_all): Likewise.
	(gtk_tree_selection_unselect_all): Likewise.
	(gtk_tree_selection_select_range): Do g_return_if_fail() if the
	model is NULL.
	(gtk_tree_selection_unselect_range): Likewise.

	* gtk/gtkfilesystemunix.c (fill_in_names): Return immediately if
	g_dir_open() fails:  there is no need to set the error ourselves,
	as g_dir_open() already does it.
2004-07-09 00:53:48 +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
ad4ca1eaa4 Don't allow unless selection mode is multiple. (#142634, John Finlay)
Wed Jun  2 00:17:07 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeselection.c (gtk_tree_selection_select_range): Don't
	allow unless selection mode is multiple.  (#142634, John Finlay)
2004-06-02 04:17:41 +00:00
Matthias Clasen
310fd268e7 Support insensitive cells in tree views and combo boxes. 2004-05-27 03:31:17 +00:00