Commit Graph

42 Commits

Author SHA1 Message Date
Benjamin Otte
d3c147a62d stylecontext: Split render functions out into gtkrender.[ch] 2014-10-03 06:18:05 +02:00
Matthias Clasen
b3e1bb1654 Progress widgets: Better typography
Use a small space before %.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Benjamin Otte
6c06bd55da gtk: Don't use gtk_render_activity()
... in places where we draw a background. This was changed for GTK 3.0.0
to allow animations, but these days it doesn't make sense anymore to use
gtk_render_activity() for backgrounds.
2014-08-16 16:34:14 +02:00
Matthias Clasen
31654f4515 GtkCellRendererProgress: Use G_PARAM_EXPLICIT_NOTIFY
Also add explicit notification and avoid redundant notification
for some properties.
2014-06-09 13:30:56 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -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
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
cd91ab9761 Fix handling of GtkCellRendererProgress::inverted
We were setting the wrong field.
https://bugzilla.redhat.com/show_bug.cgi?id=747761
2011-10-24 13:50:00 -04:00
Cosimo Cecchi
73d9ca67e6 cellrendererprogress: don't force drawing inside the border
The progressbar is composed by two different rendered areas: the trough
(i.e. the non-filled part of the bar) and the bar itself.

The bar should be able to fill the whole height/width of the trough
without resorting to nasty hacks in the theme, and we can control the
amount of space between the bar and the trough with the padding already.

https://bugzilla.gnome.org/show_bug.cgi?id=649593
2011-05-06 15:10:43 -04:00
Javier Jardón
ca8d880a20 Move documentation to inline comments: GtkCellRendererProgress 2011-04-11 02:18:13 +01:00
Carlos Garnacho
3285eff289 Make GtkCellRendererProgress use GtkStyleContext 2011-01-27 20:57:12 +01:00
Brian Cameron
f90365d46b Fix spacing. 2010-12-22 21:58:40 -06:00
Brian Cameron
e88a44f4c9 Fix bug #637721, fix function prototype. 2010-12-22 21:57:12 -06:00
Kristian Rietveld
137f16c4c5 Do not bother starting a draw call if bar_size <= 0 2010-12-05 13:57:04 +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
Matthias Clasen
0ff6aedca0 Convert GtkCellRendererProgress to a GtkOrientable
And add an inverted property to it, too.
2010-09-01 23:27:00 -04:00
Javier Jardón
4a17e27a1e gtk/gtkcellrendererprogress.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
ee1d9df94c gtkcellrendererprogress: unseal private pointer 2010-07-13 19:40:45 +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
Matthias Clasen
c27052be96 Don't try to keep state in a cell renderer between two paint calls. It
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_set_pulse):
        Don't try to keep state in a cell renderer between two paint
        calls. It doesn't work. Patch by Kristian Mueller


svn path=/trunk/; revision=21890
2008-12-13 08:18:50 +00:00
Matthias Clasen
5cfd038335 Use C_() instead of Q_(). String change!
2008-10-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkaccellabel.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkcellrendereraccel.c:
        * gtk/gtkcellrendererprogress.c:
        * gtk/gtkimmulticontext.c:
        * gtk/gtkrecentchoosermenu.c:
        * gtk/gtkvolumebutton.c: Use C_() instead of Q_(). String change!



svn path=/trunk/; revision=21716
2008-10-27 01:42:28 +00:00
Kristian Rietveld
56efde1a2f Add orientation property and some slight refactoring here and there.
2007-06-13  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkcellrendererprogress.c
	(gtk_cell_renderer_progress_class_init),
	(gtk_cell_renderer_progress_init),
	(gtk_cell_renderer_progress_[gs]et_property),
	(gtk_cell_renderer_progress_render): Add orientation property and some
	slight refactoring here and there.  (Fixes #344836, reported by
	Benjamin Montgomery).


svn path=/trunk/; revision=18118
2007-06-13 12:41:24 +00:00
Kristian Rietveld
633cd695f6 add text-[xy]align properties for aligning the text label of the progress
2007-06-06  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_init),
	(gtk_cell_renderer_progress_class_init),
	(gtk_cell_renderer_progress_[gs]et_property),
	(gtk_cell_renderer_progress_render): add text-[xy]align properties
	for aligning the text label of the progress bar.  (#334576,
	suggestion from Steven Sheehy).


