[gparted] Remove unused text_color argument from Utils::mk_label() method



commit e075ab006ee51a70aeed66a161b2b15371b396da
Author: Curtis Gedak <gedakc gmail com>
Date:   Sat Apr 26 14:06:18 2014 -0600

    Remove unused text_color argument from Utils::mk_label() method
    
    None of the current GParted code uses the text_color argument for
    Utils::mk_label().  Remove unused argument to simplify code.

 include/Utils.h |   10 +++++-----
 src/Utils.cc    |   16 +++++-----------
 2 files changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/include/Utils.h b/include/Utils.h
index 818d7d8..1433361 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -158,11 +158,11 @@ class Utils
 {
 public:
        static Sector round( double double_value ) ;
-       static Gtk::Label * mk_label( const Glib::ustring & text,
-                                     bool use_markup = true,
-                                     bool wrap = false,
-                                     bool selectable = false,
-                                     const Glib::ustring & text_color = "black" ) ;
+       static Gtk::Label * mk_label( const Glib::ustring & text
+                                   , bool use_markup = true
+                                   , bool wrap = false
+                                   , bool selectable = false
+                                   ) ;
        static Glib::ustring num_to_str( Sector number ) ;
        static Glib::ustring get_color( FILESYSTEM filesystem ) ;
        static Glib::RefPtr<Gdk::Pixbuf> get_color_as_pixbuf( FILESYSTEM filesystem, int width, int height ) ;
diff --git a/src/Utils.cc b/src/Utils.cc
index 693b067..50e053d 100644
--- a/src/Utils.cc
+++ b/src/Utils.cc
@@ -42,11 +42,11 @@ Sector Utils::round( double double_value )
         return static_cast<Sector>( double_value + 0.5 ) ;
 }
 
-Gtk::Label * Utils::mk_label( const Glib::ustring & text,
-                             bool use_markup,
-                             bool wrap,
-                             bool selectable,
-                             const Glib::ustring & text_color )
+Gtk::Label * Utils::mk_label( const Glib::ustring & text
+                            , bool use_markup
+                            , bool wrap
+                            , bool selectable
+                            )
 {
        //xalign 0.0 == Gtk::ALIGN_LEFT  (gtkmm <= 2.22)
        //           == Gtk::ALIGN_START (gtkmm >= 2.24)
@@ -57,12 +57,6 @@ Gtk::Label * Utils::mk_label( const Glib::ustring & text,
        label ->set_line_wrap( wrap ) ;
        label ->set_selectable( selectable ) ;
 
-       if ( text_color != "black" )
-       {
-               Gdk::Color color( text_color ) ;
-               label ->modify_fg( label ->get_state(), color ) ;
-       }
-
        return label ;
 }
 


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