Mercurial > pidgin
comparison libpurple/plugins/log_reader.c @ 20931:f56e94167372
Set log_reader paths at plugin load time instead of init time. This should hopefully make any crashes more clearly attributable to this plugin (hopefully there are no outstanding crashes in the init code, but this is a safeguard).
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Sun, 14 Oct 2007 20:35:13 +0000 |
| parents | d0fdf2f95277 |
| children | 89c7be36fd61 |
comparison
equal
deleted
inserted
replaced
| 20930:d0fdf2f95277 | 20931:f56e94167372 |
|---|---|
| 2421 *****************************************************************************/ | 2421 *****************************************************************************/ |
| 2422 | 2422 |
| 2423 static void | 2423 static void |
| 2424 init_plugin(PurplePlugin *plugin) | 2424 init_plugin(PurplePlugin *plugin) |
| 2425 { | 2425 { |
| 2426 | |
| 2427 } | |
| 2428 | |
| 2429 static void log_reader_init_prefs() { | |
| 2426 char *path; | 2430 char *path; |
| 2427 #ifdef _WIN32 | 2431 #ifdef _WIN32 |
| 2428 char *folder; | 2432 char *folder; |
| 2429 gboolean found = FALSE; | 2433 gboolean found = FALSE; |
| 2430 #endif | 2434 #endif |
| 2431 | |
| 2432 g_return_if_fail(plugin != NULL); | |
| 2433 | 2435 |
| 2434 purple_prefs_add_none("/plugins/core/log_reader"); | 2436 purple_prefs_add_none("/plugins/core/log_reader"); |
| 2435 | 2437 |
| 2436 | 2438 |
| 2437 /* Add general preferences. */ | 2439 /* Add general preferences. */ |
| 2687 static gboolean | 2689 static gboolean |
| 2688 plugin_load(PurplePlugin *plugin) | 2690 plugin_load(PurplePlugin *plugin) |
| 2689 { | 2691 { |
| 2690 g_return_val_if_fail(plugin != NULL, FALSE); | 2692 g_return_val_if_fail(plugin != NULL, FALSE); |
| 2691 | 2693 |
| 2694 log_reader_init_prefs(); | |
| 2695 | |
| 2692 /* The names of IM clients are marked for translation at the request of | 2696 /* The names of IM clients are marked for translation at the request of |
| 2693 translators who wanted to transliterate them. Many translators | 2697 translators who wanted to transliterate them. Many translators |
| 2694 choose to leave them alone. Choose what's best for your language. */ | 2698 choose to leave them alone. Choose what's best for your language. */ |
| 2695 adium_logger = purple_log_logger_new("adium", _("Adium"), 6, | 2699 adium_logger = purple_log_logger_new("adium", _("Adium"), 6, |
| 2696 NULL, | 2700 NULL, |
