Created method get_filesystem_software()

svn path=/trunk/; revision=965
This commit is contained in:
Curtis Gedak 2008-11-14 19:45:14 +00:00
parent 75a03f157f
commit 506c062274
3 changed files with 26 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2008-11-14 Curtis Gedak <gedakc@gmail.com>
* include/Utils.h,
src/Utils.cc: Created method get_filesystem_software().
* src/Win_GParted.cc: Moved menu entry
- "Gparted->Show Features" moved to "View->File System Support".

View File

@ -126,6 +126,7 @@ public:
static Glib::ustring get_color( FILESYSTEM filesystem ) ;
static Glib::RefPtr<Gdk::Pixbuf> get_color_as_pixbuf( FILESYSTEM filesystem, int width, int height ) ;
static Glib::ustring get_filesystem_string( FILESYSTEM filesystem ) ;
static Glib::ustring get_filesystem_software( FILESYSTEM filesystem ) ;
static Glib::ustring format_size( Sector size ) ;
static Glib::ustring format_time( std::time_t seconds ) ;
static double sector_to_unit( Sector sectors, SIZE_UNIT size_unit ) ;

View File

@ -133,6 +133,28 @@ Glib::ustring Utils::get_filesystem_string( FILESYSTEM filesystem )
}
}
Glib::ustring Utils::get_filesystem_software( FILESYSTEM filesystem )
{
switch( filesystem )
{
case FS_EXT2 : return "e2fsprogs" ;
case FS_EXT3 : return "e2fsprogs" ;
case FS_FAT16 : return "dosfstools, mtools" ;
case FS_FAT32 : return "dosfstools, mtools" ;
case FS_HFS : return "hfsutils" ;
case FS_HFSPLUS : return "hfsprogs" ;
case FS_JFS : return "jfsutils" ;
case FS_LINUX_SWAP : return "util-linux" ;
case FS_NTFS : return "ntfsprogs" ;
case FS_REISER4 : return "reiser4progs" ;
case FS_REISERFS : return "reiserfsprogs" ;
case FS_UFS : return "" ;
case FS_XFS : return "xfsprogs" ;
default : return "" ;
}
}
Glib::ustring Utils::format_size( Sector size )
{
std::stringstream ss ;