Patch to export mainwindow_jump_to_file() per xmms-dev
David Spreen <[email protected]>
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Organization | Debian GNU/Linux Project |
| Message-ID | <[email protected]> |
Beneath I attached a patch to make mainwindow_jump_to_file() accessible via libxmms. This is extremely usefull to bind keys to this function using xmms-shell. I also patched xmms-shell to use this but won't activate this feature until this patch went into xmms. (at least the debian package). to xmms-devel users: please cc me on replies since I am not subscribed to the list. david _______________________________________________ xmms-devel mailing list [email protected] http://lists.xmms.org/mailman/listinfo/xmms-devel
xmms-1.2.10_export_jumpwin_function.patch.txt
(text/plain, 3.3 KB)
diff -urN xmms-backup/libxmms/xmmsctrl.c xmms-1.2.10/libxmms/xmmsctrl.c
--- xmms-backup/libxmms/xmmsctrl.c 2004-02-23 20:31:42.000000000 +0000
+++ xmms-1.2.10/libxmms/xmmsctrl.c 2004-09-26 19:52:27.000000000 +0100
@@ -407,6 +407,11 @@
return remote_get_gint(session, CMD_GET_PLAYLIST_LENGTH);
}
+void xmms_jumpto_win(gint session)
+{
+ remote_cmd(session, CMD_JUMPTO_WIN);
+}
+
void xmms_remote_playlist_clear(gint session)
{
remote_cmd(session, CMD_PLAYLIST_CLEAR);
diff -urN xmms-backup/libxmms/xmmsctrl.h xmms-1.2.10/libxmms/xmmsctrl.h
--- xmms-backup/libxmms/xmmsctrl.h 2003-06-11 19:44:17.000000000 +0100
+++ xmms-1.2.10/libxmms/xmmsctrl.h 2004-09-26 19:52:27.000000000 +0100
@@ -40,6 +40,7 @@
void xmms_remote_set_playlist_pos(gint session, gint pos);
gint xmms_remote_get_playlist_length(gint session);
void xmms_remote_playlist_clear(gint session);
+void xmms_jumpto_win(gint session);
gint xmms_remote_get_output_time(gint session);
void xmms_remote_jump_to_time(gint session, gint pos);
void xmms_remote_get_volume(gint session, gint * vl, gint * vr);
diff -urN xmms-backup/xmms/controlsocket.c xmms-1.2.10/xmms/controlsocket.c
--- xmms-backup/xmms/controlsocket.c 2004-02-23 20:31:43.000000000 +0000
+++ xmms-1.2.10/xmms/controlsocket.c 2004-09-26 19:52:21.000000000 +0100
@@ -541,6 +541,9 @@
case CMD_PLAYLIST_NEXT:
playlist_next();
break;
+ case CMD_JUMPTO_WIN:
+ mainwin_jump_to_file();
+ break;
case CMD_TOGGLE_REPEAT:
mainwin_repeat_pushed(!cfg.repeat);
tbutton_set_toggled(mainwin_repeat, GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget(mainwin_options_menu, "/Repeat"))->active);
diff -urN xmms-backup/xmms/controlsocket.h xmms-1.2.10/xmms/controlsocket.h
--- xmms-backup/xmms/controlsocket.h 2003-06-11 19:44:17.000000000 +0100
+++ xmms-1.2.10/xmms/controlsocket.h 2004-09-26 19:52:21.000000000 +0100
@@ -39,8 +39,8 @@
CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE,
CMD_EQ_WIN_TOGGLE, CMD_SHOW_PREFS_BOX, CMD_TOGGLE_AOT,
CMD_SHOW_ABOUT_BOX, CMD_EJECT, CMD_PLAYLIST_PREV, CMD_PLAYLIST_NEXT,
- CMD_PING, CMD_GET_BALANCE, CMD_TOGGLE_REPEAT, CMD_TOGGLE_SHUFFLE,
- CMD_MAIN_WIN_TOGGLE, CMD_PLAYLIST_ADD_URL_STRING,
+ CMD_PING, CMD_GET_BALANCE, CMD_JUMPTO_WIN, CMD_TOGGLE_REPEAT,
+ CMD_TOGGLE_SHUFFLE, CMD_MAIN_WIN_TOGGLE, CMD_PLAYLIST_ADD_URL_STRING,
CMD_IS_EQ_WIN, CMD_IS_PL_WIN, CMD_IS_MAIN_WIN, CMD_PLAYLIST_DELETE,
CMD_IS_REPEAT, CMD_IS_SHUFFLE,
CMD_GET_EQ, CMD_GET_EQ_PREAMP, CMD_GET_EQ_BAND,
diff -urN xmms-backup/xmms/main.c xmms-1.2.10/xmms/main.c
--- xmms-backup/xmms/main.c 2004-02-23 20:31:43.000000000 +0000
+++ xmms-1.2.10/xmms/main.c 2004-09-26 19:52:21.000000000 +0100
@@ -1767,7 +1767,7 @@
g_free(key);
}
-static void mainwin_jump_to_file(void)
+void mainwin_jump_to_file(void)
{
GtkWidget *vbox, *scrollwin, *clist, *sep, *bbox, *jump, *queue, *cancel, *edit, *search_label, *hbox;
GList *playlist;
diff -urN xmms-backup/xmms/main.h xmms-1.2.10/xmms/main.h
--- xmms-backup/xmms/main.h 2003-12-07 02:06:43.000000000 +0000
+++ xmms-1.2.10/xmms/main.h 2004-09-26 19:52:21.000000000 +0100
@@ -92,6 +92,7 @@
void mainwin_adjust_volume_release(void);
void mainwin_adjust_balance_motion(gint b);
void mainwin_adjust_balance_release(void);
+void mainwin_jump_to_file(void);
void mainwin_set_volume_slider(gint percent);
void mainwin_set_balance_slider(gint percent);
signature.asc
(application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBVxbzdhEvvPyx3SMRAgbqAJ4wdJMwM9ohVwbCprD1QkLC1b0lDwCfYYxN X+1lokiq70G0TIZ8OuCrCbw= =rjQf -----END PGP SIGNATURE-----