diff options
author | dakkar <dakkar@fcb26f47-9200-0410-b104-b98ab5b095f3> | 2005-11-24 09:53:42 +0000 |
---|---|---|
committer | dakkar <dakkar@fcb26f47-9200-0410-b104-b98ab5b095f3> | 2005-11-24 09:53:42 +0000 |
commit | 60ad0528e674a728e84753d35c30c6b0c0a9d160 (patch) | |
tree | 285d73499f43961b58ddddd338efd9208b440095 | |
parent | r803@narval2: dakkar | 2005-11-19 18:52:02 +0100 (diff) | |
download | GtkPerlFileManager-60ad0528e674a728e84753d35c30c6b0c0a9d160.tar.gz GtkPerlFileManager-60ad0528e674a728e84753d35c30c6b0c0a9d160.tar.bz2 GtkPerlFileManager-60ad0528e674a728e84753d35c30c6b0c0a9d160.zip |
r804@narval2: dakkar | 2005-11-20 12:05:55 +0100
aggiunto riconoscimento tipi file
git-svn-id: svn://luxion/repos/GtkPerlFileManager/trunk@49 fcb26f47-9200-0410-b104-b98ab5b095f3
-rw-r--r-- | lib/LDFM/MainController.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/LDFM/MainController.pm b/lib/LDFM/MainController.pm index 9a6756a..31b45da 100644 --- a/lib/LDFM/MainController.pm +++ b/lib/LDFM/MainController.pm @@ -7,6 +7,7 @@ use Gtk2::Ex::Simple::List; use LDFM::DialogController; use Readonly; use Path::Class; +use File::MMagic; our $VERSION = '0.01'; @@ -18,6 +19,9 @@ sub new { $self->{glade_dir}=$params{glade_dir}; + # inizializzo il sistema di riconoscimento tipi file + $self->{filetype}=File::MMagic->new('/usr/share/file/magic.mime'); + # cambio le liste con qualcosa di più comodo $self->simplify_list('left'); $self->simplify_list('right'); @@ -70,7 +74,7 @@ sub update_list_with_path { push @row,'DIR',0; } else { - push @row,'FILE',-s $item; + push @row,$self->{filetype}->checktype_filename($item),-s $item; } push @dir_list,[@row]; } |