[gparted] prepare-for-gtk3: Replace deprecated GDK_<KeyName> constants (#7)



commit a44d548a3a7fb32a1aea3424bc4a0c232c3d403a
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Fri Aug 3 20:16:11 2018 +0200

    prepare-for-gtk3: Replace deprecated GDK_<KeyName> constants (#7)
    
    During the switch from Gtk2 to Gtk3 keyname constants were renamed from
    GDK_<KeyName> to GDK_KEY_<KeyName> [1].  This was done to avoid name
    clashes in gobject-introspection and language bindings.  The new
    constant names were also backported to Gtk 2.22 [2].
    
    Make use of the new constant names.
    
    References:
    [1] Migrating from GTK+ 2.x to GTK+ 3 - "Replace GDK_<keyname> with GDK_KEY_<keyname>"
        https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3.6
    
    [2] Commit - "gdk: Prefix keys with _KEY by default"
        https://gitlab.gnome.org/GNOME/gtk/commit/750c81f43dda6c783372b983e630ecd30b776d7e
    
    Closes #7 - Port to Gtk3

 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 ca994298..41a5bee4 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -185,7 +185,7 @@ void Win_GParted::init_menubar()
 
        menu ->items() .push_back( Gtk::Menu_Helpers::ImageMenuElem( 
                _("_Apply All Operations"),
-               Gtk::AccelKey(GDK_Return, Gdk::CONTROL_MASK),
+               Gtk::AccelKey(GDK_KEY_Return, Gdk::CONTROL_MASK),
                * manage( new Gtk::Image( Gtk::Stock::APPLY, Gtk::ICON_SIZE_MENU ) ), 
                sigc::mem_fun(*this, &Win_GParted::activate_apply) ) );
        menubar_main .items() .push_back( Gtk::Menu_Helpers::MenuElem( _("_Edit"), *menu ) );
@@ -330,14 +330,14 @@ void Win_GParted::init_partition_menu()
        menu_partition .items() .push_back( 
                        /*TO TRANSLATORS: "_New" is a sub menu item for the partition menu. */
                        Gtk::Menu_Helpers::ImageMenuElem( _("_New"),
-                                                         Gtk::AccelKey( GDK_Insert, Gdk::BUTTON1_MASK),
+                                                         Gtk::AccelKey(GDK_KEY_Insert, Gdk::BUTTON1_MASK),
                                                          *image,
                                                          sigc::mem_fun(*this, &Win_GParted::activate_new) ) 
);
        MENU_NEW = index++ ;
        
        menu_partition .items() .push_back( 
                        Gtk::Menu_Helpers::StockMenuElem( Gtk::Stock::DELETE, 
-                                                         Gtk::AccelKey( GDK_Delete, Gdk::BUTTON1_MASK ),
+                                                         Gtk::AccelKey(GDK_KEY_Delete, Gdk::BUTTON1_MASK),
                                                          sigc::mem_fun(*this, &Win_GParted::activate_delete) 
) );
        MENU_DEL = index++ ;
 


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