| 1087 | } |
| 1088 | |
| 1089 | static void |
| 1090 | source_dialog_drive_list (GtkFileChooser *chooser, signal_user_data_t *ud) |
| 1091 | { |
| 1092 | GList *drives, *link; |
| 1093 | guint length, ii = 1; |
| 1094 | gchar **entries; |
| 1095 | |
| 1096 | ghb_log_func(); |
| 1097 | link = drives = dvd_device_list(); |
| 1098 | if (!link) |
| 1099 | { |
| 1100 | has_drive = FALSE; |
| 1101 | return; |
| 1102 | } |
| 1103 | has_drive = TRUE; |
| 1104 | |
| 1105 | length = g_list_length(drives); |
| 1106 | entries = g_malloc0_n(length + 2, sizeof(char*)); |
| 1107 | entries[0] = g_strdup(_("Not Selected")); |
| 1108 | while (link && ii <= length) |
| 1109 | { |
| 1110 | gchar *name = get_dvd_device_name(link->data); |
| 1111 | entries[ii] = name; |
| 1112 | link = link->next; |
| 1113 | ii++; |
| 1114 | } |
| 1115 | g_list_free(drives); |
| 1116 | gtk_file_chooser_add_choice(chooser, "drive", _("Detected DVD devices:"), |
| 1117 | (const gchar **) entries, (const gchar **) entries); |
| 1118 | gtk_file_chooser_set_choice(chooser, "drive", _("Not Selected")); |
| 1119 | g_strfreev(entries); |
| 1120 | } |
| 1121 | |
| 1122 | void ghb_break_pts_duration(gint64 ptsDuration, gint *hh, gint *mm, gdouble *ss) |
| 1123 | { |
no test coverage detected