# HG changeset patch # User giacomo # Date 1167839147 28800 # Node ID f475247601585c16440209177ea5c483fa900a15 # Parent ef1316b48550f9badaea2a1df048840c75fb9594 [svn] - added in audtool mainwin-show, playlist-show and equalizer-show to toggle display of audacious windows diff -r ef1316b48550 -r f47524760158 ChangeLog --- a/ChangeLog Wed Jan 03 07:19:28 2007 -0800 +++ b/ChangeLog Wed Jan 03 07:45:47 2007 -0800 @@ -1,3 +1,11 @@ +2007-01-03 15:19:28 +0000 Kiyoshi Aman + revision [3499] + Add 'mainwin-display' handler; currently can only make the mainwin appear, but not disappear. + trunk/audtool/audtool.c | 15 +++++++++++++++ + trunk/audtool/audtool.h | 1 + + 2 files changed, 16 insertions(+) + + 2007-01-03 12:44:05 +0000 Giacomo Lozito revision [3497] - no more menu_popup() in ui_playlist.c, now it uses ui_manager_popup_menu_show() from ui_manager framework diff -r ef1316b48550 -r f47524760158 audtool/audtool.c --- a/audtool/audtool.c Wed Jan 03 07:19:28 2007 -0800 +++ b/audtool/audtool.c Wed Jan 03 07:45:47 2007 -0800 @@ -80,7 +80,9 @@ {"get-volume", get_volume, "returns the current volume level in percent"}, {"set-volume", set_volume, "sets the current volume level in percent"}, {"", NULL, "Miscellaneous"}, - {"mainwin-display", mainwin_display, "shows/hides the mainwin"}, + {"mainwin-show", mainwin_show, "shows/hides the main window"}, + {"playlist-show", playlist_show, "shows/hides the playlist window"}, + {"equalizer-show", equalizer_show, "shows/hides the equalizer window"}, {"preferences", show_preferences_window, "shows/hides the preferences window"}, {"jumptofile", show_jtf_window, "shows the jump to file window"}, {"shutdown", shutdown_audacious_server, "shuts down audacious"}, @@ -874,18 +876,55 @@ xmms_remote_set_main_volume(session, i); } -void mainwin_display(gint session, gint argc, gchar **argv) +void mainwin_show(gint session, gint argc, gchar **argv) { - if (strncmp(argv[2],"on"),2) { - xmms_remote_main_win_toggle(session, TRUE); + if (argc > 2) + { + if (!strncmp(argv[2],"on",2)) { + xmms_remote_main_win_toggle(session, TRUE); + return; + } + else if (!strncmp(argv[2],"off",3)) { + xmms_remote_main_win_toggle(session, FALSE); + return; + } } - else if (strncmp(argv[2],"off",3)) { - xmms_remote_main_win_toggle(session, FALSE); + g_print("%s: invalid parameter for mainwin-show.\n",argv[0]); + g_print("%s: syntax: %s mainwin-show \n",argv[0],argv[0]); +} + +void playlist_show(gint session, gint argc, gchar **argv) +{ + if (argc > 2) + { + if (!strncmp(argv[2],"on",2)) { + xmms_remote_pl_win_toggle(session, TRUE); + return; + } + else if (!strncmp(argv[2],"off",3)) { + xmms_remote_pl_win_toggle(session, FALSE); + return; + } } - else { - g_print("%s: invalid parameter for mainwin-display.\n",argv[0]); - g_print("%s: syntax: %s mainwin-display \n",argv[0],argv[0]); + g_print("%s: invalid parameter for playlist-show.\n",argv[0]); + g_print("%s: syntax: %s playlist-show \n",argv[0],argv[0]); +} + +void equalizer_show(gint session, gint argc, gchar **argv) +{ + if (argc > 2) + { + if (!strncmp(argv[2],"on",2)) { + xmms_remote_eq_win_toggle(session, TRUE); + return; + } + else if (!strncmp(argv[2],"off",3)) { + xmms_remote_eq_win_toggle(session, FALSE); + return; + } } + g_print("%s: invalid parameter for equalizer-show.\n",argv[0]); + g_print("%s: syntax: %s equalizer-show \n",argv[0],argv[0]); } void show_preferences_window(gint session, gint argc, gchar **argv) diff -r ef1316b48550 -r f47524760158 audtool/audtool.h --- a/audtool/audtool.h Wed Jan 03 07:19:28 2007 -0800 +++ b/audtool/audtool.h Wed Jan 03 07:45:47 2007 -0800 @@ -78,7 +78,9 @@ extern void playback_status(gint, gint, gchar **); extern void playback_seek(gint, gint, gchar **); extern void playback_seek_relative(gint, gint, gchar **); -extern void mainwin_display(gint, gint, gchar **); +extern void mainwin_show(gint, gint, gchar **); +extern void playlist_show(gint, gint, gchar **); +extern void equalizer_show(gint, gint, gchar **); extern void show_preferences_window(gint, gint, gchar **); extern void show_jtf_window(gint, gint, gchar **); extern void shutdown_audacious_server(gint, gint, gchar **);