From: Milosz D. <mde...@us...> - 2005-09-13 00:59:50
|
Update of /cvsroot/beepmp/bmpx/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4003/src Modified Files: bmp-system-control.xml bmp_playlist.c bmp_playlist.h bmp_system_control.c bmp_system_control_glue.h ui_playlist.c Log Message: Added man page, changes in the DBus interface, updated translations Index: ui_playlist.c =================================================================== RCS file: /cvsroot/beepmp/bmpx/src/ui_playlist.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ui_playlist.c 10 Sep 2005 05:16:05 -0000 1.4 --- ui_playlist.c 13 Sep 2005 00:59:42 -0000 1.5 *************** *** 1303,1307 **** gchar *uri_string, *filename; gchar **uris; ! gint ctr = 0; uri_string = g_strdup((gchar*)selection_data->data); --- 1303,1307 ---- gchar *uri_string, *filename; gchar **uris; ! gint ctr = chroma_list_get_drop_position(list); uri_string = g_strdup((gchar*)selection_data->data); *************** *** 1312,1318 **** while (*uris) { ! bmp_playlist_insert_tracklist_dnd (bmp_playlist, bmp_playlist_get_current_tracklist_name(bmp_playlist), *uris, chroma_list_get_drop_position(list)+ctr); *uris++; - ctr++; } --- 1312,1317 ---- while (*uris) { ! ctr = bmp_playlist_insert_tracklist_dnd (bmp_playlist, bmp_playlist_get_current_tracklist_name(bmp_playlist), *uris, ctr); *uris++; } Index: bmp_system_control.c =================================================================== RCS file: /cvsroot/beepmp/bmpx/src/bmp_system_control.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bmp_system_control.c 10 Sep 2005 05:16:05 -0000 1.1 --- bmp_system_control.c 13 Sep 2005 00:59:42 -0000 1.2 *************** *** 105,108 **** --- 105,109 ---- gboolean bmp_system_control_get_playlists (BmpSystemControl *self, GValueArray **array, GError **error); gboolean bmp_system_control_get_playlist (BmpSystemControl *self, const gchar *listname, GValueArray **array, GError **error); + gboolean bmp_system_control_get_current_title (BmpSystemControl *self, gchar **title, GError **error); #include <bmp_system_control_glue.h> *************** *** 110,113 **** --- 111,122 ---- gboolean + bmp_system_control_get_current_title (BmpSystemControl *self, gchar **title, GError **error) { + + *title = g_strdup (bmp_playlist_get_current_title(bmp_playlist)); + + return TRUE; + } + + gboolean bmp_system_control_get_playlist (BmpSystemControl *self, const gchar *listname, GValueArray **array, GError **error) { Index: bmp_playlist.c =================================================================== RCS file: /cvsroot/beepmp/bmpx/src/bmp_playlist.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bmp_playlist.c 11 Sep 2005 01:35:48 -0000 1.2 --- bmp_playlist.c 13 Sep 2005 00:59:42 -0000 1.3 *************** *** 455,459 **** while (filenames[n]) { ! bmp_playlist_insert_tracklist_item (self, name, filenames[n]); n++; } --- 455,470 ---- while (filenames[n]) { ! gchar *filename = filenames[n]; ! ! /* Strip leading spaces/tabs */ ! while ((filename[0] == ' ') || (filename[0] == '\t')) ! filename++; ! /* Skip comments, extended information or null lenght filenames */ ! if ((filename[0] == '#') || (filename[0] == '\0')) { ! n++; ! continue; ! } ! ! bmp_playlist_insert_tracklist_item (self, name, filename); n++; } *************** *** 1023,1027 **** } ! void bmp_playlist_insert_tracklist_dnd (BmpPlaylist *self, const gchar *listname, const gchar *uri, gint _idx) { --- 1034,1038 ---- } ! int bmp_playlist_insert_tracklist_dnd (BmpPlaylist *self, const gchar *listname, const gchar *uri, gint _idx) { *************** *** 1044,1048 **** file_item->selected = FALSE; file_item->locked = FALSE; ! LIST_ADD_ITEM_POSITION(list, file_item, _idx); } else if (g_file_test(path, G_FILE_TEST_IS_DIR)) --- 1055,1059 ---- file_item->selected = FALSE; file_item->locked = FALSE; ! LIST_ADD_ITEM_POSITION(list, file_item, _idx++); } else if (g_file_test(path, G_FILE_TEST_IS_DIR)) *************** *** 1053,1064 **** while (items) { ! file_item = g_new0(BmpFileItem,1); ! file_item->uri = g_strdup_printf("file://%s",items->data); ! file_item->metadata = NULL; ! file_item->metadata_attempted = FALSE; ! file_item->selected = FALSE; ! file_item->locked = FALSE; ! LIST_ADD_ITEM_POSITION(list, file_item, _idx++); ! items = g_list_next (items); } --- 1064,1072 ---- while (items) { ! gchar *new_uri = g_filename_to_uri (items->data, NULL, NULL); ! ! /* Do not need to increase _idx here, as if its a file, ! * above code will handle that ... */ ! _idx = bmp_playlist_insert_tracklist_dnd (self, listname, new_uri, _idx); items = g_list_next (items); } *************** *** 1069,1072 **** --- 1077,1082 ---- if (g_object_get_boolean(bmp_system_control,"shuffle")) bmp_playlist_tracklist_shuffle (self, listname); + + return _idx; } Index: bmp_system_control_glue.h =================================================================== RCS file: /cvsroot/beepmp/bmpx/src/bmp_system_control_glue.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bmp_system_control_glue.h 10 Sep 2005 05:16:05 -0000 1.1 --- bmp_system_control_glue.h 13 Sep 2005 00:59:42 -0000 1.2 *************** *** 54,58 **** ! /* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.HER3SN:1) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER_POINTER (GClosure *closure, GValue *return_value, --- 54,58 ---- ! /* BOOLEAN:POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.g7wbON:1) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER_POINTER (GClosure *closure, GValue *return_value, *************** *** 101,105 **** } ! /* BOOLEAN:INT,POINTER (/tmp/dbus-binding-tool-c-marshallers.HER3SN:2) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER (GClosure *closure, GValue *return_value, --- 101,105 ---- } ! /* BOOLEAN:INT,POINTER (/tmp/dbus-binding-tool-c-marshallers.g7wbON:2) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER (GClosure *closure, GValue *return_value, *************** *** 148,152 **** } ! /* BOOLEAN:STRING,POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.HER3SN:3) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_POINTER_POINTER (GClosure *closure, GValue *return_value, --- 148,152 ---- } ! /* BOOLEAN:STRING,POINTER,POINTER (/tmp/dbus-binding-tool-c-marshallers.g7wbON:3) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_POINTER_POINTER (GClosure *closure, GValue *return_value, *************** *** 197,201 **** } ! /* BOOLEAN:STRING,INT,POINTER (/tmp/dbus-binding-tool-c-marshallers.HER3SN:4) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_INT_POINTER (GClosure *closure, GValue *return_value, --- 197,201 ---- } ! /* BOOLEAN:STRING,INT,POINTER (/tmp/dbus-binding-tool-c-marshallers.g7wbON:4) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_INT_POINTER (GClosure *closure, GValue *return_value, *************** *** 246,250 **** } ! /* BOOLEAN:INT,INT,POINTER (/tmp/dbus-binding-tool-c-marshallers.HER3SN:5) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_INT_POINTER (GClosure *closure, GValue *return_value, --- 246,250 ---- } ! /* BOOLEAN:INT,INT,POINTER (/tmp/dbus-binding-tool-c-marshallers.g7wbON:5) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_INT_POINTER (GClosure *closure, GValue *return_value, *************** *** 295,299 **** } ! /* BOOLEAN:POINTER (/tmp/dbus-binding-tool-c-marshallers.HER3SN:6) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER (GClosure *closure, GValue *return_value, --- 295,299 ---- } ! /* BOOLEAN:POINTER (/tmp/dbus-binding-tool-c-marshallers.g7wbON:6) */ extern void dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER (GClosure *closure, GValue *return_value, *************** *** 346,366 **** #include <dbus/dbus-glib.h> static const DBusGMethodInfo dbus_glib_bmp_system_control_methods[] = { ! { (GCallback) bmp_system_control_get_playlists, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER_POINTER, 0 }, ! { (GCallback) bmp_system_control_get_playlist, dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_POINTER_POINTER, 66 }, ! { (GCallback) bmp_system_control_quit, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 140 }, ! { (GCallback) bmp_system_control_repeat, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 182 }, ! { (GCallback) bmp_system_control_ui_start, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 235 }, ! { (GCallback) bmp_system_control_ui_stop, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 280 }, ! { (GCallback) bmp_system_control_play_next, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 324 }, ! { (GCallback) bmp_system_control_play_prev, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 370 }, ! { (GCallback) bmp_system_control_play_pause, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 416 }, ! { (GCallback) bmp_system_control_play_stop, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 463 }, ! { (GCallback) bmp_system_control_play_current, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 509 }, ! { (GCallback) bmp_system_control_play_track, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 558 }, ! { (GCallback) bmp_system_control_play_list_track, dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_INT_POINTER, 614 }, ! { (GCallback) bmp_system_control_set_current_tracklist, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 683 }, ! { (GCallback) bmp_system_control_volume, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 749 }, ! { (GCallback) bmp_system_control_eq, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_INT_POINTER, 802 }, ! { (GCallback) bmp_system_control_seek, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 860 }, }; --- 346,367 ---- #include <dbus/dbus-glib.h> static const DBusGMethodInfo dbus_glib_bmp_system_control_methods[] = { ! { (GCallback) bmp_system_control_get_current_title, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER_POINTER, 0 }, ! { (GCallback) bmp_system_control_get_playlists, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER_POINTER, 66 }, ! { (GCallback) bmp_system_control_get_playlist, dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_POINTER_POINTER, 132 }, ! { (GCallback) bmp_system_control_quit, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 206 }, ! { (GCallback) bmp_system_control_repeat, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 248 }, ! { (GCallback) bmp_system_control_ui_start, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 301 }, ! { (GCallback) bmp_system_control_ui_stop, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 346 }, ! { (GCallback) bmp_system_control_play_next, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 390 }, ! { (GCallback) bmp_system_control_play_prev, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 436 }, ! { (GCallback) bmp_system_control_play_pause, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 482 }, ! { (GCallback) bmp_system_control_play_stop, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 529 }, ! { (GCallback) bmp_system_control_play_current, dbus_glib_marshal_bmp_system_control_BOOLEAN__POINTER, 575 }, ! { (GCallback) bmp_system_control_play_track, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 624 }, ! { (GCallback) bmp_system_control_play_list_track, dbus_glib_marshal_bmp_system_control_BOOLEAN__STRING_INT_POINTER, 680 }, ! { (GCallback) bmp_system_control_set_current_tracklist, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 749 }, ! { (GCallback) bmp_system_control_volume, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 815 }, ! { (GCallback) bmp_system_control_eq, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_INT_POINTER, 868 }, ! { (GCallback) bmp_system_control_seek, dbus_glib_marshal_bmp_system_control_BOOLEAN__INT_POINTER, 926 }, }; *************** *** 368,373 **** 0, dbus_glib_bmp_system_control_methods, ! 17, ! "org.beepmediaplayer.SystemControl\0GetPlaylists\0S\0arg0\0O\0F\0N\0(ss)\0\0org.beepmediaplayer.SystemControl\0GetPlaylist\0S\0arg0\0I\0s\0arg1\0O\0F\0N\0(ss)\0\0org.beepmediaplayer.SystemControl\0Quit\0S\0\0org.beepmediaplayer.SystemControl\0Repeat\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0UiStart\0S\0\0org.beepmediaplayer.SystemControl\0UiStop\0S\0\0org.beepmediaplayer.SystemControl\0PlayNext\0S\0\0org.beepmediaplayer.SystemControl\0PlayPrev\0S\0\0org.beepmediaplayer.SystemControl\0PlayPause\0S\0\0org.beepmediaplayer.SystemControl\0PlayStop\0S\0\0org.beepmediaplayer.SystemControl\0PlayCurrent\0S\0\0org.beepmediaplayer.SystemControl\0PlayTrack\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0PlayListTrack\0S\0arg0\0I\0s\0arg1\0I\0i\0\0org.beepmediaplayer.SystemControl\0SetCurrentTracklist\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0Volume\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0Eq\0S\0arg0\0I\0i\0arg1\0I\0i\0\0org.beepmediaplayer.SystemControl\0Seek\0S\0arg0\0I\0i\0\0\0", "org.beepmediaplayer.SystemControl\0Eos\0\0", "\0" --- 369,374 ---- 0, dbus_glib_bmp_system_control_methods, ! 18, ! "org.beepmediaplayer.SystemControl\0GetCurrentTitle\0S\0arg0\0O\0F\0N\0s\0\0org.beepmediaplayer.SystemControl\0GetPlaylists\0S\0arg0\0O\0F\0N\0(ss)\0\0org.beepmediaplayer.SystemControl\0GetPlaylist\0S\0arg0\0I\0s\0arg1\0O\0F\0N\0(ss)\0\0org.beepmediaplayer.SystemControl\0Quit\0S\0\0org.beepmediaplayer.SystemControl\0Repeat\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0UiStart\0S\0\0org.beepmediaplayer.SystemControl\0UiStop\0S\0\0org.beepmediaplayer.SystemControl\0PlayNext\0S\0\0org.beepmediaplayer.SystemControl\0PlayPrev\0S\0\0org.beepmediaplayer.SystemControl\0PlayPause\0S\0\0org.beepmediaplayer.SystemControl\0PlayStop\0S\0\0org.beepmediaplayer.SystemControl\0PlayCurrent\0S\0\0org.beepmediaplayer.SystemControl\0PlayTrack\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0PlayListTrack\0S\0arg0\0I\0s\0arg1\0I\0i\0\0org.beepmediaplayer.SystemControl\0SetCurrentTracklist\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0Volume\0S\0arg0\0I\0i\0\0org.beepmediaplayer.SystemControl\0Eq\0S\0arg0\0I\0i\0arg1\0I\0i\0\0org.beepmediaplayer.SystemControl\0Seek\0S\0arg0\0I\0i\0\0\0", "org.beepmediaplayer.SystemControl\0Eos\0\0", "\0" Index: bmp_playlist.h =================================================================== RCS file: /cvsroot/beepmp/bmpx/src/bmp_playlist.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bmp_playlist.h 10 Sep 2005 05:16:05 -0000 1.1 --- bmp_playlist.h 13 Sep 2005 00:59:42 -0000 1.2 *************** *** 125,129 **** bmp_playlist_insert_tracklist_item (BmpPlaylist *self, const gchar *listname, const gchar *filename); ! void bmp_playlist_insert_tracklist_dnd (BmpPlaylist *self, const gchar *listname, const gchar *filename, gint _idx); --- 125,129 ---- bmp_playlist_insert_tracklist_item (BmpPlaylist *self, const gchar *listname, const gchar *filename); ! int bmp_playlist_insert_tracklist_dnd (BmpPlaylist *self, const gchar *listname, const gchar *filename, gint _idx); Index: bmp-system-control.xml =================================================================== RCS file: /cvsroot/beepmp/bmpx/src/bmp-system-control.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bmp-system-control.xml 10 Sep 2005 05:16:05 -0000 1.1 --- bmp-system-control.xml 13 Sep 2005 00:59:42 -0000 1.2 *************** *** 4,7 **** --- 4,11 ---- <interface name="org.beepmediaplayer.SystemControl"> + <method name="GetCurrentTitle"> + <arg type="s" direction="out" /> + </method> + <method name="GetPlaylists"> <arg type="(ss)" direction="out" /> |