medium-info.c 16.7 KB
Newer Older
1
/*  dvdisaster: Additional error correction for optical media.
2
 *  Copyright (C) 2004-2017 Carsten Gnoerlich.
3
 *
4 5 6 7 8 9
 *  Email: carsten@dvdisaster.org  -or-  cgnoerlich@fsfe.org
 *  Project homepage: http://www.dvdisaster.org
 *
 *  This file is part of dvdisaster.
 *
 *  dvdisaster is free software: you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation, either version 3 of the License, or
12 13
 *  (at your option) any later version.
 *
14
 *  dvdisaster is distributed in the hope that it will be useful,
15 16 17 18 19
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
20
 *  along with dvdisaster. If not, see <http://www.gnu.org/licenses/>.
21 22 23 24 25 26 27 28 29 30 31 32
 */

#include "dvdisaster.h"

#include "scsi-layer.h"
#include "udf.h"

/*
 * Local data
 */

typedef struct _medium_info
33 34 35 36 37 38 39 40 41 42 43 44 45 46
{  GtkLabel *profileDescr;
   GtkLabel *physicalType;
   GtkLabel *bookType;
   GtkLabel *manufID;
   GtkLabel *discStatus;
   GtkLabel *usedCapacity1;
   GtkLabel *usedCapacity2;
   GtkLabel *blankCapacity;
   GtkLabel *isoLabel;
   GtkLabel *isoSize;
   GtkLabel *isoTime;
   GtkLabel *eccState;
   GtkLabel *eccSize;
   GtkLabel *eccVersion;
47 48 49 50 51 52 53
} medium_info;

/***
 *** Find out about the medium
 ***/

static void print_defaults(medium_info *mi)
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
{  SetLabelText(mi->physicalType, _("Medium not present"));
   SetLabelText(mi->manufID, "-");
   SetLabelText(mi->profileDescr, "-");
   SetLabelText(mi->discStatus, "-");
   SetLabelText(mi->usedCapacity1, "-");
   SetLabelText(mi->usedCapacity2, " ");
   SetLabelText(mi->blankCapacity, "-");
   SetLabelText(mi->isoLabel, "-");
   SetLabelText(mi->isoSize, "-");
   SetLabelText(mi->isoTime, "-");
   SetLabelText(mi->eccState, "-");
   SetLabelText(mi->eccSize, "-");
   SetLabelText(mi->eccVersion, "-");
}

static void print_tab(char *label, int tab_width)
{  char *translation=_(label);
   int length = tab_width-g_utf8_strlen(translation, -1);
   char pad[tab_width+1];

   if(length < 1) pad[0] = 0;
   else
   {  memset(pad, ' ', length);
      pad[length]=0;
   }

   PrintCLI("%s%s", translation, pad);
81 82
}

