Fix: Warning: The property GtkSettings:gtk-show-unicode-menu is deprecated
and shouldn't be used anymore
This commit is contained in:
parent
84055c01dc
commit
e6d35b8cbd
@ -203,6 +203,8 @@ class StyledTextEditor(Gtk.TextView):
|
|||||||
|
|
||||||
# we want to disable the unicode menu in the popup
|
# we want to disable the unicode menu in the popup
|
||||||
settings = Gtk.Settings.get_default()
|
settings = Gtk.Settings.get_default()
|
||||||
|
# 'gtk-show-unicode-menu' is deprecated since Gtk-3.10
|
||||||
|
if Gtk.get_minor_version() < 10:
|
||||||
try:
|
try:
|
||||||
self.show_unicode = settings.get_property('gtk-show-unicode-menu')
|
self.show_unicode = settings.get_property('gtk-show-unicode-menu')
|
||||||
settings.set_property('gtk-show-unicode-menu', False)
|
settings.set_property('gtk-show-unicode-menu', False)
|
||||||
@ -252,6 +254,8 @@ class StyledTextEditor(Gtk.TextView):
|
|||||||
|
|
||||||
Set the default Gtk settings back before leaving.
|
Set the default Gtk settings back before leaving.
|
||||||
"""
|
"""
|
||||||
|
# 'gtk-show-unicode-menu' is deprecated since Gtk-3.10
|
||||||
|
if Gtk.get_minor_version() < 10:
|
||||||
try:
|
try:
|
||||||
settings = Gtk.Settings.get_default()
|
settings = Gtk.Settings.get_default()
|
||||||
settings.set_property('gtk-show-unicode-menu', self.show_unicode)
|
settings.set_property('gtk-show-unicode-menu', self.show_unicode)
|
||||||
|
Loading…
Reference in New Issue
Block a user