1.1 --- a/src/gdlist.c Wed Jun 25 10:40:45 2008 +0000
1.2 +++ b/src/gdlist.c Fri Jul 18 11:08:30 2008 +0000
1.9 lxdream_set_global_config_value( CONFIG_GDROM, disc_name );
1.10 lxdream_save_config();
1.14 gdrom_device_count = g_list_length(gdrom_device_list);
1.15 gdrom_recent_count = g_list_length(gdrom_recent_list);
1.18 // Run the hooks in case anyone registered before the list was initialized
1.19 CALL_HOOKS( gdrom_list_change_hook, TRUE, gdrom_list_get_selection() );
1.21 @@ -170,18 +170,18 @@
1.22 gdrom_unmount_disc();
1.27 if( posn <= gdrom_device_count ) {
1.28 gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.29 return gdrom_mount_image(device->name);
1.33 posn -= FIRST_RECENT_INDEX;
1.34 if( posn >= 0 && posn < gdrom_recent_count ) {
1.35 gchar *entry = g_list_nth_data(gdrom_recent_list, posn);
1.36 return gdrom_mount_image(entry);
1.43 @@ -205,16 +205,16 @@
1.49 if( posn <= gdrom_device_count ) {
1.50 gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.51 return device->device_name;
1.55 if( posn == gdrom_device_count + 1) {
1.60 if( posn < 0 || posn > gdrom_list_size() ) {
1.63 @@ -225,22 +225,22 @@
1.65 const gchar *gdrom_list_get_filename( int posn )
1.68 - return _("Empty");
1.71 - if( posn <= gdrom_device_count ) {
1.72 - gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.73 - return device->name;
1.76 - if( posn == gdrom_device_count + 1) {
1.80 - if( posn < 0 || posn > gdrom_list_size() ) {
1.84 + return _("Empty");
1.87 - return g_list_nth_data(gdrom_recent_list, posn-FIRST_RECENT_INDEX);
1.88 + if( posn <= gdrom_device_count ) {
1.89 + gdrom_device_t device = g_list_nth_data(gdrom_device_list, posn-1);
1.90 + return device->name;
1.93 + if( posn == gdrom_device_count + 1) {
1.97 + if( posn < 0 || posn > gdrom_list_size() ) {
1.101 + return g_list_nth_data(gdrom_recent_list, posn-FIRST_RECENT_INDEX);