Author: colossus
Date: 2007-08-01 12:48:16 +0000 (Wed, 01 Aug 2007)
New Revision: 25948

Removed:
   xarchiver/trunk/src/xdgmime/Makefile
   xarchiver/trunk/src/xdgmime/Makefile.in
Modified:
   xarchiver/trunk/depcomp
   xarchiver/trunk/install-sh
   xarchiver/trunk/missing
   xarchiver/trunk/src/archive.c
   xarchiver/trunk/src/mime.c
   xarchiver/trunk/src/mime.h
   xarchiver/trunk/src/zip.c
Log:
A padlock icon appears next to the filename if it is protected.
Deleted src/xdgmime/Makefile.in.
Deleted src/xdgmime/Makefile.


Modified: xarchiver/trunk/depcomp
===================================================================
--- xarchiver/trunk/depcomp     2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/depcomp     2007-08-01 12:48:16 UTC (rev 25948)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2005-02-09.22
+scriptversion=2005-07-09.11
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 
@@ -17,8 +17,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -467,7 +467,8 @@
   done
 
   "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
     sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"

Modified: xarchiver/trunk/install-sh
===================================================================
--- xarchiver/trunk/install-sh  2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/install-sh  2007-08-01 12:48:16 UTC (rev 25948)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2005-02-02.21
+scriptversion=2005-05-14.22
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the

Modified: xarchiver/trunk/missing
===================================================================
--- xarchiver/trunk/missing     2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/missing     2007-08-01 12:48:16 UTC (rev 25948)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2005-02-08.22
+scriptversion=2005-06-08.21
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
 #   Free Software Foundation, Inc.
@@ -19,8 +19,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -297,6 +297,9 @@
       # ... or it is derived from the source name (dir/f.texi becomes f.info)
       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
     touch $file
     ;;
 

Modified: xarchiver/trunk/src/archive.c
===================================================================
--- xarchiver/trunk/src/archive.c       2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/src/archive.c       2007-08-01 12:48:16 UTC (rev 25948)
@@ -385,7 +385,8 @@
                                child_entry = xa_alloc_memory_for_each_row 
(archive->nc,archive->column_types);
                                child_entry->filename = 
g_strdup(full_path_name);
                                child_entry->columns = 
