Howdy!
I was playing around with CheckMenuItem and thought a quick feature
would be to toggle my tooltips. Well my understanding of the
Gtk::Tooltips class is incomplete as I can’t get it to disable the
tooltips. Here’s some code that demonstrates:
#!/usr/bin/env ruby
The following code demonstrates that the Gtk::Tooltips.disable
does not function as documented on the wiki. The tooltips are
always available on the buttons even after executing
tooltips.disable
require ‘gtk2’
Gtk.init
window = Gtk::Window.new ‘testing tooltip enable/disable’
window.signal_connect(‘destroy’) { Gtk.main_quit }
window.signal_connect(‘delete_event’) { false }
hbox = Gtk::HBox.new
enable_button = Gtk::Button.new ‘Enable Tooltips’
disable_button = Gtk::Button.new ‘Disable Tooltips’
tooltips = Gtk::Tooltips.new
tooltips.set_tip enable_button, ‘Press to enable tooltips’, ‘’
tooltips.set_tip disable_button, ‘Press to disable tooltips’, ‘’
tooltips.disable
enable_button.signal_connect(‘clicked’) { puts ‘enable’ ;
tooltips.enable }
disable_button.signal_connect(‘clicked’) { puts ‘disable’ ;
tooltips.disable }
hbox.add enable_button
hbox.add disable_button
window.add hbox
window.show_all
Gtk.main
Any ideas on the correct way to disable tooltips? Or is this a bug or a
feature change?
Thank you,
Roy