/[Frey]/trunk/lib/Frey/Editor.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Editor.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 616 by dpavlin, Mon Nov 24 20:58:02 2008 UTC revision 617 by dpavlin, Sat Nov 29 15:05:55 2008 UTC
# Line 23  sub url_regex { qr{/editor\+?(.+?)\+(\d+ Line 23  sub url_regex { qr{/editor\+?(.+?)\+(\d+
23    
24  =cut  =cut
25    
26    sub switch_screen {
27            my $cmd = 'xdotool key super+Tab';
28            warn "# switch_screen $cmd";
29            system $cmd;
30    }
31    
32  sub command {  sub command {
33          my ( $self, $url ) = @_;          my ( $self, $url ) = @_;
34          $url =~ url_regex;          $url =~ url_regex;
# Line 32  sub command { Line 38  sub command {
38          $path = $self->class_path( $path ) || $path if ! -e $path;          $path = $self->class_path( $path ) || $path if ! -e $path;
39          my $cmd = "$editor $path +$line";          my $cmd = "$editor $path +$line";
40          warn "# $url -> system $cmd";          warn "# $url -> system $cmd";
41          return $cmd;          $self->switch_screen;
42            system $cmd;
43            $self->switch_screen;
44  }  }
45    
46  1;  1;

Legend:
Removed from v.616  
changed lines
  Added in v.617

  ViewVC Help
Powered by ViewVC 1.1.26