Author: colossus
Date: 2007-01-08 10:10:03 +0000 (Mon, 08 Jan 2007)
New Revision: 24306

Added:
   xarchiver/trunk/pixmaps/xarchiver-behaviour.svg
Modified:
   xarchiver/trunk/pixmaps/Makefile.am
   xarchiver/trunk/src/archive.c
   xarchiver/trunk/src/archive.h
   xarchiver/trunk/src/arj.c
   xarchiver/trunk/src/callbacks.c
   xarchiver/trunk/src/callbacks.h
   xarchiver/trunk/src/extract_dialog.c
   xarchiver/trunk/src/interface.c
   xarchiver/trunk/src/main.c
   xarchiver/trunk/src/pref_dialog.c
   xarchiver/trunk/src/zip.c
Log:
Broken zip ability because of the introduction of zipinfo.
Slightly modified arj.c but still to fix a random gtk message from 
gtk_liststore.
Removed EmptyTextBuffer() because it's now useless.
Added code for freeing the archive->cmd_line_output GList in src/archive.c.
Fixed wrong determination of archive id in password_dialog() and drag_begin().
Fixed wrong deletion of files in the archive when the user hits the ESC key in 
the confirmation dialog.
Fixed wrong way of detecting the clicked icon in the prefs dialog.
Replaced test icons with the final (?) ones for the prefs dialog options.


Modified: xarchiver/trunk/pixmaps/Makefile.am
===================================================================
--- xarchiver/trunk/pixmaps/Makefile.am 2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/pixmaps/Makefile.am 2007-01-08 10:10:03 UTC (rev 24306)
@@ -2,6 +2,10 @@
 
 pixmapsdir = $(datadir)/pixmaps/xarchiver
 
-pixmaps_DATA = xarchiver-add.png xarchiver-extract.png 
xarchiver-add_button.png xarchiver-extract_button.png
+pixmaps_DATA =         xarchiver-add.png \
+               xarchiver-extract.png \
+               xarchiver-add_button.png \
+               xarchiver-extract_button.png \
+               xarchiver-behaviour.svg
 
 EXTRA_DIST = $(pixmaps_DATA)

