hilfer 0.9.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ # Currently only offers activate, which raises the window and give it focus
2
+ class Window
3
+ attr_accessor :window_id, :desktop, :pid, :title
4
+
5
+ def initialize( window_id, desktop, pid, title )
6
+ @window_id, @desktop, @pid, @title = window_id, desktop, pid, title
7
+ end
8
+
9
+ # create a new Window instance from the pid
10
+ def self.pid( pid )
11
+ list.find {|x| x.pid == pid.to_s }
12
+ end
13
+
14
+ # window is the Window ID
15
+ def activate
16
+ `wmctrl -i -R 0x#{window_id}`
17
+ $?
18
+ end
19
+
20
+ def self.list
21
+ `wmctrl -lp`.split("\n").map do |line|
22
+ line =~ /^(0x[\da-z]+)\s+(-?\d+)\s+(\d+)\s+(.*)/i
23
+ Window.new( $1, $2, $3, $4 )
24
+ end
25
+ end
26
+ end
@@ -1,6 +1,6 @@
1
1
  # check for existence of Terminal
2
2
  unless File.exist?( '/usr/bin/Terminal' )
3
- raise 'XFCE Terminal not available at /usr/bin/Terminal'
3
+ raise 'Xfce Terminal not available at /usr/bin/Terminal'
4
4
  end
5
5
 
6
6
  =begin rdoc
@@ -0,0 +1,25 @@
1
+ require 'gtk2'
2
+ require 'hilfer/extensions.rb'
3
+
4
+ class MockKeyEvent
5
+ include Gdk::KeyMatcher
6
+
7
+ def initialize( keyval )
8
+ @keyval =
9
+ case keyval
10
+ when Fixnum
11
+ keyval
12
+ when String
13
+ eval( "Gdk::Keyval::GDK_#{keyval}" )
14
+ when Symbol
15
+ eval( "Gdk::Keyval::GDK_#{keyval.to_s}" )
16
+ end
17
+ end
18
+
19
+ attr_accessor :keyval
20
+
21
+ def inspect
22
+ "#<Gdk::EventKey #{key_name} state=none>"
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hilfer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Anderson
@@ -9,19 +9,27 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-11 00:00:00 +02:00
12
+ date: 2009-08-01 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
17
+ type: :development
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
20
21
  - - ">="
21
22
  - !ruby/object:Gem::Version
22
- version: 1.5.1
23
+ version: 1.8.2
23
24
  version:
24
- description: Gtk2 directory browser for SciTE with plenty of keyboard shortcuts for directory and file navigation. It understands some of the Rails directory structure. Subversion file status is highlighted with different colours. Once upon a time there was a directory browser called jaffm (Just a File Manager). I liked the idea of an ultra simple file browser, but jaffm went extinct. So I wrote hilfer.
25
+ description: |-
26
+ Gtk2 directory browser for SciTE with plenty of keyboard shortcuts for directory
27
+ and file navigation. It understands some of the Rails directory structure.
28
+ Subversion file status is highlighted with different colours.
29
+
30
+ Once upon a time there was a directory browser called jaffm (Just a File Manager).
31
+ I liked the idea of an ultra simple file browser, but jaffm went extinct. So
32
+ I wrote hilfer.
25
33
  email: john at semiosix dot com
26
34
  executables:
27
35
  - hilfer
@@ -41,6 +49,7 @@ files:
41
49
  - TODO
42
50
  - bin/hilfer
43
51
  - bin/ssc
52
+ - lib/hilfer/extensions.rb
44
53
  - lib/hilfer/gnome_terminal.rb
45
54
  - lib/hilfer/hilfer-icon.png
46
55
  - lib/hilfer/hilfer_config.rb
@@ -52,10 +61,13 @@ files:
52
61
  - lib/hilfer/tree_viewer.rb
53
62
  - lib/hilfer/tree_viewer_window.rb
54
63
  - lib/hilfer/version.rb
64
+ - lib/hilfer/window.rb
55
65
  - lib/hilfer/xterm.rb
56
66
  - lib/hilfer/xfce_terminal.rb
57
67
  has_rdoc: true
58
68
  homepage: http://www.rubyforge.org/projects/hilfer
69
+ licenses: []
70
+
59
71
  post_install_message:
60
72
  rdoc_options:
61
73
  - --main
@@ -77,9 +89,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
89
  requirements: []
78
90
 
79
91
  rubyforge_project: hilfer
80
- rubygems_version: 1.1.0
92
+ rubygems_version: 1.3.5
81
93
  signing_key:
82
- specification_version: 2
94
+ specification_version: 3
83
95
  summary: Gtk2 directory browser for SciTE with plenty of keyboard shortcuts for directory and file navigation
84
- test_files: []
85
-
96
+ test_files:
97
+ - test/test_key_matcher.rb