# HG changeset patch # User mf0102 <0102@gmx.at> # Date 1214755483 -7200 # Node ID 48cdebc174ef02054b9b51ec6babb1b2e88c9c72 # Parent b71d4f3f3afdca08b10797ce6c4203f4a634779a enabled interface destruction diff -r b71d4f3f3afd -r 48cdebc174ef src/audacious/interface.c --- a/src/audacious/interface.c Sun Jun 29 17:48:07 2008 +0200 +++ b/src/audacious/interface.c Sun Jun 29 18:04:43 2008 +0200 @@ -52,6 +52,13 @@ i->init(); } +void +interface_destroy(Interface *i) +{ + if (i->fini != NULL) + i->fini(); +} + Interface * interface_get(gchar *id) { diff -r b71d4f3f3afd -r 48cdebc174ef src/audacious/interface.h --- a/src/audacious/interface.h Sun Jun 29 17:48:07 2008 +0200 +++ b/src/audacious/interface.h Sun Jun 29 18:04:43 2008 +0200 @@ -38,6 +38,8 @@ void interface_register(Interface *i); void interface_deregister(Interface *i); void interface_run(Interface *i); +void interface_destroy(Interface *i); + Interface *interface_get(gchar *id); #endif diff -r b71d4f3f3afd -r 48cdebc174ef src/audacious/main.c --- a/src/audacious/main.c Sun Jun 29 17:48:07 2008 +0200 +++ b/src/audacious/main.c Sun Jun 29 18:04:43 2008 +0200 @@ -487,24 +487,13 @@ aud_quit(void) { GList *playlists = NULL, *playlists_top = NULL; + Interface *i = interface_get(options.interface); playlist_stop_get_info_thread(); aud_config_save(); -#if 0 - if (options.headless == FALSE) - { - gtk_widget_hide(equalizerwin); - gtk_widget_hide(playlistwin); - gtk_widget_hide(mainwin); - - gtk_accel_map_save(aud_paths[BMP_PATH_ACCEL_FILE]); - gtk_main_quit(); - - cleanup_skins(); - } -#endif + interface_destroy(i); plugin_system_cleanup(); diff -r b71d4f3f3afd -r 48cdebc174ef src/audacious/ui_legacy.c --- a/src/audacious/ui_legacy.c Sun Jun 29 17:48:07 2008 +0200 +++ b/src/audacious/ui_legacy.c Sun Jun 29 18:04:43 2008 +0200 @@ -239,10 +239,26 @@ return TRUE; } +static gboolean +_ui_finalize() +{ + gtk_widget_hide(equalizerwin); + gtk_widget_hide(playlistwin); + gtk_widget_hide(mainwin); + + gtk_accel_map_save(aud_paths[BMP_PATH_ACCEL_FILE]); + gtk_main_quit(); + + cleanup_skins(); + + return TRUE; +} + static Interface legacy_interface = { .id = "legacy", .desc = N_("Legacy Interface"), .init = _ui_initialize, + .fini = _ui_finalize }; void