/[graveman]/graveman/current/src/matos.c
ViewVC logotype

Diff of /graveman/current/src/matos.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by scresto, Tue Mar 29 00:10:26 2005 UTC revision 1.26 by scresto, Thu Mar 31 22:14:12 2005 UTC
# Line 350  gboolean burn_data(Tgrave *Ag, GError ** Line 350  gboolean burn_data(Tgrave *Ag, GError **
350    }    }
351    
352    sc_grave_set_data(Ag, &Liso, "iso"); /* image iso */    sc_grave_set_data(Ag, &Liso, "iso"); /* image iso */
 g_warning("tout debut !\n");  
353    if (Lstatus && *Labort==FALSE) {    if (Lstatus && *Labort==FALSE) {
 g_warning("tout debut 2!\n");  
354      Lextrapara = make_image_getextrapara(Ag, "data");      Lextrapara = make_image_getextrapara(Ag, "data");
 g_warning("tout debut 3!\n");  
355      sc_grave_set_data(Ag, Lextrapara, "extrapara"); /* parametres supplementaires */      sc_grave_set_data(Ag, Lextrapara, "extrapara"); /* parametres supplementaires */
 g_warning("oui on fais l'iso !\n");      
356      Lstatus = make_iso(Ag, Aerror);      Lstatus = make_iso(Ag, Aerror);
357      sc_grave_del_data(Ag, "extrapara");      sc_grave_del_data(Ag, "extrapara");
358      g_free(Lextrapara);      g_free(Lextrapara);
# Line 529  _DEB("ici 1LDST => %s\n", Ldst); Line 525  _DEB("ici 1LDST => %s\n", Ldst);
525      if (Lsimul) Ltodo++; /* 1 pour la simulation */      if (Lsimul) Ltodo++; /* 1 pour la simulation */
526    
527      Lstatus = burn_dvd(Ag, Aerror);      Lstatus = burn_dvd(Ag, Aerror);
   
528    } else {    } else {
529      Ltmp = _FILENAME(gtk_entry_get_text(Lgraveuriso));      Ltmp = _FILENAME(gtk_entry_get_text(Lgraveuriso));
530      g_strlcpy(Liso, Ltmp, MAXPATHLEN-1);      g_strlcpy(Liso, Ltmp, MAXPATHLEN-1);
# Line 542  _DEB("ici 1LDST => %s\n", Ldst); Line 537  _DEB("ici 1LDST => %s\n", Ldst);
537    sc_grave_del_data(Ag, "extrapara");    sc_grave_del_data(Ag, "extrapara");
538    g_free(Lextrapara);    g_free(Lextrapara);
539    
540    unlink(Ltmpdir);  //  unlink(Ltmpdir);
541    
542    sc_grave_del_data(Ag, "todo");    sc_grave_del_data(Ag, "todo");
543    sc_grave_del_data(Ag, "done");    sc_grave_del_data(Ag, "done");
# Line 559  void set_waitwindow_title(gboolean Ainse Line 554  void set_waitwindow_title(gboolean Ainse
554    gchar Ltitle[_BUF_SIZE];    gchar Ltitle[_BUF_SIZE];
555    Tdriveinfo *Ldevice = (Tdriveinfo *)sc_grave_get_data(Awaitg, "device1");    Tdriveinfo *Ldevice = (Tdriveinfo *)sc_grave_get_data(Awaitg, "device1");
556    GtkLabel *Llabel = GTK_LABEL(sc_grave_get_widget(Awaitg, "label1"));    GtkLabel *Llabel = GTK_LABEL(sc_grave_get_widget(Awaitg, "label1"));
 printf("oui ?!\n");    
 printf("typecd ==== [%d]\n", Atypecd);  
557    *Ltitle=0;    *Ltitle=0;
558    *Lcd = 0;    *Lcd = 0;
559    if (Atypecd & _MEDIA_BLANKORAPPENDABLE) {    if (Atypecd & _MEDIA_BLANKORAPPENDABLE) {
# Line 581  printf("typecd ==== [%d]\n", Atypecd); Line 574  printf("typecd ==== [%d]\n", Atypecd);
574      g_snprintf(Lcd, sizeof(Lcd)-1, _("a CD"));      g_snprintf(Lcd, sizeof(Lcd)-1, _("a CD"));
575    }    }
576    
 printf("la man 2?\n");  
 printf("cd [%s]\n", Lcd);  
 printf("drv [%s]\n", Ldevice->name);  
577    if (Ainsert) {    if (Ainsert) {
578      g_snprintf(Ltitle, sizeof(Ltitle)-1, _("Please insert %s in drive %s to continue..."), Lcd, Ldevice->name);      g_snprintf(Ltitle, sizeof(Ltitle)-1, _("Please insert %s in drive %s to continue..."), Lcd, Ldevice->name);
579    } else {    } else {
580      g_snprintf(Ltitle, sizeof(Ltitle)-1, _("Ok there is %s in drive %s."), Lcd, Ldevice->name);      g_snprintf(Ltitle, sizeof(Ltitle)-1, _("Ok there is %s in drive %s."), Lcd, Ldevice->name);
581    }    }
582  printf("ca chie?\n");  
583    gtk_label_set_text(Llabel, Ltitle);    gtk_label_set_text(Llabel, Ltitle);
584  }  }
585    
# Line 610  gboolean callback_waiting_for_user(gpoin Line 600  gboolean callback_waiting_for_user(gpoin
600        
601    Ldrive = sc_grave_get_data(Lg, "device1");    Ldrive = sc_grave_get_data(Lg, "device1");
602    if (!Ldrive) return TRUE;    if (!Ldrive) return TRUE;
 printf("get1\n");  
