Author: colossus Date: 2006-08-02 12:52:56 +0000 (Wed, 02 Aug 2006) New Revision: 22628
Modified: xarchiver/trunk/TODO xarchiver/trunk/src/archive.c xarchiver/trunk/src/archive.h xarchiver/trunk/src/callbacks.c Log: Completed display of ID's of the ISO image in the ISO properties window. Updated TODO file. Modified: xarchiver/trunk/TODO =================================================================== --- xarchiver/trunk/TODO 2006-08-02 10:57:39 UTC (rev 22627) +++ xarchiver/trunk/TODO 2006-08-02 12:52:56 UTC (rev 22628) @@ -1,4 +1,3 @@ -- add display of ID's inside the ISO plus image type [PARTIALLY DONE]. - fix bug #1736. - switching by right clicking on the toolbar to icons with text/ no text/ small icons. - [MAYBE] create a routine for handling the sensitiveness of the buttons, window title Modified: xarchiver/trunk/src/archive.c =================================================================== --- xarchiver/trunk/src/archive.c 2006-08-02 10:57:39 UTC (rev 22627) +++ xarchiver/trunk/src/archive.c 2006-08-02 12:52:56 UTC (rev 22628) @@ -102,12 +102,16 @@ if (archive == NULL) return; if(archive->path) + { g_free(archive->path); - archive->path = NULL; + archive->path = NULL; + } if(archive->escaped_path) + { g_free(archive->escaped_path); - archive->escaped_path = NULL; + archive->escaped_path = NULL; + } if (archive->tmp != NULL) { @@ -117,8 +121,64 @@ } if (archive->passwd != NULL) + { g_free (archive->passwd); - archive->passwd = NULL; - + archive->passwd = NULL; + } + + if (system_id != NULL) + { + g_free (system_id); + system_id = NULL; + } + + if (volume_id != NULL) + { + g_free (volume_id); + volume_id = NULL; + } + + if (publisher_id != NULL) + { + g_free (publisher_id); + publisher_id = NULL; + } + + if (preparer_id != NULL) + { + g_free (preparer_id); + preparer_id = NULL; + } + + if (application_id != NULL) + { + g_free (application_id); + application_id = NULL; + } + + if (creation_date != NULL) + { + g_free (creation_date); + creation_date = NULL; + } + + if (modified_date != NULL) + { + g_free (modified_date); + modified_date = NULL; + } + + if (expiration_date != NULL) + { + g_free (expiration_date); + expiration_date = NULL; + } + + if (effective_date != NULL) + { + g_free (effective_date); + effective_date = NULL; + } + g_free (archive); } Modified: xarchiver/trunk/src/archive.h =================================================================== --- xarchiver/trunk/src/archive.h 2006-08-02 10:57:39 UTC (rev 22627) +++ xarchiver/trunk/src/archive.h 2006-08-02 12:52:56 UTC (rev 22628) @@ -78,6 +78,7 @@ unsigned short int x; gint input_fd, output_fd, error_fd; +gchar *system_id,*volume_id,*publisher_id,*preparer_id,*application_id,*creation_date,*modified_date,*expiration_date,*effective_date; void SpawnAsyncProcess (XArchive *archive, gchar *command , gboolean input, gboolean output_flag); XArchive *xa_init_archive_structure (); void xa_clean_archive_structure (XArchive *archive); Modified: xarchiver/trunk/src/callbacks.c =================================================================== --- xarchiver/trunk/src/callbacks.c 2006-08-02 10:57:39 UTC (rev 22627) +++ xarchiver/trunk/src/callbacks.c 2006-08-02 12:52:56 UTC (rev 22628) @@ -822,15 +822,19 @@ { fseek ( ptr , offset_image, SEEK_SET ); fread ( &ipd, 1, sizeof(ipd), ptr ); - ipd.system_id[31] = '\0'; - ipd.volume_id[31] = '\0'; - ipd.copyright_file_id[36] = '\0'; - ipd.abstract_file_id[36] = '\0'; - ipd.bibliographic_file_id[36] = '\0'; - ipd.volume_set_id[127] = '\0'; - ipd.publisher_id[127] = '\0'; - ipd.preparer_id[127] = '\0'; - ipd.application_id[127] = '\0'; + system_id = g_strndup ( ipd.system_id, 30); + volume_id = g_strndup ( ipd.volume_id, 30); + application_id = g_strndup ( ipd.application_id, 126); + publisher_id = g_strndup ( ipd.publisher_id, 126); + preparer_id = g_strndup ( ipd.preparer_id, 126); + + creation_date = g_strdup_printf ("%4.4s %2.2s %2.2s %2.2s:%2.2s:%2.2s.%2.2s",&ipd.creation_date[0],&ipd.creation_date[4],&ipd.creation_date[6],&ipd.creation_date[8],&ipd.creation_date[10],&ipd.creation_date[12],&ipd.creation_date[14]); + + modified_date = g_strdup_printf ("%4.4s %2.2s %2.2s %2.2s:%2.2s:%2.2s.%2.2s",&ipd.modification_date[0],&ipd.modification_date[4],&ipd.modification_date[6],&ipd.modification_date[8],&ipd.modification_date[10],&ipd.modification_date[12],&ipd.modification_date[14]); + + expiration_date = g_strdup_printf ("%4.4s %2.2s %2.2s %2.2s:%2.2s:%2.2s.%2.2s",&ipd.expiration_date[0],&ipd.expiration_date[4],&ipd.expiration_date[6],&ipd.expiration_date[8],&ipd.expiration_date[10],&ipd.expiration_date[12],&ipd.expiration_date[14]); + + effective_date = g_strdup_printf ("%4.4s %2.2s %2.2s %2.2s:%2.2s:%2.2s.%2.2s",&ipd.effective_date[0],&ipd.effective_date[4],&ipd.effective_date[6],&ipd.effective_date[8],&ipd.effective_date[10],&ipd.effective_date[12],&ipd.effective_date[14]); return TRUE; } else @@ -1303,13 +1307,27 @@ /* Image type */ gtk_entry_set_text ( GTK_ENTRY (image_type_entry),archive->tmp); /* System ID */ - gtk_entry_set_text ( GTK_ENTRY (system_id_entry),ipd.system_id); + gtk_entry_set_text ( GTK_ENTRY (system_id_entry),system_id); /* Volume ID */ - gtk_entry_set_text ( GTK_ENTRY (volume_id_entry),ipd.volume_id); + gtk_entry_set_text ( GTK_ENTRY (volume_id_entry),volume_id); /* Application ID */ - gtk_entry_set_text ( GTK_ENTRY (application_entry),ipd.application_id); - + gtk_entry_set_text ( GTK_ENTRY (application_entry),application_id); + /* Publisher ID */ + gtk_entry_set_text ( GTK_ENTRY (publisher_entry),publisher_id); gtk_widget_show (iso_properties_win); + /* Preparer ID */ + gtk_entry_set_text ( GTK_ENTRY (preparer_entry),preparer_id); + gtk_widget_show (iso_properties_win); + /* Creation Date */ + gtk_entry_set_text ( GTK_ENTRY (creation_date_entry),creation_date); + /* Modified Date */ + gtk_entry_set_text ( GTK_ENTRY (modified_date_entry),modified_date); + gtk_widget_show (iso_properties_win); + /* Expiration Date */ + gtk_entry_set_text ( GTK_ENTRY (expiration_date_entry),expiration_date); + /* Effective Date */ + gtk_entry_set_text ( GTK_ENTRY (effective_date_entry),effective_date); + gtk_widget_show (iso_properties_win); } void xa_archive_properties ( GtkMenuItem *menuitem , gpointer user_data ) _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits