comparison audtool/audtool.c @ 2247:ef1316b48550 trunk

[svn] Add 'mainwin-display' handler; currently can only make the mainwin appear, but not disappear.
author kiyoshi
date Wed, 03 Jan 2007 07:19:28 -0800
parents 6bfa0777a57a
children f47524760158
comparison
equal deleted inserted replaced
2246:a04dcf29737d 2247:ef1316b48550
78 {"playback-seek-relative", playback_seek_relative, "performs a seek relative to the current position"}, 78 {"playback-seek-relative", playback_seek_relative, "performs a seek relative to the current position"},
79 {"<sep>", NULL, "Volume control"}, 79 {"<sep>", NULL, "Volume control"},
80 {"get-volume", get_volume, "returns the current volume level in percent"}, 80 {"get-volume", get_volume, "returns the current volume level in percent"},
81 {"set-volume", set_volume, "sets the current volume level in percent"}, 81 {"set-volume", set_volume, "sets the current volume level in percent"},
82 {"<sep>", NULL, "Miscellaneous"}, 82 {"<sep>", NULL, "Miscellaneous"},
83 {"mainwin-display", mainwin_display, "shows/hides the mainwin"},
83 {"preferences", show_preferences_window, "shows/hides the preferences window"}, 84 {"preferences", show_preferences_window, "shows/hides the preferences window"},
84 {"jumptofile", show_jtf_window, "shows the jump to file window"}, 85 {"jumptofile", show_jtf_window, "shows the jump to file window"},
85 {"shutdown", shutdown_audacious_server, "shuts down audacious"}, 86 {"shutdown", shutdown_audacious_server, "shuts down audacious"},
86 {"<sep>", NULL, "Help system"}, 87 {"<sep>", NULL, "Help system"},
87 {"list-handlers", get_handlers_list, "shows handlers list"}, 88 {"list-handlers", get_handlers_list, "shows handlers list"},
871 } 872 }
872 873
873 xmms_remote_set_main_volume(session, i); 874 xmms_remote_set_main_volume(session, i);
874 } 875 }
875 876
877 void mainwin_display(gint session, gint argc, gchar **argv)
878 {
879 if (strncmp(argv[2],"on"),2) {
880 xmms_remote_main_win_toggle(session, TRUE);
881 }
882 else if (strncmp(argv[2],"off",3)) {
883 xmms_remote_main_win_toggle(session, FALSE);
884 }
885 else {
886 g_print("%s: invalid parameter for mainwin-display.\n",argv[0]);
887 g_print("%s: syntax: %s mainwin-display <on/off>\n",argv[0],argv[0]);
888 }
889 }
890
876 void show_preferences_window(gint session, gint argc, gchar **argv) 891 void show_preferences_window(gint session, gint argc, gchar **argv)
877 { 892 {
878 xmms_remote_show_prefs_box(session); 893 xmms_remote_show_prefs_box(session);
879 } 894 }
880 895