xa_fill_archive_entry_columns_for_each_row(archive,child_entry,items);
-
+                               child_entry->is_dir = TRUE;
+                               g_print ("%s in %x è 
%d\n",child_entry->filename,child_entry,child_entry->is_dir);
                                child_entry->next = last_entry->child;
                                last_entry->child = child_entry;
                                //this entry, last_entry->child, contains all 
the dirs
@@ -451,6 +452,7 @@
 {
        GSList *s = NULL;
        XEntry *entry  = NULL;
+       const char *icon_name;
 
        GtkTreeIter iter;
        unsigned short int i;
@@ -472,8 +474,15 @@
                                g_free (entry->filename);
                                entry->filename = dummy;
                        }
-                       gtk_list_store_set 
(archive->liststore,&iter,0,xa_get_stock_mime_icon(entry->filename),1,entry->filename,-1);
+                       if (entry->is_dir)
+                               icon_name = "folder";
+                       else if (entry->is_encrypted)
+                               icon_name = "password";
+                       else
+                               icon_name = 
xa_get_stock_mime_icon(entry->filename);
 
+                       gtk_list_store_set 
(archive->liststore,&iter,0,icon_name,1,entry->filename,-1);
+
                        for (i = 0; i < archive->nc; i++)
                        {
                                switch(archive->column_types[i+2])
@@ -526,6 +535,7 @@
        
        while (entry)
        {
+               g_print ("inserisco %s in %x is_dir è 
%d\n",entry->filename,entry,entry->is_dir);
                if(!g_utf8_validate(entry->filename, -1, NULL) )
                {
                        gchar *dummy = g_convert(entry->filename, -1, "UTF-8", 
"WINDOWS-1252", NULL, NULL, NULL);
@@ -544,8 +554,20 @@
 
                current_column = entry->columns;
                gtk_list_store_append (archive->liststore, &iter);
-               gtk_list_store_set 
(archive->liststore,&iter,0,xa_get_stock_mime_icon(entry->filename),1,entry->filename,-1);
 
+               if (entry->is_dir)
+               {
+                       g_print ("%s è una dir\n",entry->filename);
+                       icon_name = "folder";
+               }
+               else if (entry->is_encrypted)
+                       icon_name = "password";
+               
+               else
+                       icon_name = xa_get_stock_mime_icon(entry->filename);
+
+               gtk_list_store_set 
(archive->liststore,&iter,0,icon_name,1,entry->filename,-1);
+
                for (i = 0; i < archive->nc; i++)
                {
                        switch(archive->column_types[i+2])

Modified: xarchiver/trunk/src/mime.c
===================================================================
--- xarchiver/trunk/src/mime.c  2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/src/mime.c  2007-08-01 12:48:16 UTC (rev 25948)
@@ -20,13 +20,13 @@
 #include "mime.h"
 #include <string.h>
 
-const char *xa_get_stock_mime_icon(gchar *filename)
+const char *xa_get_stock_mime_icon(char *filename)
 {
        const char *mime;
        const char *icon_name = "binary";
 
        mime = xdg_mime_get_mime_type_from_file_name(filename);
-       g_print ("%s\t%s\n",filename,mime);
+       //g_print ("%s\t%s\n",filename,mime);
        if (strncmp(mime,"image/",6) == 0)
                icon_name = "image";
        else if (strcmp(mime,"text/html") == 0)

Modified: xarchiver/trunk/src/mime.h
===================================================================
--- xarchiver/trunk/src/mime.h  2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/src/mime.h  2007-08-01 12:48:16 UTC (rev 25948)
@@ -21,7 +21,6 @@
 #define __XARCHIVER_MIME_H__
 
 #include "xdgmime/xdgmime.h"
-#include <gtk/gtk.h>
 
-const char *xa_get_stock_mime_icon(gchar *filename);
+const char *xa_get_stock_mime_icon(char *filename);
 #endif

Deleted: xarchiver/trunk/src/xdgmime/Makefile

Deleted: xarchiver/trunk/src/xdgmime/Makefile.in

Modified: xarchiver/trunk/src/zip.c
===================================================================
--- xarchiver/trunk/src/zip.c   2007-08-01 11:30:41 UTC (rev 25947)
+++ xarchiver/trunk/src/zip.c   2007-08-01 12:48:16 UTC (rev 25948)
@@ -55,6 +55,8 @@
 void xa_get_zip_line_content (gchar *line, gpointer data)
 {
        XArchive *archive = data;
+       XEntry *entry = NULL;
+
        gchar *filename;
        gpointer item[8];
        unsigned short int i = 0;
@@ -122,7 +124,7 @@
        for(; n < linesize && line[n] != ' '; n++);
 
        line[n]='\0';
-       if (line[0] == 'B' || line[0] == 'T')
+       if ((line+a)[0] == 'B' || (line+a)[0] == 'T')
                encrypted = TRUE;
        n++;
 
@@ -169,12 +171,12 @@
        /* filename */
        line[linesize-1] = '\0';
        filename = line + n;
-       //item[0] = GTK_STOCK_DIRECTORY;//xa_get_mime_icon (line+a);
-       archive->entry = xa_set_archive_entries_for_each_row 
(archive,filename,item);
-       if (archive->entry != NULL)
+
+       entry = xa_set_archive_entries_for_each_row (archive,filename,item);
+       if (entry != NULL)
        {
-               archive->entry->is_dir = is_dir;
-               archive->entry->is_encrypted = encrypted;
+               entry->is_dir = is_dir;
+               entry->is_encrypted = encrypted;
        }
        else
        {

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

Reply via email to