GNOME Bugzilla – Bug 152061
add an option to show recorders only to bacon-cd-selection
Last modified: 2004-12-22 21:47:04 UTC
It would be useful to have an option to show only recorder devices in bacon-cd-selection.
Created attachment 31372 [details] [review] patch for HEAD
William, could you write a simple test program that shows the cd selection widget, with checkboxes to switch the "show-recorders-only", and "file-image" properties on or off on the fly? That would allow for people to test those changes, and make sure they're robust.
Created attachment 31382 [details] tarball of test program
Created attachment 31383 [details] [review] updated patch Well, the test program was useful. It found an existing off by one bug in the file-image property set callback! Also showed that the new function compare_drives needed to be more robust. Unfortunately, I only have a recorder on my test machine. So, I'm not really able to test the show-recorders-only logic. Can someone with a CDROM device please give this a try?
You can fake it by modifying cd-drive.c directly.
Created attachment 31392 [details] [review] updated patch Ok, I faked it. This version fixes: - insert into list instead of append since file-image is assumed to be last - don't remove item from list before storing link to previous item
I've committed the off-by-one fix, and a test program (this one doesn't rely on glade). Could you update your patch?
Created attachment 31475 [details] [review] updated patch
I don't like that: + bcs->priv->cdroms = scan_for_cdroms (show_recorders_only, show_file_image); because if you create the recorder without recorders shown, showing them wouldn't add any drives to the list. The rest looks OK.
My mistake, it will work because we scan again. That will need to be cleaned up in 2.10, so that we only scan when creating the widget.
2004-09-10 William Jon McCann <mccann@jhu.edu> * bacon-cd-selection.c (bacon_cd_selection_class_init) (cdrom_combo_box, bacon_cd_selection_new, compare_drives) (bacon_cd_selection_set_recorders_only) (bacon_cd_selection_set_property) (bacon_cd_selection_get_property): Add show-recorders-only property. Fixes #152061.