lib/rabbit/logger/gui.rb in rabbit-2.1.2 vs lib/rabbit/logger/gui.rb in rabbit-2.1.3

- old
+ new

@@ -52,28 +52,25 @@ def log_prog_name(prog_name) if prog_name append("#{prog_name}: ", "prog_name") end end - + def log_message(message) - unless GLib.utf8_validate(message) - message = GLib.filename_to_utf8(message) - end append(message, "message") append("\n") end def append(text, *tags) iter = @buffer.get_iter_at_offset(-1) - @buffer.insert_with_tags(iter, text, *tags) + @buffer.insert_with_tags(iter, text.encode("UTF-8"), *tags) end def title _("Rabbit Error Dialog") end - + def init_dialog(width=@width, height=@height) flags = 0 buttons = [ [Gtk::Stock::CLEAR, Gtk::Dialog::RESPONSE_CANCEL], [Gtk::Stock::CLOSE, Gtk::Dialog::RESPONSE_CLOSE], @@ -91,11 +88,11 @@ @dialog.signal_connect("destroy") do |widget, event| exit if @current_severity >= FATAL true end end - + def set_dialog_response @dialog.signal_connect("response") do |widget, event| case event when Gtk::Dialog::RESPONSE_CANCEL clear_buffer @@ -110,10 +107,10 @@ @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 flags = Gtk::AccelFlags::VISIBLE Keys::QUIT_KEYS.each do |val|