lib/Context/Views/Gtk/PageView.rb in context-0.0.16 vs lib/Context/Views/Gtk/PageView.rb in context-0.0.22

- old
+ new

@@ -1,47 +1,27 @@ require 'Context/Views/PageView' -require 'Context/Gtk/Key' require 'Context/Gtk/Widget' +require 'Context/Views/Gtk/Widgets/MainWindow' require 'gtk2' module Context::Gtk class PageView < Context::PageView - class MainWindow < Gtk::Window - def initialize(title, view) - super(title) - @view = view - connectSignals unless @view.nil? - end - - def connectSignals - signal_connect('destroy') do - closeView - end - end - - def closeView - @view.close - end - end - attr_reader :mainWindow def initialize(context, title="No Title") super(context) @mainWindow = MainWindow.new(title, self) @mainWindow.set_default_size(600, 400) - @widget = Context::Gtk::Widget.new(@mainWindow) end def open - @mainWindow.show_all - @mainWindow.grab_focus + @mainWindow.open end def getWidget - @widget + @mainWindow end def emitDestroyEvent @mainWindow.signal_emit("destroy") end