Commit 4d139659 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

made the code look more similar to GtkCellRendererToggle to allow for easy

2005-01-03  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcellrenderertoggle.c
	(gimp_cell_renderer_toggle_get_size): made the code look more
	similar to GtkCellRendererToggle to allow for easy comparison.
parent 9c65cb8f
2005-01-03 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcellrenderertoggle.c
(gimp_cell_renderer_toggle_get_size): made the code look more
similar to GtkCellRendererToggle to allow for easy comparison.
2005-01-03 Sven Neumann <sven@gimp.org>
* app/menus/plug-in-menus.c: made the code a little more robust by
not relying on certain properties of the menu path.
2005-01-03 Sven Neumann <neumann@jpk.com>
* tools/pdbgen/pdb/gradient.pdb: do actually add the new procedure
......
......@@ -250,7 +250,7 @@ gimp_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
gint pixbuf_width;
gint pixbuf_height;
if (!toggle->stock_id)
if (! toggle->stock_id)
{
GTK_CELL_RENDERER_CLASS (parent_class)->get_size (cell,
widget,
......@@ -260,7 +260,7 @@ gimp_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
return;
}
if (!toggle->pixbuf)
if (! toggle->pixbuf)
gimp_cell_renderer_toggle_create_pixbuf (toggle, widget);
pixbuf_width = gdk_pixbuf_get_width (toggle->pixbuf);
......@@ -271,8 +271,11 @@ gimp_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
calc_height = (pixbuf_height +
(gint) cell->ypad * 2 + widget->style->ythickness * 2);
if (x_offset) *x_offset = 0;
if (y_offset) *y_offset = 0;
if (width)
*width = calc_width;
if (height)
*height = calc_height;
if (cell_area)
{
......@@ -289,9 +292,6 @@ gimp_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
*y_offset = MAX (*y_offset, 0);
}
}
if (width) *width = calc_width;
if (height) *height = calc_height;
}
static void
......@@ -309,7 +309,7 @@ gimp_cell_renderer_toggle_render (GtkCellRenderer *cell,
GtkStateType state;
gboolean active;
if (!toggle->stock_id)
if (! toggle->stock_id)
{
GTK_CELL_RENDERER_CLASS (parent_class)->render (cell, window, widget,
background_area,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment