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



commit 6a80ca8f7d7b414a69127e0736c0dbf07d74d2d8
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Mon Aug 13 15:34:26 2018 +0200

    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

 src/Win_GParted.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 097b1349..c8dd0912 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -630,8 +630,8 @@ void Win_GParted::refresh_combo_devices()
                menu ->items() .back() .signal_activate() .connect( 
                        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() ;
        }


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