603    Lrequis = (GSList *) sc_grave_get_data(Lg, "devicerequis1");    Lrequis = (GSList *) sc_grave_get_data(Lg, "devicerequis1");
 printf("get2\n");  
604    Ldetect = (gint *) sc_grave_get_data(Lg, "detect1");    Ldetect = (gint *) sc_grave_get_data(Lg, "detect1");
 printf("get3\n");  
605    Lmediatitle = (gint *)sc_grave_get_data(Lg, "mediatitle1");    Lmediatitle = (gint *)sc_grave_get_data(Lg, "mediatitle1");
 printf("get4\n");  
606    Lmedialu = 0;    Lmedialu = 0;
607    
608    if (Linitdisp && *Linitdisp) {    if (Linitdisp && *Linitdisp) {
 printf("get6\n");  
609      set_waitwindow_title(Lstatusmedia, *Lmediatitle, Lg);      set_waitwindow_title(Lstatusmedia, *Lmediatitle, Lg);
 printf("get7\n");  
610      gtk_widget_show(GTK_WIDGET(sc_grave_get_data(Lg, "window")));      gtk_widget_show(GTK_WIDGET(sc_grave_get_data(Lg, "window")));
611      gdk_flush ();      gdk_flush ();
612      *Linitdisp = FALSE;      *Linitdisp = FALSE;
613    }    }
614            
  printf("la DVD ?!\n");  
615  /*    if (*Lrequis & _MEDIA_IS_DVD) {*/  /*    if (*Lrequis & _MEDIA_IS_DVD) {*/
616    Lmedialu += get_dvdinfo(Lg, Ldrive, NULL);    Lmedialu += get_dvdinfo(Lg, Ldrive, NULL);
617  /*    }*/  /*    }*/
618    
   printf("la CD ?!\n");  
619  /*    if (*Lrequis & _MEDIA_IS_CD) {*/  /*    if (*Lrequis & _MEDIA_IS_CD) {*/
620    Lmedialu += get_cdinfo(Lg, Ldrive, NULL);    Lmedialu += get_cdinfo(Lg, Ldrive, NULL);
621  /*    }*/  /*    }*/
# Line 646  printf("get7\n"); Line 628  printf("get7\n");
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)));
630      if (Lstatusmedia) LnewCont = TRUE;*/      if (Lstatusmedia) LnewCont = TRUE;*/
 printf("on a LU [%d]\n", Lmedialu);  
631    for (Lcur = Lrequis; Lcur; Lcur = g_slist_next(Lcur)) {    for (Lcur = Lrequis; Lcur; Lcur = g_slist_next(Lcur)) {
632      Lmediatest = (int ) Lcur->data;      Lmediatest = (int ) Lcur->data;
 printf("et on TEST [%d]\n", Lmediatest);  
 printf("resu du test [%d]\n", (Lmediatest & Lmedialu));  
633      if ((Lmediatest & Lmedialu) == Lmediatest) {      if ((Lmediatest & Lmedialu) == Lmediatest) {
634        *Lcont  = 0;        *Lcont  = 0;
635        Lstatusmedia = FALSE;        Lstatusmedia = FALSE;
# Line 703  gboolean waiting_for_user(gint Atitle, T Line 682  gboolean waiting_for_user(gint Atitle, T
682    gtk_window_set_position(GTK_WINDOW(Lwindow), GTK_WIN_POS_CENTER_ALWAYS);    gtk_window_set_position(GTK_WINDOW(Lwindow), GTK_WIN_POS_CENTER_ALWAYS);
683    
684    
   printf("ici man !\n");  
685    /* on appele une fois le callback pour verifier que l'utilisateur n'ai pas    /* on appele une fois le callback pour verifier que l'utilisateur n'ai pas
686     * deja inseré le bon cd qui va bien */     * deja inseré le bon cd qui va bien */
687    sc_grave_set_data(Lwaitg, &Linit, "initdisp");    sc_grave_set_data(Lwaitg, &Linit, "initdisp");
# Line 728  gboolean waiting_for_user(gint Atitle, T Line 706  gboolean waiting_for_user(gint Atitle, T
706    g_free(Ldevicetitle1); g_free(Ldevicetitle2);    g_free(Ldevicetitle1); g_free(Ldevicetitle2);
707    
708    sc_grave_destroy(Lwaitg);    sc_grave_destroy(Lwaitg);
 printf("lcont => %d %d\n", Lcont, Labort);  
709    
710    return (Lcont == 0 && Labort == FALSE);    return (Lcont == 0 && Labort == FALSE);
711  }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26