From 287a34ae0dfc23e4158f67cb7783d239f202c368 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 6 Mar 2009 03:56:38 +0000 Subject: * {ext,lib,test}/**/*.rb: removed trailing spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/json/lib/json/editor.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'ext/json/lib/json/editor.rb') diff --git a/ext/json/lib/json/editor.rb b/ext/json/lib/json/editor.rb index 12a7f94591..ad86fdb15e 100644 --- a/ext/json/lib/json/editor.rb +++ b/ext/json/lib/json/editor.rb @@ -48,14 +48,14 @@ module JSON # Opens an error dialog on top of _window_ showing the error message # _text_. def Editor.error_dialog(window, text) - dialog = MessageDialog.new(window, Dialog::MODAL, - MessageDialog::ERROR, + dialog = MessageDialog.new(window, Dialog::MODAL, + MessageDialog::ERROR, MessageDialog::BUTTONS_CLOSE, text) dialog.show_all dialog.run rescue TypeError - dialog = MessageDialog.new(Editor.window, Dialog::MODAL, - MessageDialog::ERROR, + dialog = MessageDialog.new(Editor.window, Dialog::MODAL, + MessageDialog::ERROR, MessageDialog::BUTTONS_CLOSE, text) dialog.show_all dialog.run @@ -67,8 +67,8 @@ module JSON # message _text_. If yes was answered _true_ is returned, otherwise # _false_. def Editor.question_dialog(window, text) - dialog = MessageDialog.new(window, Dialog::MODAL, - MessageDialog::QUESTION, + dialog = MessageDialog.new(window, Dialog::MODAL, + MessageDialog::QUESTION, MessageDialog::BUTTONS_YES_NO, text) dialog.show_all dialog.run do |response| @@ -465,7 +465,7 @@ module JSON add_separator add_item("Append new node", ?a, &method(:append_new_node)) add_item("Insert new node before", ?i, &method(:insert_new_node)) - add_separator + add_separator add_item("Collapse/Expand node (recursively)", ?e, &method(:collapse_expand)) @@ -504,7 +504,7 @@ module JSON # Revert the current JSON document in the editor to the saved version. def revert(item) window.instance_eval do - @filename and file_open(@filename) + @filename and file_open(@filename) end end @@ -666,7 +666,7 @@ module JSON collapse_all else self.expanded = true - expand_all + expand_all end end @@ -880,7 +880,7 @@ module JSON dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT @key = key_input.text type = ALL_TYPES[@type = type_input.active] @@ -932,7 +932,7 @@ module JSON dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT type = types[type_input.active] @content = case type @@ -973,7 +973,7 @@ module JSON dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT return @order = order_input.text, reverse_checkbox.active? end @@ -1008,7 +1008,7 @@ module JSON dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all self.focus = dialog - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT begin return Regexp.new(regex_input.text, icase_checkbox.active? ? Regexp::IGNORECASE : 0) @@ -1207,7 +1207,7 @@ module JSON end end - # Save the current file as the filename + # Save the current file as the filename def file_save_as filename = select_file('Save as a JSON file') store_file(filename) @@ -1233,7 +1233,7 @@ module JSON rescue SystemCallError => e Editor.error_dialog(self, "Failed to store JSON file: #{e}!") end - + # Load the file named _filename_ into the editor as a JSON document. def load_file(filename) if filename @@ -1326,7 +1326,7 @@ module JSON dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) dialog.show_all - dialog.run do |response| + dialog.run do |response| if response == Dialog::RESPONSE_ACCEPT return @location = location_input.text end -- cgit v1.2.3