ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* texshow patch
@ 2002-03-13 16:05 Taco Hoekwater
  0 siblings, 0 replies; only message in thread
From: Taco Hoekwater @ 2002-03-13 16:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

Hi all,

The attached file is a patch that makes texshow start/respond faster under
certain Linux window managers, and it adds resize support (you can make the
window bigger if you want). 

Instructions:
Save the attachment in the directory where cont_set.pm resides, then
cd to that directory yourself and execute

	patch -R < patchfile

No support, but should work OK, the amount of change is minimal. I removed
some unneeded calls to raise() and focus(), and added some calls to update().

-- 
groeten,

Taco

[-- Attachment #2: patchfile --]
[-- Type: application/octet-stream, Size: 4127 bytes --]

*** cont_set.pm	Wed Mar 13 16:48:17 2002
--- cont_set.pm.orig	Wed Mar 13 16:54:00 2002
***************
*** 84,88 ****
  my $mw = MainWindow -> new ( -title => 'ConTeXt commands' ) ;
  
! #$mw -> resizable ('n', 'n') ; 
  
  sub SetupWindow { return $mw } ; 
--- 84,88 ----
  my $mw = MainWindow -> new ( -title => 'ConTeXt commands' ) ;
  
! $mw -> resizable ('n', 'n') ; 
  
  sub SetupWindow { return $mw } ; 
***************
*** 121,126 ****
  $fw -> pack (   -fill => 'x'    ,
                  -side => 'top'  ) ; 
! $sw -> pack (   -fill => 'both' , 
!                 -expand => 1      ,
                  -side => 'left' ) ;
  $cw -> pack (   -fill => 'both' , 
--- 121,126 ----
  $fw -> pack (   -fill => 'x'    ,
                  -side => 'top'  ) ; 
! $sw -> pack (  #-fill => 'both' , 
!              #-expand => 1      ,
                  -side => 'left' ) ;
  $cw -> pack (   -fill => 'both' , 
***************
*** 172,178 ****
         $request -> pack ( -padx => '6p', 
                            -pady => '2p', 
!                           -side => 'left' ) ;
! 	$mw->update();
! 	$mw->minsize($mw->width(),$mw->height()) }
  
  $cw -> bind ('<B1-Motion>', \&update_setup ) ;
--- 172,176 ----
         $request -> pack ( -padx => '6p', 
                            -pady => '2p', 
!                           -side => 'left' ) }
  
  $cw -> bind ('<B1-Motion>', \&update_setup ) ;
***************
*** 291,295 ****
  $arg {idx}    = 'argument/{/.../}'        ;
  $arg {idxs}   = 'argument/{/..+...+../}'  ;
! $arg {mat}    = 'argument/$/...:$'        ; #'
  $arg {nop}    = '//.../'                  ;
  $arg {fil}    = '//.../'                  ;
--- 289,293 ----
  $arg {idx}    = 'argument/{/.../}'        ;
  $arg {idxs}   = 'argument/{/..+...+../}'  ;
! $arg {mat}    = 'argument/$/...:$'        ;
  $arg {nop}    = '//.../'                  ;
  $arg {fil}    = '//.../'                  ;
***************
*** 493,499 ****
             $stopsuffix = '' ;
             do_update_setup ($key,0) ;
! #           $mw -> raise ; 
!            $cw -> focus ;
!            $mw -> update } } }
  
  #D In editors we want to provide context sensitive help
--- 491,496 ----
             $stopsuffix = '' ;
             do_update_setup ($key,0) ;
!            $mw -> raise ; 
!            $mw -> focus } } }
  
  #D In editors we want to provide context sensitive help
***************
*** 534,540 ****
          $cw -> see ($index) ;
          update_setup ;
! #        $mw -> raise ; 
! #        $mw -> focus 
! } } 
  
  #D Whenever a new set of commands is selected (by means of the
--- 531,536 ----
          $cw -> see ($index) ;
          update_setup ;
!         $mw -> raise ; 
!         $mw -> focus } } 
  
  #D Whenever a new set of commands is selected (by means of the
***************
*** 550,554 ****
          my $position = $positions{$old_setup_file}{$command} ;
          $command = $crosslinks{$setup_file}[$position] }
!     # load_setup($setup_file) ;
      my @list = sort {lc $a cmp lc $b} keys %{$commands{$setup_file}} ;
      $cw -> delete ('0.0', 'end') ;
--- 546,550 ----
          my $position = $positions{$old_setup_file}{$command} ;
          $command = $crosslinks{$setup_file}[$position] }
!     load_setup($setup_file) ;
      my @list = sort {lc $a cmp lc $b} keys %{$commands{$setup_file}} ;
      $cw -> delete ('0.0', 'end') ;
***************
*** 562,568 ****
          $cw -> activate ('0.0') }
      update_setup ;
! #    $mw -> raise ; 
! #    $mw -> focus 
! }
  
  #D Sometimes we want to make sure the dat is loaded indeed:
--- 558,563 ----
          $cw -> activate ('0.0') }
      update_setup ;
!     $mw -> raise ; 
!     $mw -> focus }
  
  #D Sometimes we want to make sure the dat is loaded indeed:
***************
*** 601,606 ****
              $cw -> see ($index) ;
              update_setup ; 
! #            $mw -> raise ; 
! #            $mw -> focus ;
              return } } } 
  
--- 596,601 ----
              $cw -> see ($index) ;
              update_setup ; 
!             $mw -> raise ; 
!             $mw -> focus ;
              return } } } 
  

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-13 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-13 16:05 texshow patch Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).