summaryrefslogtreecommitdiff
path: root/gui/gdmphotosetup.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2005-07-14 20:24:03 +0000
committerBrian Cameron <bcameron@src.gnome.org>2005-07-14 20:24:03 +0000
commitab704a7e97239f6c575615c57bb78d908d88d601 (patch)
tree389bae793bd56038ae7e24573070844a17667f0c /gui/gdmphotosetup.c
parent747c40a2c112c4b9ecd1b1794bd0f69f81c6556b (diff)
downloadgdm-ab704a7e97239f6c575615c57bb78d908d88d601.tar.gz
Use new gstdio functions and set correct permission on .face.
2005-07-13 William Jon McCann <mccann@jhu.edu> * gui/gdmphotosetup.c (main): Use new gstdio functions and set correct permission on .face.
Diffstat (limited to 'gui/gdmphotosetup.c')
-rw-r--r--gui/gdmphotosetup.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gui/gdmphotosetup.c b/gui/gdmphotosetup.c
index 3c6e6f2e..d5baff58 100644
--- a/gui/gdmphotosetup.c
+++ b/gui/gdmphotosetup.c
@@ -19,14 +19,17 @@
*/
#include "config.h"
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <libgnome/libgnome.h>
+#include <libgnomeui/libgnomeui.h>
+
#include <viciousui.h>
#include "gdm.h"
@@ -292,7 +295,7 @@ main (int argc, char *argv[])
"in the facebrowser:")),
FALSE, FALSE, 0);
- if (stat (current_pix, &s) < 0 || current_pix == NULL) {
+ if (g_stat (current_pix, &s) < 0 || current_pix == NULL) {
preview = gtk_image_new ();
current_image = gtk_image_new ();
} else {
@@ -335,7 +338,7 @@ main (int argc, char *argv[])
break;
if (ve_string_empty (current_pix) ||
- stat (current_pix, &s) < 0) {
+ g_stat (current_pix, &s) < 0) {
/*
* This can happen if the user has a setting for their face
@@ -357,7 +360,7 @@ main (int argc, char *argv[])
"/.gnome2/gdm",
NULL);
- VE_IGNORE_EINTR (unlink (photofile));
+ VE_IGNORE_EINTR (g_unlink (photofile));
preview_pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (current_image));
if (gdk_pixbuf_save (preview_pixbuf, photofile, "png", NULL,
@@ -391,8 +394,8 @@ main (int argc, char *argv[])
gnome_config_sync ();
/* ensure proper permissions */
- chmod (cfg_file, 0600);
- chmod (photofile, 0600);
+ g_chmod (cfg_file, 0600);
+ g_chmod (photofile, 0644);
g_free (cfg_file);
g_free (photofile);