changeset 2248:f47524760158 trunk

[svn] - added in audtool mainwin-show, playlist-show and equalizer-show to toggle display of audacious windows
author giacomo
date Wed, 03 Jan 2007 07:45:47 -0800
parents ef1316b48550
children 7e0642c07bcc
files ChangeLog audtool/audtool.c audtool/audtool.h
diffstat 3 files changed, 59 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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 <kiyoshi.aman@gmail.com>
+  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 <james@develia.org>
   revision [3497]
   - no more menu_popup() in ui_playlist.c, now it uses ui_manager_popup_menu_show() from ui_manager framework
--- 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"},
 	{"<sep>", 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 <on/off>\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 <on/off>\n",argv[0],argv[0]);
+	g_print("%s: invalid parameter for playlist-show.\n",argv[0]);
+	g_print("%s: syntax: %s playlist-show <on/off>\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 <on/off>\n",argv[0],argv[0]);
 }
 
 void show_preferences_window(gint session, gint argc, gchar **argv)
--- 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 **);