560 |
|
|
561 |
*Ltitle=0; |
*Ltitle=0; |
562 |
*Lcd = 0; |
*Lcd = 0; |
563 |
if (Atypecd & _MEDIA_CDR) { |
if (Atypecd & _MEDIA_BLANKORAPPENDABLE) { |
564 |
|
g_snprintf(Lcd, sizeof(Lcd)-1, _("a CDR/RW")); |
565 |
|
} else if (Atypecd & _MEDIA_CDR) { |
566 |
g_snprintf(Lcd, sizeof(Lcd)-1, _("a CDR")); |
g_snprintf(Lcd, sizeof(Lcd)-1, _("a CDR")); |
567 |
} else if (Atypecd & _MEDIA_CDRW) { |
} else if (Atypecd & _MEDIA_CDRW) { |
568 |
g_snprintf(Lcd, sizeof(Lcd)-1, _("a CDRW")); |
g_snprintf(Lcd, sizeof(Lcd)-1, _("a CDRW")); |
613 |
Lmedialu = 0; |
Lmedialu = 0; |
614 |
|
|
615 |
if (*Lrequis & _MEDIA_IS_DVD) { |
if (*Lrequis & _MEDIA_IS_DVD) { |
|
printf("test DVD!\n"); |
|
616 |
Lmedialu += get_dvdinfo(Ldrive, NULL); |
Lmedialu += get_dvdinfo(Ldrive, NULL); |
|
printf("fin => %d\n", Lmedialu); |
|
617 |
} |
} |
618 |
|
|
619 |
if (*Lrequis & _MEDIA_IS_CD) { |
if (*Lrequis & _MEDIA_IS_CD) { |
|
printf("test CD!\n"); |
|
620 |
Lmedialu += get_cdinfo(Ldrive, NULL); |
Lmedialu += get_cdinfo(Ldrive, NULL); |
|
printf("fin => %d\n", Lmedialu); |
|
|
|
|
621 |
} |
} |
|
printf("cdoudvd => %d\n", (!(_MEDIA_CMP_CD(*Lrequis, Lmedialu) || _MEDIA_CMP_DVD(*Lrequis, Lmedialu)))); |
|
|
printf("blank = >%d\n", ((*Lrequis & _MEDIA_BLANK) && (Lmedialu & _MEDIA_NOBLANK))); |
|
|
printf("nobliank => %d\n", ((*Lrequis & _MEDIA_NOBLANK) && (Lmedialu & _MEDIA_BLANK))); |
|
|
printf("apprend => %d\n", ((*Lrequis & _MEDIA_APPENDABLE) && (!(Lmedialu & _MEDIA_APPENDABLE)))); |
|
622 |
|
|
623 |
if (Ldetect) *Ldetect = Lmedialu; |
if (Ldetect) *Ldetect = Lmedialu; |
624 |
Lstatusmedia = (!(_MEDIA_CMP_CD(*Lrequis, Lmedialu) || _MEDIA_CMP_DVD(*Lrequis, Lmedialu))) || |
Lstatusmedia = (!(_MEDIA_CMP_CD(*Lrequis, Lmedialu) || _MEDIA_CMP_DVD(*Lrequis, Lmedialu))) || |
625 |
|
((*Lrequis & _MEDIA_BLANKORAPPENDABLE) && |
626 |
|
((!(Lmedialu & _MEDIA_BLANK)) && (!(Lmedialu & _MEDIA_APPENDABLE)))) || |
627 |
((*Lrequis & _MEDIA_BLANK) && (Lmedialu & _MEDIA_NOBLANK)) || |
((*Lrequis & _MEDIA_BLANK) && (Lmedialu & _MEDIA_NOBLANK)) || |
628 |
((*Lrequis & _MEDIA_NOBLANK) && (Lmedialu & _MEDIA_BLANK)) || |
((*Lrequis & _MEDIA_NOBLANK) && (Lmedialu & _MEDIA_BLANK)) || |
629 |
((*Lrequis & _MEDIA_APPENDABLE) && (!(Lmedialu & _MEDIA_APPENDABLE))); |
((*Lrequis & _MEDIA_APPENDABLE) && (!(Lmedialu & _MEDIA_APPENDABLE))); |
637 |
return TRUE; |
return TRUE; |
638 |
} |
} |
639 |
|
|
640 |
|
/* attente que l'utilisateur ai bien entre un cd */ |
641 |
gboolean waiting_for_user(Tgrave *Ag, gint Atypecd1, gint *Adetectcd1, gchar *Ldriveident1, |
gboolean waiting_for_user(gchar *Atitle, Tgrave *Ag, gint Atypecd1, gint *Adetectcd1, gchar *Ldriveident1) |
|
gint Atypecd2, gint *Adetectcd2, gchar *Ldriveident2) |
|
642 |
{ |
{ |
643 |
Tgrave *Lwaitg = sc_grave_load("window_waiting_cd.glade"); |
Tgrave *Lwaitg = sc_grave_load("window_waiting_cd.glade"); |
644 |
GtkWidget *Lparent = sc_grave_get_widget(Ag, "topwindow"); |
GtkWidget *Lparent = sc_grave_get_widget(Ag, "topwindow"); |
674 |
set_waitwindow_title(TRUE, Atypecd1, 1, Lwaitg); |
set_waitwindow_title(TRUE, Atypecd1, 1, Lwaitg); |
675 |
} |
} |
676 |
} |
} |
|
if (Ldriveident2 && *Ldriveident2 && Atypecd2 != _MEDIA_NONE) { |
|
|
GtkComboBox *Lcombob2 = GTK_COMBO_BOX(sc_grave_get_widget(Ag, Ldriveident2)); |
|
|
GtkTreeModel *Lmodelb2 = gtk_combo_box_get_model(Lcombob2); |
|
|
if (gtk_combo_box_get_active_iter(Lcombob2, &Liter)) { |
|
|
gtk_tree_model_get(Lmodelb2, &Liter, 0, &Lident2, 2, &Ldevicetitle2, -1); |
|
|
|
|
|
sc_grave_set_data(Lwaitg, Lident2, "device2"); |
|
|
sc_grave_set_data(Lwaitg, Adetectcd2, "detect2"); |
|
|
sc_grave_set_data(Lwaitg, Ldevicetitle1, "devicetitle2"); |
|
|
sc_grave_set_data(Lwaitg, &Atypecd2, "devicerequis2"); |
|
|
|
|
|
set_waitwindow_title(TRUE, Atypecd2, 2, Lwaitg); //Atypecd2, Ldevicetitle2); |
|
|
gtk_label_set_text(GTK_LABEL(sc_grave_get_widget(Lwaitg, "label2")), Ltitle); |
|
|
} |
|
|
} |
|
677 |
|
|
678 |
gtk_window_set_transient_for(GTK_WINDOW(Lwindow), GTK_WINDOW(Lparent)); |
gtk_window_set_transient_for(GTK_WINDOW(Lwindow), GTK_WINDOW(Lparent)); |
679 |
gtk_window_set_position(GTK_WINDOW(Lwindow), GTK_WIN_POS_CENTER_ALWAYS); |
gtk_window_set_position(GTK_WINDOW(Lwindow), GTK_WIN_POS_CENTER_ALWAYS); |
709 |
{ |
{ |
710 |
gboolean Lstatus = FALSE; |
gboolean Lstatus = FALSE; |
711 |
gchar *Liso = get_combo_value(sc_grave_get_widget(Ag, Aname)); |
gchar *Liso = get_combo_value(sc_grave_get_widget(Ag, Aname)); |
|
printf("=%s= iso? %s\n", Aname, Liso); |
|
712 |
Lstatus = !strcmp(Liso, "iso"); |
Lstatus = !strcmp(Liso, "iso"); |
713 |
|
|
714 |
return Lstatus; |
return Lstatus; |