Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: stcrocco/ruber
base: 9d16959cd2
...
head fork: stcrocco/ruber
compare: 1bb5a3df8a
  • 2 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
3  CHANGES
@@ -6,7 +6,8 @@ h3. Features
* Added a RI plugin. You can now insert the class or method name in the RI tool widget
and see the documentation in a nice HTML format inside the tool widget itself.
- This plugin requires RDoc version 3.x (maybe version 2.x will also work).
+ This plugin requires RDoc version 3.x (it isn't tested with version 2.x).
+* Added an IRB plugin
* The syntax checker plugin has been rewritten. Now other plugins can check the
syntax of a document
* Ruby and YAML syntax checker now are in their own plugin, rather than being part
View
4 TODO
@@ -121,10 +121,6 @@ h3. Quick Open File
h3. Quick open method/class plugin
-h3. ri plugin
-
-h3. irb plugin
-
h3. Konsole plugin
h3. File system browser plugin
View
1  lib/ruber/output_widget.rb
@@ -759,6 +759,7 @@ def maybe_open_file idx
ed = Ruber[:main_window].display_document file, display_hints
hide_tool = pinned_down? and Qt::Application.mouse_buttons != Qt::MidButton
Ruber[:main_window].hide_tool self if hide_tool
+ ed.set_focus if ed
ed
end
View
48 lib/ruber/settings_dialog.rb
@@ -51,34 +51,34 @@ module Ruber
a <tt>read_settings</tt>, a <tt>store_settings</tt> and a <tt>read_default_settings</tt>
method in your widget class like this:
- class MyWidget < Qt::Widget
+bc.. class MyWidget < Qt::Widget
- def initialize parent = nil
- super
- @default_dir_widget = KDE::LineEdit.new self
- @default_file_widget = KDE::LineEdit.new self
- end
-
- def read_settings
- path = @settings_dialog.settings_container[:general, :default_path]
- @default_dir_widget.text = File.dirname(path)
- @default_file_widget.text = File.basename(path)
- end
-
- def store_settings
- path = File.join @default_dir_widget.text, @default_file_widget.text
- @settings_dialog.settings_container[:general, :default_path] = path
- end
-
- def read_default_settings
- path = @settings_dialog.settings_container.default(:general, :default_path)
- @default_dir_widget.text = File.dirname(path)
- @default_file_widget.text = File.basename(path)
- end
+ def initialize parent = nil
+ super
+ @default_dir_widget = KDE::LineEdit.new self
+ @default_file_widget = KDE::LineEdit.new self
+ end
+ def read_settings
+ path = @settings_dialog.settings_container[:general, :default_path]
+ @default_dir_widget.text = File.dirname(path)
+ @default_file_widget.text = File.basename(path)
+ end
+
+ def store_settings
+ path = File.join @default_dir_widget.text, @default_file_widget.text
+ @settings_dialog.settings_container[:general, :default_path] = path
+ end
+
+ def read_default_settings
+ path = @settings_dialog.settings_container.default(:general, :default_path)
+ @default_dir_widget.text = File.dirname(path)
+ @default_file_widget.text = File.basename(path)
end
-Note that the <tt>@settings_dialog</tt> instance variable has been automatically
+end
+
+p. Note that the <tt>@settings_dialog</tt> instance variable has been automatically
created by the dialog when the widget has been created and contains a reference
to the dialog itself.
View
5 ruber.ruprj
@@ -55,6 +55,11 @@
:ruby_options:
- -Ilib
:rspec:
+ :code_directory: .
+ :patterns:
+ - :code: "**/*.rb"
+ :spec: "%f_spec.rb"
+ :glob: 0
:full_backtraces: false
:ruby_options:
- -I.
View
11 spec/output_widget_spec.rb
@@ -1006,6 +1006,17 @@ class << @ow
@ow.send :maybe_open_file, @mod.index(0,0)
end
+ it 'gives focus to the editor' do
+ ed = flexmock{|m| m.should_receive(:set_focus).once}
+ @mw.should_receive(:display_document).once.and_return(ed)
+ @ow.send :maybe_open_file, @mod.index(0,0)
+ end
+
+ it 'doesn\'t attempt to give focus to the editor if no editor is found' do
+ @mw.should_receive(:display_document).once.and_return nil
+ lambda{@ow.send :maybe_open_file, @mod.index(0,0)}.should_not raise_error
+ end
+
it 'does nothing if the Control and/or Shift modifiers are pressed' do
flexmock(@ow).should_receive(:find_filename_in_index).never
flexmock(Ruber::Application).should_receive(:keyboard_modifiers).once.and_return(Qt::ShiftModifier.to_i)

No commit comments for this range

Something went wrong with that request. Please try again.