aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-colour.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 23:13:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-29 00:13:23 +0800
commitfad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch)
treeae78be371695c3dc18847b87d3f014f985aa3a40 /filter/filter-colour.c
parent6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff)
downloadgsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'filter/filter-colour.c')
-rw-r--r--filter/filter-colour.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/filter/filter-colour.c b/filter/filter-colour.c
index a5cc3534ad..c175829a5e 100644
--- a/filter/filter-colour.c
+++ b/filter/filter-colour.c
@@ -32,10 +32,10 @@
#define d(x)
-static int colour_eq (FilterElement *fe, FilterElement *cm);
+static gint colour_eq (FilterElement *fe, FilterElement *cm);
static void xml_create (FilterElement *fe, xmlNodePtr node);
static xmlNodePtr xml_encode (FilterElement *fe);
-static int xml_decode (FilterElement *fe, xmlNodePtr node);
+static gint xml_decode (FilterElement *fe, xmlNodePtr node);
static GtkWidget *get_widget (FilterElement *fe);
static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff);
static void format_sexp (FilterElement *, GString *);
@@ -143,10 +143,10 @@ xml_encode (FilterElement *fe)
g_snprintf (spec, sizeof (spec), "#%04x%04x%04x",
fc->color.red, fc->color.green, fc->color.blue);
- value = xmlNewNode(NULL, (const unsigned char *)"value");
- xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"colour");
- xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name);
- xmlSetProp(value, (const unsigned char *)"spec", (unsigned char *)spec);
+ value = xmlNewNode(NULL, (const guchar *)"value");
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"colour");
+ xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name);
+ xmlSetProp(value, (const guchar *)"spec", (guchar *)spec);
return value;
}
@@ -158,22 +158,22 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
xmlChar *prop;
xmlFree (fe->name);
- fe->name = (char *)xmlGetProp(node, (const unsigned char *)"name");
+ fe->name = (gchar *)xmlGetProp(node, (const guchar *)"name");
- prop = xmlGetProp(node, (const unsigned char *)"spec");
+ prop = xmlGetProp(node, (const guchar *)"spec");
if (prop != NULL) {
- gdk_color_parse((char *)prop, &fc->color);
+ gdk_color_parse((gchar *)prop, &fc->color);
xmlFree (prop);
} else {
/* try reading the old RGB properties */
- prop = xmlGetProp(node, (const unsigned char *)"red");
- sscanf((char *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.red);
+ prop = xmlGetProp(node, (const guchar *)"red");
+ sscanf((gchar *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.red);
xmlFree (prop);
- prop = xmlGetProp(node, (const unsigned char *)"green");
- sscanf((char *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.green);
+ prop = xmlGetProp(node, (const guchar *)"green");
+ sscanf((gchar *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.green);
xmlFree (prop);
- prop = xmlGetProp(node, (const unsigned char *)"blue");
- sscanf((char *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.blue);
+ prop = xmlGetProp(node, (const guchar *)"blue");
+ sscanf((gchar *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.blue);
xmlFree (prop);
}