Mercurial > audlegacy
comparison src/audacious/pluginenum.c @ 4781:c2dc7a3a7240
g_basename is deprecated, replace with g_path_get_basename.
| author | Tony Vroon <chainsaw@gentoo.org> |
|---|---|
| date | Fri, 26 Sep 2008 21:46:42 +0100 |
| parents | d470630b8cea |
| children |
comparison
equal
deleted
inserted
replaced
| 4780:6284337e04fd | 4781:c2dc7a3a7240 |
|---|---|
| 427 | 427 |
| 428 static void set_pvt_data(Plugin * plugin, gpointer data) | 428 static void set_pvt_data(Plugin * plugin, gpointer data) |
| 429 { | 429 { |
| 430 mowgli_dictionary_elem_t *elem; | 430 mowgli_dictionary_elem_t *elem; |
| 431 | 431 |
| 432 elem = mowgli_dictionary_find(pvt_data_dict, g_basename(plugin->filename)); | 432 elem = mowgli_dictionary_find(pvt_data_dict, g_path_get_basename(plugin->filename)); |
| 433 if (elem == NULL) | 433 if (elem == NULL) |
| 434 mowgli_dictionary_add(pvt_data_dict, g_basename(plugin->filename), data); | 434 mowgli_dictionary_add(pvt_data_dict, g_path_get_basename(plugin->filename), data); |
| 435 else | 435 else |
| 436 elem->data = data; | 436 elem->data = data; |
| 437 } | 437 } |
| 438 | 438 |
| 439 static gpointer get_pvt_data(void) | 439 static gpointer get_pvt_data(void) |
| 440 { | 440 { |
| 441 Plugin *cur_p = plugin_get_current(); | 441 Plugin *cur_p = plugin_get_current(); |
| 442 | 442 |
| 443 return mowgli_dictionary_retrieve(pvt_data_dict, g_basename(cur_p->filename)); | 443 return mowgli_dictionary_retrieve(pvt_data_dict, g_path_get_basename(cur_p->filename)); |
| 444 } | 444 } |
| 445 | 445 |
| 446 static gint | 446 static gint |
| 447 inputlist_compare_func(gconstpointer a, gconstpointer b) | 447 inputlist_compare_func(gconstpointer a, gconstpointer b) |
| 448 { | 448 { |
| 565 | 565 |
| 566 p->enabled = TRUE; | 566 p->enabled = TRUE; |
| 567 | 567 |
| 568 /* XXX: we need something better than p->filename if plugins | 568 /* XXX: we need something better than p->filename if plugins |
| 569 will eventually provide multiple plugins --nenolod */ | 569 will eventually provide multiple plugins --nenolod */ |
| 570 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); | 570 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p); |
| 571 | 571 |
| 572 /* build the extension hash table */ | 572 /* build the extension hash table */ |
| 573 gint i; | 573 gint i; |
| 574 if(p->vfs_extensions) { | 574 if(p->vfs_extensions) { |
| 575 for(i = 0; p->vfs_extensions[i] != NULL; i++) { | 575 for(i = 0; p->vfs_extensions[i] != NULL; i++) { |
| 591 output_plugin_init(Plugin * plugin) | 591 output_plugin_init(Plugin * plugin) |
| 592 { | 592 { |
| 593 OutputPlugin *p = OUTPUT_PLUGIN(plugin); | 593 OutputPlugin *p = OUTPUT_PLUGIN(plugin); |
| 594 op_data.output_list = g_list_append(op_data.output_list, p); | 594 op_data.output_list = g_list_append(op_data.output_list, p); |
| 595 | 595 |
| 596 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); | 596 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p); |
| 597 } | 597 } |
| 598 | 598 |
| 599 static void | 599 static void |
| 600 effect_plugin_init(Plugin * plugin) | 600 effect_plugin_init(Plugin * plugin) |
| 601 { | 601 { |
| 602 EffectPlugin *p = EFFECT_PLUGIN(plugin); | 602 EffectPlugin *p = EFFECT_PLUGIN(plugin); |
| 603 ep_data.effect_list = g_list_append(ep_data.effect_list, p); | 603 ep_data.effect_list = g_list_append(ep_data.effect_list, p); |
| 604 | 604 |
| 605 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); | 605 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p); |
| 606 } | 606 } |
| 607 | 607 |
| 608 static void | 608 static void |
| 609 general_plugin_init(Plugin * plugin) | 609 general_plugin_init(Plugin * plugin) |
| 610 { | 610 { |
| 611 GeneralPlugin *p = GENERAL_PLUGIN(plugin); | 611 GeneralPlugin *p = GENERAL_PLUGIN(plugin); |
| 612 gp_data.general_list = g_list_append(gp_data.general_list, p); | 612 gp_data.general_list = g_list_append(gp_data.general_list, p); |
| 613 | 613 |
| 614 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); | 614 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p); |
| 615 } | 615 } |
| 616 | 616 |
| 617 static void | 617 static void |
| 618 vis_plugin_init(Plugin * plugin) | 618 vis_plugin_init(Plugin * plugin) |
| 619 { | 619 { |
| 620 VisPlugin *p = VIS_PLUGIN(plugin); | 620 VisPlugin *p = VIS_PLUGIN(plugin); |
| 621 p->disable_plugin = vis_disable_plugin; | 621 p->disable_plugin = vis_disable_plugin; |
| 622 vp_data.vis_list = g_list_append(vp_data.vis_list, p); | 622 vp_data.vis_list = g_list_append(vp_data.vis_list, p); |
| 623 | 623 |
| 624 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); | 624 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p); |
| 625 } | 625 } |
| 626 | 626 |
| 627 static void | 627 static void |
| 628 discovery_plugin_init(Plugin * plugin) | 628 discovery_plugin_init(Plugin * plugin) |
| 629 { | 629 { |
| 630 DiscoveryPlugin *p = DISCOVERY_PLUGIN(plugin); | 630 DiscoveryPlugin *p = DISCOVERY_PLUGIN(plugin); |
| 631 dp_data.discovery_list = g_list_append(dp_data.discovery_list, p); | 631 dp_data.discovery_list = g_list_append(dp_data.discovery_list, p); |
| 632 | 632 |
| 633 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); | 633 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p); |
| 634 } | 634 } |
| 635 | 635 |
| 636 /*******************************************************************/ | 636 /*******************************************************************/ |
| 637 | 637 |
| 638 static void | 638 static void |
| 914 /* | 914 /* |
| 915 * Only test basename to avoid problems when changing | 915 * Only test basename to avoid problems when changing |
| 916 * prefix. We will only see one plugin with the same | 916 * prefix. We will only see one plugin with the same |
| 917 * basename, so this is usually what the user want. | 917 * basename, so this is usually what the user want. |
| 918 */ | 918 */ |
| 919 if (cfg.outputplugin && !strcmp(g_basename(cfg.outputplugin), g_basename(op->filename))) | 919 if (cfg.outputplugin && !strcmp(g_path_get_basename(cfg.outputplugin), g_path_get_basename(op->filename))) |
| 920 op_data.current_output_plugin = op; | 920 op_data.current_output_plugin = op; |
| 921 if (op->init) | 921 if (op->init) |
| 922 { | 922 { |
| 923 plugin_set_current((Plugin *)op); | 923 plugin_set_current((Plugin *)op); |
| 924 op->init(); | 924 op->init(); |
