[gparted] Replace Win_GParted::hbox member with local variables



commit 25b7382d034778a5b08896152653cca2eb19e95b
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Fri Jan 3 10:57:20 2020 +0000

    Replace Win_GParted::hbox member with local variables
    
    hbox is a very generic name for a member variable and used as a local
    variable in two methods.  Change to local variables instead.

 include/Win_GParted.h | 1 -
 src/Win_GParted.cc    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/include/Win_GParted.h b/include/Win_GParted.h
index c7dad7e7..40a25599 100644
--- a/include/Win_GParted.h
+++ b/include/Win_GParted.h
@@ -220,7 +220,6 @@ private:
        Gtk::Box vbox_main;
        Gtk::Box vbox_info;
        Gtk::Box hbox_toolbar;
-       Gtk::Box *hbox;
        Gtk::Toolbar toolbar_main;
        Gtk::MenuBar menubar_main;
        Gtk::ComboBox combo_devices ;
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 08d3cab3..98fa9498 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -548,7 +548,7 @@ Gtk::Menu * Win_GParted::create_format_menu()
 //Add one entry to the Partition --> Format to --> (file system list) menu
 void Win_GParted::create_format_menu_add_item(FSType fstype, bool activate)
 {
-       hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
+       Gtk::Box *hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
        //the colored square
        hbox->pack_start(*manage(new Gtk::Image(Utils::get_color_as_pixbuf(fstype, 16, 16))),
                         Gtk::PACK_SHRINK);
@@ -730,7 +730,7 @@ void Win_GParted::refresh_combo_devices()
                treerow[ treeview_devices_columns .size ] = "(" + Utils::format_size( devices[ i ] .length, 
devices[ i ] .sector_size ) + ")" ; 
 
                // Devices submenu...
-               hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
+               Gtk::Box *hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
                hbox ->pack_start( * Utils::mk_label( devices[ i ] .get_path() ), Gtk::PACK_EXPAND_WIDGET ) ;
                hbox ->pack_start( * Utils::mk_label( "   (" + Utils::format_size( devices[ i ] .length, 
devices[ i ] .sector_size ) + ")" ),
                                   Gtk::PACK_SHRINK ) ;


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