svn path=/trunk/; revision=18068
2007-06-06 20:27:15 +00:00
Kristian Rietveld
75c9c07f02 fix docs.
2007-01-03  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcellrendererprogress.c
	(gtk_cell_renderer_progress_class_init): fix docs.


svn path=/trunk/; revision=17027
2007-01-02 23:36:32 +00:00
Matthias Clasen
0dd1afdfca Implement activity mode for GtkCellRendererProgress. (#377851, Brad
2007-01-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkcellrendererprogress.c: Implement activity mode
        for GtkCellRendererProgress.  (#377851, Brad Taylor)



svn path=/trunk/; revision=17004
2007-01-02 04:11:15 +00:00
Carlos Garnacho
40750b5152 do not use xthickness/ythickness, they aren't used any longer for drawing.
2006-12-07  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtkcellrendererprogress (compute_dimensions): do not use
        xthickness/ythickness, they aren't used any longer for drawing.
2006-12-07 15:56:03 +00:00
Kristian Rietveld
980ca0ed46 broooooooken pipe 2006-12-06 21:40:02 +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
Kristian Rietveld
d4fdc6b7a9 This commit includes a fix for #169463, Stefan Kost.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	This commit includes a fix for #169463, Stefan Kost.

	* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
	when cell_area is set, return cell_area width/height as width/height,
	so the focus rectangle will be drawn correctly.

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
	of focus-line-width property,
	(validate_row): take focus_line_width into account.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	also take focus_line_width into account when calculating the cell_area
	y and height (before, we only took it into account when calculating
	x and width).
2005-06-19 12:44:12 +00:00
Owen Taylor
dda40ca71a Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
2005-05-11  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
	to draw the swatch in to avoid having an extraneous window.

	* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
	color when !has_opacity.

2005-05-10  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
	files for Cairo convenience functionality.

	* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
	convenience functions to add GdkRectangle, GdkRegion to a cairo path.

	* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
	gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().

	* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
	gdk_drawable_create_cairo_context() to gdk_cairo_create().

	* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
	Rename gdk_pixbuf_set_as_cairo_source() to
	gdk_cairo_set_source_pixbuf().

	* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
	gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
	Adjust for renames.

	* gdk/gdk.symbols: Update.

	* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
	coordinate system problem that was causing the wrong portions
	to be invalidated.

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
	gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
	gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
	gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
	gtk/gtkcellview.c (gtk_cell_view_expose)
	gtk/gtkdnd.c (gtk_drag_highlight_expose)
	gtk/gtkentry.c (gtk_entry_draw_text)
	gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.

	* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
	GTK+ style ... use instance-private data and standard names for
	private structure, etc. Move function docs inline.

	* gtk/gtkcalendar.[ch]: Switch to drawing everything in
	expose. Switch drawing to Cairo.

	* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
	gtk_calendar_freeze/thaw
2005-05-11 19:16:19 +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
b6c29a5f1a : Mark param spec strings as static. 2005-03-21 06:02:43 +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
afc970df72 Add a translator hint. (#163889)
2005-01-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_set_value):
	Add a translator hint.  (#163889)
2005-01-14 13:53:31 +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
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
d9d8bda57e Add a Q_() macro.
Sun May 16 22:27:17 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkintl.h (Q_): Add a Q_() macro.

	* gtk/gtkcellrendererprogress.h: Remove GTK_PROGRESS_CELL_UNKNOWN
	and GTK_PROGRESS_CELL_FAILED. With the ability the set the label,
	they are not really needed.

	* gtk/gtkcellrendererprogress.c: Use the xpad and ypad properties
	instead of hardwired padding, use Q_() for the default label,
	compute a reasonable minimal size.  (#142571, #142572, #142573,
	Tommi Komulainen, Christian Persch)
2004-05-17 02:33:18 +00:00
Matthias Clasen
b3e562abcf Add a progress cell renderer, based on the one found in Epiphany. 2004-05-12 16:07:44 +00:00