[gcalctool] Fix whitespace



commit 95233f949d55a99858e99a943835f829a089b140
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed Oct 20 09:45:38 2010 +1100

    Fix whitespace

 src/math-buttons.c     |   98 ++++++++++++++++++++++++------------------------
 src/math-display.c     |   24 ++++++------
 src/math-equation.c    |   85 +++++++++++++++++++++--------------------
 src/math-preferences.c |   34 ++++++++--------
 src/math-window.c      |   62 +++++++++++++++---------------
 src/mp-serializer.c    |    2 +-
 6 files changed, 153 insertions(+), 152 deletions(-)
---
diff --git a/src/math-buttons.c b/src/math-buttons.c
index 5fb04fd..967c09f 100644
--- a/src/math-buttons.c
+++ b/src/math-buttons.c
@@ -428,12 +428,12 @@ static struct UnitCategory categories[] = {
 MathButtons *
 math_buttons_new(MathEquation *equation)
 {
-    return g_object_new (math_buttons_get_type(), "equation", equation, NULL);
+    return g_object_new(math_buttons_get_type(), "equation", equation, NULL);
 }
 
 
 static void
-set_tint (GtkWidget *widget, GdkColor *tint, gint alpha)
+set_tint(GtkWidget *widget, GdkColor *tint, gint alpha)
 {
     GtkStyle *style;
     int j;
@@ -754,7 +754,7 @@ source_currency_combo_changed_cb(GtkWidget *combo, MathButtons *buttons)
     gtk_tree_model_get(model, &iter, 0, &value, -1);
 
     math_equation_set_source_currency(buttons->priv->equation, value);
-    g_free (value);
+    g_free(value);
 }
 
 
@@ -776,8 +776,8 @@ source_currency_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons
         gboolean matched;
 
         gtk_tree_model_get(model, &iter, 0, &v, -1);
-        matched = strcmp (math_equation_get_source_currency(buttons->priv->equation), v) == 0;
-        g_free (v);
+        matched = strcmp(math_equation_get_source_currency(buttons->priv->equation), v) == 0;
+        g_free(v);
         if (matched)
             break;
         valid = gtk_tree_model_iter_next(model, &iter);
@@ -802,7 +802,7 @@ target_currency_combo_changed_cb(GtkWidget *combo, MathButtons *buttons)
     gtk_tree_model_get(model, &iter, 0, &value, -1);
 
     math_equation_set_target_currency(buttons->priv->equation, value);
-    g_free (value);
+    g_free(value);
 }
 
 
@@ -824,8 +824,8 @@ target_currency_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons
         gboolean matched;
 
         gtk_tree_model_get(model, &iter, 0, &v, -1);
-        matched = strcmp (math_equation_get_target_currency(buttons->priv->equation), v) == 0;
-        g_free (v);
+        matched = strcmp(math_equation_get_target_currency(buttons->priv->equation), v) == 0;
+        g_free(v);
         if (matched)
             break;
         valid = gtk_tree_model_iter_next(model, &iter);
@@ -906,7 +906,7 @@ load_mode(MathButtons *buttons, ButtonMode mode)
         if (button_data[i].tooltip)
             gtk_widget_set_tooltip_text(button, _(button_data[i].tooltip));
       
