Author: colossus
Date: 2008-06-25 12:55:43 +0000 (Wed, 25 Jun 2008)
New Revision: 27148

Added:
   xarchiver/trunk/src/utf8-fnmatch.c
   xarchiver/trunk/src/utf8-fnmatch.h
Modified:
   xarchiver/trunk/INSTALL
   xarchiver/trunk/Makefile.am
   xarchiver/trunk/depcomp
   xarchiver/trunk/install-sh
   xarchiver/trunk/src/Makefile.am
   xarchiver/trunk/src/archive.c
   xarchiver/trunk/src/archive.h
   xarchiver/trunk/src/interface.c
   xarchiver/trunk/src/interface.h
   xarchiver/trunk/src/tar.c
   xarchiver/trunk/src/window.c
Log:
Fixed deletion of files within tar and tar compressed archives. It should work 
now :)
Added a 'Select by pattern' widget.
Added files utf8-fnmatch for selecting files by pattern.


Modified: xarchiver/trunk/INSTALL
===================================================================
--- xarchiver/trunk/INSTALL     2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/INSTALL     2008-06-25 12:55:43 UTC (rev 27148)
@@ -2,7 +2,7 @@
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007 Free Software Foundation, Inc.
+2006 Free Software Foundation, Inc.
 
 This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -67,9 +67,6 @@
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
 Compilers and Options
 =====================
 

Modified: xarchiver/trunk/Makefile.am
===================================================================
--- xarchiver/trunk/Makefile.am 2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/Makefile.am 2008-06-25 12:55:43 UTC (rev 27148)
@@ -15,7 +15,6 @@
 @INTLTOOL_DESKTOP_RULE@
 
 EXTRA_DIST = \
-       LEGGIMI \
        autogen.sh \
        intltool-extract.in \
        intltool-merge.in \

Modified: xarchiver/trunk/depcomp
===================================================================
--- xarchiver/trunk/depcomp     2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/depcomp     2008-06-25 12:55:43 UTC (rev 27148)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2007-03-29.01
+scriptversion=2006-10-15.18
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -215,39 +215,34 @@
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
   if test "$libtool" = yes; then
-    tmpdepfile1=$dir$base.u
-    tmpdepfile2=$base.u
-    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
-    tmpdepfile1=$dir$base.u
-    tmpdepfile2=$dir$base.u
-    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    rm -f "$tmpdepfile"
     exit $stat
   fi
 
-  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
-  do
-    test -f "$tmpdepfile" && break
-  done
   if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile

Modified: xarchiver/trunk/install-sh
===================================================================
--- xarchiver/trunk/install-sh  2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/install-sh  2008-06-25 12:55:43 UTC (rev 27148)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-12-25.00
+scriptversion=2006-10-14.15
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -48,7 +48,7 @@
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
+doit="${DOITPROG-}"
 if test -z "$doit"; then
   doit_exec=exec
 else
@@ -58,49 +58,34 @@
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
 
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
+posix_glob=
 posix_mkdir=
 
 # Desired mode of installed file.
 mode=0755
 
-chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
+chgrpcmd=
 stripcmd=
-
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
 src=
 dst=
 dir_arg=
-dst_arg=
-
-copy_on_change=false
+dstarg=
 no_target_directory=
 
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -110,55 +95,65 @@
 In the 4th, create DIRECTORIES.
 
 Options:
-     --help     display this help and exit.
-     --version  display version info and exit.
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
 
-  -c            (ignored)
-  -C            install only if different (preserve the last data modification 
time)
-  -d            create directories instead of installing files.
-  -g GROUP      $chgrpprog installed files to GROUP.
-  -m MODE       $chmodprog installed files to MODE.
-  -o USER       $chownprog installed files to USER.
-  -s            $stripprog installed files.
-  -t DIRECTORY  install into DIRECTORY.
-  -T            report an error if DSTFILE is a directory.
-
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
-  RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
 "
 
 while test $# -ne 0; do
   case $1 in
-    -c) ;;
+    -c) shift
+        continue;;
 
-    -C) copy_on_change=true;;
+    -d) dir_arg=true
+        shift
+        continue;;
 
-    -d) dir_arg=true;;
-
     -g) chgrpcmd="$chgrpprog $2"
-       shift;;
+        shift
+        shift
+        continue;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
+        shift
+        shift
        case $mode in
          *' '* | *'    '* | *'
 '*       | *'*'* | *'?'* | *'['*)
            echo "$0: invalid mode: $mode" >&2
            exit 1;;
        esac
-       shift;;
+        continue;;
 
     -o) chowncmd="$chownprog $2"
-       shift;;
+        shift
+        shift
+        continue;;
 
-    -s) stripcmd=$stripprog;;
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
 
-    -t) dst_arg=$2
-       shift;;
+    -t) dstarg=$2
+       shift
+       shift
+       continue;;
 
-    -T) no_target_directory=true;;
+    -T) no_target_directory=true
+       shift
+       continue;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
@@ -170,22 +165,21 @@
 
     *)  break;;
   esac
-  shift
 done
 
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
   # Otherwise, the last argument is the destination.  Remove it from [EMAIL 
PROTECTED]
   for arg
   do
-    if test -n "$dst_arg"; then
+    if test -n "$dstarg"; then
       # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dst_arg"
