Commit 0c46cef0 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

code cleanup, untabified.

2005-11-02  Michael Natterer  <mitch@gimp.org>

	* app/text/gimptext.c: code cleanup, untabified.
parent c9c4e926
2005-11-02 Michael Natterer <mitch@gimp.org>
* app/text/gimptext.c: code cleanup, untabified.
2005-11-02 Michael Natterer <mitch@gimp.org> 2005-11-02 Michael Natterer <mitch@gimp.org>
* app/actions/data-commands.c * app/actions/data-commands.c
......
...@@ -103,19 +103,19 @@ gimp_font_get_type (void) ...@@ -103,19 +103,19 @@ gimp_font_get_type (void)
static const GTypeInfo font_info = static const GTypeInfo font_info =
{ {
sizeof (GimpFontClass), sizeof (GimpFontClass),
(GBaseInitFunc) NULL, (GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL, (GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_font_class_init, (GClassInitFunc) gimp_font_class_init,
NULL, /* class_finalize */ NULL, /* class_finalize */
NULL, /* class_font */ NULL, /* class_font */
sizeof (GimpFont), sizeof (GimpFont),
0, /* n_preallocs */ 0, /* n_preallocs */
(GInstanceInitFunc) gimp_font_init, (GInstanceInitFunc) gimp_font_init,
}; };
font_type = g_type_register_static (GIMP_TYPE_VIEWABLE, font_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
"GimpFont", "GimpFont",
&font_info, 0); &font_info, 0);
} }
return font_type; return font_type;
...@@ -124,12 +124,8 @@ gimp_font_get_type (void) ...@@ -124,12 +124,8 @@ gimp_font_get_type (void)
static void static void
gimp_font_class_init (GimpFontClass *klass) gimp_font_class_init (GimpFontClass *klass)
{ {
GObjectClass *object_class; GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpViewableClass *viewable_class; GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GParamSpec *param_spec;
object_class = G_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
...@@ -142,12 +138,11 @@ gimp_font_class_init (GimpFontClass *klass) ...@@ -142,12 +138,11 @@ gimp_font_class_init (GimpFontClass *klass)
viewable_class->default_stock_id = "gtk-select-font"; viewable_class->default_stock_id = "gtk-select-font";
param_spec = g_param_spec_object ("pango-context", NULL, NULL, g_object_class_install_property (object_class, PROP_PANGO_CONTEXT,
PANGO_TYPE_CONTEXT, g_param_spec_object ("pango-context",
G_PARAM_WRITABLE); NULL, NULL,
PANGO_TYPE_CONTEXT,
g_object_class_install_property (object_class, G_PARAM_WRITABLE));
PROP_PANGO_CONTEXT, param_spec);
} }
static void static void
...@@ -189,7 +184,6 @@ gimp_font_set_property (GObject *object, ...@@ -189,7 +184,6 @@ gimp_font_set_property (GObject *object,
case PROP_PANGO_CONTEXT: case PROP_PANGO_CONTEXT:
if (font->pango_context) if (font->pango_context)
g_object_unref (font->pango_context); g_object_unref (font->pango_context);
font->pango_context = (PangoContext *) g_value_dup_object (value); font->pango_context = (PangoContext *) g_value_dup_object (value);
break; break;
...@@ -219,15 +213,13 @@ gimp_font_get_popup_size (GimpViewable *viewable, ...@@ -219,15 +213,13 @@ gimp_font_get_popup_size (GimpViewable *viewable,
gint *popup_width, gint *popup_width,
gint *popup_height) gint *popup_height)
{ {
GimpFont *font; GimpFont *font = GIMP_FONT (viewable);
PangoFontDescription *font_desc; PangoFontDescription *font_desc;
PangoRectangle ink; PangoRectangle ink;
PangoRectangle logical; PangoRectangle logical;
const gchar *name; const gchar *name;
font = GIMP_FONT (viewable); if (! font->pango_context)
if (!font->pango_context)
return FALSE; return FALSE;
name = gimp_object_get_name (GIMP_OBJECT (font)); name = gimp_object_get_name (GIMP_OBJECT (font));
...@@ -261,7 +253,7 @@ gimp_font_get_new_preview (GimpViewable *viewable, ...@@ -261,7 +253,7 @@ gimp_font_get_new_preview (GimpViewable *viewable,
gint width, gint width,
gint height) gint height)
{ {
GimpFont *font; GimpFont *font = GIMP_FONT (viewable);
PangoLayout *layout; PangoLayout *layout;
PangoRectangle ink; PangoRectangle ink;
PangoRectangle logical; PangoRectangle logical;
...@@ -274,8 +266,6 @@ gimp_font_get_new_preview (GimpViewable *viewable, ...@@ -274,8 +266,6 @@ gimp_font_get_new_preview (GimpViewable *viewable,
guchar *p; guchar *p;
guchar black = 0; guchar black = 0;
font = GIMP_FONT (viewable);
if (! font->pango_context) if (! font->pango_context)
return NULL; return NULL;
......
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