aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-alert.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-04 19:34:32 +0800
commitfcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch)
treee16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /e-util/e-alert.c
parentf78417c48861759d7b0c4535ecd3febe4638a7d3 (diff)
downloadgsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.bz2
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.lz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.xz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'e-util/e-alert.c')
-rw-r--r--e-util/e-alert.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index 5ef7c577e8..88dbb7189d 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -149,17 +149,17 @@ map_type (const gchar *nick)
}
/*
- XML format:
-
- <error id="error-id" type="info|warning|question|error"?
- response="default_response"? >
- <primary>Primary error text.</primary>?
- <secondary>Secondary error text.</secondary>?
- <button stock="stock-button-id"? label="button label"?
- response="response_id"? /> *
- </error>
+ * XML format:
+ *
+ * <error id="error-id" type="info|warning|question|error"?
+ * response="default_response"? >
+ * <primary> Primary error text.</primary>?
+ * <secondary> Secondary error text.</secondary>?
+ * <button stock="stock-button-id"? label="button label"?
+ * response="response_id"? /> *
+ * </error>
+ */
-*/
static void
e_alert_load (const gchar *path)
{
@@ -211,7 +211,7 @@ e_alert_load (const gchar *path)
g_warning("Error file '%s', domain '%s' already used, merging", path, tmp);
xmlFree (tmp);
- for (error = root->children;error;error = error->next) {
+ for (error = root->children; error; error = error->next) {
if (!strcmp((gchar *)error->name, "error")) {
tmp = (gchar *)xmlGetProp(error, (const guchar *)"id");
if (tmp == NULL)
@@ -221,7 +221,7 @@ e_alert_load (const gchar *path)
e->id = g_strdup (tmp);
xmlFree (tmp);
- lastbutton = (EAlertButton *)&e->buttons;
+ lastbutton = (EAlertButton *) &e->buttons;
tmp = (gchar *)xmlGetProp(error, (const guchar *)"type");
e->message_type = map_type (tmp);
@@ -234,7 +234,7 @@ e_alert_load (const gchar *path)
xmlFree (tmp);
}
- for (scan = error->children;scan;scan=scan->next) {
+ for (scan = error->children; scan; scan = scan->next) {
if (!strcmp((gchar *)scan->name, "primary")) {
if ((tmp = (gchar *) xmlNodeGetContent (scan))) {
e->primary_text = g_strdup (
@@ -373,7 +373,7 @@ alert_format_string (const gchar *format,
while (format
&& (newstart = strchr (format, '{'))
- && (end = strchr (newstart+1, '}'))) {
+ && (end = strchr (newstart + 1, '}'))) {
g_string_append_len (string, format, newstart - format);
id = atoi (newstart + 1);
if (id < args->len) {
@@ -435,7 +435,7 @@ alert_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- EAlert *alert = (EAlert*) object;
+ EAlert *alert = (EAlert *) object;
switch (property_id) {
case PROP_TAG:
@@ -476,7 +476,7 @@ alert_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- EAlert *alert = (EAlert*) object;
+ EAlert *alert = (EAlert *) object;
switch (property_id) {
case PROP_TAG:
@@ -703,7 +703,8 @@ e_alert_init (EAlert *alert)
* Returns: a new #EAlert
**/
EAlert *
-e_alert_new (const gchar *tag, ...)
+e_alert_new (const gchar *tag,
+ ...)
{
EAlert *e;
va_list va;
@@ -716,7 +717,8 @@ e_alert_new (const gchar *tag, ...)
}
EAlert *
-e_alert_new_valist (const gchar *tag, va_list va)
+e_alert_new_valist (const gchar *tag,
+ va_list va)
{
EAlert *alert;
GPtrArray *args;
@@ -738,7 +740,8 @@ e_alert_new_valist (const gchar *tag, va_list va)
}
EAlert *
-e_alert_new_array (const gchar *tag, GPtrArray *args)
+e_alert_new_array (const gchar *tag,
+ GPtrArray *args)
{
return g_object_new (E_TYPE_ALERT, "tag", tag, "args", args, NULL);
}