+      set fnord "$@" "$dstarg"
       shift # fnord
     fi
     shift # arg
-    dst_arg=$arg
+    dstarg=$arg
   done
 fi
 
@@ -230,7 +224,7 @@
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src;;
+    -*) src=./$src ;;
   esac
 
   if test -n "$dir_arg"; then
@@ -248,22 +242,22 @@
       exit 1
     fi
 
-    if test -z "$dst_arg"; then
+    if test -z "$dstarg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dst_arg
+    dst=$dstarg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst;;
+      -*) dst=./$dst ;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-       echo "$0: $dst_arg: Is a directory" >&2
+       echo "$0: $dstarg: Is a directory" >&2
        exit 1
       fi
       dstdir=$dst
@@ -384,19 +378,26 @@
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix='/';;
-       -*) prefix='./';;
-       *)  prefix='';;
+       /*) prefix=/ ;;
+       -*) prefix=./ ;;
+       *)  prefix= ;;
       esac
 
-      eval "$initialize_posix_glob"
+      case $posix_glob in
+        '')
+         if (set -f) 2>/dev/null; then
+           posix_glob=true
+         else
+           posix_glob=false
+         fi ;;
+      esac
 
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      $posix_glob && set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      $posix_glob && set +f
       IFS=$oIFS
 
       prefixes=
@@ -458,55 +459,42 @@
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
-    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
-    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-    # If -C, don't bother to copy if it wouldn't change the file.
-    if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
 
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
-       set X $old && old=:$2:$4:$5:$6 &&
-       set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dst"; then
+              $doit $rmcmd -f "$dst" 2>/dev/null \
+              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+              || {
+                echo "$0: cannot unlink or rename $dst" >&2
+                (exit 1); exit 1
+              }
+            else
+              :
+            fi
+          } &&
 
-       test "$old" = "$new" &&
-       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
-    then
-      rm -f "$dsttmp"
-    else
-      # Rename the file to the real destination.
-      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dst"
+        }
+    } || exit 1
 
-      # The rename failed, perhaps because mv can't rename something else
-      # to itself, or perhaps because mv is so ancient that it does not
-      # support -f.
-      {
-       # Now remove or move aside any old file at destination location.
-       # We try this two ways since rm can't unlink itself on some
-       # systems and the destination file might be busy for other
-       # reasons.  In this case, the final cleanup might fail but the new
-       # file should still install successfully.
-       {
-         test ! -f "$dst" ||
-         $doit $rmcmd -f "$dst" 2>/dev/null ||
-         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-         } ||
-         { echo "$0: cannot unlink or rename $dst" >&2
-           (exit 1); exit 1
-         }
-       } &&
-
-       # Now rename the file to the real destination.
-       $doit $mvcmd "$dsttmp" "$dst"
-      }
-    fi || exit 1
-
     trap '' 0
   fi
 done

Modified: xarchiver/trunk/src/Makefile.am
===================================================================
--- xarchiver/trunk/src/Makefile.am     2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/Makefile.am     2008-06-25 12:55:43 UTC (rev 27148)
@@ -15,6 +15,7 @@
        main.c main.h \
        string_utils.c string_utils.h \
        mime.c mime.h \
+       utf8-fnmatch.c utf8-fnmatch.h \
        support.c support.h \
        archive.c archive.h \
        interface.c interface.h \

Modified: xarchiver/trunk/src/archive.c
===================================================================
--- xarchiver/trunk/src/archive.c       2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/archive.c       2008-06-25 12:55:43 UTC (rev 27148)
@@ -626,11 +626,11 @@
        return fullpathname;
 }
 
-void xa_fill_list_with_recursed_entries(XEntry *entry,GString 
**p_file_list,gchar *current_path,gboolean flag)
+void xa_fill_list_with_recursed_entries(XEntry *entry,GString 
**p_file_list,gchar *current_path)
 {
        gint idx,current_page;
-       gchar *full_path = NULL;
-       gchar *quoted_path, *parent_dirs = NULL;
+       gchar *full_path, *_dummy = NULL;
+       gchar *quoted_path, *parent_dir = NULL;
 
        if (entry == NULL)
                return;
@@ -639,42 +639,34 @@
        idx = xa_find_archive_index (current_page);
 
        if (entry == archive[idx]->root_entry)
-               parent_dirs = "";
+               parent_dir = "";
        else
-               parent_dirs = g_strdup(archive[idx]->location_entry_path);
-               
+               parent_dir = g_strdup(archive[idx]->location_entry_path);
+
        /* Recurse to siblings with the same path */
-       if (flag)
-               xa_fill_list_with_recursed_entries(entry->next, p_file_list, 
current_path,TRUE);
+       
xa_fill_list_with_recursed_entries(entry->next,p_file_list,current_path);
 
        if (strlen(current_path) == 0)
                full_path = g_strdup(entry->filename);
        else
                full_path = g_strconcat(current_path,"/",entry->filename,NULL);
 
