Skip to content

Instantly share code, notes, and snippets.

@naota
Created June 14, 2014 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naota/301b70b7f87ebc818744 to your computer and use it in GitHub Desktop.
Save naota/301b70b7f87ebc818744 to your computer and use it in GitHub Desktop.
diff --git a/core/plugin/gtk/gtk.rb b/core/plugin/gtk/gtk.rb
index 9c1d4e1..34d57ac 100644
--- a/core/plugin/gtk/gtk.rb
+++ b/core/plugin/gtk/gtk.rb
@@ -311,7 +311,10 @@ Plugin.create :gtk do
on_gui_contextmenu do |event, contextmenu|
widget = widgetof(event.widget)
if widget
- ::Gtk::ContextMenu.new(*contextmenu).popup(widget, event) end end
+ menu = ::Gtk::ContextMenu.new(*contextmenu).popup(widget, event)
+ menu.signal_connect(:hide) { |this|
+ this.destroy }
+ end end
on_gui_timeline_clear do |i_timeline|
timeline = widgetof(i_timeline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment