lib/jldrill/views/gtk/MainWindowView.rb in jldrill-0.5.1.7 vs lib/jldrill/views/gtk/MainWindowView.rb in jldrill-0.6.0.1

- old
+ new

@@ -1,9 +1,12 @@ +# encoding: utf-8 require 'Context/Gtk/Widget' require 'Context/Views/Gtk/Widgets/MainWindow' require 'Context/Views/Gtk/Widgets/VBox' require 'jldrill/contexts/MainContext' +require 'jldrill/views/gtk/widgets/Icon' +require 'jldrill/model/Config' require 'gtk2' module JLDrill::Gtk class MainWindowView < JLDrill::MainContext::MainWindowView @@ -11,19 +14,12 @@ attr_reader :icon, :mainWindow def initialize(context) super(context) @mainWindow = Context::Gtk::MainWindow.new("JLDrill", self) - # GTK+ on windows doesn't have SVG, so if this fails read the PNG - begin - @icon = Gdk::Pixbuf.new(File.join(JLDrill::Config::DATA_DIR, - "icon.svg")) - rescue - @icon = Gdk::Pixbuf.new(File.join(JLDrill::Config::DATA_DIR, - "icon.png")) - end - @mainWindow.icon_list=([@icon]) + @icon = Icon.new + @mainWindow.icon_list=([@icon.icon]) @mainWindow.set_default_size(600, 400) @vbox = Context::Gtk::VBox.new @mainWindow.addToThisWidget(@vbox) end @@ -37,7 +33,11 @@ end def emitDestroyEvent @mainWindow.signal_emit("destroy") end + + def showBusy(bool) + @mainWindow.showBusy(bool) + end end end