Rename create_format_menu_add_item() parameter of type FSType (!52)

Closes !52 - Rename members and variables currently named 'filesystem'
This commit is contained in:
Mike Fleetwood 2019-06-13 10:50:10 +01:00
parent 2cbb867508
commit f53c462c06
2 changed files with 9 additions and 7 deletions

View File

@ -61,7 +61,7 @@ private:
void init_toolbar() ;
void init_partition_menu() ;
Gtk::Menu * create_format_menu() ;
void create_format_menu_add_item( FSType filesystem, bool activate );
void create_format_menu_add_item(FSType fstype, bool activate);
void init_device_info() ;
void init_hpaned_main() ;
void add_custom_css();

View File

@ -544,26 +544,28 @@ Gtk::Menu * Win_GParted::create_format_menu()
return menu ;
}
//Add one entry to the Partition --> Format to --> (file system list) menu
void Win_GParted::create_format_menu_add_item( FSType filesystem, bool activate )
void Win_GParted::create_format_menu_add_item(FSType fstype, bool activate)
{
hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
//the colored square
hbox ->pack_start( * manage( new Gtk::Image( Utils::get_color_as_pixbuf( filesystem, 16, 16 ) ) ),
Gtk::PACK_SHRINK ) ;
hbox->pack_start(*manage(new Gtk::Image(Utils::get_color_as_pixbuf(fstype, 16, 16))),
Gtk::PACK_SHRINK);
//the label...
hbox ->pack_start( * Utils::mk_label( " " + Utils::get_filesystem_string( filesystem ) ),
Gtk::PACK_SHRINK ) ;
hbox->pack_start(*Utils::mk_label(" " + Utils::get_filesystem_string(fstype)),
Gtk::PACK_SHRINK);
Gtk::MenuItem *item = manage(new Gtk::MenuItem(*hbox));
menu->append(*item);
if ( activate )
item->signal_activate().connect(
sigc::bind<FSType>( sigc::mem_fun( *this, &Win_GParted::activate_format ), filesystem ) );
sigc::bind<FSType>(sigc::mem_fun(*this, &Win_GParted::activate_format), fstype));
else
item->set_sensitive(false);
}
void Win_GParted::init_device_info()
{
vbox_info.set_orientation(Gtk::ORIENTATION_VERTICAL);