diff --git core/plugin/openimg/openimg.rb core/plugin/openimg/openimg.rb index 0414098..e32f763 100644 --- core/plugin/openimg/openimg.rb +++ core/plugin/openimg/openimg.rb @@ -90,6 +90,7 @@ Plugin.create :openimg do w_wrap = ::Gtk::DrawingArea.new w_toolbar = ::Gtk::Toolbar.new w_browser = ::Gtk::ToolButton.new(Gtk::Image.new(Gdk::Pixbuf.new(Skin.get('forward.png'), 24, 24))) + w_close_button = ::Gtk::ToolButton.new(Gtk::Image.new(Gdk::Pixbuf.new(Skin.get('close.png'), 24, 24))) window.ssc(:destroy, &:destroy) last_size = nil @@ -104,8 +105,12 @@ Plugin.create :openimg do w_browser.ssc(:clicked) do Gtk.openurl(display_url) false end + w_close_button.ssc(:clicked) do + window.destroy + false end w_toolbar.insert(0, w_browser) + w_toolbar.insert(0, w_close_button) window.add(Gtk::VBox.new.closeup(w_toolbar).add(w_wrap)) notice 'loading thread generate' Thread.new {