Added: xarchiver/trunk/pixmaps/xarchiver-behaviour.svg
===================================================================
--- xarchiver/trunk/pixmaps/xarchiver-behaviour.svg                             
(rev 0)
+++ xarchiver/trunk/pixmaps/xarchiver-behaviour.svg     2007-01-08 10:10:03 UTC 
(rev 24306)
@@ -0,0 +1,430 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://web.resource.org/cc/";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="40"
+   height="40"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44.1"
+   sodipodi:docbase="/home/baze"
+   sodipodi:docname="xarchiver-behaviour.svg"
+   version="1.0"
+   inkscape:export-filename="/home/baze/xarchiver-behaviour.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5776">
+      <stop
+         style="stop-color:#000000;stop-opacity:0.23999999;"
+         offset="0.0000000"
+         id="stop5778" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop5780" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5042">
+      <stop
+         style="stop-color:#4b3a23;stop-opacity:1.0000000"
+         offset="0"
+         id="stop5044" />
+      <stop
+         style="stop-color:#c8ac80;stop-opacity:1.0000000"
+         offset="1"
+         id="stop5046" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient4295">
+      <stop
+         style="stop-color:#bb9e77;stop-opacity:1;"
+         offset="0"
+         id="stop4297" />
+      <stop
+         style="stop-color:#c9b293;stop-opacity:1.0000000"
+         offset="1"
+         id="stop4299" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3559">
+      <stop
+         style="stop-color:#bb9e77;stop-opacity:1.0000000"
+         offset="0"
+         id="stop3561" />
+      <stop
+         style="stop-color:#c5b090;stop-opacity:1.0000000"
+         offset="1.0000000"
+         id="stop3563" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3551">
+      <stop
+         style="stop-color:#7d6a50;stop-opacity:1;"
+         offset="0"
+         id="stop3553" />
+      <stop
+         style="stop-color:#ad8f63;stop-opacity:1.0000000"
+         offset="1.0000000"
+         id="stop3555" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3533">
+      <stop
+         style="stop-color:#c1a276;stop-opacity:1;"
+         offset="0"
+         id="stop3535" />
+      <stop
+         style="stop-color:#a98b60;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop3537" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2792">
+      <stop
+         style="stop-color:#cfb286;stop-opacity:1.0000000"
+         offset="0"
+         id="stop2794" />
+      <stop
+         style="stop-color:#dcc19b;stop-opacity:1.0000000"
+         offset="1"
+         id="stop2796" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient2776">
+      <stop
+         style="stop-color:#4b3a23;stop-opacity:1.0000000"
+         offset="0"
+         id="stop2778" />
+      <stop
+         style="stop-color:#c8ac80;stop-opacity:1.0000000"
+         offset="1"
+         id="stop2780" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5776"
+       id="radialGradient5794"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.29638,0,73.79214)"
+       cx="59.25"
+       cy="104.875"
+       fx="59.25"
+       fy="104.875"
+       r="55.25" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2792"
+       id="linearGradient5796"
+       gradientUnits="userSpaceOnUse"
+       x1="80.26329"
+       y1="95.065216"
+       x2="28.055557"
+       y2="68.473427" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2776"
+       id="linearGradient5798"
+       gradientUnits="userSpaceOnUse"
+       x1="58.415089"
+       y1="71.195747"
+       x2="61.158115"
+       y2="22.393425" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3533"
+       id="linearGradient5800"
+       gradientUnits="userSpaceOnUse"
+       x1="59.341206"
+       y1="77.286224"
+       x2="102.70774"
+       y2="77.286224" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3551"
+       id="linearGradient5802"
+       gradientUnits="userSpaceOnUse"
+       x1="69.149498"
+       y1="61.723667"
+       x2="72.115852"
+       y2="92.659592" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3559"
+       id="linearGradient5804"
+       gradientUnits="userSpaceOnUse"
+       x1="86.1875"
+       y1="75.944229"
+       x2="77.062553"
+       y2="53.316811" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5042"
+       id="linearGradient5806"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(2,2)"
+       x1="43.487068"
+       y1="54.814445"
+       x2="34.689285"
+       y2="89.993011" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4295"
+       id="linearGradient5808"
+       gradientUnits="userSpaceOnUse"
+       x1="36.769554"
+       y1="84.512932"
+       x2="35.708893"
+       y2="55.167999" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4295"
+       id="linearGradient1345"
+       gradientUnits="userSpaceOnUse"
+       x1="35.988102"
+       y1="79.824211"
+       x2="35.708893"
+       y2="55.167999"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5042"
+       id="linearGradient1348"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,1.119968,-5.29208)"
+       x1="43.487068"
+       y1="54.814445"
+       x2="33.751541"
+       y2="87.961235" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3559"
+       id="linearGradient1351"
+       gradientUnits="userSpaceOnUse"
+       x1="86.1875"
+       y1="75.944229"
+       x2="77.062553"
+       y2="53.316811"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3551"
+       id="linearGradient1354"
+       gradientUnits="userSpaceOnUse"
+       x1="69.149498"
+       y1="61.723667"
+       x2="72.115852"
+       y2="92.659592"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3533"
+       id="linearGradient1357"
+       gradientUnits="userSpaceOnUse"
+       x1="59.341206"
+       y1="77.286224"
+       x2="102.70774"
+       y2="77.286224"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2776"
+       id="linearGradient1360"
+       gradientUnits="userSpaceOnUse"
+       x1="61.158115"
+       y1="59.591202"
+       x2="61.158115"
+       y2="18.872946"
+       gradientTransform="matrix(0.860914,0,0,0.92317,13.57038,0.372924)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2792"
+       id="linearGradient1363"
+       gradientUnits="userSpaceOnUse"
+       x1="80.26329"
+       y1="95.065216"
+       x2="28.055557"
+       y2="68.473427"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5776"
+       id="radialGradient4274"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.29638,0,73.79214)"
+       cx="59.25"
+       cy="104.875"
+       fx="59.25"
+       fy="104.875"
+       r="55.25" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2792"
+       id="linearGradient4276"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)"
+       x1="80.26329"
+       y1="95.065216"
+       x2="28.055557"
+       y2="68.473427" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2776"
+       id="linearGradient4278"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.860914,0,0,0.92317,13.57038,0.372924)"
+       x1="61.158115"
+       y1="59.591202"
+       x2="61.158115"
+       y2="18.872946" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3533"
+       id="linearGradient4280"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)"
+       x1="59.341206"
+       y1="77.286224"
+       x2="102.70774"
+       y2="77.286224" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3551"
+       id="linearGradient4282"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)"
+       x1="69.149498"
+       y1="61.723667"
+       x2="72.115852"
+       y2="92.659592" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3559"
+       id="linearGradient4284"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)"
+       x1="86.1875"
+       y1="75.944229"
+       x2="77.062553"
+       y2="53.316811" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5042"
+       id="linearGradient4286"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,1.119968,-5.29208)"
+       x1="43.487068"
+       y1="54.814445"
+       x2="33.751541"
+       y2="87.961235" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4295"
+       id="linearGradient4288"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.103756,0,0,1.103756,-1.087544,-7.499592)"
+       x1="35.988102"
+       y1="79.824211"
+       x2="35.708893"
+       y2="55.167999" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.72460938"
+     inkscape:cx="210.28830"
+     inkscape:cy="150.81118"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:window-width="772"
+     inkscape:window-height="543"
+     inkscape:window-x="239"
+     inkscape:window-y="161"
+     width="40px"
+     height="40px"
+     showgrid="true" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="g4264"
+       transform="matrix(0.313341,0,0,0.313341,4.898567e-2,-2.648669)">
+      <path
+         transform="matrix(1.103756,0,0,1.238565,-1.087544,-28.81219)"
+         d="M 114.5 104.875 A 55.25 16.375 0 1 1  4,104.875 A 55.25 16.375 0 1 
1  114.5 104.875 z"
+         sodipodi:ry="16.375"
+         sodipodi:rx="55.25"
+         sodipodi:cy="104.875"
+         sodipodi:cx="59.25"
+         id="path5048"
+         
style="opacity:1;color:black;fill:url(#radialGradient4274);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:nodetypes="cccccccccccc"
+         id="path1308"
+         d="M 64.930862,24.854256 L 13.192299,39.306561 L 1.4993841,73.764443 
L 13.192299,78.765838 L 13.192299,94.459868 L 64.447969,117.05237 L 
113.73757,94.459868 L 113.73757,77.455128 L 125.8444,71.418962 L 
113.73757,39.410038 L 113.73757,39.306561 L 64.930862,24.854256 z "
+         
style="fill:url(#linearGradient4276);fill-opacity:1;fill-rule:evenodd;stroke:#af8b5e;stroke-width:3.31126809;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path2038"
+         d="M 23.813499,40.584325 L 64.19451,55.384903 L 103.67573,40.544512 L 
65.104541,28.01669 L 23.813499,40.584325 z "
+         
style="fill:url(#linearGradient4278);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path2800"
+         d="M 64.410669,59.528231 L 64.410669,115.26792 L 112.27674,93.390103 
L 112.34292,40.617616 L 64.410669,59.528231 z "
+         
style="fill:url(#linearGradient4280);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path2802"
+         d="M 64.309999,59.415616 L 71.484413,100.80647 L 112.2544,79.766117 L 
112.40036,40.571819 L 64.309999,59.415616 z "
+         
style="fill:url(#linearGradient4282);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path3541"
+         d="M 64.309999,59.415616 L 75.485529,94.735807 L 123.77485,70.591145 
L 112.40036,40.57182 L 64.309999,59.415616 z "
+         
style="fill:url(#linearGradient4284);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path4306"
+         d="M 64.377178,59.423786 L 54.192156,102.0381 L 14.872939,82.545873 L 
14.283522,41.194653 L 64.377178,59.423786 z "
+         
style="fill:url(#linearGradient4286);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path3567"
+         d="M 64.363231,59.417458 L 51.984644,94.757508 L 3.6899834,72.923865 
L 14.440041,40.676419 L 64.363231,59.417458 z "
+         
style="fill:url(#linearGradient4288);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+    </g>
+  </g>
+</svg>

