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"
    750c81f43d

Closes #7 - Port to Gtk3
This commit is contained in:
Luca Bacci 2018-08-03 20:16:11 +02:00 committed by Mike Fleetwood
parent 38d9d92013
commit a44d548a3a
1 changed files with 3 additions and 3 deletions

View File

@ -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++ ;