Commit Graph

93 Commits

Author SHA1 Message Date
Benjamin Otte
1abe923740 css: Do inconsistent checked states right
In HTML5, both pseudoclasses apply. So we do the same thing in our
widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Benjamin Otte
4e077d4638 gtk: Use new :checked state
on:
- GtkToggleButton
- GtkCheckButton
- GtkRadioButton
- GtkModelButton
- GtkCellRendererToggle
- GtkCheckMenuItem

also update themes:
- Adwaita
- Raleigh
but not the win32 theme.

The new :checked state replaces :active for the actual checkedness of
the widgets and :active is now used exclusively while the button is being
pressed.

https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Benjamin Otte
8ea013290b cellrenderertoggle: Remove copy/paste leftovers
Introduced in 2d88a3ae30
2014-06-10 13:47:51 +02:00
Matthias Clasen
2d88a3ae30 GtkCellRendererToggle: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:57 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
Dan Williams
7d0d90ad62 GtkCellRendererToggle: correct "toggled" signal documentation
Previous commit wrongly identified "active" as containing the new
value.  Instead, applications must determine the new value to
update the model with manually based on the value currently in the
model.
2013-10-10 17:07:42 -05:00
Dan Williams
e869399369 GtkCellRendererToggle: update documentation of 'toggled' signal
Clarify that applications are expected to handle updating the model
from the 'active' property, like GtkCellRendererText does for the
'edited' property.
2013-10-10 15:33:36 -05: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
Benjamin Otte
16e902d20a API: Export gtk_cell_renderer_class_set_accessible_type()
This function is necessary to implement cell renderer accessibility
support.
2013-02-25 21:42:31 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Rui Matos
70970146ca cellrenderertoggle: Use the cell renderer's state flags as a base for rendering
This allows us to pick the underlying widget's state flags that we don't
explicitly set here.
2011-12-19 19:21:15 +00:00
Benjamin Otte
c5433e852b gtk: Add accessible types for cell renderers 2011-12-16 04:53:16 +01:00
Javier Jardón
fc0e045d92 Move documentation to inline comments: GtkCellRendererToggle 2011-04-11 02:42:54 +01:00
Cosimo Cecchi
64aac9624c Use 16 as default size for checkbutton indicator
So that 16x16 icons can be used from themes such as Adwaita in their
natural size.
2011-03-03 17:48:25 -05:00
Carlos Garnacho
9b091ae330 Make GtkCellRendererToggle use GtkStyleContext 2011-01-27 20:57:12 +01:00
Kristian Rietveld
a28c11a27f Clip to cell_area when rendering cell content
This fixes a GTK+ 3.0 regression.  In GTK+ 2, the render method
on GtkCellRenderer had a expose_area parameter, typically set to
cell_area.  This parameter was used for clipping cell content to be
rendered to the cell area (and thus clipping to within the focus
rectangle).  During the rendering clean up this parameter was removed
and no clipping put back into place.

Since expose_area was usually equal to cell_area anyway, it does not make
sense to reintroduce the expose_area parameter.  Instead, we do clipping at
two levels:
 - in gtk_cell_renderer_render() we clip to background_area.  We cannot
clip to cell_area here because we want to allow cell renderers to
render in the background area (e.g. background color/effect).
 - cell renderers should clip to clip_area when rendering cell
content individually (as they had to individually clip to expose_region
before).
2010-12-16 00:07:08 +01:00
Matthias Clasen
21eae6b6f3 Make GdkRectangle arguments in GtkCellRenderer use const consistently
https://bugzilla.gnome.org/show_bug.cgi?id=630900
2010-10-04 10:23:55 -04:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
e31e77eeb8 API: Change cellrenderer->render vfunc to take a cairo_t
Also constify the rectangle arguments. They were const anyway.
2010-09-26 15:03:01 +02:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
dd61c2bdea gtk/gtkcellrenderertoggle.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
3c90ecf27b gtkcellrenderertoggle: Move public members to private structure 2010-07-13 19:40:46 +02:00
Javier Jardón
db584abef3 Use accessor functions to access GtkCellRenderer 2010-07-13 19:40:45 +02: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
Javier Jardón
32b9aeaadd Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-09 02:40:17 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Kristian Rietveld
4f219692ed Make toggle cell renderer follow insensitive state of widget
Likewise to other cell renderers, GtkCellRendererToggle now properly
follows the insensitive state of the widget requesting rendering.  It
does this by checking the state of the widget pointer, not by using
GtkCellRendererFlags (there exists an insensitive flags).  Later on, I
think we should move to using GtkCellRendererFlags and not the state of
the widget requesting rendering.  Patch merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Michael Natterer
66ae394eb5 Add API for the sealed member "activatable" 2009-07-14 01:53:56 +02: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
Michael Natterer
02fd7ba040 gtk/gtkcellrenderer.c gtk/gtkcellrendererpixbuf.c
2008-05-19  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcellrenderer.c
	* gtk/gtkcellrendererpixbuf.c
	* gtk/gtkcellrenderertoggle.c
	* gtk/gtkimagemenuitem.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkoptionmenu.c
	* gtk/gtkstatusbar.c
	* gtk/gtktextview.c: s/PROP_ZERO/PROP_0/g, remove LAST_PROP.


