[gparted] Rename Utils method parameters of type FSType (!52)



commit c85fc66dcffcf6f41be99d84ac7f527041ed6c67
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Thu Jun 13 10:41:34 2019 +0100

    Rename Utils method parameters of type FSType (!52)
    
    Closes !52 - Rename members and variables currently named 'filesystem'

 include/Utils.h | 10 +++++-----
 src/Utils.cc    | 24 ++++++++++++++----------
 2 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/include/Utils.h b/include/Utils.h
index 569f3f79..eeb9cb3c 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -137,15 +137,15 @@ public:
                                                   Gtk::IconSize icon_size);
        static Glib::ustring get_stock_label(const Gtk::StockID& stock_id);
        static Glib::ustring num_to_str( Sector number ) ;
-       static Glib::ustring get_color( FSType filesystem );
-       static Glib::RefPtr<Gdk::Pixbuf> get_color_as_pixbuf( FSType filesystem, int width, int height );
+       static Glib::ustring get_color(FSType fstype);
+       static Glib::RefPtr<Gdk::Pixbuf> get_color_as_pixbuf(FSType fstype, int width, int height);
        static int get_max_partition_name_length( Glib::ustring & tabletype );
-       static int get_filesystem_label_maxlength( FSType filesystem );
-       static Glib::ustring get_filesystem_string( FSType filesystem );
+       static int get_filesystem_label_maxlength(FSType fstype);
+       static Glib::ustring get_filesystem_string(FSType fstype);
        static const Glib::ustring get_encrypted_string();
        static const Glib::ustring get_filesystem_string( bool encrypted, FSType fstype );
        static const Glib::ustring get_filesystem_kernel_name( FSType fstype );
-       static Glib::ustring get_filesystem_software( FSType filesystem );
+       static Glib::ustring get_filesystem_software(FSType fstype);
        static bool kernel_supports_fs( const Glib::ustring & fs ) ;
        static bool kernel_version_at_least( int major_ver, int minor_ver, int patch_ver ) ;
        static Glib::ustring format_size( Sector sectors, Byte_Value sector_size ) ;
diff --git a/src/Utils.cc b/src/Utils.cc
index 5389cc89..0e4fa389 100644
--- a/src/Utils.cc
+++ b/src/Utils.cc
@@ -145,9 +145,9 @@ Glib::ustring Utils::num_to_str( Sector number )
 // [*] Colour not from the GNOME palette.
 //     http://developer.gnome.org/hig-book/2.32/design-color.html.en
 //     
http://web.archive.org/web/20130922173112/https://developer.gnome.org/hig-book/stable/design-color.html.en
-Glib::ustring Utils::get_color( FSType filesystem )
+Glib::ustring Utils::get_color(FSType fstype)
 {
-       switch( filesystem )
+       switch (fstype)
        {
                case FS_UNSUPPORTED:     return "#000000";  // Black (never displayed)
                case FS_UNALLOCATED:     return "#A9A9A9";  // Medium Grey [*]
@@ -193,13 +193,14 @@ Glib::ustring Utils::get_color( FSType filesystem )
        }
 }
 
-Glib::RefPtr<Gdk::Pixbuf> Utils::get_color_as_pixbuf( FSType filesystem, int width, int height )
+
+Glib::RefPtr<Gdk::Pixbuf> Utils::get_color_as_pixbuf(FSType fstype, int width, int height)
 {
        Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create( Gdk::COLORSPACE_RGB, false, 8, width, height 
) ;
 
        if ( pixbuf )
        {
-               std::stringstream hex( get_color( filesystem ) .substr( 1 ) + "00" ) ;
+               std::stringstream hex(get_color(fstype).substr(1) + "00");
                unsigned long dec ;
                hex >> std::hex >> dec ;
 
@@ -252,9 +253,10 @@ int Utils::get_max_partition_name_length( Glib::ustring & tabletype )
        return 0;
 }
 
-int Utils::get_filesystem_label_maxlength( FSType filesystem )
+
+int Utils::get_filesystem_label_maxlength(FSType fstype)
 {
-       switch( filesystem )
+       switch (fstype)
        {
                //All file systems commented out are not supported for labelling
                //  by either the new partition or label partition operations.
@@ -304,10 +306,11 @@ int Utils::get_filesystem_label_maxlength( FSType filesystem )
        }
 }
 
+
 // Return libparted file system name / GParted display name
-Glib::ustring Utils::get_filesystem_string( FSType filesystem )
+Glib::ustring Utils::get_filesystem_string(FSType fstype)
 {
-       switch( filesystem )
+       switch (fstype)
        {
                case FS_UNSUPPORTED:     return "unsupported";  // Never displayed
                case FS_UNALLOCATED:
@@ -424,9 +427,10 @@ const Glib::ustring Utils::get_filesystem_kernel_name( FSType fstype )
        }
 }
 
-Glib::ustring Utils::get_filesystem_software( FSType filesystem )
+
+Glib::ustring Utils::get_filesystem_software(FSType fstype)
 {
-       switch( filesystem )
+       switch (fstype)
        {
                case FS_BTRFS       : return "btrfs-progs / btrfs-tools" ;
                case FS_EXT2        : return "e2fsprogs" ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]