Modified: xarchiver/trunk/src/archive.c
===================================================================
--- xarchiver/trunk/src/archive.c       2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/archive.c       2007-01-08 10:10:03 UTC (rev 24306)
@@ -69,6 +69,13 @@
        if (archive->pb_source == 0)
                archive->pb_source = g_timeout_add (200, xa_progressbar_pulse, 
NULL);
 
+       if (archive->cmd_line_output != NULL)
+       {
+               g_list_foreach (archive->cmd_line_output, (GFunc) g_free, NULL);
+               g_list_free (archive->cmd_line_output);
+               archive->cmd_line_output = NULL;
+       }
+
        if ( archive->parse_output )
        {
                ioc = g_io_channel_unix_new (output_fd);

Modified: xarchiver/trunk/src/archive.h
===================================================================
--- xarchiver/trunk/src/archive.h       2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/archive.h       2007-01-08 10:10:03 UTC (rev 24306)
@@ -97,7 +97,7 @@
 XArchive *xa_init_archive_structure ();
 gboolean xa_dump_child_output (GIOChannel *ioc, GIOCondition cond, gpointer 
data);
 void xa_clean_archive_structure ( XArchive *archive);
-gint xa_find_archive_index ( gint page_num );
+gint xa_find_archive_index (gint page_num);
 gint xa_get_new_archive_idx();
 
 XArchive *archive[100];

Modified: xarchiver/trunk/src/arj.c
===================================================================
--- xarchiver/trunk/src/arj.c   2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/arj.c   2007-01-08 10:10:03 UTC (rev 24306)
@@ -26,10 +26,10 @@
 
 static gboolean ArjOpen (GIOChannel *ioc, GIOCondition cond, gpointer data);
 
-void OpenArj ( XArchive *archive )
+void OpenArj (XArchive *archive)
 {
     jump_header = FALSE;
-       gchar *command = g_strconcat ( "arj v " , archive->escaped_path, NULL );
+       gchar *command = g_strconcat ("arj v ",archive->escaped_path, NULL);
        archive->has_sfx = archive->has_properties = archive->can_add = 
archive->can_extract = archive->has_test = TRUE;
        archive->dummy_size = 0;
     archive->nr_of_files = 0;
@@ -37,8 +37,8 @@
        archive->parse_output = ArjOpen;
        archive->format ="ARJ";
        xa_spawn_async_process (archive,command,0);
-       g_free ( command );
-       if ( archive->child_pid == 0 )
+       g_free (command);
+       if (archive->child_pid == 0)
                return;
 
        char *names[]= 
{(_("Filename")),(_("Original")),(_("Compressed")),(_("Ratio")),(_("Date")),(_("Time")),(_("Attributes"))};
@@ -81,7 +81,7 @@
                                if (line == NULL)
                                        break;
                                archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
-                               if (strncmp (line, "----------", 10) == 0 || 
strncmp (line, "\x0a",1) == 0)
+                               if (strncmp (line, "----------", 10) == 0)
                                {
                                        g_free (line);
                                        status = g_io_channel_read_line ( ioc, 
&line, NULL, NULL, NULL );
@@ -100,11 +100,11 @@
                        else if (arj_line == 2)
                        {
                                status = g_io_channel_read_line ( ioc, &line, 
NULL, NULL, NULL );
-                               archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
                                if ( line == NULL)
                                        break;
-                               fields = split_line (line,10);
-                               if ( g_str_has_prefix(fields[7] , "d") == FALSE)
+                               archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
+                               fields = split_line (line,8);
+                               if (g_str_has_prefix(fields[7] , "d") == FALSE)
                                        archive->nr_of_files++;
                        for ( x = 2; x < 8; x++)
                        {
@@ -114,26 +114,25 @@
                        gtk_list_store_set (archive->liststore, 
&iter,x-1,fields[x],-1);
                                }
                                archive->dummy_size += 
strtoll(fields[2],NULL,0);
+                               g_strfreev (fields);
                                g_free (line);
-                               g_strfreev ( fields );
                        }
                        else if (arj_line == 3)
                        {
                status = g_io_channel_read_line ( ioc, &line, NULL, NULL, NULL 
);
-                               if (line != NULL)
-                {
-                       archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
-                       g_free (line);
-                }
+               if ( line == NULL)
+                                       break;
+                               archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
+                g_free (line);
                        }
                        else if (arj_line == 4)
             {
                status = g_io_channel_read_line ( ioc, &line, NULL, NULL, NULL 
);
-                if (line != NULL)
-                {
-                       archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
-                       g_free (line);
-                }
+                if ( line == NULL)
+                                       break;
+
+                               archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
+                g_free (line);
                                arj_line = 1;
                 break;
                        }

Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c     2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/callbacks.c     2007-01-08 10:10:03 UTC (rev 24306)
@@ -67,6 +67,7 @@
 
                xa_hide_progress_bar_stop_button(archive);
                xa_set_button_state 
(1,1,1,archive->can_add,archive->can_extract,archive->has_sfx,archive->has_test,archive->has_properties);
+               archive->status = XA_ARCHIVESTATUS_IDLE;
                return;
        }
 
@@ -75,9 +76,9 @@
                if ( WEXITSTATUS (status) )
                {
                        xa_hide_progress_bar_stop_button(archive);
-                       xa_set_button_state 
(1,1,1,archive->can_add,archive->can_extract,archive->has_sfx,archive->has_test,archive->has_properties);
+                       xa_set_button_state 
(1,1,1,archive->can_add,archive->can_extract,0,archive->has_test,archive->has_properties);
                        Update_StatusBar ( _("Operation failed."));
-                       response = xa_show_message_dialog (GTK_WINDOW   
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while accessing the archive."),_("Do you want to view the 
command line output?") );
+                       response = xa_show_message_dialog 
(GTK_WINDOW(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An
 error occurred while accessing the archive."),_("Do you want to view the 
command line output?") );
                        if (response == GTK_RESPONSE_YES)
                                xa_show_cmd_line_output (NULL);
                        /* In case the user supplies a wrong password we reset 
it so he can try again */
@@ -86,6 +87,7 @@
                                g_free (archive->passwd);
                                archive->passwd = NULL;
                        }
+                       archive->status = XA_ARCHIVESTATUS_IDLE;
                        return;
                }
        }
@@ -95,10 +97,9 @@
                xa_hide_progress_bar_stop_button(archive);
                gtk_widget_set_sensitive ( exe_menu, FALSE);
                gtk_widget_set_sensitive ( Exe_button, FALSE);
-               response = xa_show_message_dialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,   GTK_BUTTONS_OK,_("The sfx 
archive was saved as:"),archive->tmp );
+               response = xa_show_message_dialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,GTK_BUTTONS_OK,_("The sfx 
archive was saved as:"),archive->tmp );
        }
-       if (archive->status == XA_ARCHIVESTATUS_TEST)
-               xa_show_cmd_line_output (NULL);
+
        if ( ! cli )
        {
                /* This to automatically reload the content of the archive 
after adding or deleting */
@@ -148,7 +149,6 @@
                                default:
                                break;
                        }
-                       archive->status = XA_ARCHIVESTATUS_IDLE;
                        while (waiting)
                        {
                                ps = waitpid ( archive->child_pid, &status, 
WNOHANG);
@@ -157,6 +157,7 @@
                                else
                                        gtk_main_iteration_do (FALSE);
                        }
+                       archive->status = XA_ARCHIVESTATUS_IDLE;
                }
        }
 
@@ -176,9 +177,13 @@
        }
        xa_hide_progress_bar_stop_button(archive);
        xa_set_button_state 
(1,1,1,archive->can_add,archive->can_extract,archive->has_sfx,archive->has_test,archive->has_properties);
+       Update_StatusBar ( _("Operation completed."));
 
+       if (archive->status == XA_ARCHIVESTATUS_TEST)
+               xa_show_cmd_line_output (NULL);
+
        gtk_widget_grab_focus (GTK_WIDGET(archive->treeview));
-       Update_StatusBar ( _("Operation completed."));
+       archive->status = XA_ARCHIVESTATUS_IDLE;
 }
 
 void xa_new_archive (GtkMenuItem *menuitem, gpointer user_data)
