Mercurial > audlegacy
diff src/libaudclient/audctrl.c @ 3917:b5ee3a4a8e3b
libaudclient:
- audacious_remote_toggle_about_box, audacious_remote_toggle_jtf_box, audacious_remote_toggle_prefs_box, audacious_remote_toggle_filebrowser, audacious_remote_eq_activate have been added.
audtool:
- argument parser has been improved.
- command to show filebrowser has been added.
- command to activate/deactivate equalizer has been added.
- now each command to show aboutbox, prefswin, jtf and filebrowser is capable of change visibility.
- now playlist_clear stops playback first.
- normalize names of some commands.
core:
- enhance some dbus functions to support visibility control.
- add some functions to hide dialogs.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Thu, 08 Nov 2007 22:16:50 +0900 |
parents | 86c9abc83fbd |
children | e5119c001bb4 |
line wrap: on
line diff
--- a/src/libaudclient/audctrl.c Thu Nov 08 00:13:00 2007 +0900 +++ b/src/libaudclient/audctrl.c Thu Nov 08 22:16:50 2007 +0900 @@ -535,7 +535,18 @@ * Tells audacious to show the preferences pane. **/ void audacious_remote_show_prefs_box(DBusGProxy *proxy) { - org_atheme_audacious_show_prefs_box(proxy, &error); + audacious_remote_toggle_prefs_box(proxy, TRUE); +} + +/** + * audacious_remote_toggle_prefs_box: + * @proxy: DBus proxy for audacious + * @show: shows/hides + * + * Tells audacious to show/hide the preferences pane. + **/ +void audacious_remote_toggle_prefs_box(DBusGProxy *proxy, gboolean show) { + org_atheme_audacious_show_prefs_box(proxy, show, &error); g_clear_error(&error); } @@ -546,7 +557,18 @@ * Tells audacious to show the about box. **/ void audacious_remote_show_about_box(DBusGProxy *proxy) { - org_atheme_audacious_show_about_box(proxy, &error); + audacious_remote_toggle_about_box(proxy, TRUE); +} + +/** + * audacious_remote_toggle_about_box: + * @proxy: DBus proxy for audacious + * @show: shows/hides + * + * Tells audacious to show/hide the about box. + **/ +void audacious_remote_toggle_about_box(DBusGProxy *proxy, gboolean show) { + org_atheme_audacious_show_about_box(proxy, show, &error); g_clear_error(&error); } @@ -885,7 +907,30 @@ * Tells audacious to show the Jump-to-File pane. **/ void audacious_remote_show_jtf_box(DBusGProxy *proxy) { - org_atheme_audacious_show_jtf_box(proxy, &error); + audacious_remote_toggle_jtf_box(proxy, TRUE); +} + +/** + * audacious_remote_toggle_jtf_box: + * @proxy: DBus proxy for audacious + * @show: shows/hides jtf pane + * + * Tells audacious to show/hide the Jump-to-File pane. + **/ +void audacious_remote_toggle_jtf_box(DBusGProxy *proxy, gboolean show) { + org_atheme_audacious_show_jtf_box(proxy, show, &error); + g_clear_error(&error); +} + +/** + * audacious_remote_toggle_filebrowser: + * @proxy: DBus proxy for audacious + * @show: shows/hides filebrowser + * + * Tells audacious to show the filebrowser dialog. + **/ +void audacious_remote_toggle_filebrowser(DBusGProxy *proxy, gboolean show) { + org_atheme_audacious_show_filebrowser(proxy, show, &error); g_clear_error(&error); } @@ -1003,3 +1048,14 @@ return s; } +/** + * audacious_remote_eq_activate: + * @proxy: DBus proxy for audacious + * @active: Whether or not to activate the equalizer. + * + * Toggles the equalizer. + **/ +void audacious_remote_eq_activate(DBusGProxy *proxy, gboolean active) { + org_atheme_audacious_equalizer_activate (proxy, active, &error); + g_clear_error(&error); +}