-        atk_object_set_name (gtk_widget_get_accessible (button), button_data[i].widget_name);
+        atk_object_set_name(gtk_widget_get_accessible(button), button_data[i].widget_name);
 
         switch (button_data[i].class) {
         case NUMBER:
@@ -1564,7 +1564,7 @@ function_cb(GtkWidget *widget, MathButtons *buttons)
             GtkWidget *item;
           
             item = gtk_menu_item_new_with_label(_(functions[i].name));
-            g_object_set_data(G_OBJECT(item), "function", g_strdup (functions[i].function));
+            g_object_set_data(G_OBJECT(item), "function", g_strdup(functions[i].function));
             gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
             g_signal_connect(item, "activate", G_CALLBACK(insert_function_cb), buttons);
             gtk_widget_show(item);
@@ -1580,7 +1580,7 @@ G_MODULE_EXPORT
 void
 factorize_cb(GtkWidget *widget, MathButtons *buttons)
 {
-    math_equation_factorize (buttons->priv->equation);
+    math_equation_factorize(buttons->priv->equation);
 }
 
 
@@ -1638,7 +1638,7 @@ finc_activate_cb(GtkWidget *widget, MathButtons *buttons)
     if (finc_dialog_fields[dialog][field+1] == NULL) {
         GtkWidget *dialog_widget;
         dialog_widget = gtk_widget_get_toplevel(widget);
-        if (gtk_widget_is_toplevel (dialog_widget)) {
+        if (gtk_widget_is_toplevel(dialog_widget)) {
             gtk_dialog_response(GTK_DIALOG(dialog_widget),
                                 GTK_RESPONSE_OK);
             return;
@@ -1665,7 +1665,7 @@ finc_response_cb(GtkWidget *widget, gint response_id, MathButtons *buttons)
     if (response_id != GTK_RESPONSE_OK)
         return;
 
-    dialog = GPOINTER_TO_INT (g_object_get_data(G_OBJECT(widget), "finc_dialog"));
+    dialog = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "finc_dialog"));
 
     for (i = 0; i < 4; i++) {
         if (finc_dialog_fields[dialog][i] == NULL) {
@@ -1794,18 +1794,18 @@ number_mode_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons *bu
 
 
 static void
-math_buttons_set_property (GObject      *object,
-                           guint         prop_id,
-                           const GValue *value,
-                           GParamSpec   *pspec)
+math_buttons_set_property(GObject      *object,
+                          guint         prop_id,
+                          const GValue *value,
+                          GParamSpec   *pspec)
 {
     MathButtons *self;
 
-    self = MATH_BUTTONS (object);
+    self = MATH_BUTTONS(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        self->priv->equation = g_value_get_object (value);
+        self->priv->equation = g_value_get_object(value);
         math_buttons_set_mode(self, self->priv->mode);
         g_signal_connect(self->priv->equation, "notify::display", G_CALLBACK(display_changed_cb), self);
         g_signal_connect(self->priv->equation, "notify::number-mode", G_CALLBACK(number_mode_changed_cb), self);
@@ -1815,41 +1815,41 @@ math_buttons_set_property (GObject      *object,
         display_changed_cb(self->priv->equation, NULL, self);
         break;
     case PROP_MODE:
-        math_buttons_set_mode(self, g_value_get_int (value));
+        math_buttons_set_mode(self, g_value_get_int(value));
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
 
 
 static void
-math_buttons_get_property (GObject    *object,
-                           guint       prop_id,
-                           GValue     *value,
-                           GParamSpec *pspec)
+math_buttons_get_property(GObject    *object,
+                          guint       prop_id,
+                          GValue     *value,
+                          GParamSpec *pspec)
 {
     MathButtons *self;
 
-    self = MATH_BUTTONS (object);
+    self = MATH_BUTTONS(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        g_value_set_object (value, self->priv->equation);
+        g_value_set_object(value, self->priv->equation);
         break;
     case PROP_MODE:
-        g_value_set_int (value, self->priv->mode);
+        g_value_set_int(value, self->priv->mode);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
 
 
 static void
-math_buttons_class_init (MathButtonsClass *klass)
+math_buttons_class_init(MathButtonsClass *klass)
 {
     static GEnumValue button_mode_values[] =
     {
@@ -1859,37 +1859,37 @@ math_buttons_class_init (MathButtonsClass *klass)
       {PROGRAMMING, "programming", "programming"},
       {0, NULL, NULL}
     };
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
     object_class->get_property = math_buttons_get_property;
     object_class->set_property = math_buttons_set_property;
 
-    g_type_class_add_private (klass, sizeof (MathButtonsPrivate));
+    g_type_class_add_private(klass, sizeof(MathButtonsPrivate));
 
     button_mode_type = g_enum_register_static("ButtonMode", button_mode_values);
 
-    g_object_class_install_property (object_class,
-                                     PROP_EQUATION,
-                                     g_param_spec_object ("equation",
-                                                          "equation",
-                                                          "Equation being controlled",
-                                                          math_equation_get_type(),
-                                                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-    g_object_class_install_property (object_class,
-                                     PROP_MODE,
-                                     g_param_spec_enum ("mode",
-                                                        "mode",
-                                                        "Button mode",
-                                                        button_mode_type,
-                                                        BASIC,
-                                                        G_PARAM_READWRITE));
+    g_object_class_install_property(object_class,
+                                    PROP_EQUATION,
+                                    g_param_spec_object("equation",
+                                                        "equation",
+                                                        "Equation being controlled",
+                                                        math_equation_get_type(),
+                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+    g_object_class_install_property(object_class,
+                                    PROP_MODE,
+                                    g_param_spec_enum("mode",
+                                                      "mode",
+                                                      "Button mode",
+                                                      button_mode_type,
+                                                      BASIC,
+                                                      G_PARAM_READWRITE));
 }
 
 
 static void
-math_buttons_init (MathButtons *buttons)
+math_buttons_init(MathButtons *buttons)
 {
-    buttons->priv = G_TYPE_INSTANCE_GET_PRIVATE (buttons, math_buttons_get_type(), MathButtonsPrivate);
+    buttons->priv = G_TYPE_INSTANCE_GET_PRIVATE(buttons, math_buttons_get_type(), MathButtonsPrivate);
     buttons->priv->programming_base = 10;
     gdk_color_parse("#0000FF", &buttons->priv->color_numbers);
     gdk_color_parse("#00FF00", &buttons->priv->color_action);
diff --git a/src/math-display.c b/src/math-display.c
index 1b623ef..57a102b 100644
--- a/src/math-display.c
+++ b/src/math-display.c
@@ -49,14 +49,14 @@ G_DEFINE_TYPE (MathDisplay, math_display, GTK_TYPE_VIEWPORT);
 MathDisplay *
 math_display_new()
 {
-    return g_object_new (math_display_get_type(), "equation", math_equation_new(), NULL);
+    return g_object_new(math_display_get_type(), "equation", math_equation_new(), NULL);
 }
 
 
 MathDisplay *
 math_display_new_with_equation(MathEquation *equation)
 {
-    return g_object_new (math_display_get_type(), "equation", equation, NULL);
+    return g_object_new(math_display_get_type(), "equation", equation, NULL);
 }
 
 
@@ -324,15 +324,15 @@ math_display_set_property(GObject      *object,
 {
     MathDisplay *self;
 
-    self = MATH_DISPLAY (object);
+    self = MATH_DISPLAY(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        self->priv->equation = g_value_get_object (value);
+        self->priv->equation = g_value_get_object(value);
         create_gui(self);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
@@ -346,28 +346,28 @@ math_display_get_property(GObject    *object,
 {
     MathDisplay *self;
 
-    self = MATH_DISPLAY (object);
+    self = MATH_DISPLAY(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        g_value_set_object (value, self->priv->equation);
+        g_value_set_object(value, self->priv->equation);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
 
 
 static void
-math_display_class_init (MathDisplayClass *klass)
+math_display_class_init(MathDisplayClass *klass)
 {
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
     object_class->get_property = math_display_get_property;
     object_class->set_property = math_display_set_property;
 
-    g_type_class_add_private (klass, sizeof (MathDisplayPrivate));
+    g_type_class_add_private(klass, sizeof(MathDisplayPrivate));
 
     g_object_class_install_property(object_class,
                                     PROP_EQUATION,
@@ -382,5 +382,5 @@ math_display_class_init (MathDisplayClass *klass)
 static void 
 math_display_init(MathDisplay *display)
 {
-    display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display, math_display_get_type(), MathDisplayPrivate);
+    display->priv = G_TYPE_INSTANCE_GET_PRIVATE(display, math_display_get_type(), MathDisplayPrivate);
 }
diff --git a/src/math-equation.c b/src/math-equation.c
index 3503841..75e73fc 100644
--- a/src/math-equation.c
+++ b/src/math-equation.c
@@ -112,7 +112,7 @@ G_DEFINE_TYPE (MathEquation, math_equation, GTK_TYPE_TEXT_BUFFER);
 MathEquation *
 math_equation_new()
 {
-    return g_object_new (math_equation_get_type(), NULL);
+    return g_object_new(math_equation_get_type(), NULL);
 }
 
 
@@ -317,7 +317,7 @@ math_equation_copy(MathEquation *equation)
 
     text = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(equation), &start, &end, FALSE);
     gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), text, -1);
-    g_free (text);
+    g_free(text);
 }
 
 
@@ -326,7 +326,7 @@ on_paste(GtkClipboard *clipboard, const gchar *text, gpointer data)
 {
     MathEquation *equation = data;
     if (text != NULL)
-        math_equation_insert (equation, text);
+        math_equation_insert(equation, text);
 }
 
 
@@ -646,7 +646,7 @@ math_equation_get_number(MathEquation *equation, MPNumber *z)
 
     text = math_equation_get_display(equation);
     result = !mp_serializer_from_string(equation->priv->serializer, text, z);
-    g_free (text);
+    g_free(text);
 
     return result;
 }
@@ -848,10 +848,10 @@ variable_is_defined(const char *name, void *data)
 
     if (strcmp(lower_name, "rand") == 0 || 
         strcmp(lower_name, "ans") == 0) {
-        g_free (lower_name);
+        g_free(lower_name);
         return 1;
     }
-    g_free (lower_name);
+    g_free(lower_name);
 
     return math_variables_get_value(equation->priv->variables, name) != NULL;
 }
@@ -1238,7 +1238,7 @@ math_equation_set_property(GObject      *object,
 {
     MathEquation *self;
 
-    self = MATH_EQUATION (object);
+    self = MATH_EQUATION(object);
 
     switch (prop_id) {
     case PROP_STATUS:
@@ -1278,7 +1278,7 @@ math_equation_set_property(GObject      *object,
         math_equation_set_target_currency(self, g_value_get_string(value));
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
@@ -1293,7 +1293,7 @@ math_equation_get_property(GObject    *object,
     MathEquation *self;
     gchar *text;
 
-    self = MATH_EQUATION (object);
+    self = MATH_EQUATION(object);
 
     switch (prop_id) {
     case PROP_STATUS:
@@ -1343,13 +1343,14 @@ math_equation_get_property(GObject    *object,
         g_value_set_object(value, self->priv->serializer);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
 
+
 static void
-math_equation_constructed (GObject *object)
+math_equation_constructed(GObject *object)
 {
     GtkTextBuffer *parent_class;
     parent_class = g_type_class_peek_parent(MATH_EQUATION_GET_CLASS(object));
@@ -1361,7 +1362,7 @@ math_equation_constructed (GObject *object)
 
 
 static void
-math_equation_class_init (MathEquationClass *klass)
+math_equation_class_init(MathEquationClass *klass)
 {
     static GEnumValue number_mode_values[] =
     {
@@ -1377,13 +1378,13 @@ math_equation_class_init (MathEquationClass *klass)
       {MP_GRADIANS, "gradians", "gradians"},
       {0, NULL, NULL}
     };
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
     object_class->get_property = math_equation_get_property;
     object_class->set_property = math_equation_set_property;
     object_class->constructed = math_equation_constructed;
 
-    g_type_class_add_private (klass, sizeof (MathEquationPrivate));
+    g_type_class_add_private(klass, sizeof(MathEquationPrivate));
   
     number_mode_type = g_enum_register_static("NumberMode", number_mode_values);
     number_format_type = math_display_format_get_type();
@@ -1491,24 +1492,24 @@ math_equation_class_init (MathEquationClass *klass)
                                                         MP_TYPE_SERIALIZER,
                                                         G_PARAM_READABLE));
 
-    g_signal_new ("answer-changed",
-                  G_TYPE_FROM_CLASS(object_class),
-                  G_SIGNAL_RUN_FIRST,
-                  0,
-                  NULL,
-                  NULL,
-                  g_cclosure_marshal_VOID__VOID,
-                  G_TYPE_NONE,
-                  0);
+    g_signal_new("answer-changed",
+                 G_TYPE_FROM_CLASS(object_class),
+                 G_SIGNAL_RUN_FIRST,
+                 0,
+                 NULL,
+                 NULL,
+                 g_cclosure_marshal_VOID__VOID,
+                 G_TYPE_NONE,
+                 0);
 }
 
 
 static void
-pre_insert_text_cb (MathEquation  *equation,
-                    GtkTextIter   *location,
-                    gchar         *text,
-                    gint           len,
-                    gpointer       user_data)
+pre_insert_text_cb(MathEquation  *equation,
+                   GtkTextIter   *location,
+                   gchar         *text,
+                   gint           len,
+                   gpointer       user_data)
 {
     gunichar c;
   
@@ -1553,10 +1554,10 @@ on_delete(MathEquation *equation)
 
 
 static void
-pre_delete_range_cb (MathEquation  *equation,
-                     GtkTextIter   *start,
-                     GtkTextIter   *end,
-                     gpointer       user_data)
+pre_delete_range_cb(MathEquation  *equation,
+                    GtkTextIter   *start,
+                    GtkTextIter   *end,
+                    gpointer       user_data)
 {  
     if (equation->priv->in_reformat)
         return;
@@ -1582,11 +1583,11 @@ pre_delete_range_cb (MathEquation  *equation,
 
 
 static void
-insert_text_cb (MathEquation  *equation,
-                GtkTextIter   *location,
-                gchar         *text,
-                gint           len,
-                gpointer       user_data)
+insert_text_cb(MathEquation  *equation,
+               GtkTextIter   *location,
+               gchar         *text,
+               gint           len,
+               gpointer       user_data)
 {
     if (equation->priv->in_reformat)
         return;
@@ -1597,10 +1598,10 @@ insert_text_cb (MathEquation  *equation,
 
 
 static void
-delete_range_cb (MathEquation  *equation,
-                 GtkTextIter   *start,
-                 GtkTextIter   *end,
-                 gpointer       user_data)
+delete_range_cb(MathEquation  *equation,
+                GtkTextIter   *start,
+                GtkTextIter   *end,
+                gpointer       user_data)
 {
     if (equation->priv->in_reformat)
         return;
@@ -1621,7 +1622,7 @@ math_equation_init(MathEquation *equation)
     gboolean use_default_digits = FALSE;
     int i;
 
-    equation->priv = G_TYPE_INSTANCE_GET_PRIVATE (equation, math_equation_get_type(), MathEquationPrivate);
+    equation->priv = G_TYPE_INSTANCE_GET_PRIVATE(equation, math_equation_get_type(), MathEquationPrivate);
 
     g_signal_connect(equation, "insert-text", G_CALLBACK(pre_insert_text_cb), equation);
     g_signal_connect(equation, "delete-range", G_CALLBACK(pre_delete_range_cb), equation);  
diff --git a/src/math-preferences.c b/src/math-preferences.c
index d2a3c58..c63bb53 100644
--- a/src/math-preferences.c
+++ b/src/math-preferences.c
@@ -42,7 +42,7 @@ struct MathPreferencesDialogPrivate
 MathPreferencesDialog *
 math_preferences_dialog_new(MathEquation *equation)
 {  
-    return g_object_new (math_preferences_get_type(), "equation", equation, NULL);
+    return g_object_new(math_preferences_get_type(), "equation", equation, NULL);
 }
 
 
@@ -332,21 +332,21 @@ create_gui(MathPreferencesDialog *dialog)
 
 static void
 math_preferences_set_property(GObject      *object,
-                            guint         prop_id,
-                            const GValue *value,
-                            GParamSpec   *pspec)
+                              guint         prop_id,
+                              const GValue *value,
+                              GParamSpec   *pspec)
 {
     MathPreferencesDialog *self;
 
-    self = MATH_PREFERENCES (object);
+    self = MATH_PREFERENCES(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        self->priv->equation = g_value_get_object (value);
+        self->priv->equation = g_value_get_object(value);
         create_gui(self);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
@@ -354,34 +354,34 @@ math_preferences_set_property(GObject      *object,
 
 static void
 math_preferences_get_property(GObject    *object,
-                            guint       prop_id,
-                            GValue     *value,
-                            GParamSpec *pspec)
+                              guint       prop_id,
+                              GValue     *value,
+                              GParamSpec *pspec)
 {
     MathPreferencesDialog *self;
 
-    self = MATH_PREFERENCES (object);
+    self = MATH_PREFERENCES(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        g_value_set_object (value, self->priv->equation);
+        g_value_set_object(value, self->priv->equation);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
 
 
 static void
-math_preferences_class_init (MathPreferencesDialogClass *klass)
+math_preferences_class_init(MathPreferencesDialogClass *klass)
 {
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
     object_class->get_property = math_preferences_get_property;
     object_class->set_property = math_preferences_set_property;
 
-    g_type_class_add_private (klass, sizeof (MathPreferencesDialogPrivate));
+    g_type_class_add_private(klass, sizeof(MathPreferencesDialogPrivate));
 
     g_object_class_install_property(object_class,
                                     PROP_EQUATION,
@@ -396,5 +396,5 @@ math_preferences_class_init (MathPreferencesDialogClass *klass)
 static void
 math_preferences_init(MathPreferencesDialog *dialog)
 {
-    dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, math_preferences_get_type(), MathPreferencesDialogPrivate);
+    dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE(dialog, math_preferences_get_type(), MathPreferencesDialogPrivate);
 }
diff --git a/src/math-window.c b/src/math-window.c
index 25d65bd..cad8bee 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -52,7 +52,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
 MathWindow *
 math_window_new(MathEquation *equation)
 {
-    return g_object_new (math_window_get_type(), "equation", equation, NULL);
+    return g_object_new(math_window_get_type(), "equation", equation, NULL);
 }
 
 
@@ -106,14 +106,14 @@ math_window_critical_error(MathWindow *window, const gchar *title, const gchar *
 static void
 copy_cb(GtkWidget *widget, MathWindow *window)
 {
-    math_equation_copy (window->priv->equation);  
+    math_equation_copy(window->priv->equation);  
 }
 
 
 static void
 paste_cb(GtkWidget *widget, MathWindow *window)
 {
-    math_equation_paste (window->priv->equation);
+    math_equation_paste(window->priv->equation);
 }
 
 
@@ -161,8 +161,8 @@ help_cb(GtkWidget *widget, MathWindow *window)
     GdkScreen *screen;
     GError *error = NULL;
 
-    screen = gtk_widget_get_screen (GTK_WIDGET (window));
-    gtk_show_uri (screen, "ghelp:gcalctool", gtk_get_current_event_time (), &error);
+    screen = gtk_widget_get_screen(GTK_WIDGET(window));
+    gtk_show_uri(screen, "ghelp:gcalctool", gtk_get_current_event_time(), &error);
 
     if (error != NULL)
     {
@@ -170,16 +170,16 @@ help_cb(GtkWidget *widget, MathWindow *window)
         /* Translators: Error message displayed when unable to launch help browser */
         const char *message = _("Unable to open help file");
 
-        d = gtk_message_dialog_new (GTK_WINDOW (window),
-                                    GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                    GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
-                                    "%s", message);
-        gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (d),
-                                                  "%s", error->message);
-        g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL);
-        gtk_window_present (GTK_WINDOW (d));
+        d = gtk_message_dialog_new(GTK_WINDOW (window),
+                                   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                   GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+                                   "%s", message);
+        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG (d),
+                                                 "%s", error->message);
+        g_signal_connect(d, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+        gtk_window_present(GTK_WINDOW(d));
 
-        g_error_free (error);
+        g_error_free(error);
     }
 }
 
@@ -450,15 +450,15 @@ math_window_set_property(GObject      *object,
 {
     MathWindow *self;
 
-    self = MATH_WINDOW (object);
+    self = MATH_WINDOW(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        self->priv->equation = g_value_get_object (value);
+        self->priv->equation = g_value_get_object(value);
         create_gui(self);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
@@ -472,28 +472,28 @@ math_window_get_property(GObject    *object,
 {
     MathWindow *self;
 
-    self = MATH_WINDOW (object);
+    self = MATH_WINDOW(object);
 
     switch (prop_id) {
     case PROP_EQUATION:
-        g_value_set_object (value, self->priv->equation);
+        g_value_set_object(value, self->priv->equation);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
     }
 }
 
 
 static void
-math_window_class_init (MathWindowClass *klass)
+math_window_class_init(MathWindowClass *klass)
 {
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
     object_class->get_property = math_window_get_property;
     object_class->set_property = math_window_set_property;
 
-    g_type_class_add_private (klass, sizeof (MathWindowPrivate));
+    g_type_class_add_private(klass, sizeof(MathWindowPrivate));
 
     g_object_class_install_property(object_class,
                                     PROP_EQUATION,
@@ -504,20 +504,20 @@ math_window_class_init (MathWindowClass *klass)
                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
     signals[QUIT] =
-        g_signal_new ("quit",
-                      G_TYPE_FROM_CLASS (klass),
-                      G_SIGNAL_RUN_LAST,
-                      G_STRUCT_OFFSET (MathWindowClass, quit),
-                      NULL, NULL,
-                      g_cclosure_marshal_VOID__VOID,
-                      G_TYPE_NONE, 0);
+        g_signal_new("quit",
+                     G_TYPE_FROM_CLASS (klass),
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (MathWindowClass, quit),
+                     NULL, NULL,
+                     g_cclosure_marshal_VOID__VOID,
+                     G_TYPE_NONE, 0);
 }
 
 
 static void
 math_window_init(MathWindow *window)
 {
-    window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, math_window_get_type(), MathWindowPrivate);
+    window->priv = G_TYPE_INSTANCE_GET_PRIVATE(window, math_window_get_type(), MathWindowPrivate);
     gtk_window_set_title(GTK_WINDOW(window),
                          /* Title of main window */
                          _("Calculator"));
diff --git a/src/mp-serializer.c b/src/mp-serializer.c
index 0ff732d..43e3985 100644
--- a/src/mp-serializer.c
+++ b/src/mp-serializer.c
@@ -301,7 +301,7 @@ mp_serializer_to_standard_string(MpSerializer *serializer, const MPNumber *x, ch
 void
 mp_serializer_to_specific_string(const MPNumber *x, int base, int accuracy, bool trim_zeroes, bool localize, char **target)
 {
-    MpSerializer *serializer = mp_serializer_new ();
+    MpSerializer *serializer = mp_serializer_new();
     if (!localize) {
         serializer->priv->radix = '.';
         serializer->priv->show_tsep = false;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]