@@ -197,7 +202,6 @@
        xa_add_page (archive[current_page]);
 
        xa_set_button_state (1,1,1,1,0,0,0,0 );
-    EmptyTextBuffer();
     archive[current_page]->has_passwd = FALSE;
     gtk_widget_set_sensitive ( iso_info , FALSE );
     gtk_widget_set_sensitive ( view_shell_output1 , TRUE );
@@ -250,6 +254,7 @@
                if (strcmp (path,archive[current_page]->path) == 0)
                {
                        g_free (path);
+                       gtk_notebook_set_current_page (notebook,current_page);
                        return;
                }
        }
@@ -298,7 +303,6 @@
        gtk_widget_set_sensitive ( view_shell_output1 , TRUE );
 
        g_free (path);
-       EmptyTextBuffer();
 
        //Does the user open an archive from the command line whose archiver is 
not installed ?
        gchar *ext = NULL;
@@ -473,7 +477,6 @@
        else
                gtk_notebook_set_show_tabs (notebook,TRUE);
 
-       EmptyTextBuffer();
        xa_clean_archive_structure (archive[idx]);
        archive[idx] = NULL;
 
@@ -539,7 +542,7 @@
        response = xa_show_message_dialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,msg,_( 
"Are you sure you want to do this?") );
        g_free (msg);
 
