summaryrefslogtreecommitdiff
path: root/capplets/about-me/mate-about-me.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2015-12-07 12:12:04 +0300
committermonsta <[email protected]>2015-12-07 12:12:04 +0300
commit57ec684808906cbbb89897dff19642169d7faeae (patch)
tree75d2bd71edf89c47e3b3b73e2c2361173760d997 /capplets/about-me/mate-about-me.c
parentde95631e6f8ab673c0000af9d2441a1fb70a8180 (diff)
downloadmate-control-center-57ec684808906cbbb89897dff19642169d7faeae.tar.bz2
mate-control-center-57ec684808906cbbb89897dff19642169d7faeae.tar.xz
about-me: fix indent a bit
Diffstat (limited to 'capplets/about-me/mate-about-me.c')
-rw-r--r--capplets/about-me/mate-about-me.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/capplets/about-me/mate-about-me.c b/capplets/about-me/mate-about-me.c
index 2e8a5612..c3a9dc0d 100644
--- a/capplets/about-me/mate-about-me.c
+++ b/capplets/about-me/mate-about-me.c
@@ -100,21 +100,21 @@ static void
about_me_load_photo (MateAboutMe *me)
{
gchar *file;
- GError *error = NULL;
+ GError *error = NULL;
file = g_build_filename (g_get_home_dir (), ".face", NULL);
- me->image = gdk_pixbuf_new_from_file(file, &error);
+ me->image = gdk_pixbuf_new_from_file(file, &error);
- if (me->image != NULL) {
+ if (me->image != NULL) {
e_image_chooser_set_from_file (E_IMAGE_CHOOSER (me->image_chooser), file);
- me->have_image = TRUE;
- } else {
- me->have_image = FALSE;
- g_warning ("Could not load %s: %s", file, error->message);
- g_error_free (error);
- }
-
- g_free (file);
+ me->have_image = TRUE;
+ } else {
+ me->have_image = FALSE;
+ g_warning ("Could not load %s: %s", file, error->message);
+ g_error_free (error);
+ }
+
+ g_free (file);
}
static void
@@ -123,21 +123,20 @@ about_me_update_photo (MateAboutMe *me)
GtkBuilder *dialog;
gchar *file;
GError *error;
- gboolean result;
+ gboolean result;
guchar *data;
gsize length;
dialog = me->dialog;
-
if (me->image_changed && me->have_image) {
GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
GdkPixbuf *pixbuf = NULL, *scaled = NULL;
int height, width;
gboolean do_scale = FALSE;
float scale = 1.0;
- float scalex = 1.0, scaley = 1.0;
+ float scalex = 1.0, scaley = 1.0;
e_image_chooser_get_image_data (E_IMAGE_CHOOSER (me->image_chooser), (char **) &data, &length);
@@ -158,12 +157,13 @@ about_me_update_photo (MateAboutMe *me)
width = gdk_pixbuf_get_width (pixbuf);
if (width > MAX_WIDTH) {
- scalex = (float)MAX_WIDTH/width;
+ scalex = (float)MAX_WIDTH/width;
if (scalex < scale) {
scale = scalex;
}
do_scale = TRUE;
}
+
if (height > MAX_HEIGHT) {
scaley = (float)MAX_HEIGHT/height;
if (scaley < scale) {
@@ -189,7 +189,7 @@ about_me_update_photo (MateAboutMe *me)
/* FIXME: I would have to read the default used by the mdmgreeter program */
error = NULL;
file = g_build_filename (g_get_home_dir (), ".face", NULL);
- if (g_file_set_contents (file, (gchar *)data, length, &error) == TRUE) {
+ if (g_file_set_contents (file, (gchar *)data, length, &error) == TRUE) {
g_chmod (file, 0644);
} else {
g_warning ("Could not create %s: %s", file, error->message);
@@ -197,8 +197,7 @@ about_me_update_photo (MateAboutMe *me)
}
g_free (file);
- g_object_unref (pixbuf);
-
+ g_object_unref (pixbuf);
} else if (me->image_changed && !me->have_image) {
/* Update the image in the card */
file = g_build_filename (g_get_home_dir (), ".face", NULL);
@@ -417,7 +416,7 @@ about_me_setup_dialog (void)
gchar *str;
me = g_new0 (MateAboutMe, 1);
- me->image = NULL;
+ me->image = NULL;
dialog = gtk_builder_new ();
gtk_builder_add_from_file (dialog, MATECC_UI_DIR "/mate-about-me-dialog.ui", NULL);