Lines 174-179
Link Here
|
174 |
gchar *default_path; |
174 |
gchar *default_path; |
175 |
gchar *tmp_dir; |
175 |
gchar *tmp_dir; |
176 |
const char *comp_name; |
176 |
const char *comp_name; |
|
|
177 |
gint n_burners_co; |
178 |
XfburnDeviceList *devlist_co; |
177 |
|
179 |
|
178 |
gobj = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties); |
180 |
gobj = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties); |
179 |
obj = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG (gobj); |
181 |
obj = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG (gobj); |
Lines 190-205
Link Here
|
190 |
gtk_window_set_icon (GTK_WINDOW (obj), icon); |
192 |
gtk_window_set_icon (GTK_WINDOW (obj), icon); |
191 |
g_object_unref (icon); |
193 |
g_object_unref (icon); |
192 |
|
194 |
|
193 |
/* burning devices list */ |
195 |
devlist_co = xfburn_device_list_new (); |
194 |
priv->device_box = xfburn_device_box_new (SHOW_CD_WRITERS | SHOW_CDRW_WRITERS | SHOW_MODE_SELECTION | SHOW_SPEED_SELECTION); |
196 |
g_object_get (devlist_co, "num-burners", &n_burners_co, NULL); |
195 |
gtk_widget_show (priv->device_box); |
197 |
g_object_unref(devlist_co); |
196 |
|
198 |
if (n_burners_co >= 1) { /* cd burner available? Else only iso creation */ |
197 |
g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj); |
199 |
|
198 |
|
200 |
/* burning devices list */ |
199 |
priv->frame_device = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box); |
201 |
priv->device_box = xfburn_device_box_new (SHOW_CD_WRITERS | SHOW_CDRW_WRITERS | SHOW_MODE_SELECTION | SHOW_SPEED_SELECTION); |
200 |
gtk_widget_show (priv->frame_device); |
202 |
gtk_widget_show (priv->device_box); |
201 |
gtk_box_pack_start (box, priv->frame_device, FALSE, FALSE, BORDER); |
203 |
|
202 |
|
204 |
g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj); |
|
|
205 |
|
206 |
priv->frame_device = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box); |
207 |
gtk_widget_show (priv->frame_device); |
208 |
gtk_box_pack_start (box, priv->frame_device, FALSE, FALSE, BORDER); |
209 |
} |
203 |
/* composition name */ |
210 |
/* composition name */ |
204 |
comp_name = iso_image_get_volume_id (priv->image); |
211 |
comp_name = iso_image_get_volume_id (priv->image); |
205 |
if (priv->show_volume_name) { |
212 |
if (priv->show_volume_name) { |
Lines 298-304
Link Here
|
298 |
gtk_widget_grab_focus (button); |
305 |
gtk_widget_grab_focus (button); |
299 |
gtk_widget_grab_default (button); |
306 |
gtk_widget_grab_default (button); |
300 |
|
307 |
|
301 |
cb_volume_changed (XFBURN_DEVICE_BOX (priv->device_box), TRUE, xfburn_device_box_get_selected_device (XFBURN_DEVICE_BOX (priv->device_box)), obj); |
308 |
if (n_burners_co >= 1) { |
|
|
309 |
cb_volume_changed (XFBURN_DEVICE_BOX (priv->device_box), TRUE, xfburn_device_box_get_selected_device (XFBURN_DEVICE_BOX (priv->device_box)), obj); |
310 |
} else { |
311 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->check_only_iso), TRUE); |
312 |
gtk_widget_set_sensitive (priv->hbox_iso, TRUE); |
313 |
gtk_widget_set_sensitive (priv->check_eject, FALSE); |
314 |
gtk_widget_set_sensitive (priv->check_burnfree, FALSE); |
315 |
gtk_widget_set_sensitive (priv->check_dummy, FALSE); |
316 |
gtk_widget_set_sensitive (priv->check_only_iso, FALSE); |
317 |
} |
302 |
g_signal_connect (G_OBJECT (obj), "response", G_CALLBACK (cb_dialog_response), priv); |
318 |
g_signal_connect (G_OBJECT (obj), "response", G_CALLBACK (cb_dialog_response), priv); |
303 |
|
319 |
|
304 |
return gobj; |
320 |
return gobj; |
Lines 393-408
Link Here
|
393 |
{ |
409 |
{ |
394 |
XfburnBurnDataCompositionBaseDialogPrivate *priv = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG_GET_PRIVATE (dialog); |
410 |
XfburnBurnDataCompositionBaseDialogPrivate *priv = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG_GET_PRIVATE (dialog); |
395 |
gboolean valid_disc; |
411 |
gboolean valid_disc; |
|
|
412 |
gint n_burners_co; |
413 |
XfburnDeviceList *devlist_co; |
396 |
|
414 |
|
397 |
gtk_widget_set_sensitive (priv->frame_device, !gtk_toggle_button_get_active (button)); |
415 |
devlist_co = xfburn_device_list_new (); |
398 |
xfburn_device_box_set_sensitive (XFBURN_DEVICE_BOX (priv->device_box), !gtk_toggle_button_get_active (button)); |
416 |
g_object_get (devlist_co, "num-burners", &n_burners_co, NULL); |
399 |
|
417 |
g_object_unref(devlist_co); |
|
|
418 |
if(n_burners_co>=1) { |
419 |
gtk_widget_set_sensitive (priv->frame_device, !gtk_toggle_button_get_active (button)); |
420 |
xfburn_device_box_set_sensitive (XFBURN_DEVICE_BOX (priv->device_box), !gtk_toggle_button_get_active (button)); |
421 |
} |
400 |
gtk_widget_set_sensitive (priv->hbox_iso, gtk_toggle_button_get_active (button)); |
422 |
gtk_widget_set_sensitive (priv->hbox_iso, gtk_toggle_button_get_active (button)); |
401 |
gtk_widget_set_sensitive (priv->check_eject, !gtk_toggle_button_get_active (button)); |
423 |
gtk_widget_set_sensitive (priv->check_eject, !gtk_toggle_button_get_active (button)); |
402 |
gtk_widget_set_sensitive (priv->check_burnfree, !gtk_toggle_button_get_active (button)); |
424 |
gtk_widget_set_sensitive (priv->check_burnfree, !gtk_toggle_button_get_active (button)); |
403 |
gtk_widget_set_sensitive (priv->check_dummy, !gtk_toggle_button_get_active (button)); |
425 |
gtk_widget_set_sensitive (priv->check_dummy, !gtk_toggle_button_get_active (button)); |
404 |
if (!gtk_toggle_button_get_active (button)) { |
426 |
if (!gtk_toggle_button_get_active (button)) { |
405 |
g_object_get (G_OBJECT (priv->device_box), "valid", &valid_disc, NULL); |
427 |
if(n_burners_co>=1) |
|
|
428 |
g_object_get (G_OBJECT (priv->device_box), "valid", &valid_disc, NULL); |
406 |
gtk_widget_set_sensitive (priv->button_proceed, valid_disc); |
429 |
gtk_widget_set_sensitive (priv->button_proceed, valid_disc); |
407 |
} else { |
430 |
} else { |
408 |
gtk_widget_set_sensitive (priv->button_proceed, TRUE); |
431 |
gtk_widget_set_sensitive (priv->button_proceed, TRUE); |
Lines 634-639
Link Here
|
634 |
struct burn_source * src = NULL; |
657 |
struct burn_source * src = NULL; |
635 |
IsoWriteOpts *write_opts; |
658 |
IsoWriteOpts *write_opts; |
636 |
|
659 |
|
|
|
660 |
gint n_burners_co; |
661 |
XfburnDeviceList *devlist_co; |
662 |
|
637 |
/* If the name was the default, update the image volume id and volset id */ |
663 |
/* If the name was the default, update the image volume id and volset id */ |
638 |
if (priv->entry != NULL) { |
664 |
if (priv->entry != NULL) { |
639 |
const gchar * comp_name = gtk_entry_get_text (GTK_ENTRY (priv->entry)); |
665 |
const gchar * comp_name = gtk_entry_get_text (GTK_ENTRY (priv->entry)); |
Lines 667-673
Link Here
|
667 |
|
693 |
|
668 |
gtk_widget_show (dialog_progress); |
694 |
gtk_widget_show (dialog_progress); |
669 |
|
695 |
|
670 |
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_only_iso))) { |
696 |
devlist_co = xfburn_device_list_new (); |
|
|
697 |
g_object_get (devlist_co, "num-burners", &n_burners_co, NULL); |
698 |
g_object_unref(devlist_co); |
699 |
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_only_iso)) |
700 |
|| n_burners_co <1) { // force iso if no burner exists |
671 |
ThreadWriteIsoParams *params = NULL; |
701 |
ThreadWriteIsoParams *params = NULL; |
672 |
|
702 |
|
673 |
/* create a new iso */ |
703 |
/* create a new iso */ |