From 853ed4533bbddf16c50ad12ed1db70fa252715fb Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sun, 27 Aug 2017 13:13:16 +0200 Subject: [PATCH] Fix GdkSettings-related deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/gtkutil.c (xg_initialize): Don’t set deprecated and ignored gtk-menu-bar-accel setting in new versions of GTK+. Use g_object_set instead of deprecated gtk_settngs_set_string_property otherwise. --- src/gtkutil.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index a2e9f266758..a2e322b1dac 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -5244,6 +5244,7 @@ xg_initialize (void) settings = gtk_settings_get_for_screen (gdk_display_get_default_screen (gdk_display_get_default ())); +#if ! GTK_CHECK_VERSION (3, 10, 0) /* Remove F10 as a menu accelerator, it does not mix well with Emacs key bindings. It doesn't seem to be any way to remove properties, so we set it to "" which in means "no key". */ @@ -5251,13 +5252,18 @@ xg_initialize (void) "gtk-menu-bar-accel", "", EMACS_CLASS); +#endif /* Make GTK text input widgets use Emacs style keybindings. This is Emacs after all. */ +#if GTK_CHECK_VERSION (3, 16, 0) + g_object_set (settings, "gtk-key-theme-name", "Emacs", NULL); +#else gtk_settings_set_string_property (settings, "gtk-key-theme-name", "Emacs", EMACS_CLASS); +#endif /* Make dialogs close on C-g. Since file dialog inherits from dialog, this works for them also. */ -- 2.39.2