プロジェクト

全般

プロフィール

機能 #612 » 0001-role-window-icon-Proc.patch

developに対するformat-patch - Satoshi Okuno, 2013-09-14 01:14

差分を表示:

core/plugin/gtk/toolbar_generator.rb
face = command[:show_face] || command[:name] || command[:slug].to_s
name = if defined? face.call then lambda{ |x| face.call(event) } else face end
toolitem = ::Gtk::Button.new
toolitem.add(::Gtk::WebIcon.new(command[:icon], 16, 16))
icon = nil
if command[:icon].is_a?(Proc)
icon = command[:icon].call(*[nil, container][0, (command[:icon].arity == -1 ? 1 : command[:icon].arity)])
else
icon = command[:icon]
end
toolitem.add(::Gtk::WebIcon.new(icon, 16, 16))
toolitem.tooltip(name)
toolitem.relief = ::Gtk::RELIEF_NONE
toolitem.ssc(:clicked){
    (1-1/1)