From: Philipp Stephani Date: Sun, 27 Aug 2017 11:13:16 +0000 (+0200) Subject: Fix GdkSettings-related deprecation warnings X-Git-Tag: emacs-26.0.90~333 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=853ed4533bbddf16c50ad12ed1db70fa252715fb;p=emacs.git Fix GdkSettings-related deprecation warnings * 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. --- 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. */