-       if (entry->child)
-       {
-               if (flag == TRUE)
-               {
-                       quoted_path = g_shell_quote(entry->filename);
-                       *p_file_list = g_string_prepend 
(*p_file_list,quoted_path);
-                       *p_file_list = g_string_prepend_c (*p_file_list,' ');
-               }
-               xa_fill_list_with_recursed_entries(entry->child, p_file_list, 
full_path,TRUE);
-               g_free(full_path);
-       }
+       if (parent_dir)
+               _dummy = g_strconcat (parent_dir,entry->filename,NULL);
        else
-       {
-               quoted_path = g_shell_quote(full_path);
-               *p_file_list = g_string_prepend (*p_file_list,quoted_path);
-               *p_file_list = g_string_prepend_c (*p_file_list,' ');
-       }
-       g_print ("%s\n",parent_dirs);
-       g_free(parent_dirs);
+               _dummy = g_strdup(entry->filename);
+
+       quoted_path = g_shell_quote(_dummy);
+       g_free(_dummy);
+       *p_file_list = g_string_prepend (*p_file_list,quoted_path);
+       *p_file_list = g_string_prepend_c (*p_file_list,' ');
+       g_free(parent_dir);             
+       if (entry->child)
+               xa_fill_list_with_recursed_entries(entry->child, p_file_list, 
full_path);
+       g_free(full_path);
        return;
 }
 
-
 void xa_entries_to_filelist(XEntry *entry,GString **p_file_list,gchar 
*current_path)
 {
        gchar *full_path = NULL;
@@ -684,7 +676,7 @@
                return;
                
        /* Recurse to siblings with the same path */
-       xa_entries_to_filelist(entry->next, p_file_list, current_path);
+       xa_entries_to_filelist(entry->next,p_file_list,current_path);
 
        if (strlen(current_path) == 0)
                full_path = g_strdup(entry->filename);
@@ -693,7 +685,7 @@
 
        if (entry->child)
        {
-               xa_entries_to_filelist(entry->child, p_file_list, full_path);
+               xa_entries_to_filelist(entry->child, p_file_list,full_path);
                g_free(full_path);
        }
        else

Modified: xarchiver/trunk/src/archive.h
===================================================================
--- xarchiver/trunk/src/archive.h       2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/archive.h       2008-06-25 12:55:43 UTC (rev 27148)
@@ -136,7 +136,7 @@
 void xa_update_window_with_archive_entries(XArchive *archive,XEntry *entry);
 XEntry* xa_find_entry_from_path(XEntry *root_entry,const gchar *fullpathname);
 gchar *xa_build_full_path_name_from_entry(XEntry *entry);
-void xa_fill_list_with_recursed_entries(XEntry *entry,GString 
**p_file_list,gchar *current_path,gboolean flag);
+void xa_fill_list_with_recursed_entries(XEntry *entry,GString 
**p_file_list,gchar *current_path);
 void xa_entries_to_filelist(XEntry *, GString **, gchar *);
 XArchive *archive[100];
 #endif

Modified: xarchiver/trunk/src/interface.c
===================================================================
--- xarchiver/trunk/src/interface.c     2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/interface.c     2008-06-25 12:55:43 UTC (rev 27148)
@@ -131,7 +131,7 @@
        menuitem2_menu = gtk_menu_new ();
        gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem2), menuitem2_menu);
 
-       addfile = gtk_image_menu_item_new_with_mnemonic (_("_Add"));
+       addfile = gtk_image_menu_item_new_with_mnemonic (_("Add"));
        gtk_widget_set_sensitive (addfile,FALSE);
        gtk_widget_show (addfile);
        gtk_container_add (GTK_CONTAINER (menuitem2_menu), addfile);
