802 |
if (g_str_has_suffix(Lname, "combo")==FALSE) return; |
if (g_str_has_suffix(Lname, "combo")==FALSE) return; |
803 |
|
|
804 |
if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(Acombo), &Liter)) return; |
if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(Acombo), &Liter)) return; |
|
gtk_tree_model_get(Lmodel, &Liter, 0, &Llecteur, 3, &Lident, -1); |
|
805 |
|
|
806 |
Ldrive = (Tdriveinfo *) g_slist_nth_data(Glistdrives, Lident); |
gtk_tree_model_get(Lmodel, &Liter, 0, &Ldrive, 3, &Lident, -1); |
807 |
|
|
808 |
Lisimgiso = !strcmp(Llecteur, "iso"); |
Lisimgiso = !Ldrive; |
809 |
|
|
810 |
Lspeedname = g_strdup(Lname); |
Lspeedname = g_strdup(Lname); |
811 |
_SWAP_COMBO(Lspeedname, "speed"); |
_SWAP_COMBO(Lspeedname, "speed"); |
816 |
Lpanel = (GtkWidget *)sc_grave_get_widget(Lg, Laskname); |
Lpanel = (GtkWidget *)sc_grave_get_widget(Lg, Laskname); |
817 |
g_free(Laskname); |
g_free(Laskname); |
818 |
|
|
|
|
|
819 |
/* on cache ou montre la zone de saisie du nom de l'image iso */ |
/* on cache ou montre la zone de saisie du nom de l'image iso */ |
820 |
if (GTK_IS_WIDGET(Lpanel)) { |
if (GTK_IS_WIDGET(Lpanel)) { |
821 |
|
|
831 |
gtk_widget_set_sensitive(Lvitesse, Lisimgiso ? FALSE : TRUE); |
gtk_widget_set_sensitive(Lvitesse, Lisimgiso ? FALSE : TRUE); |
832 |
} |
} |
833 |
} |
} |
|
|
|
834 |
if (!Lisimgiso && GTK_IS_WIDGET(Lvitesse)) { |
if (!Lisimgiso && GTK_IS_WIDGET(Lvitesse)) { |
835 |
remplire_combo_vitesse(GTK_COMBO_BOX(Lvitesse), Llecteur, conf_get_string(Lspeedname)); |
remplire_combo_vitesse(GTK_COMBO_BOX(Lvitesse), Ldrive, conf_get_string(Lspeedname)); |
836 |
} |
} |
837 |
|
|
838 |
for (i=0; ((Lobj = sc_grave_get_datav(Lg, "%s_isotodisabled%d", Lname, i)) && GTK_IS_WIDGET(Lobj)); i++) { |
for (i=0; ((Lobj = sc_grave_get_datav(Lg, "%s_isotodisabled%d", Lname, i)) && GTK_IS_WIDGET(Lobj)); i++) { |
903 |
GSList *Llmediarequis = g_slist_append(NULL, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_NOBLANK + _MEDIA_APPENDABLE)); |
GSList *Llmediarequis = g_slist_append(NULL, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_NOBLANK + _MEDIA_APPENDABLE)); |
904 |
gboolean Lstatus; |
gboolean Lstatus; |
905 |
|
|
906 |
Lstatus = waiting_for_user(_MEDIA_BLANKORAPPENDABLE, Lg, Llmediarequis, NULL, "dstothercombo"); |
Lstatus = waiting_for_user(_MEDIA_BLANKORAPPENDABLE, Lg, Llmediarequis, NULL, get_drive_info(Lg, "dstothercombo")); |
907 |
g_slist_free(Llmediarequis); |
g_slist_free(Llmediarequis); |
908 |
|
|
909 |
if (Lstatus==FALSE) return; |
if (Lstatus==FALSE) return; |
982 |
GSList *Llmediarequis = g_slist_append(NULL, GINT_TO_POINTER(_MEDIA_CDRW + _MEDIA_NOBLANK)); |
GSList *Llmediarequis = g_slist_append(NULL, GINT_TO_POINTER(_MEDIA_CDRW + _MEDIA_NOBLANK)); |
983 |
gboolean Lstatus; |
gboolean Lstatus; |
984 |
printf("tout debut !\n"); |
printf("tout debut !\n"); |
985 |
Lstatus = waiting_for_user(_MEDIA_BLANKORAPPENDABLE, Lg, Llmediarequis, NULL, "dstothercombo"); |
Lstatus = waiting_for_user(_MEDIA_BLANKORAPPENDABLE, Lg, Llmediarequis, NULL, get_drive_info(Lg, "dstothercombo")); |
986 |
printf("aprew awit !\n"); |
printf("aprew awit !\n"); |
987 |
g_slist_free(Llmediarequis); |
g_slist_free(Llmediarequis); |
988 |
|
|
1020 |
gchar *Ltxt = NULL; |
gchar *Ltxt = NULL; |
1021 |
gchar *Ltitle = NULL; |
gchar *Ltitle = NULL; |
1022 |
GtkWidget *Lwindow1 = GTK_WIDGET(sc_grave_get_widget(Lg, "topwindow")); |
GtkWidget *Lwindow1 = GTK_WIDGET(sc_grave_get_widget(Lg, "topwindow")); |
|
GtkWidget *Ldevice1 = NULL, *Ldevice2 = NULL; |
|
1023 |
GSList *Llmediarequis1 = NULL; |
GSList *Llmediarequis1 = NULL; |
1024 |
GSList *Llmediarequis2 = NULL; |
GSList *Llmediarequis2 = NULL; |
1025 |
gint Lmediatitle1 = _MEDIA_NONE, Lmediatitle2 = _MEDIA_NONE; |
gint Lmediatitle1 = _MEDIA_NONE, Lmediatitle2 = _MEDIA_NONE; |
1026 |
gint Lmediadetect1 = _MEDIA_NONE, Lmediadetect2 = _MEDIA_NONE; |
gint Lmediadetect1 = _MEDIA_NONE, Lmediadetect2 = _MEDIA_NONE; |
1027 |
gchar Ldevicename1[_BUF_SIZE], Ldevicename2[_BUF_SIZE]; |
// gchar Ldevicename1[_BUF_SIZE], Ldevicename2[_BUF_SIZE]; |
1028 |
|
Tdriveinfo *Ldevicename1 = NULL, *Ldevicename2 = NULL; |
1029 |
gboolean Lwritercdrw; |
gboolean Lwritercdrw; |
1030 |
gboolean Liso = FALSE; |
gboolean Liso = FALSE; |
1031 |
Ttypeoperation Loperation = WRITE_CD; |
Ttypeoperation Loperation = WRITE_CD; |
1032 |
|
|
|
*Ldevicename1 = *Ldevicename2 = 0; |
|
|
|
|
1033 |
Lname = gtk_widget_get_name(Abtn); |
Lname = gtk_widget_get_name(Abtn); |
1034 |
|
|
1035 |
if (!Lname) return; |
if (!Lname) return; |
1051 |
} |
} |
1052 |
Ltxt = _("Do you really want to create an audio cd ?"); |
Ltxt = _("Do you really want to create an audio cd ?"); |
1053 |
Ltitle = _("Writing audio cd in progress..."); |
Ltitle = _("Writing audio cd in progress..."); |
1054 |
g_strlcpy(Ldevicename1, "dstaudiocombo", sizeof(Ldevicename1)-1); |
Ldevicename1 = get_drive_info(Lg, "dstaudiocombo"); |
1055 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_BLANK)); |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_BLANK)); |
1056 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_APPENDABLE)); |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_APPENDABLE)); |
1057 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CDRW + _MEDIA_BLANK)); |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CDRW + _MEDIA_BLANK)); |
1063 |
GtkTreeModel *Ltreemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(sc_grave_get_data(Lg, "_current_list"))); |
GtkTreeModel *Ltreemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(sc_grave_get_data(Lg, "_current_list"))); |
1064 |
/* gravure cd de donnee, on verifie qu'il y ai au |
/* gravure cd de donnee, on verifie qu'il y ai au |
1065 |
* moins un fichier/repertoire dans la liste */ |
* moins un fichier/repertoire dans la liste */ |
1066 |
|
printf("oui on passe la !\n"); |
1067 |
if (g_str_has_prefix(Lname, "btnburndvddata")) { |
if (g_str_has_prefix(Lname, "btnburndvddata")) { |
1068 |
Loperation = WRITE_DVD; |
Loperation = WRITE_DVD; |
1069 |
} |
} |
1081 |
} |
} |
1082 |
|
|
1083 |
if (Loperation == WRITE_CD) { |
if (Loperation == WRITE_CD) { |
1084 |
g_strlcpy(Ldevicename1, "dstdatacombo", sizeof(Ldevicename1)-1); |
Ldevicename1 = get_drive_info(Lg, "dstdatacombo"); |
1085 |
Liso = is_an_iso(Lg, Ldevicename1); |
Liso = !Ldevicename1; |
1086 |
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Lg, "datamulti")))) { |
if (Liso) { |
1087 |
|
Ltxt = _("Do you really want to create an iso image ?"); |
1088 |
|
} else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Lg, "datamulti")))) { |
1089 |
Loperation = WRITE_CD_MULTI; |
Loperation = WRITE_CD_MULTI; |
1090 |
Ltxt = _("Do you really want to start or continue a multi session data cd ?"); |
Ltxt = _("Do you really want to start or continue a multi session data cd ?"); |
|
} else if (Liso) { |
|
|
Ltxt = _("Do you really want to create an iso image ?"); |
|
1091 |
} else { |
} else { |
1092 |
Ltxt = _("Do you really want to create a data cd ?"); |
Ltxt = _("Do you really want to create a data cd ?"); |
1093 |
} |
} |
1103 |
Ltitle = _("Writing iso image in progress..."); |
Ltitle = _("Writing iso image in progress..."); |
1104 |
} |
} |
1105 |
} else { |
} else { |
1106 |
Ltxt = _("Do you really want to create a data dvd ?"); |
printf("la man ! DVDDVDVDVDVD\n"); |
1107 |
Ltitle = _("Writing data dvd in progress..."); |
Ldevicename1 = get_drive_info(Lg, "dstdvddatacombo"); |
1108 |
g_strlcpy(Ldevicename1, "dstdvddatacombo", sizeof(Ldevicename1)-1); |
Liso = !Ldevicename1; |
1109 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDR + _MEDIA_BLANK)); |
if (!Liso) { |
1110 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDR + _MEDIA_APPENDABLE)); |
Ltxt = _("Do you really want to create a data dvd ?"); |
1111 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDPRW)); |
Ltitle = _("Writing data dvd in progress..."); |
1112 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDMRW)); |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDR + _MEDIA_BLANK)); |
1113 |
Lmediatitle1 = _MEDIA_DVDRew; |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDR + _MEDIA_APPENDABLE)); |
1114 |
|
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDPRW)); |
1115 |
|
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_DVDMRW)); |
1116 |
|
Lmediatitle1 = _MEDIA_DVDRew; |
1117 |
|
} else { |
1118 |
|
printf("ok trankil\n"); |
1119 |
|
/* creation image iso */ |
1120 |
|
Loperation = WRITE_CD; |
1121 |
|
Ltxt = _("Do you really want to create an iso image ?"); |
1122 |
|
} |
1123 |
} |
} |
1124 |
} else { |
} else { |
1125 |
/* copie de cd */ |
/* copie de cd */ |
1126 |
|
|
1127 |
|
printf("copie ?!\n"); |
1128 |
Ltxt = _("Do you really want to start the copy ?"); |
Ltxt = _("Do you really want to start the copy ?"); |
1129 |
Ltitle = _("Copying in progress..."); |
Ltitle = _("Copying in progress..."); |
1130 |
g_strlcpy(Ldevicename1, "srccopycombo", sizeof(Ldevicename1)-1); |
Ldevicename1 = get_drive_info(Lg, "srccopycombo"); |
1131 |
if (!is_an_iso(Lg, Ldevicename1)) { |
Liso = !Ldevicename1; |
1132 |
|
if (!Liso) { |
1133 |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CD + _MEDIA_NOBLANK)); |
Llmediarequis1 = g_slist_append(Llmediarequis1, GINT_TO_POINTER(_MEDIA_CD + _MEDIA_NOBLANK)); |
1134 |
Lmediatitle1 = _MEDIA_CD; |
Lmediatitle1 = _MEDIA_CD; |
1135 |
} |
} |
1136 |
g_strlcpy(Ldevicename2, "dstcopycombo", sizeof(Ldevicename2)-1); |
Ldevicename2 = get_drive_info(Lg, "dstcopycombo"); |
1137 |
printf("devname2 == > %s\n", Ldevicename2); |
|
1138 |
if (!is_an_iso(Lg, Ldevicename2)) { |
if (Ldevicename2) { |
1139 |
Llmediarequis2 = g_slist_append(Llmediarequis2, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_BLANK)); |
Llmediarequis2 = g_slist_append(Llmediarequis2, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_BLANK)); |
1140 |
Llmediarequis2 = g_slist_append(Llmediarequis2, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_APPENDABLE)); |
Llmediarequis2 = g_slist_append(Llmediarequis2, GINT_TO_POINTER(_MEDIA_CDR + _MEDIA_APPENDABLE)); |
1141 |
Llmediarequis2 = g_slist_append(Llmediarequis2, GINT_TO_POINTER(_MEDIA_CDRW + _MEDIA_BLANK)); |
Llmediarequis2 = g_slist_append(Llmediarequis2, GINT_TO_POINTER(_MEDIA_CDRW + _MEDIA_BLANK)); |
1145 |
} |
} |
1146 |
} |
} |
1147 |
|
|
1148 |
if (g_slist_length(Llmediarequis1)) Ldevice1 = sc_grave_get_widget(Lg, Ldevicename1); |
/* if (g_slist_length(Llmediarequis1)) Ldevice1 = sc_grave_get_widget(Lg, Ldevicename1); |
1149 |
if (g_slist_length(Llmediarequis2)) Ldevice2 = sc_grave_get_widget(Lg, Ldevicename2); |
if (g_slist_length(Llmediarequis2)) Ldevice2 = sc_grave_get_widget(Lg, Ldevicename2);*/ |
1150 |
|
|
1151 |
/* attente que l'utilisateur ai bien insere un cd */ |
/* attente que l'utilisateur ai bien insere un cd */ |
1152 |
printf("attente 1\n"); |
printf("attente 1 mediatitle1 [%d]\n", Lmediatitle1); |
1153 |
if (waiting_for_user(Lmediatitle1, Lg, Llmediarequis1, &Lmediadetect1, Ldevicename1)==FALSE) return; |
if (waiting_for_user(Lmediatitle1, Lg, Llmediarequis1, &Lmediadetect1, Ldevicename1)==FALSE) return; |
1154 |
printf("attente 2\n"); |
printf("attente 2\n"); |
1155 |
if (waiting_for_user(Lmediatitle2, Lg, Llmediarequis2, &Lmediadetect2, Ldevicename2)==FALSE) return; |
if (waiting_for_user(Lmediatitle2, Lg, Llmediarequis2, &Lmediadetect2, Ldevicename2)==FALSE) return; |
1157 |
|
|
1158 |
/* confirmation debut de l'operation */ |
/* confirmation debut de l'operation */ |
1159 |
if (Loperation != WRITE_DVD) { |
if (Loperation != WRITE_DVD) { |
1160 |
/* on affiche l'option "effacer le CDRW que lorsque c'est un graveur qui le permet et que l'on |
/* on affiche l'option "effacer le CDRW que lorsque c'est un graveur qui le permet */ |
1161 |
* ne continue pas un cd multi session .. */ |
Lwritercdrw = Ldevicename1 && DRIVE_CDRW_WRITER(Ldevicename1) ? TRUE : FALSE; |
1162 |
Lwritercdrw = Ldevice1 && DRIVE_CDRW_WRITER(get_drive_cmb(GTK_COMBO_BOX(Ldevice1))) ? TRUE : FALSE; |
printf("ici ca chie !?\n"); |
1163 |
Ldialoghash = create_dialog_confirm_operation(Lwindow1, Ltxt, |
Ldialoghash = create_dialog_confirm_operation(Lwindow1, Ltxt, |
1164 |
Loperation != WRITE_CD_MULTI && Lwritercdrw == TRUE && |
Lwritercdrw == TRUE && |
1165 |
((Lmediadetect1 & _MEDIA_CDRW) && (Lmediadetect1 & _MEDIA_NOBLANK)) ? |
((Lmediadetect1 & _MEDIA_CDRW) && (Lmediadetect1 & _MEDIA_NOBLANK)) ? |
1166 |
_("Blank CD-RW before writing") : NULL, conf_get_boolean("autoblank")); |
_("Blank CD-RW before writing") : NULL, conf_get_boolean("autoblank")); |
1167 |
} else { |
} else { |
1168 |
/* confirmation gravure dvd */ |
/* confirmation gravure dvd */ |
1169 |
|
printf("oui !\n"); |
1170 |
Ldialoghash = create_dialog_select_dvdoperation(Lwindow1, Lmediadetect1); |
Ldialoghash = create_dialog_select_dvdoperation(Lwindow1, Lmediadetect1); |
1171 |
} |
} |
1172 |
Lconfirm = sc_grave_get_data(Ldialoghash, "window"); |
Lconfirm = sc_grave_get_data(Ldialoghash, "window"); |
1180 |
|
|
1181 |
g_assert(GTK_IS_WIDGET(Labcheck)); |
g_assert(GTK_IS_WIDGET(Labcheck)); |
1182 |
if (Lwritercdrw == TRUE) { |
if (Lwritercdrw == TRUE) { |
1183 |
|
printf("ici ca chie2 !?\n"); |
1184 |
Luseautoblank = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Labcheck)); |
Luseautoblank = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Labcheck)); |
1185 |
|
printf("ici ca chie3 !?\n"); |
1186 |
} |
} |
1187 |
sc_grave_set_data(Lg, &Luseautoblank, "useautoblank"); |
sc_grave_set_data(Lg, &Luseautoblank, "useautoblank"); |
1188 |
} else { |
} else { |
1189 |
GtkRadioButton *Labradio = GTK_RADIO_BUTTON(sc_grave_get_widget(Ldialoghash, "burninitial")); |
GtkRadioButton *Labradio = GTK_RADIO_BUTTON(sc_grave_get_widget(Ldialoghash, "burninitial")); |
1190 |
|
printf("ici ca chie4 !?\n"); |
1191 |
Ltypeburn = g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Labradio)) ? "-Z" : "-M"); |
Ltypeburn = g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Labradio)) ? "-Z" : "-M"); |
1192 |
|
printf("ici ca chie5 !?\n"); |
1193 |
sc_grave_set_data(Lg, Ltypeburn, "typeburn"); |
sc_grave_set_data(Lg, Ltypeburn, "typeburn"); |
1194 |
} |
} |
1195 |
|
|