modern-gtk2: Use Gtk::MenuItem::unset_submenu() (!17)

Gtk::MenuItem::remove_submenu() was deprecated in gtkmm 2.12.  Replace
with Gtk::MenuItem::unset_submenu() introduced in gtkmm 2.22.

References:
https://developer.gnome.org/gtkmm/2.24/classGtk_1_1MenuItem.html
https://gitlab.gnome.org/GNOME/gtkmm/blob/2.22.0/NEWS#L24

Closes !17 - Gtk2 modernisation
This commit is contained in:
Luca Bacci 2018-08-13 15:34:26 +02:00 committed by Mike Fleetwood
parent 511d597188
commit 6a80ca8f7d
1 changed files with 3 additions and 3 deletions

View File

@ -631,7 +631,7 @@ void Win_GParted::refresh_combo_devices()
sigc::bind<unsigned int>( sigc::mem_fun(*this, &Win_GParted::radio_devices_changed), i ) ) ;
}
menubar_main .items()[ 0 ] .get_submenu() ->items()[ 1 ] .remove_submenu() ;
menubar_main.items()[0].get_submenu()->items()[1].unset_submenu();
if ( menu ->items() .size() )
{
@ -1582,7 +1582,7 @@ void Win_GParted::menu_gparted_features()
dialog.load_filesystems( show_fs_actions );
//recreate format menu...
menu_partition .items()[ MENU_FORMAT ] .remove_submenu() ;
menu_partition.items()[MENU_FORMAT].unset_submenu();
menu_partition .items()[ MENU_FORMAT ] .set_submenu( * create_format_menu() ) ;
menu_partition .items()[ MENU_FORMAT ] .get_submenu() ->show_all_children() ;
}