-       if ( response == GTK_RESPONSE_NO)
+       if (response == GTK_RESPONSE_NO || response == 
GTK_RESPONSE_DELETE_EVENT)
                return;
 
        Update_StatusBar ( _("Deleting files from the archive, please 
wait..."));
@@ -1171,18 +1174,6 @@
        g_list_free (columns);
 }
 
-void EmptyTextBuffer ()
-{
-       //TODO
-/*     if (textbuf != NULL)
-       {
-               gtk_text_buffer_get_start_iter (textbuf,&start);
-               gtk_text_buffer_get_end_iter (textbuf,&end);
-               gtk_text_buffer_delete (textbuf,&start,&end);
-               gtk_text_buffer_get_start_iter(textbuf, &enditer);
-       }*/
-}
-
 void xa_create_liststore ( unsigned short int nc, gchar *columns_names[] , 
GType columns_types[], XArchive *archive)
 {
        unsigned short int x;
@@ -1230,20 +1221,17 @@
        gint current_page;
        gint idx;
 
-       //TODO: find some way to free the glist in the archive
-       current_page = gtk_notebook_get_current_page(notebook);
+       current_page = gtk_notebook_get_current_page (notebook);
        idx = xa_find_archive_index (current_page);
 
        xa_cmd_line_output = gtk_dialog_new_with_buttons (_("Command line 
output"),
-                                                                       
GTK_WINDOW (MainWindow), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                                                       
GTK_WINDOW (MainWindow), GTK_DIALOG_NO_SEPARATOR,
                                                                        
GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE, NULL);
        gtk_dialog_set_default_response (GTK_DIALOG (xa_cmd_line_output), 
GTK_RESPONSE_CLOSE);
-       gtk_dialog_set_has_separator (GTK_DIALOG (xa_cmd_line_output), FALSE);
        gtk_widget_set_size_request (xa_cmd_line_output, 400, 250);
        vbox = GTK_DIALOG (xa_cmd_line_output)->vbox;
 
        scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
-       gtk_widget_show (scrolledwindow);
        gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0);
        gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow), 4);
        g_object_set (G_OBJECT (scrolledwindow),"hscrollbar-policy", 
GTK_POLICY_AUTOMATIC,"shadow-type", GTK_SHADOW_IN,"vscrollbar-policy", 
GTK_POLICY_AUTOMATIC, NULL);
@@ -1253,6 +1241,7 @@
        gtk_text_buffer_get_iter_at_offset (textbuffer, &iter, 0);
 
        textview = gtk_text_view_new_with_buffer (textbuffer);
+       g_object_unref (textbuffer);
        gtk_container_add (GTK_CONTAINER (scrolledwindow), textview);
        gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE);
        gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview), FALSE);
@@ -1414,7 +1403,6 @@
 
        archive[idx]->full_path = full_path;
        archive[idx]->overwrite = overwrite;
-       EmptyTextBuffer();
        if (command != NULL)
        {
                result = xa_run_command (command , 0);
@@ -1427,6 +1415,7 @@
                        return;
                }
        }
+       g_message ("xa_view_file_inside_archive: %s",archive[idx]->tmp);
        view_window = view_win(names->str);
        g_string_free (names,TRUE);
        string = g_strrstr ( dummy_name, "/" );
@@ -1434,14 +1423,14 @@
                filename = g_strconcat ( "/tmp/" , dummy_name, NULL );
        else
        {
-               if ( strchr ( string , ' ' ) )
+               if (strchr (string,' '))
                {
                        string = RemoveBackSlashes ( string );
                        tofree = TRUE;
                }
-               filename = g_strconcat ( "/tmp" , string , NULL );
+               filename = g_strconcat ( archive[idx]->tmp , string , NULL );
                if ( tofree )
-                       g_free ( string );
+                       g_free (string);
        }
        g_free (dummy_name);
 