@@ -202,6 +202,10 @@
        gtk_container_add (GTK_CONTAINER (menuitem2_menu), select_all);
        gtk_widget_set_sensitive (select_all, FALSE);
        gtk_widget_add_accelerator (select_all, "activate",accel_group,GDK_a, 
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
+       
+       tmp_image = gtk_image_new_from_stock ("gtk-select-all", 
GTK_ICON_SIZE_MENU);
+       gtk_widget_show (tmp_image);
+       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (select_all), 
tmp_image);
 
        deselect_all = gtk_image_menu_item_new_with_mnemonic (_("Dese_lect 
All"));
        gtk_widget_show (deselect_all);
@@ -209,6 +213,11 @@
        gtk_widget_set_sensitive (deselect_all, FALSE);
        gtk_widget_add_accelerator (deselect_all, "activate",accel_group,GDK_l, 
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
 
+       select_pattern = gtk_image_menu_item_new_with_mnemonic (_("Select _by 
pattern"));
+       gtk_widget_show (select_pattern);
+       gtk_container_add (GTK_CONTAINER (menuitem2_menu), select_pattern);
+       gtk_widget_add_accelerator (select_pattern, 
"activate",accel_group,GDK_b, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
+
        separatormenuitem5 = gtk_separator_menu_item_new ();
        gtk_widget_show (separatormenuitem5);
        gtk_container_add (GTK_CONTAINER (menuitem2_menu), separatormenuitem5);
@@ -238,7 +247,7 @@
        prefs_menu = gtk_image_menu_item_new_with_mnemonic (_("_Preferences"));
        gtk_widget_show (prefs_menu);
        gtk_container_add (GTK_CONTAINER (menuitem2_menu), prefs_menu);
-       gtk_widget_add_accelerator (prefs_menu, "activate",accel_group,GDK_p, 
GDK_MOD1_MASK, GTK_ACCEL_VISIBLE);
+       gtk_widget_add_accelerator (prefs_menu, "activate",accel_group,GDK_f, 
GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
 
        tmp_image = gtk_image_new_from_stock ("gtk-preferences", 
GTK_ICON_SIZE_MENU);
        gtk_widget_show (tmp_image);
@@ -429,6 +438,7 @@
        g_signal_connect ((gpointer) view_shell_output1, "activate", G_CALLBACK 
(xa_show_cmd_line_output), NULL);
        g_signal_connect ((gpointer) select_all, "activate", G_CALLBACK 
(xa_select_all), NULL);
        g_signal_connect ((gpointer) deselect_all, "activate", G_CALLBACK 
(xa_deselect_all), NULL);
+       g_signal_connect ((gpointer) select_pattern, "activate", G_CALLBACK 
(xa_create_delete_dialog), NULL);
        g_signal_connect ((gpointer) password_entry, "activate", G_CALLBACK 
(xa_reset_password), NULL);
        g_signal_connect ((gpointer) prefs_menu, "activate", G_CALLBACK 
(xa_show_prefs_dialog), NULL);
        g_signal_connect ((gpointer) close1, "activate", G_CALLBACK 
(xa_close_archive), NULL);
@@ -748,7 +758,7 @@
        gtk_widget_show (image9);
        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (view), image9);
 
-       extract = gtk_image_menu_item_new_with_mnemonic (_("Extract"));
+       extract = gtk_image_menu_item_new_with_mnemonic (_("Extract..."));
        gtk_widget_show (extract);
        gtk_container_add (GTK_CONTAINER (xa_popup_menu),extract);
        
@@ -798,7 +808,7 @@
        gtk_widget_show (image10);
        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (ddelete), image10);
 
-       rename = gtk_image_menu_item_new_with_mnemonic (_("Rename"));
+       rename = gtk_image_menu_item_new_with_mnemonic (_("Rename..."));
        gtk_widget_show (rename);
        gtk_container_add (GTK_CONTAINER (xa_popup_menu), rename);
 
@@ -814,6 +824,87 @@
        g_signal_connect ((gpointer) rename, "activate",G_CALLBACK 
(on_xa_rename_activate),NULL);*/
 }
 
+void xa_create_delete_dialog(GtkMenuItem *menuitem, gpointer user_data)
+{
+       GtkWidget *ddialog1;
+       GtkWidget *ddialog_vbox1;
+       GtkWidget *dhbox1;
+       GtkWidget *pattern_label;
+       GtkWidget *pattern_entry;
+       GtkWidget *dialog_action_area1;
+       GtkWidget *cancelbutton1;
+       GtkWidget *okbutton1;
+       gchar *string = NULL;
+       gboolean done = FALSE;
+  
+       ddialog1 = gtk_dialog_new ();
+       gtk_window_set_title (GTK_WINDOW (ddialog1), _("Select by Pattern"));
+       gtk_window_set_modal (GTK_WINDOW (ddialog1), TRUE);
+       gtk_window_set_type_hint (GTK_WINDOW (ddialog1), 
GDK_WINDOW_TYPE_HINT_DIALOG);
+       gtk_widget_set_size_request(ddialog1,286,93);
+       gtk_window_set_transient_for (GTK_WINDOW (ddialog1),GTK_WINDOW 
(xa_main_window));
+       ddialog_vbox1 = GTK_DIALOG (ddialog1)->vbox;
+       gtk_widget_show (ddialog_vbox1);
+
+       dhbox1 = gtk_hbox_new (FALSE, 10);
+       gtk_widget_show (dhbox1);
+       gtk_box_pack_start (GTK_BOX (ddialog_vbox1), dhbox1, TRUE, TRUE, 0);
+       gtk_container_set_border_width (GTK_CONTAINER (dhbox1), 5);
+
+       pattern_label = gtk_label_new (_("Pattern:"));
+       gtk_widget_show (pattern_label);
+       gtk_box_pack_start (GTK_BOX (dhbox1), pattern_label, FALSE, FALSE, 0);
+
+       pattern_entry = gtk_entry_new ();
+       gtk_widget_show (pattern_entry);
+       gtk_box_pack_start (GTK_BOX (dhbox1), pattern_entry, TRUE, TRUE, 0);
+       gtk_entry_set_activates_default(GTK_ENTRY(pattern_entry), TRUE);
+
+       dialog_action_area1 = GTK_DIALOG (ddialog1)->action_area;
+       gtk_widget_show (dialog_action_area1);
+       gtk_button_box_set_layout (GTK_BUTTON_BOX 
(dialog_action_area1),GTK_BUTTONBOX_END);
+
+       cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
+       gtk_widget_show (cancelbutton1);
+       gtk_dialog_add_action_widget (GTK_DIALOG (ddialog1), 
cancelbutton1,GTK_RESPONSE_CANCEL);
+       GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
+
+       okbutton1 = gtk_button_new_with_mnemonic (_("Select"));
+       gtk_widget_show (okbutton1);
+       gtk_dialog_add_action_widget (GTK_DIALOG (ddialog1), 
okbutton1,GTK_RESPONSE_OK);
+       GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
+       gtk_dialog_set_default_response (GTK_DIALOG (ddialog1), 
GTK_RESPONSE_OK);
+       
+       while ( ! done )
+       {
+               switch (gtk_dialog_run (GTK_DIALOG(ddialog1)))
+               {
+                       case GTK_RESPONSE_CANCEL:
+                       case GTK_RESPONSE_DELETE_EVENT:
+                       done = TRUE;
+                       goto destroy_delete_dialog;
+                       break;
+
+                       case GTK_RESPONSE_OK:
+                       string = g_strdup 
(gtk_entry_get_text(GTK_ENTRY(pattern_entry)));
+                       if (strlen(string) == 0)
+                       {
+                               xa_deselect_all(NULL,NULL);
+                               done = TRUE;
+                               break;
+                       }
+                       done = TRUE;
+                       break;
+               }
+       }
+       //check and select the rows matching the pattern here
+       
+       g_free(string);
+
+destroy_delete_dialog:
+       gtk_widget_destroy (ddialog1);
+ }
+
 GtkWidget *create_archive_properties_window()
 {
        archive_properties_window = gtk_dialog_new_with_buttons (_("Archive 
Properties Window"),
@@ -996,7 +1087,8 @@
        gtk_widget_set_sensitive (exe_menu, sfx);
        gtk_widget_set_sensitive (check_menu, test);
        gtk_widget_set_sensitive (properties, info);
-       //gtk_widget_set_sensitive (select_all, select);
+       gtk_widget_set_sensitive (select_all, Close);
+       gtk_widget_set_sensitive (select_pattern, Close);
 }
 
 void xa_handle_navigation_buttons (GtkMenuItem *menuitem, gpointer user_data)

Modified: xarchiver/trunk/src/interface.h
===================================================================
--- xarchiver/trunk/src/interface.h     2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/interface.h     2008-06-25 12:55:43 UTC (rev 27148)
@@ -80,8 +80,7 @@
 GtkWidget *image1;
 GtkWidget *image2;
 GtkWidget *menuitem4;
-GtkWidget *select_all;
-GtkWidget *deselect_all;
+GtkWidget *select_all,*deselect_all,*select_pattern;
 GtkWidget *exe_menu;
 GtkWidget *menuitem4_menu;
 GtkWidget *about1;
@@ -126,11 +125,12 @@
 widget_data *xa_create_output_window(gchar *);
 void xa_create_main_window (GtkWidget *xa_main_window,gboolean show_location);
 GtkWidget *create_archive_properties_window();
+void xa_create_delete_dialog(GtkMenuItem *menuitem, gpointer user_data);
 void xa_handle_navigation_buttons (GtkMenuItem *menuitem, gpointer user_data);
 void xa_add_page (XArchive *archive);
 void xa_page_has_changed (GtkNotebook *notebook, GtkNotebookPage *page, guint 
page_num, gpointer user_data);
 void xa_close_page (GtkWidget *widget, gpointer data);
-void xa_set_button_state (gboolean New, gboolean Open,gboolean Close, gboolean 
add,gboolean extract, gboolean sfx, gboolean test, gboolean info);
+void xa_set_button_state (gboolean,gboolean,gboolean,gboolean,gboolean, 
gboolean, gboolean,gboolean);
 void xa_restore_navigation(int idx);
 #endif
 

Modified: xarchiver/trunk/src/tar.c
===================================================================
--- xarchiver/trunk/src/tar.c   2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/tar.c   2008-06-25 12:55:43 UTC (rev 27148)
@@ -369,7 +369,7 @@
                        gtk_tree_path_free (row_list->data);
 
                        if (entry->is_dir)
-                               xa_fill_list_with_recursed_entries(entry, 
&names,"",TRUE);
+                               xa_fill_list_with_recursed_entries(entry, 
&names,"");
                        else
                                g_string_prepend 
(names,xa_build_full_path_name_from_entry(entry));
 

Added: xarchiver/trunk/src/utf8-fnmatch.c
===================================================================
--- xarchiver/trunk/src/utf8-fnmatch.c                          (rev 0)
+++ xarchiver/trunk/src/utf8-fnmatch.c  2008-06-25 12:55:43 UTC (rev 27148)
@@ -0,0 +1,397 @@
+/*
+ *  Copyright (C) 2008 Giuseppe Torelli - <[EMAIL PROTECTED]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  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
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Copyright (c) 1989, 1993, 1994
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Guido van Rossum.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.6 1998/03/19 00:29:59 millert 
Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
+ * Compares a filename or pathname to a pattern.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <glib.h>
+#include "utf8-fnmatch.h"
+
+#undef EOS
+#define        EOS     '\0'
+
+#define        RANGE_MATCH     1
+#define        RANGE_NOMATCH   0
+#define        RANGE_ERROR     (-1)
+
+
+static int
+g_utf8_rangematch (const char  *pattern,
+                  gunichar     test,
+                  int          flags,
+                  char       **new_pattern)
+{
+       gboolean  negate, ok;
+       gunichar  c;
+
+       /*
+        * A bracket expression starting with an unquoted circumflex
+        * character produces unspecified results (IEEE 1003.2-1992,
+        * 3.13.2).  This implementation treats it like '!', for
+        * consistency with the regular expression syntax.
+        * J.T. Conklin ([EMAIL PROTECTED])
+        */
+       if ((negate = (g_utf8_get_char (pattern) == '!' || g_utf8_get_char 
(pattern) == '^')))
+               pattern = g_utf8_next_char (pattern);
+
+       if (flags & FNM_CASEFOLD)
+               test = g_unichar_tolower (test);
+
+       /*
+        * A right bracket shall lose its special meaning and represent
+        * itself in a bracket expression if it occurs first in the list.
+        * -- POSIX.2 2.8.3.2
+        */
+       ok = FALSE;
+
+       c = g_utf8_get_char (pattern);
+       pattern = g_utf8_next_char (pattern);
+
+       do {
+               gunichar c2;
+
+               if (c == '\\' && !(flags & FNM_NOESCAPE)) {
+                       c = g_utf8_get_char (pattern);
+                       pattern = g_utf8_next_char (pattern);
+               }
+
+               if (c == EOS)
+                       return (RANGE_ERROR);
+
+               if (c == '/' && (flags & FNM_PATHNAME))
+                       return (RANGE_NOMATCH);
+
+               if ((flags & FNM_CASEFOLD)) {
+                       c = g_unichar_tolower (c);
+               }
+
+               c2 = g_utf8_get_char (g_utf8_next_char (pattern));
+
+               if ((g_utf8_get_char (pattern) == '-') && (c2 != EOS) && (c2 != 
']')) {
+                       pattern = g_utf8_next_char (pattern);
+                       pattern = g_utf8_next_char (pattern);
+
+                       if (c2 == '\\' && !(flags & FNM_NOESCAPE)) {
+                               c2 = g_utf8_get_char (pattern);
+                               pattern = g_utf8_next_char (pattern);
+                       }
+
+                       if (c2 == EOS)
+                               return (RANGE_ERROR);
+
+                       if (flags & FNM_CASEFOLD) 
+                               c2 = g_unichar_tolower (c2);
+
+                       if (c <= test && test <= c2)
+                               ok = TRUE;
+
+               } else if (c == test)
+                       ok = TRUE;
+
+               c = g_utf8_get_char (pattern);
+               pattern = g_utf8_next_char (pattern);
+
+       } while (c != ']');
+               
+       *new_pattern = (char *) pattern;
+
+       return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH);
+}
+
+
+int
+g_utf8_fnmatch (const char *pattern, 
+               const char *string, 
+               int         flags)
+{
+       const char *stringstart;
+       char       *new_pattern;
+       gunichar    c, test;
+
+       for (stringstart = string;;) {
+               const char *string_1;
+               gunichar    c2;
+
+               c = g_utf8_get_char (pattern);
+               pattern = g_utf8_next_char (pattern);
+
+               switch (c) {
+               case EOS:
+                       if ((flags & FNM_LEADING_DIR) && g_utf8_get_char 
(string) == '/') 
+                               return 0;
+                       return (g_utf8_get_char (string) == EOS ? 0 : 
FNM_NOMATCH);
+
+               case '?':
+                       if (g_utf8_get_char (string) == EOS)
+                               return FNM_NOMATCH;
+
+                       if (g_utf8_get_char (string) == '/' && (flags & 
FNM_PATHNAME))
+                               return FNM_NOMATCH;
+
+                       string_1 = g_utf8_prev_char (string);
+                       if ((g_utf8_get_char (string) == '.') 
+                           && (flags & FNM_PERIOD) 
+                           && (string == stringstart ||
+                               ((flags & FNM_PATHNAME) && g_utf8_get_char 
(string_1) == '/')))
+                               return FNM_NOMATCH;
+                       string = g_utf8_next_char (string);
+                       break;
+
+               case '*':
+                       c = g_utf8_get_char (pattern);
+                       /* Collapse multiple stars. */
+                       while (c == '*') {
+                               pattern = g_utf8_next_char (pattern);
+                               c = g_utf8_get_char (pattern);
+                       }
+
+                       string_1 = g_utf8_prev_char (string);
+                       if ((g_utf8_get_char (string) == '.') 
+                           && (flags & FNM_PERIOD) 
+                           && (string == stringstart ||
+                               ((flags & FNM_PATHNAME) && g_utf8_get_char 
(string_1) == '/')))
+                               return FNM_NOMATCH;
+
+                       /* Optimize for pattern with * at end or before /. */
+                       if (c == EOS) {
+                               if (flags & FNM_PATHNAME)
+                                       return ((flags & FNM_LEADING_DIR) 
+                                               || (g_utf8_strchr (string, -1, 
'/') == NULL) ? 0 : FNM_NOMATCH);
+                               else
+                                       return 0;
+
+                       } else if (c == '/' && (flags & FNM_PATHNAME)) {
+                               if ((string = g_utf8_strchr (string, -1, '/')) 
== NULL)
+                                       return FNM_NOMATCH;
+                               break;
+                       }
+
+                       /* General case, use recursion. */
+                       while ((test = g_utf8_get_char (string)) != EOS) {
+                               if (! g_utf8_fnmatch (pattern, string, flags & 
~FNM_PERIOD))
+                                       return 0;
+                               if (test == '/' && (flags & FNM_PATHNAME))
+                                       break;
+                               string = g_utf8_next_char (string);
+                       }
+                       return FNM_NOMATCH;
+
+               case '[':
+                       if (g_utf8_get_char (string) == EOS)
+                               return FNM_NOMATCH;
+
+                       if (g_utf8_get_char (string) == '/' && (flags & 
FNM_PATHNAME))
+                               return FNM_NOMATCH;
+
+                       string_1 = g_utf8_prev_char (string);
+                       if ((g_utf8_get_char (string) == '.') 
+                           && (flags & FNM_PERIOD) 
+                           && (string == stringstart ||
+                               ((flags & FNM_PATHNAME) && g_utf8_get_char 
(string_1) == '/')))
+                               return FNM_NOMATCH;
+
+                       switch (g_utf8_rangematch (pattern, g_utf8_get_char 
(string), flags, &new_pattern)) {
+                       case RANGE_ERROR:
+                               /* not a good range, treat as normal text */
+                               goto normal;
+                       case RANGE_MATCH:
+                               pattern = new_pattern;
+                               break;
+                       case RANGE_NOMATCH:
+                               return FNM_NOMATCH;
+                       }
+                       string = g_utf8_next_char (string);
+                       break;
+
+               case '\\':
+                       if (!(flags & FNM_NOESCAPE)) {
+                               pattern = g_utf8_next_char (pattern);
+                               c = g_utf8_get_char (pattern);
+                               if (c == EOS) {
+                                       c = '\\';
+                                       pattern = g_utf8_prev_char (pattern);
+                               }
+                       }
+
+                       /* FALLTHROUGH */
+               default:
+               normal:
+                       c2 = g_utf8_get_char (string);
+
+                       if (flags & FNM_CASEFOLD) {
+                               c = g_unichar_tolower (c);
+                               c2 = g_unichar_tolower (c2);
+                       }
+
+                       if (c != c2)
+                               return FNM_NOMATCH;
+
+                       string = g_utf8_next_char (string);
+                       break;
+               }
+       }
+       /* NOTREACHED */
+}
+
+
+#ifdef UTF8_FN_MATCH_TEST
+
+
+static gboolean noisy = FALSE;
+
+
+static void
+verbose (const gchar *format, ...)
+{
+       gchar *msg;
+       va_list args;
+       
+       va_start (args, format);
+       msg = g_strdup_vprintf (format, args);
+       va_end (args);
+       
+       if (noisy)
+               g_print (msg);
+       g_free (msg);
+}
+
+
+static gboolean
+test_match (gchar *pattern,
+            gchar *string,
+            gboolean match)
+{
+       verbose ("matching \"%s\" against \"%s\" \t", string, pattern);
+       
+       if ((g_utf8_fnmatch (pattern, string, FNM_CASEFOLD) == 0) != match)
+               {
+                       g_print ("failed \t(unexpected %s)\n", (match ? 
"mismatch" : "match"));
+                       return FALSE;
+               }
+       
+       verbose ("passed (%s)\n", match ? "match" : "nomatch");
+       
+       return TRUE;
+}
+
+
+#define TEST_MATCH(pattern, string, match) {   \
+  total++;                     \
+  if (test_match (pattern, string, match)) \
+    passed++; \
+  else \
+    failed++; \
+}
+
+
+int main (int argc, gchar **argv) {
+       gint total = 0;
+       gint passed = 0;
+       gint failed = 0;
+       gint i;
+       
+       for (i = 1; i < argc; i++)
+               if (strcmp ("--noisy", argv[i]) == 0)
+                       noisy = TRUE;
+       
+       TEST_MATCH("*x", "x", TRUE);
+       TEST_MATCH("*x", "xx", TRUE);
+       TEST_MATCH("*x", "yyyx", TRUE);
+       TEST_MATCH("*x", "yyxy", FALSE);
+       TEST_MATCH("?x", "x", FALSE);
+       TEST_MATCH("?x", "xx", TRUE);
+       TEST_MATCH("?x", "yyyx", FALSE);
+       TEST_MATCH("?x", "yyxy", FALSE);
+       TEST_MATCH("*?x", "xx", TRUE);
+       TEST_MATCH("?*x", "xx", TRUE);
+       TEST_MATCH("*?x", "x", FALSE);
+       TEST_MATCH("?*x", "x", FALSE);
+       TEST_MATCH("*?*x", "yx", TRUE);
+       TEST_MATCH("*?*x", "xxxx", TRUE);
+       TEST_MATCH("x*??", "xyzw", TRUE);
+       TEST_MATCH("*x", "\xc3\x84x", TRUE);
+       TEST_MATCH("?x", "\xc3\x84x", TRUE);
+       TEST_MATCH("??x", "\xc3\x84x", FALSE);
+       TEST_MATCH("ab\xc3\xa4\xc3\xb6", "ab\xc3\xa4\xc3\xb6", TRUE);
+       TEST_MATCH("ab\xc3\xa4\xc3\xb6", "abao", FALSE);
+       TEST_MATCH("ab?\xc3\xb6", "ab\xc3\xa4\xc3\xb6", TRUE);
+       TEST_MATCH("ab?\xc3\xb6", "abao", FALSE);
+       TEST_MATCH("ab\xc3\xa4?", "ab\xc3\xa4\xc3\xb6", TRUE);
+       TEST_MATCH("ab\xc3\xa4?", "abao", FALSE);
+       TEST_MATCH("ab??", "ab\xc3\xa4\xc3\xb6", TRUE);
+       TEST_MATCH("ab*", "ab\xc3\xa4\xc3\xb6", TRUE);
+       TEST_MATCH("ab*\xc3\xb6", "ab\xc3\xa4\xc3\xb6", TRUE);
+       TEST_MATCH("ab*\xc3\xb6", "aba\xc3\xb6x\xc3\xb6", TRUE);
+       TEST_MATCH("*.o", "gtkcellrendererthreestates.o", TRUE);
+       TEST_MATCH("A*.o", "AA.o", TRUE);
+       TEST_MATCH("A*.o", "aaaa.o", TRUE);
+       TEST_MATCH("A*.o", "B.o", FALSE);
+
+       verbose ("\n%u tests passed, %u failed\n", passed, failed);
+        
+       return failed;
+}
+
+#endif
+

Added: xarchiver/trunk/src/utf8-fnmatch.h
===================================================================
--- xarchiver/trunk/src/utf8-fnmatch.h                          (rev 0)
+++ xarchiver/trunk/src/utf8-fnmatch.h  2008-06-25 12:55:43 UTC (rev 27148)
@@ -0,0 +1,71 @@
+/*
+ *  Copyright (C) 2008 Giuseppe Torelli - <[EMAIL PROTECTED]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  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
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+/*-
+ * Copyright (c) 1992, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)fnmatch.h   8.1 (Berkeley) 6/2/93
+
+ *     $OpenBSD: fnmatch.h,v 1.4 1997/09/22 05:25:32 millert Exp $
+ */
+
+#ifndef        _FNMATCH_H_
+#define        _FNMATCH_H_
+
+#define        FNM_NOMATCH     1       /* Match failed. */
+
+#define        FNM_NOESCAPE    0x01    /* Disable backslash escaping. */
+#define        FNM_PATHNAME    0x02    /* Slash must be matched by slash. */
+#define        FNM_PERIOD      0x04    /* Period must be matched by period. */
+#define        FNM_LEADING_DIR 0x08    /* Ignore /<tail> after Imatch. */
+#define        FNM_CASEFOLD    0x10    /* Case insensitive search. */
+#define        FNM_IGNORECASE  FNM_CASEFOLD
+#define        FNM_FILE_NAME   FNM_PATHNAME
+
+int     g_utf8_fnmatch (const char *pattern, const char *string, int flags);
+
+#endif /* !_FNMATCH_H_ */

Modified: xarchiver/trunk/src/window.c
===================================================================
--- xarchiver/trunk/src/window.c        2008-06-25 11:57:37 UTC (rev 27147)
+++ xarchiver/trunk/src/window.c        2008-06-25 12:55:43 UTC (rev 27148)
@@ -453,6 +453,7 @@
                gtk_widget_set_sensitive (properties,FALSE);
                gtk_widget_set_sensitive (up_button,FALSE);
                gtk_widget_set_sensitive (home_button,FALSE);
+               gtk_widget_set_sensitive (deselect_all,FALSE);
                xa_disable_delete_view_buttons (FALSE);
                xa_set_button_state (1,1,0,0,0,0,0,0);
                xa_set_window_title (xa_main_window,NULL);
@@ -527,16 +528,24 @@
                        gtk_tree_model_get 
(archive[id]->model,&iter,archive[id]->nc+1,&entry,-1);
                        gtk_tree_path_free (row_list->data);
                        if (entry->is_dir)
-                               xa_fill_list_with_recursed_entries(entry, 
&names,"",TRUE);
+                       {
+                               if (archive[id]->type == XARCHIVETYPE_TAR || 
is_tar_compressed(archive[id]->type))
+                                       goto one_file;
+                               else
+                                       
xa_fill_list_with_recursed_entries(entry, &names,"");
+                       }
                        else
+                       {
+                               one_file:
+                               g_string_prepend_c (names,' ');
                                g_string_prepend 
(names,xa_build_full_path_name_from_entry(entry));
+                       }
                        row_list = row_list->next;
                }
                g_list_free (row_list);
-               g_print (names->str);
        }
 
-       response = xa_show_message_dialog (GTK_WINDOW 
(xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,"You 
are about to delete %d file(s) from the archive.",_( "Are you sure you want to 
do this?") );
+       response = xa_show_message_dialog (GTK_WINDOW 
(xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,"You 
are about to delete entries from the archive.",_( "Are you sure you want to do 
this?") );
        if (response == GTK_RESPONSE_NO || response == 
GTK_RESPONSE_DELETE_EVENT)
                return;
 
@@ -843,7 +852,7 @@
                g_object_set (about,
                        "name",  "Xarchiver",
                        "version", PACKAGE_VERSION,
-                       "copyright", "Copyright \xC2\xA9 2005-2007 Giuseppe 
Torelli",
+                       "copyright", "Copyright \xC2\xA9 2005-2008 Giuseppe 
Torelli",
                        "comments", "A lightweight GTK+2 archive manager",
                        "authors", authors,
                        "documenters",documenters,

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

Reply via email to