Mercurial > pidgin
comparison plugins/notify.c @ 3427:8fa61405af2b
[gaim-migrate @ 3453]
Who never commits anything *now*, Etan?
I changed most of the error message text around. If you think any of it
should be different, just let me know, or send a patch.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 25 Aug 2002 10:51:24 +0000 |
parents | 5a5df7968b6e |
children | 0202b5e1af69 |
comparison
equal
deleted
inserted
replaced
3426:ccbcc11a68c2 | 3427:8fa61405af2b |
---|---|
19 #include <string.h> | 19 #include <string.h> |
20 #include <X11/Xlib.h> | 20 #include <X11/Xlib.h> |
21 #include <X11/Xutil.h> | 21 #include <X11/Xutil.h> |
22 #include <X11/Xatom.h> | 22 #include <X11/Xatom.h> |
23 #include <gdk/gdkx.h> | 23 #include <gdk/gdkx.h> |
24 #include <errno.h> | |
24 | 25 |
25 guint choice = 1; | 26 guint choice = 1; |
26 #define NOTIFY_FOCUS 0x00000001 | 27 #define NOTIFY_FOCUS 0x00000001 |
27 #define NOTIFY_TYPE 0x00000002 | 28 #define NOTIFY_TYPE 0x00000002 |
28 #define NOTIFY_IN_FOCUS 0x00000004 | 29 #define NOTIFY_IN_FOCUS 0x00000004 |
255 gchar buf[1000]; | 256 gchar buf[1000]; |
256 FILE *fp; | 257 FILE *fp; |
257 | 258 |
258 snprintf(buf, 1000, "%s/.gaim/.notify", getenv("HOME")); | 259 snprintf(buf, 1000, "%s/.gaim/.notify", getenv("HOME")); |
259 if (!(fp = fopen(buf, "w"))) { | 260 if (!(fp = fopen(buf, "w"))) { |
260 do_error_dialog(_("Unable to write to config file"), _("Notify plugin")); | 261 do_error_dialog(_("Unable to write notify plugin config file"), strerror(errno), GAIM_ERROR); |
261 return; | 262 return; |
262 } | 263 } |
263 | 264 |
264 fprintf(fp, "%d=CHOICE\n", choice); | 265 fprintf(fp, "%d=CHOICE\n", choice); |
265 fprintf(fp, "%d=METHOD\n", method); | 266 fprintf(fp, "%d=METHOD\n", method); |