comparison libpurple/plugin.c @ 15927:2b8d4fabc103

merge of '479ec3bc42bb56e872fb1e8d5975ee5cc73f9cb8' and 'af97194f292b3a82f2a36fc3094f579a3dfc2841'
author Richard Laager <rlaager@wiktel.com>
date Mon, 26 Mar 2007 03:01:33 +0000
parents 4a7a13521709 ab2f466b6a13
children 9f5c9df30287 f05360b5470d
comparison
equal deleted inserted replaced
15890:4a7a13521709 15927:2b8d4fabc103
367 purple_debug_error("plugins", "%s is not loadable: The UI requirement is not met.\n", plugin->path); 367 purple_debug_error("plugins", "%s is not loadable: The UI requirement is not met.\n", plugin->path);
368 plugin->unloadable = TRUE; 368 plugin->unloadable = TRUE;
369 return plugin; 369 return plugin;
370 } 370 }
371 371
372 /* 372 /*
373 * Check to make sure a plugin has defined an id. 373 * Check to make sure a plugin has defined an id.
374 * Not having this check caused purple_plugin_unload to 374 * Not having this check caused purple_plugin_unload to
375 * enter an infinite loop in certain situations by passing 375 * enter an infinite loop in certain situations by passing
376 * purple_find_plugin_by_id a NULL value. -- ecoffey 376 * purple_find_plugin_by_id a NULL value. -- ecoffey
377 */ 377 */
378 if (plugin->info->id == NULL || *plugin->info->id == '\0') 378 if (plugin->info->id == NULL || *plugin->info->id == '\0')
379 { 379 {
380 plugin->error = g_strdup_printf(_("This plugin has not defined an ID.")); 380 plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
381 purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path); 381 purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path);
382 plugin->unloadable = TRUE; 382 plugin->unloadable = TRUE;
670 670
671 if (dep_plugin != NULL && purple_plugin_is_loaded(dep_plugin)) 671 if (dep_plugin != NULL && purple_plugin_is_loaded(dep_plugin))
672 { 672 {
673 if (!purple_plugin_unload(dep_plugin)) 673 if (!purple_plugin_unload(dep_plugin))
674 { 674 {
675 char *translated_name = g_strdup(_(dep_plugin->info->name));
676 char *tmp; 675 char *tmp;
677 676
678 tmp = g_strdup_printf(_("The dependent plugin %s failed to unload."), 677 tmp = g_strdup_printf(_("The dependent plugin %s failed to unload."),
679 translated_name); 678 _(dep_plugin->info->name));
680 g_free(translated_name);
681 679
682 purple_notify_error(NULL, NULL, 680 purple_notify_error(NULL, NULL,
683 _("There were errors unloading the plugin."), tmp); 681 _("There were errors unloading the plugin."), tmp);
684 g_free(tmp); 682 g_free(tmp);
685 } 683 }