83 84 85 86
void PrintMediumInfo(void *mi_ptr)
{  Image *image;
   DeviceHandle *dh;
   medium_info *mi=(medium_info*)mi_ptr;
87 88
   char *disc_status;
   char *sess_status;
89
   int tab_width=30;
90

91 92 93 94 95 96 97
   if(!mi) /* create dummy medium_info in CLI mode so that PrintCLIorLabel() won't crash */
   {  mi=alloca(sizeof(medium_info));
      memset(mi, 0, sizeof(medium_info));
   }

   if(Closure->guiMode)
      print_defaults(mi);
98

99 100 101
   image = OpenImageFromDevice(Closure->device);
   if(!image) return;
   dh = image->dh;
102 103
   QueryBlankCapacity(dh);
   
104 105
   /* Medium properties */

106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
   PrintCLI(_("Physical medium info"));
   PrintCLI("\n\n");

   tab_width=GetLongestTranslation("Medium type:",
				   "Book type:",
				   "Manuf.-ID:",
				   "Drive profile:",
				   "Disc status:",
				   "Used sectors:",
				   "Blank capacity:",
				   NULL)+1;

   print_tab("Medium type:",tab_width);
   PrintCLIorLabel(mi->physicalType, "%s\n", dh->typeDescr);
   print_tab("Book type:",tab_width);
   PrintCLIorLabel(mi->bookType, "%s\n", dh->bookDescr);
   print_tab("Manuf.-ID:",tab_width);
   PrintCLIorLabel(mi->manufID, "%s\n", dh->manuID);
   print_tab("Drive profile:",tab_width);
   PrintCLIorLabel(mi->profileDescr, "%s\n", dh->profileDescr);
126 127 128 129 130 131 132 133 134 135 136 137 138 139

   switch(dh->discStatus&3)
   {  case 0: disc_status = g_strdup(_("empty")); break;
      case 1: disc_status = g_strdup(_("appendable")); break;
      case 2: disc_status = g_strdup(_("finalized")); break;
      default: disc_status = g_strdup(_("unknown")); break;
   }
   switch((dh->discStatus>>2)&3)
   {  case 0: sess_status = g_strdup(_("empty")); break;
      case 1: sess_status = g_strdup(_("incomplete")); break;
      case 2: sess_status = g_strdup(_("damaged")); break;
      default: sess_status = g_strdup(_("complete")); break;
   }

140 141 142

   print_tab("Disc status:",tab_width);
   PrintCLIorLabel(mi->discStatus, _("%s (%d sessions; last session %s)\n"),
143 144 145 146
		disc_status, dh->sessions, sess_status);
   g_free(disc_status);
   g_free(sess_status);

147 148
   print_tab("Used sectors:",tab_width);
   PrintCLIorLabel(mi->usedCapacity1, _("%lld sectors (%lld MiB), from READ CAPACITY\n"),
149
		dh->readCapacity+1, (dh->readCapacity+1)>>9);
150 151
   print_tab(" ",tab_width);
   PrintCLIorLabel(mi->usedCapacity2, _("%lld sectors (%lld MiB), from DVD structure\n"),
152
		dh->userAreaSize, dh->userAreaSize>>9);
153 154 155

   print_tab("Blank capacity:",tab_width);
   PrintCLIorLabel(mi->blankCapacity, _("%lld sectors (%lld MiB)\n"),
156 157 158 159
		dh->blankCapacity, (dh->blankCapacity)>>9);

   /* Filesystem properties */

160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
   if(image->isoInfo)
   {  tab_width=GetLongestTranslation("Medium label:",
				      "File system size:",
				      "Creation time:",
				      NULL)+1;

      PrintCLI("\n\n");
      PrintCLI(_("Filesystem info"));
      PrintCLI("\n\n");

      print_tab("Medium label:",tab_width);
      PrintCLIorLabel(mi->isoLabel, "%s\n", image->isoInfo->volumeLabel);
      print_tab("File system size:",tab_width);
      PrintCLIorLabel(mi->isoSize, _("%d sectors (%lld MiB)\n"),
		   image->isoInfo->volumeSize, (gint64)image->isoInfo->volumeSize>>9);
      print_tab("Creation time:",tab_width);
      PrintCLIorLabel(mi->isoTime, "%s\n", image->isoInfo->creationDate);
177 178
   }

179 180
   /* Augmented image properties
      fixme: verify RS03 correctness */
181

182 183
   if(image->eccHeader)
   {  EccHeader *eh = image->eccHeader;
184 185
      int major = eh->creatorVersion/10000; 
      int minor = (eh->creatorVersion%10000)/100;
186
      int micro = eh->creatorVersion%100;
187 188
      char method[5];
 
189 190 191 192 193 194 195 196 197
      tab_width=GetLongestTranslation("Error correction data:",
				      "Augmented image size:",
				      "dvdisaster version:",
				      NULL)+1;
      PrintCLI("\n\n");
      PrintCLI(_("Augmented image info"));
      PrintCLI("\n\n");

      memcpy(method, eh->method, 4);
198
      method[4] = 0;
199 200
      print_tab("Error correction data:",tab_width);
      PrintCLIorLabel(mi->eccState, _("%s, %d roots, %4.1f%% redundancy.\n"), 
201 202
		   method, eh->eccBytes,
		    ((double)eh->eccBytes*100.0)/(double)eh->dataBytes);
203 204 205
      print_tab("Augmented image size:",tab_width);
      PrintCLIorLabel(mi->eccSize, _("%lld sectors (%lld MiB)\n"),
		   image->expectedSectors, image->expectedSectors>>9);
206

207
      print_tab("dvdisaster version:", tab_width);
208

209 210 211
      if(micro)
	   PrintCLIorLabel(mi->eccVersion, "%d.%d.%d", major, minor, micro);
      else PrintCLIorLabel(mi->eccVersion, "%d.%d", major, minor);
212 213 214 215
   }

   /* Clean up */

216
   CloseImage(image);
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
}

