-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac GUI: don't show /dev/poll/cdrom if it is configured as cdrom #163
Conversation
[disk setPath:[NSString stringWithUTF8String: dsk ]]; | ||
[disk setIsCDROM:YES]; | ||
NSString *path = [NSString stringWithUTF8String: dsk ]; | ||
if (![path hasPrefix:@"/dev/"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your indentation doesn't seem to be consistent with the rest of the file. Could you please make it consistent?
|
||
// Remove all cdroms (but keep the ones in /dev/) | ||
const char *path; | ||
int index=0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: spaces around =
if(![p hasPrefix:@"/dev/"]) { | ||
PrefsRemoveItem("cdrom", index); | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Combine with previous line.
int index=0; | ||
while ((path = PrefsFindString("cdrom", index)) != NULL) { | ||
NSString *p = [NSString stringWithUTF8String: path]; | ||
if(![p hasPrefix:@"/dev/"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Space after if
I have fixed the formatting. |
const char *path; | ||
int index = 0; | ||
while ((path = PrefsFindString("cdrom", index)) != NULL) { | ||
NSString *p = [NSString stringWithUTF8String: path]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Indent for this line is still off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Mac GUI: don't show /dev/poll/cdrom if it is configured as cdrom
This should fix #149.
It will still show the
/dev/poll/cdrom
entries if they are not configured as cdrom, so that the user can remove those entries.