@@ -1449,7 +1438,7 @@
        if ( ! result)
        {
                gtk_widget_hide (viewport2);
-               unlink ( filename );
+               unlink (filename);
                Update_StatusBar ( _("Operation failed."));
                response = xa_show_message_dialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("An error 
occurred while extracting the file to be viewed:") , error->message);
                g_error_free (error);
@@ -1805,8 +1794,6 @@
        current_page = gtk_notebook_get_current_page (notebook);
        idx = xa_find_archive_index ( current_page );
 
-       if (watch_child_flag)
-               EmptyTextBuffer();
        archive[idx]->parse_output = 0;
        xa_spawn_async_process ( archive[idx],command,0);
        if ( archive[idx]->child_pid == 0 )
@@ -1835,7 +1822,6 @@
                                gtk_tooltips_disable ( pad_tooltip );
                                gtk_widget_hide ( pad_image );
                                gtk_widget_hide ( viewport2 );
-                               xa_set_window_title (MainWindow , NULL);
                                response = xa_show_message_dialog (GTK_WINDOW   
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while accessing the archive."),_("Do you want to view the 
command line output?") );
                                if (response == GTK_RESPONSE_YES)
                                        xa_show_cmd_line_output (NULL);
@@ -1864,7 +1850,6 @@
 
 void xa_hide_progress_bar_stop_button( XArchive *archive)
 {
-       archive->status = XA_ARCHIVESTATUS_IDLE;
     gtk_widget_set_sensitive ( Stop_button , FALSE );
     if (archive->pb_source != 0)
                g_source_remove (archive->pb_source);
@@ -1879,17 +1864,20 @@
     gchar            *name;
     GList            *row_list;
        gint current_page;
+       gint idx;
 
        //gtk_drag_source_set_icon_name (treeview1, DATADIR 
"/pixmaps/xarchiver.png" );
        current_page = gtk_notebook_get_current_page(notebook);
-    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW 
(archive[current_page]->treeview));
+       idx = xa_find_archive_index (current_page);
 
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW 
(archive[idx]->treeview));
+
        row_list = gtk_tree_selection_get_selected_rows (selection, NULL);
        if ( row_list == NULL )
                return;
 
-       gtk_tree_model_get_iter (archive[current_page]->model, &iter, 
(GtkTreePath*) (row_list->data) );
-       gtk_tree_model_get (archive[current_page]->model, &iter, 0, &name, -1);
+       gtk_tree_model_get_iter (archive[idx]->model, &iter, (GtkTreePath*) 
(row_list->data) );
+       gtk_tree_model_get (archive[idx]->model, &iter, 0, &name, -1);
        gchar *no_slashes = g_strrstr ( name, "/" );
        if (no_slashes != NULL)
                no_slashes++;
@@ -2247,10 +2235,10 @@
 
        current_page = gtk_notebook_get_current_page(notebook);
        idx = xa_find_archive_index (current_page);
+
        comment_window = view_win ( _("Archive comment window") );
        gtk_text_buffer_create_tag (viewtextbuf, "bold","weight", 
PANGO_WEIGHT_BOLD, NULL);
        gtk_text_buffer_insert (viewtextbuf, &viewenditer, "\n", 1);
        gtk_text_buffer_insert_with_tags_by_name (viewtextbuf, &viewenditer, 
archive[idx]->comment->str, archive[idx]->comment->len, "bold", NULL);
        gtk_widget_show (comment_window);
 }
-

Modified: xarchiver/trunk/src/callbacks.h
===================================================================
--- xarchiver/trunk/src/callbacks.h     2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/callbacks.h     2007-01-08 10:10:03 UTC (rev 24306)
@@ -99,7 +99,6 @@
 
 void xa_watch_child ( GPid pid, gint status, gpointer data);
 void xa_remove_columns();
-void EmptyTextBuffer ();
 void xa_create_liststore ( unsigned short int nc, gchar *columns_names[] , 
GType columns_types[], XArchive *archive);
 void ConcatenateFileNames (GtkTreeModel *model, GtkTreePath *treepath, 
GtkTreeIter *iter, GString *data);
 void ConcatenateFileNames2 (gchar *filename , GString *data);

Modified: xarchiver/trunk/src/extract_dialog.c
===================================================================
--- xarchiver/trunk/src/extract_dialog.c        2007-01-08 08:36:46 UTC (rev 
24305)
+++ xarchiver/trunk/src/extract_dialog.c        2007-01-08 10:10:03 UTC (rev 
24306)
@@ -869,7 +869,7 @@
        result = xa_create_temp_directory (tmp_dir);
        if (result == 0)
                return FALSE;
