Mercurial > pidgin
comparison src/gaimrc.c @ 4405:cb629f3efee6
[gaim-migrate @ 4674]
Fix for win32 path bugs, and removed redundant filter_break from gaimrc_read_plugins.
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Thu, 23 Jan 2003 19:24:12 +0000 |
parents | bca8256a91a6 |
children | 61c9c2bd2a9c |
comparison
equal
deleted
inserted
replaced
4404:16f7f9451814 | 4405:cb629f3efee6 |
---|---|
431 char *path; | 431 char *path; |
432 | 432 |
433 p = (struct gaim_plugin *)pl->data; | 433 p = (struct gaim_plugin *)pl->data; |
434 | 434 |
435 path = escape_text2(p->path); | 435 path = escape_text2(p->path); |
436 | |
437 fprintf(f, "\tplugin { %s }\n", path); | 436 fprintf(f, "\tplugin { %s }\n", path); |
438 | |
439 free(path); | 437 free(path); |
440 | 438 |
441 pl = pl->next; | 439 pl = pl->next; |
442 } | 440 } |
443 | 441 |
460 if (buf[0] == '}') | 458 if (buf[0] == '}') |
461 break; | 459 break; |
462 | 460 |
463 p = parse_line(buf, &parse_buffer); | 461 p = parse_line(buf, &parse_buffer); |
464 if (!strcmp(p->option, "plugin")) { | 462 if (!strcmp(p->option, "plugin")) { |
465 #ifndef _WIN32 | |
466 filter_break(p->value[0]); | |
467 #endif | |
468 load = g_slist_append(load, g_strdup(p->value[0])); | 463 load = g_slist_append(load, g_strdup(p->value[0])); |
469 } | 464 } |
470 } | 465 } |
471 /* this is such a fucked up hack. the reason we do this is because after | 466 /* this is such a fucked up hack. the reason we do this is because after |
472 * we load a plugin the gaimrc file gets rewrit. so we have to remember | 467 * we load a plugin the gaimrc file gets rewrit. so we have to remember |
959 static void gaimrc_write_sounds(FILE *f) | 954 static void gaimrc_write_sounds(FILE *f) |
960 { | 955 { |
961 int i; | 956 int i; |
962 fprintf(f, "sound_files {\n"); | 957 fprintf(f, "sound_files {\n"); |
963 for (i = 0; i < NUM_SOUNDS; i++) | 958 for (i = 0; i < NUM_SOUNDS; i++) |
964 if (sound_file[i]) | 959 if (sound_file[i]) { |
960 #ifndef _WIN32 | |
965 fprintf(f, "\tsound%c { %s }\n", i + 'A', sound_file[i]); | 961 fprintf(f, "\tsound%c { %s }\n", i + 'A', sound_file[i]); |
962 #else | |
963 /* Make sure windows dir speparators arn't swallowed up when | |
964 path is read back in from resource file */ | |
965 char* tmp=wgaim_escape_dirsep(sound_file[i]); | |
966 fprintf(f, "\tsound%c { %s }\n", i + 'A', tmp); | |
967 g_free(tmp); | |
968 #endif | |
969 } | |
966 else | 970 else |
967 fprintf(f, "\tsound%c { }\n", i + 'A'); | 971 fprintf(f, "\tsound%c { }\n", i + 'A'); |
968 #ifndef _WIN32 | 972 #ifndef _WIN32 |
969 fprintf(f, "\tsound_cmd { %s }\n", sound_cmd); | 973 fprintf(f, "\tsound_cmd { %s }\n", sound_cmd); |
970 #endif | 974 #endif |