lib/rabbit/logger/gui.rb in rabbit-2.1.6 vs lib/rabbit/logger/gui.rb in rabbit-2.1.7

- old
+ new

@@ -76,19 +76,19 @@ [Gtk::Stock::CLOSE, Gtk::Dialog::RESPONSE_CLOSE], ] @dialog = Gtk::Dialog.new(title, nil, flags, *buttons) @dialog.vbox.add(init_buffer) @dialog.set_default_size(width, height) + @dialog.title = title set_dialog_delete set_dialog_response - set_dialog_expose_event set_dialog_accel_group end def set_dialog_delete @dialog.signal_connect("destroy") do |widget, event| - exit if @current_severity >= FATAL + exit if @current_severity >= Severity::FATAL true end end def set_dialog_response @@ -101,19 +101,12 @@ end true end end - def set_dialog_expose_event - @dialog.signal_connect("expose_event") do |widget, event| - @dialog.title = title - false - end - end - def set_dialog_accel_group accel_group = Gtk::AccelGroup.new - mod = Gdk::Window::ModifierType.new + mod = Gdk::ModifierType.new flags = Gtk::AccelFlags::VISIBLE Keys::QUIT_KEYS.each do |val| accel_group.connect(val, mod, flags) do @dialog.signal_emit("response", Gtk::Dialog::RESPONSE_CLOSE) true