filename | src/gdlist.c |
changeset | 736:a02d1475ccfd |
prev | 709:18c39a8e504c |
next | 755:ab873907b00e |
author | nkeynes |
date | Mon Jul 14 07:44:42 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Re-indent everything consistently Fix include guards for consistency as well |
file | annotate | diff | log | raw |
1.1 --- a/src/gdlist.c Wed Jun 25 10:40:45 2008 +00001.2 +++ b/src/gdlist.c Mon Jul 14 07:44:42 2008 +00001.3 @@ -126,7 +126,7 @@1.4 list_changed = TRUE;1.5 }1.6 }1.7 -1.8 +1.9 lxdream_set_global_config_value( CONFIG_GDROM, disc_name );1.10 lxdream_save_config();1.12 @@ -159,7 +159,7 @@1.13 }1.14 gdrom_device_count = g_list_length(gdrom_device_list);1.15 gdrom_recent_count = g_list_length(gdrom_recent_list);1.16 -1.17 +1.18 // Run the hooks in case anyone registered before the list was initialized1.19 CALL_HOOKS( gdrom_list_change_hook, TRUE, gdrom_list_get_selection() );1.20 }1.21 @@ -170,18 +170,18 @@1.22 gdrom_unmount_disc();1.23 return TRUE;1.24 }1.25 -1.26 +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.30 }1.31 -1.32 +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.37 }1.38 -1.39 +1.40 return FALSE;1.41 }1.43 @@ -205,16 +205,16 @@1.44 if( posn == 0 ) {1.45 return _("Empty");1.46 }1.47 -1.48 +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.52 }1.53 -1.54 +1.55 if( posn == gdrom_device_count + 1) {1.56 return "";1.57 }1.58 -1.59 +1.60 if( posn < 0 || posn > gdrom_list_size() ) {1.61 return NULL;1.62 }1.63 @@ -225,22 +225,22 @@1.65 const gchar *gdrom_list_get_filename( int posn )1.66 {1.67 - if( posn == 0 ) {1.68 - return _("Empty");1.69 - }1.70 -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.74 - }1.75 -1.76 - if( posn == gdrom_device_count + 1) {1.77 - return "";1.78 - }1.79 -1.80 - if( posn < 0 || posn > gdrom_list_size() ) {1.81 - return NULL;1.82 - }1.83 + if( posn == 0 ) {1.84 + return _("Empty");1.85 + }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.91 + }1.92 +1.93 + if( posn == gdrom_device_count + 1) {1.94 + return "";1.95 + }1.96 +1.97 + if( posn < 0 || posn > gdrom_list_size() ) {1.98 + return NULL;1.99 + }1.100 +1.101 + return g_list_nth_data(gdrom_recent_list, posn-FIRST_RECENT_INDEX);1.102 }
.