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,12 +203,14 @@ 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()
|
||||||
try:
|
# 'gtk-show-unicode-menu' is deprecated since Gtk-3.10
|
||||||
self.show_unicode = settings.get_property('gtk-show-unicode-menu')
|
if Gtk.get_minor_version() < 10:
|
||||||
settings.set_property('gtk-show-unicode-menu', False)
|
try:
|
||||||
except:
|
self.show_unicode = settings.get_property('gtk-show-unicode-menu')
|
||||||
#GTK wants to deprecate show-unicode-menu, this prepares for this
|
settings.set_property('gtk-show-unicode-menu', False)
|
||||||
self.show_unicode = False
|
except:
|
||||||
|
#GTK wants to deprecate show-unicode-menu, this prepares for this
|
||||||
|
self.show_unicode = False
|
||||||
|
|
||||||
# variable to not copy to clipboard on double/triple click
|
# variable to not copy to clipboard on double/triple click
|
||||||
self.selclick = False
|
self.selclick = False
|
||||||
@ -252,12 +254,14 @@ class StyledTextEditor(Gtk.TextView):
|
|||||||
|
|
||||||
Set the default Gtk settings back before leaving.
|
Set the default Gtk settings back before leaving.
|
||||||
"""
|
"""
|
||||||
try:
|
# 'gtk-show-unicode-menu' is deprecated since Gtk-3.10
|
||||||
settings = Gtk.Settings.get_default()
|
if Gtk.get_minor_version() < 10:
|
||||||
settings.set_property('gtk-show-unicode-menu', self.show_unicode)
|
try:
|
||||||
except:
|
settings = Gtk.Settings.get_default()
|
||||||
#GTK wants to deprecate show-unicode-menu, this prepares for this
|
settings.set_property('gtk-show-unicode-menu', self.show_unicode)
|
||||||
pass
|
except:
|
||||||
|
#GTK wants to deprecate show-unicode-menu, this prepares for this
|
||||||
|
pass
|
||||||
|
|
||||||
def on_key_press_event(self, widget, event):
|
def on_key_press_event(self, widget, event):
|
||||||
"""Signal handler.
|
"""Signal handler.
|
||||||
|
Loading…
Reference in New Issue
Block a user