diff options
| author | Philipp Stephani | 2017-08-27 13:13:16 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-08-27 15:00:18 +0200 |
| commit | 853ed4533bbddf16c50ad12ed1db70fa252715fb (patch) | |
| tree | 44418d41f0b6084f7c7be114a78862028b2bb4ae | |
| parent | fe49aa17d505f13926eac2212b89effec9bd3c98 (diff) | |
| download | emacs-853ed4533bbddf16c50ad12ed1db70fa252715fb.tar.gz emacs-853ed4533bbddf16c50ad12ed1db70fa252715fb.zip | |
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.
| -rw-r--r-- | src/gtkutil.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
| 5244 | 5244 | ||
| 5245 | settings = gtk_settings_get_for_screen (gdk_display_get_default_screen | 5245 | settings = gtk_settings_get_for_screen (gdk_display_get_default_screen |
| 5246 | (gdk_display_get_default ())); | 5246 | (gdk_display_get_default ())); |
| 5247 | #if ! GTK_CHECK_VERSION (3, 10, 0) | ||
| 5247 | /* Remove F10 as a menu accelerator, it does not mix well with Emacs key | 5248 | /* Remove F10 as a menu accelerator, it does not mix well with Emacs key |
| 5248 | bindings. It doesn't seem to be any way to remove properties, | 5249 | bindings. It doesn't seem to be any way to remove properties, |
| 5249 | so we set it to "" which in means "no key". */ | 5250 | so we set it to "" which in means "no key". */ |
| @@ -5251,13 +5252,18 @@ xg_initialize (void) | |||
| 5251 | "gtk-menu-bar-accel", | 5252 | "gtk-menu-bar-accel", |
| 5252 | "", | 5253 | "", |
| 5253 | EMACS_CLASS); | 5254 | EMACS_CLASS); |
| 5255 | #endif | ||
| 5254 | 5256 | ||
| 5255 | /* Make GTK text input widgets use Emacs style keybindings. This is | 5257 | /* Make GTK text input widgets use Emacs style keybindings. This is |
| 5256 | Emacs after all. */ | 5258 | Emacs after all. */ |
| 5259 | #if GTK_CHECK_VERSION (3, 16, 0) | ||
| 5260 | g_object_set (settings, "gtk-key-theme-name", "Emacs", NULL); | ||
| 5261 | #else | ||
| 5257 | gtk_settings_set_string_property (settings, | 5262 | gtk_settings_set_string_property (settings, |
| 5258 | "gtk-key-theme-name", | 5263 | "gtk-key-theme-name", |
| 5259 | "Emacs", | 5264 | "Emacs", |
| 5260 | EMACS_CLASS); | 5265 | EMACS_CLASS); |
| 5266 | #endif | ||
| 5261 | 5267 | ||
| 5262 | /* Make dialogs close on C-g. Since file dialog inherits from | 5268 | /* Make dialogs close on C-g. Since file dialog inherits from |
| 5263 | dialog, this works for them also. */ | 5269 | dialog, this works for them also. */ |