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

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

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

revision 1.12 by scresto, Sat Feb 5 17:31:48 2005 UTC revision 1.13 by scresto, Tue Feb 8 02:32:57 2005 UTC
# Line 79  Tsearchdrive listesearchdrives[] = { Line 79  Tsearchdrive listesearchdrives[] = {
79    
80  gboolean cdrecord_grave_callback(GIOChannel *Astd, GIOCondition Acond, gpointer Adata);  gboolean cdrecord_grave_callback(GIOChannel *Astd, GIOCondition Acond, gpointer Adata);
81    
82  gchar *get_title(gint Anbrgravure, gint Acurcd, gboolean Adosimul)  static gchar *get_title(gint Anbrgravure, gint Acurcd, gboolean Adosimul)
83  {  {
84    gchar *Ltxt = NULL;    gchar *Ltxt = NULL;
85    if (Anbrgravure==1) {    if (Anbrgravure==1) {
# Line 90  gchar *get_title(gint Anbrgravure, gint Line 90  gchar *get_title(gint Anbrgravure, gint
90      }      }
91    } else {    } else {
92      if (!Adosimul) {      if (!Adosimul) {
93        Ltxt = g_strdup_printf(_("Writing cd %d/%d in progress..."), Acurcd, Anbrgravure);        Ltxt = g_strdup_printf(_("Writing DVD %d/%d in progress..."), Acurcd, Anbrgravure);
94      } else {      } else {
95        Ltxt = g_strdup_printf(_("Simulated CD writing %d/%d in progress..."), Acurcd, Anbrgravure);        Ltxt = g_strdup_printf(_("Simulated CD writing %d/%d in progress..."), Acurcd, Anbrgravure);
96      }      }
# Line 182  gboolean scan_for_drives(GHashTable *Aha Line 182  gboolean scan_for_drives(GHashTable *Aha
182  {  {
183    gchar **Lcmd;    gchar **Lcmd;
184    gchar *Lcommandline;    gchar *Lcommandline;
185    gint pid, g_out, Lnbrarg;    gint Lpid, g_out, Lnbrarg;
186    gboolean Lbolstatus;    gboolean Lbolstatus;
187    GIOChannel *Lcom;    GIOChannel *Lcom;
188    gboolean Lstatus;    gboolean Lstatus;
# Line 205  gboolean scan_for_drives(GHashTable *Aha Line 205  gboolean scan_for_drives(GHashTable *Aha
205    
206      Lbolstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */      Lbolstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */
207        (GSpawnFlags ) (0),        (GSpawnFlags ) (0),
208        NULL, NULL, &pid, NULL, &g_out, NULL, Aerror);        NULL, NULL, &Lpid, NULL, &g_out, NULL, Aerror);
209      g_strfreev(Lcmd);      g_strfreev(Lcmd);
210        
211      if (Lbolstatus == FALSE) {      if (Lbolstatus == FALSE) {
# Line 227  gboolean scan_for_drives(GHashTable *Aha Line 227  gboolean scan_for_drives(GHashTable *Aha
227                
228      g_io_channel_shutdown(Lcom, FALSE, NULL);      g_io_channel_shutdown(Lcom, FALSE, NULL);
229      g_io_channel_unref(Lcom);      g_io_channel_unref(Lcom);
230      g_spawn_close_pid(pid);      g_spawn_close_pid(Lpid);
231      g_hash_table_remove(Ahash, "drivedesc");      g_hash_table_remove(Ahash, "drivedesc");
232    }    }
233    
# Line 404  gboolean burn_from_image(gchar *Aop, GHa Line 404  gboolean burn_from_image(gchar *Aop, GHa
404      }      }
405    
406      Lstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */      Lstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */
407          (GSpawnFlags ) (0),          (GSpawnFlags ) (G_SPAWN_DO_NOT_REAP_CHILD),
408          NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);          NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);
409      g_strfreev(Lcmd);      g_strfreev(Lcmd);
410    
# Line 432  gboolean burn_from_image(gchar *Aop, GHa Line 432  gboolean burn_from_image(gchar *Aop, GHa
432      while (*Lcont > 0 && *Labort == FALSE) {      while (*Lcont > 0 && *Labort == FALSE) {
433        gtk_main_iteration();            gtk_main_iteration();    
434      }      }
435        exit_prog(*Lpid, Aerror, NULL);
436    
437      g_source_remove(Lcomevent);      g_source_remove(Lcomevent);
438      g_source_remove(Lcomerrevent);      g_source_remove(Lcomerrevent);
439                
# Line 780  _DEB("execution [%s]\n", Lcommandline); Line 782  _DEB("execution [%s]\n", Lcommandline);
782      }      }
783    
784      Lstatus = g_spawn_async_with_pipes(*Lrepertoire, Lcmd, NULL, /* env argument */      Lstatus = g_spawn_async_with_pipes(*Lrepertoire, Lcmd, NULL, /* env argument */
785          (GSpawnFlags ) (0),          (GSpawnFlags ) (G_SPAWN_DO_NOT_REAP_CHILD),
786          NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);          NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);
787      g_strfreev(Lcmd);      g_strfreev(Lcmd);
788    
# Line 808  _DEB("execution [%s]\n", Lcommandline); Line 810  _DEB("execution [%s]\n", Lcommandline);
810      while (*Lcont>0 && *Labort == FALSE) {      while (*Lcont>0 && *Labort == FALSE) {
811        gtk_main_iteration();        gtk_main_iteration();
812      }      }
813        exit_prog(*Lpid, Aerror, NULL);
814    
815      g_source_remove(Lcomerrevent);      g_source_remove(Lcomerrevent);
816      g_source_remove(Lcomevent);      g_source_remove(Lcomevent);
# Line 940  gboolean perform_erase_cdrw(GHashTable * Line 943  gboolean perform_erase_cdrw(GHashTable *
943    }    }
944    
945    Lstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */    Lstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */
946        (GSpawnFlags ) (0),        (GSpawnFlags ) (G_SPAWN_DO_NOT_REAP_CHILD),
947         NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);         NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);
948    g_strfreev(Lcmd);    g_strfreev(Lcmd);
949    
# Line 966  _DEB("cont vaut => %d\n", *Lcont); Line 969  _DEB("cont vaut => %d\n", *Lcont);
969  _DEB("fin !!!\n");  _DEB("fin !!!\n");
970    while (*Lcont > 0) { while(gtk_events_pending()) gtk_main_iteration(); }    while (*Lcont > 0) { while(gtk_events_pending()) gtk_main_iteration(); }
971    
972      exit_prog(*Lpid, Aerror, NULL);
973    
974    g_source_remove(Lcomerrevent);    g_source_remove(Lcomerrevent);
975    g_source_remove(Lcomevent);    g_source_remove(Lcomevent);
976    
# Line 1007  gboolean perform_fix_cd(GHashTable *Ahas Line 1012  gboolean perform_fix_cd(GHashTable *Ahas
1012    }    }
1013    
1014    Lstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */    Lstatus = g_spawn_async_with_pipes(NULL, Lcmd, NULL, /* env argument */
1015        (GSpawnFlags ) (0),        (GSpawnFlags ) (G_SPAWN_DO_NOT_REAP_CHILD),
1016         NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);         NULL, NULL, Lpid, NULL, &g_out, &g_err, Aerror);
1017    g_strfreev(Lcmd);    g_strfreev(Lcmd);
1018    
# Line 1033  _DEB("cont vaut => %d\n", *Lcont); Line 1038  _DEB("cont vaut => %d\n", *Lcont);
1038  _DEB("fin !!!\n");  _DEB("fin !!!\n");
1039    while (*Lcont > 0) { while(gtk_events_pending()) gtk_main_iteration(); }    while (*Lcont > 0) { while(gtk_events_pending()) gtk_main_iteration(); }
1040    
1041      exit_prog(*Lpid, Aerror, NULL);
1042    
1043    g_source_remove(Lcomerrevent);    g_source_remove(Lcomerrevent);
1044    g_source_remove(Lcomevent);    g_source_remove(Lcomevent);
1045    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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