-       g_message (tmp_dir);
+
        if (cpio_flag)
        {
                chdir (tmp_dir);
@@ -905,7 +905,6 @@
        g_free (command);
        g_slist_free (filenames);
        g_string_free ( unescaped_names, TRUE );
-
        if (result == 0 || stop_flag)
        {
                xa_delete_temp_directory ( tmp_dir, 0 );
@@ -926,6 +925,7 @@
        gchar *command;
        gboolean result;
 
+       chdir (dir_name);
        command = g_strconcat ( "rm -rf ", dir_name , NULL );
        result = xa_run_command (command , flag );
        g_free (command);

Modified: xarchiver/trunk/src/interface.c
===================================================================
--- xarchiver/trunk/src/interface.c     2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/interface.c     2007-01-08 10:10:03 UTC (rev 24306)
@@ -599,8 +599,10 @@
        gboolean done = FALSE;
        gchar *password = NULL;
        gint current_page;
+       gint idx;
 
        current_page = gtk_notebook_get_current_page (notebook);
+       idx = xa_find_archive_index (current_page);
 
        passwd = gtk_dialog_new ();
        gtk_window_set_title (GTK_WINDOW (passwd),_("Enter Archive Password"));
@@ -624,8 +626,8 @@
        gtk_entry_set_visibility (GTK_ENTRY (password_entry), FALSE);
        gtk_entry_set_activates_default(GTK_ENTRY(password_entry), TRUE);
 
-       if (current_page > 0 && archive[current_page]->passwd != NULL)
-               gtk_entry_set_text 
(GTK_ENTRY(password_entry),archive[current_page]->passwd);
+       if (current_page > 0 && archive[idx]->passwd != NULL)
+               gtk_entry_set_text 
(GTK_ENTRY(password_entry),archive[idx]->passwd);
        gtk_widget_show (password_entry);
 
        dialog_action_area1 = GTK_DIALOG (passwd)->action_area;

Modified: xarchiver/trunk/src/main.c
===================================================================
--- xarchiver/trunk/src/main.c  2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/main.c  2007-01-08 10:10:03 UTC (rev 24306)
@@ -72,8 +72,8 @@
 
        if (socket_info.lock_socket < 0)
        {
-               // Socket exists
-               if (argc > 1)   // filenames were sent to first instance, so 
quit
+               /* Socket exists; filenames were sent to first instance, so 
quit */
+               if (argc > 1)
                        return 0;
        }
 #endif
@@ -357,14 +357,19 @@
        }
 
        absolute_path = g_find_program_in_path ("zip");
-    if ( absolute_path )
+    if (absolute_path)
        {
-               ArchiveType = g_list_prepend ( ArchiveType, "jar");
-               ArchiveSuffix = g_list_prepend ( ArchiveSuffix, "*.jar");
                g_free (absolute_path);
+               absolute_path = g_find_program_in_path ("zipinfo");
+       if (absolute_path)
+               {
+                       g_free (absolute_path);
+                       ArchiveType = g_list_prepend ( ArchiveType, "jar");
+                       ArchiveSuffix = g_list_prepend ( ArchiveSuffix, 
"*.jar");
 
-               ArchiveType = g_list_prepend ( ArchiveType, "zip");
-               ArchiveSuffix = g_list_prepend ( ArchiveSuffix, "*.zip");
+                       ArchiveType = g_list_prepend ( ArchiveType, "zip");
+                       ArchiveSuffix = g_list_prepend ( ArchiveSuffix, 
"*.zip");
+               }
        }
 
        absolute_path = g_find_program_in_path("7za");

Modified: xarchiver/trunk/src/pref_dialog.c
===================================================================
--- xarchiver/trunk/src/pref_dialog.c   2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/pref_dialog.c   2007-01-08 10:10:03 UTC (rev 24306)
@@ -53,7 +53,7 @@
        g_object_set (G_OBJECT (scrolledwindow1),"hscrollbar-policy", 
GTK_POLICY_NEVER,"shadow-type", GTK_SHADOW_IN,"vscrollbar-policy", 
GTK_POLICY_NEVER, NULL);
        gtk_widget_show (scrolledwindow1);
 
-       prefs_data->prefs_liststore = gtk_list_store_new ( 2, GDK_TYPE_PIXBUF, 
G_TYPE_STRING);
+       prefs_data->prefs_liststore = gtk_list_store_new ( 3, GDK_TYPE_PIXBUF, 
G_TYPE_STRING,G_TYPE_UINT);
        prefs_iconview = 
gtk_icon_view_new_with_model(GTK_TREE_MODEL(prefs_data->prefs_liststore));
        g_object_unref (prefs_data->prefs_liststore);
 
@@ -65,18 +65,18 @@
        gtk_container_add (GTK_CONTAINER (scrolledwindow1), prefs_iconview);
 
        gtk_list_store_append (prefs_data->prefs_liststore, &iter);
-       icon_pixbuf = gdk_pixbuf_new_from_file 
("./pixmaps/xarchiver-extract.png", NULL);
-       gtk_list_store_set (prefs_data->prefs_liststore, &iter, 0, icon_pixbuf, 
1, _("Behaviour"), -1);
+       icon_pixbuf = gdk_pixbuf_new_from_file 
("./pixmaps/xarchiver-behaviour.svg", NULL);
+       gtk_list_store_set (prefs_data->prefs_liststore, &iter, 0, icon_pixbuf, 
1, _("Behaviour"),2,0,-1);
        g_object_unref (icon_pixbuf);
 
        gtk_list_store_append (prefs_data->prefs_liststore, &iter);
-       icon_pixbuf = gdk_pixbuf_new_from_file ("./pixmaps/xarchiver-add.png", 
NULL);
-       gtk_list_store_set (prefs_data->prefs_liststore, &iter, 0, icon_pixbuf, 
1, _("View"), -1);
+       icon_pixbuf = gtk_widget_render_icon (prefs_iconview, "gtk-find", 
GTK_ICON_SIZE_DND, NULL);
+       gtk_list_store_set (prefs_data->prefs_liststore, &iter, 0, icon_pixbuf, 
1, _("View"),2,1,-1);
        g_object_unref (icon_pixbuf);
 
        gtk_list_store_append (prefs_data->prefs_liststore, &iter);
-       icon_pixbuf = gdk_pixbuf_new_from_file 
("./pixmaps/xarchiver-extract.png", NULL);
-       gtk_list_store_set (prefs_data->prefs_liststore, &iter, 0, icon_pixbuf, 
1, _("Advanced"), -1);
+    icon_pixbuf = gtk_widget_render_icon (prefs_iconview, "gtk-execute", 
GTK_ICON_SIZE_DND, NULL);
+       gtk_list_store_set (prefs_data->prefs_liststore, &iter, 0, icon_pixbuf, 
1, _("Advanced"),2,2,-1);
        g_object_unref (icon_pixbuf);
        gtk_widget_show (prefs_iconview);
 
@@ -187,7 +187,7 @@
        GTK_WIDGET_UNSET_FLAGS (prefs_data->check_show_comment, GTK_CAN_FOCUS);
        gtk_button_set_focus_on_click (GTK_BUTTON 
(prefs_data->check_show_comment), FALSE);
 
-       prefs_data->check_show_iso_info = gtk_check_button_new_with_mnemonic 
(_("Show ISO info after loading the archive"));
+       prefs_data->check_show_iso_info = gtk_check_button_new_with_mnemonic 
(_("Show ISO info after loading the image"));
        gtk_widget_show (prefs_data->check_show_iso_info);
        gtk_box_pack_start (GTK_BOX (vbox2), prefs_data->check_show_iso_info, 
FALSE, FALSE, 0);
        GTK_WIDGET_UNSET_FLAGS (prefs_data->check_show_iso_info, GTK_CAN_FOCUS);
@@ -265,7 +265,7 @@
        GList *list;
        GtkTreePath *path;
        GtkTreeIter iter;
-       gchar *text = NULL;
+       guint column = 0;
 
        list = gtk_icon_view_get_selected_items (iconview);
        if (list == NULL)
@@ -275,17 +275,15 @@
        path = (GtkTreePath*)list->data;
 
        gtk_tree_model_get_iter ( GTK_TREE_MODEL(prefs->prefs_liststore), 
&iter, path );
-       gtk_tree_model_get ( GTK_TREE_MODEL(prefs->prefs_liststore), &iter, 1, 
&text, -1);
+       gtk_tree_model_get ( GTK_TREE_MODEL(prefs->prefs_liststore), &iter, 2, 
&column, -1);
 
        gtk_tree_path_free( (GtkTreePath*)list->data );
        g_list_free (list);
 
-       if (strncmp ( text,"B",1) == 0 )
+       if (column == 0)
                gtk_notebook_set_current_page 
(GTK_NOTEBOOK(prefs->prefs_notebook),0);
-       else if (strncmp ( text,"V",1) == 0 )
+       else if (column == 1)
                gtk_notebook_set_current_page 
(GTK_NOTEBOOK(prefs->prefs_notebook),1);
-       else if (strncmp ( text,"A",1) == 0 )
+       else if (column == 2)
                gtk_notebook_set_current_page 
(GTK_NOTEBOOK(prefs->prefs_notebook),2);
-
-       g_free (text);
 }

