def on_fontsize_spin_button_grab_focus( # pylint: disable=no-self-use
self, spin_button):
'''
Signal handler called when the spin button to change
the font size grabs focus
:param spin_button: The spin button to change the font size
:type spin_button: Gtk.SpinButton object
'''
if _ARGS.debug:
sys.stdout.write(
'on_fontsize_spin_button_grab_focus() spin_button = %s\n'
%repr(spin_button))
spin_button.grab_focus_without_selecting()
# The default signal handler would again select the contents
# of the search entry. Therefore, we must prevent the default
# signal handler from running:
GObject.signal_stop_emission_by_name(spin_button, 'grab-focus')
return True
评论列表
文章目录