/***
 *** GUI callbacks 
 ***/

/*
 * Callback for drive selection
 */

static void drive_select_cb(GtkWidget *widget, gpointer data)
{  int n;
   char *dnode;

   if(!Closure->deviceNodes->len)  /* No drives available */
     return;

   n = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));

   if(n<0)
     return;

   dnode = g_ptr_array_index(Closure->deviceNodes, n);
   g_free(Closure->device);
   Closure->device = g_strdup(dnode);

   gtk_combo_box_set_active(GTK_COMBO_BOX(Closure->driveCombo), n);
}

/*
 * Callback for updating the medium information
 */

static void update_cb(GtkWidget *widget, gpointer data)
251
{  PrintMediumInfo((medium_info*)data); 
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
}

/*
 * Close notification
 */

static void mi_destroy_cb(GtkWidget *widget, gpointer data)
{
   Closure->mediumWindow = NULL;
   Closure->mediumDrive = NULL;

   g_free(Closure->mediumInfoContext);
}

/***
 *** Create the medium info window
 ***/

void CreateMediumInfoWindow()
{ GtkWidget *dialog,*vbox,*hbox,*table,*button,*lab,*sep,*frame,*combo_box;
  medium_info *mi;
  int i;
  int dev_idx = 0;

  if(Closure->mediumWindow) 
  {  gtk_widget_show(Closure->mediumWindow);
     return;
  }

  /*** Create the dialog */

  dialog = gtk_dialog_new_with_buttons(_utf("windowtitle|Medium info"), 
				       Closure->window, GTK_DIALOG_DESTROY_WITH_PARENT,
				       GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT, NULL);
  g_signal_connect_swapped(dialog, "response", G_CALLBACK(gtk_widget_destroy), dialog);

  Closure->mediumInfoContext = mi = g_malloc0(sizeof(medium_info));

  /*** Inner vbox and title */

  vbox = gtk_vbox_new(FALSE, 0);
  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox, TRUE, TRUE, 0);
  gtk_container_set_border_width(GTK_CONTAINER(vbox), 10);

  lab = gtk_label_new(NULL);
  gtk_label_set_markup(GTK_LABEL(lab), 
		       _utf("<big>Medium info</big>\n"
			    "<i>Properties of the currently inserted medium</i>"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_box_pack_start(GTK_BOX(vbox), lab, FALSE, FALSE, 0);

  sep = gtk_hseparator_new();
  gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0);

  gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(" "), FALSE, FALSE, 0);

  /*** Drive selection */

  frame = gtk_frame_new(_utf("Drive selection"));
  gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);

  hbox = gtk_hbox_new(FALSE, 0);
  gtk_container_set_border_width(GTK_CONTAINER(hbox), 10);
  gtk_container_add(GTK_CONTAINER(frame), hbox);

  lab = gtk_label_new(_utf("Drive:"));
  gtk_box_pack_start(GTK_BOX(hbox), lab, FALSE, FALSE, 0);

  lab = gtk_label_new(" ");
  gtk_box_pack_start(GTK_BOX(hbox), lab, FALSE, FALSE, 0);

  combo_box = gtk_combo_box_new_text();
  gtk_box_pack_start(GTK_BOX(hbox), combo_box, FALSE, FALSE, 0);

  g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(drive_select_cb), NULL);

  for(i=0; i<Closure->deviceNames->len; i++)   
  {
    gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), 
			      g_ptr_array_index(Closure->deviceNames,i));

    if(!strcmp(Closure->device, g_ptr_array_index(Closure->deviceNodes,i)))
      dev_idx = i;
  }

  if(!Closure->deviceNodes->len)
  {  gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _utf("No drives found"));
  }

  gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), dev_idx);

  lab = gtk_label_new(_utf(" "));
  gtk_box_pack_start(GTK_BOX(hbox), lab, FALSE, FALSE, 0);

  button = gtk_button_new_with_label(_utf("Update medium info"));
  g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(update_cb), mi);
  gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 10);

  /*** Medium info */

  frame = gtk_frame_new(_utf("Physical medium info"));
  gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);

  table = gtk_table_new(2, 8, FALSE);
  gtk_container_set_border_width(GTK_CONTAINER(table), 5);
  gtk_container_add(GTK_CONTAINER(frame), table);

  lab = gtk_label_new(_utf("Medium type:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 0, 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
362 363
  lab = gtk_label_new(" ");
  mi->physicalType = GTK_LABEL(lab);
364 365 366 367 368 369
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Book type:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 1, 2, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
370 371
  lab = gtk_label_new(" ");
  mi->bookType = GTK_LABEL(lab);
372 373 374 375 376 377
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Manuf.-ID:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 2, 3, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
378 379
  lab = gtk_label_new(" ");
  mi->manufID = GTK_LABEL(lab);
380 381 382 383 384 385
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Drive profile:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 3, 4, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
386 387
  lab = gtk_label_new(" ");
  mi->profileDescr = GTK_LABEL(lab);
388 389 390 391 392 393
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Disc status:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 4, 5, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
394 395
  lab = gtk_label_new(" ");
  mi->discStatus = GTK_LABEL(lab);
396 397 398 399 400 401
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Used sectors:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 5, 6, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
402 403
  lab = gtk_label_new(" ");
  mi->usedCapacity1 = GTK_LABEL(lab);
404 405 406 407 408 409
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(" ");
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 6, 7, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
410 411
  lab = gtk_label_new(" ");
  mi->usedCapacity2 = GTK_LABEL(lab);
412 413 414 415 416 417
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Blank capacity:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 7, 8, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
418 419
  lab = gtk_label_new(" ");
  mi->blankCapacity = GTK_LABEL(lab);
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  /*** Filesystem info */

  frame = gtk_frame_new(_utf("Filesystem info"));
  gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);

  table = gtk_table_new(2, 3, FALSE);
  gtk_container_set_border_width(GTK_CONTAINER(table), 5);
  gtk_container_add(GTK_CONTAINER(frame), table);

  lab = gtk_label_new(_utf("Medium label:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 0, 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
435 436
  lab = gtk_label_new(" ");
  mi->isoLabel = GTK_LABEL(lab);
437 438 439 440 441 442
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("File system size:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 1, 2, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
443 444
  lab = gtk_label_new(" ");
  mi->isoSize = GTK_LABEL(lab);
445 446 447 448 449 450
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Creation time:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 2, 3, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
451 452
  lab = gtk_label_new(" ");
  mi->isoTime = GTK_LABEL(lab);
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  /*** Error correction info */

  frame = gtk_frame_new(_utf("Augmented image info"));
  gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);

  table = gtk_table_new(2, 3, FALSE);
  gtk_container_set_border_width(GTK_CONTAINER(table), 5);
  gtk_container_add(GTK_CONTAINER(frame), table);

  lab = gtk_label_new(_utf("Error correction data:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 0, 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
468 469
  lab = gtk_label_new(" ");
  mi->eccState = GTK_LABEL(lab);
470 471 472 473 474 475
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("Augmented image size:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 1, 2, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
476 477
  lab = gtk_label_new(" ");
  mi->eccSize = GTK_LABEL(lab);
478 479 480 481 482 483
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  lab = gtk_label_new(_utf("dvdisaster version:"));
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 0, 1, 2, 3, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 5, 2 );
484 485
  lab = gtk_label_new(" ");
  mi->eccVersion = GTK_LABEL(lab);
486 487 488 489 490 491 492 493 494 495
  gtk_misc_set_alignment(GTK_MISC(lab), 0.0, 0.0); 
  gtk_table_attach(GTK_TABLE(table), lab, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);

  /*** Show it */

  g_signal_connect(G_OBJECT(dialog), "destroy", G_CALLBACK(mi_destroy_cb), NULL);
  Closure->mediumWindow = dialog;
  Closure->mediumDrive = combo_box;
  gtk_widget_show_all(dialog);

496
  PrintMediumInfo(mi);
497 498
}