svn path=/trunk/; revision=20112
2008-05-19 14:15:34 +00:00
Michael Natterer
3c9a4ac633 Fix check/radio indicator drawing mess (bug #452225):
2007-07-27  Michael Natterer  <mitch@imendio.com>

	Fix check/radio indicator drawing mess (bug #452225):

	* gtk/gtkstyle.c (gtk_default_draw_check): really decrease the
	indicator size by one to ensure odd size (don't say -= -1).

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	removed -1 adjustment from calls to gtk_paint_option(). Theme
	engines now get the actually configured size passed, not one pixel
	less.

	* gtk/gtkcellrenderertoggle.c
	* gtk/gtkcheckmenuitem.c: changed default indicator size from 12
	to 13 so all widgets which draw check/option indicators have the
	same default size now (and render the same size after above
	changes).

	* README.in: mention above changes in the release notes.


svn path=/trunk/; revision=18547
2007-07-27 12:11:07 +00:00
Kristian Rietveld
28c44b80bb refactor to initialize indicator_size to TOGGLE_WIDTH instead of the
2007-01-10  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_init):
	refactor to initialize indicator_size to TOGGLE_WIDTH instead
	of the hardcoded value of 12.


svn path=/trunk/; revision=17128
2007-01-10 17:33:23 +00:00
Kristian Rietveld
817d667da8 Make sure [xy]_offset are always being initialized, fix pixbuf renderer
2006-12-03  Kristian Rietveld  <kris@gtk.org>

	Make sure [xy]_offset are always being initialized, fix pixbuf
	renderer padding.  (#108235, Sven Neuman).

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size),
	(gtk_cell_renderer_pixbuf_render): add padding in _render instead
	of _get_size.

	* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
	always initialize [xy]_offset.
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto.
	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
	ditto.
2006-12-03 20:02:04 +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
ce5e74e1fe initialize the inconsistent field in the private structure,
2006-01-13  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_init):
	initialize the inconsistent field in the private structure,
	(gtk_cell_renderer_toggle_class_init),
	(gtk_cell_renderer_toggle_{set,get}_property),
	(gtk_cell_renderer_toggle_get_size): introduce a indicator-size
	property.
2006-01-13 13:09:14 +00:00
Michael Natterer
35de5c5b78 removed redundant calls to g_object_notify().
2005-11-14  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_set_property):
	removed redundant calls to g_object_notify().
2005-11-14 11:28:33 +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
Matthias Clasen
7645a361ba Typo fixes 2005-06-18 05:33:55 +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
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
310fd268e7 Support insensitive cells in tree views and combo boxes. 2004-05-27 03:31:17 +00:00
Matthias Clasen
45828f5002 Document the ::toggled signal.
Tue May 11 00:38:25 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init):
	Document the ::toggled signal.
2004-05-11 04:39:57 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Matthias Clasen
6c935950b2 Clip narrow columns in rtl-oriented tree views (#128089,
Tue Feb  3 01:38:06 2004  Matthias Clasen  <maclas@gmx.de>

	Clip narrow columns in rtl-oriented tree views (#128089,
	chinen@jp.ibm.com):

	* gtk/gtkstyle.c (gtk_default_draw_option):
	* gtk/gtkstyle.c (gtk_default_draw_check): Clip to the
	given area.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	Use the right clip area when calling gtk_cell_renderer_render().
	* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_cell_draw_focus):
	Use the right clip area when calling gtk_paint_focus().
	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	Use the right clip area when calling gtk_paint_toggle() or
	gtk_paint_check().
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
	Clip to the expose_area when drawing the background rectangle.
2004-02-03 00:40:56 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00