Modified: xarchiver/trunk/src/zip.c
===================================================================
--- xarchiver/trunk/src/zip.c   2007-01-08 08:36:46 UTC (rev 24305)
+++ xarchiver/trunk/src/zip.c   2007-01-08 10:10:03 UTC (rev 24306)
@@ -24,7 +24,7 @@
 static gboolean ZipOpen (GIOChannel *ioc, GIOCondition cond, gpointer data);
 void OpenZip ( XArchive *archive )
 {
-       gchar *command = g_strconcat ( "unzip -vl -qq " , 
archive->escaped_path, NULL );
+       gchar *command = g_strconcat ( "zipinfo -t -l " , 
archive->escaped_path, NULL );
        archive->has_sfx = archive->has_properties = archive->can_add = 
archive->can_extract = archive->has_test = TRUE;
        archive->dummy_size = 0;
     archive->nr_of_files = 0;
@@ -54,12 +54,15 @@
        {
                do
                {
+                       /* Let's jump the header */
                        status = g_io_channel_read_line ( ioc, &line, NULL, 
NULL, NULL );
-                       if ( line == NULL )
+                       if (line != NULL)
+                               g_free (line);
+                       status = g_io_channel_read_line ( ioc, &line, NULL, 
NULL, NULL );
+                       if (line == NULL)
                                break;
-                       archive->cmd_line_output = g_list_append 
(archive->cmd_line_output,g_strdup(line));
-                       fields = split_line (line,6);
-                       filename = get_last_field (line,8);
+                       fields = split_line (line,9);
+                       filename = get_last_field (line,10);
                        if ( g_str_has_suffix(filename , "/") == TRUE)
                                archive->nr_of_dirs++;
                        else
@@ -69,7 +72,7 @@
                                gtk_list_store_append (archive->liststore, 
&iter);
                                for ( x = 0; x < 6; x++)
                                {
-                                       if (x == 0 || x == 2)
+                                       if (x == 4 || x == 6)
                                                gtk_list_store_set 
(archive->liststore, &iter,x+1, strtoll (fields[x],NULL,0), -1);
                                        else
                                                gtk_list_store_set 
(archive->liststore, &iter,x+1,fields[x], -1);

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to