comparison plugins/notify.c @ 5436:ad445074d239

[gaim-migrate @ 5818] Another big commit. Ugh. I need a very smart regexp. Core/UI split do_error_dialog(), and soon the mail dialogs! Yay! This should work without problems at all, but standard disclaimer.. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 18 May 2003 19:59:02 +0000
parents fefad67de2c7
children 2c4c975620f0
comparison
equal deleted inserted replaced
5435:a2f26666de42 5436:ad445074d239
47 #define METHOD_STRING 0x00000001 47 #define METHOD_STRING 0x00000001
48 #define METHOD_QUOTE 0x00000002 48 #define METHOD_QUOTE 0x00000002
49 #define METHOD_URGENT 0x00000004 49 #define METHOD_URGENT 0x00000004
50 #define METHOD_COUNT 0x00000008 50 #define METHOD_COUNT 0x00000008
51 51
52 static GaimPlugin *my_plugin = NULL;
53
52 void *handle; 54 void *handle;
53 GtkWidget *Entry; 55 GtkWidget *Entry;
54 gchar *title_string; 56 gchar *title_string;
55 int Number = 0; 57 int Number = 0;
56 58
434 gchar buf[1000]; 436 gchar buf[1000];
435 FILE *fp; 437 FILE *fp;
436 438
437 snprintf(buf, 1000, "%s/.gaim/.notify", getenv("HOME")); 439 snprintf(buf, 1000, "%s/.gaim/.notify", getenv("HOME"));
438 if (!(fp = fopen(buf, "w"))) { 440 if (!(fp = fopen(buf, "w"))) {
439 do_error_dialog(_("Unable to write to config file"), _("Notify plugin"), GAIM_ERROR); 441 gaim_notify_error(my_plugin, NULL,
442 _("Unable to write to config file"),
443 _("Notify plugin"));
440 return; 444 return;
441 } 445 }
442 446
443 fprintf(fp, "%d=TYPE\n", type); 447 fprintf(fp, "%d=TYPE\n", type);
444 fprintf(fp, "%d=CHOICE\n", choice); 448 fprintf(fp, "%d=CHOICE\n", choice);
710 }; 714 };
711 715
712 static void 716 static void
713 __init_plugin(GaimPlugin *plugin) 717 __init_plugin(GaimPlugin *plugin)
714 { 718 {
719 my_plugin = plugin;
715 } 720 }
716 721
717 GAIM_INIT_PLUGIN(notify, __init_plugin, info); 722 GAIM_INIT_PLUGIN(notify, __init_plugin, info);