home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / tcl / examples / tkps-ged.patch < prev   
Text File  |  1994-11-14  |  6KB  |  207 lines

  1. *** tkps.dist    Thu Nov  3 17:06:14 1994
  2. --- tkps    Tue Nov 15 13:16:44 1994
  3. ***************
  4. *** 32,38 ****
  5.   set UPDATE_PERIOD 10000 
  6.   
  7.   # The default double click behavior
  8. ! set USER_SIG KILL
  9.   
  10.   # The default command line args to "ps"
  11.   set DEFAULT_PS_ARGS  "-auxww"
  12. --- 32,38 ----
  13.   set UPDATE_PERIOD 10000 
  14.   
  15.   # The default double click behavior
  16. ! #set USER_SIG KILL
  17.   
  18.   # The default command line args to "ps"
  19.   set DEFAULT_PS_ARGS  "-auxww"
  20. ***************
  21. *** 43,55 ****
  22.   # 
  23.   
  24.   set common_sigs {
  25.   {INT    2       interupt}
  26.   {QUIT   3       quit}
  27.   {IOT    6       abort}
  28.   {KILL   9       non-catchable, non-ignorable kill}
  29. - {STOP   17      sendable stop signal not from tty}
  30.   {ALRM   14      alarm clock}
  31.   {TERM   15      software termination signal}
  32.   }
  33.   
  34.   
  35. --- 43,56 ----
  36.   # 
  37.   
  38.   set common_sigs {
  39. + {HUP    1       hangup}
  40.   {INT    2       interupt}
  41.   {QUIT   3       quit}
  42.   {IOT    6       abort}
  43.   {KILL   9       non-catchable, non-ignorable kill}
  44.   {ALRM   14      alarm clock}
  45.   {TERM   15      software termination signal}
  46. + {STOP   17      sendable stop signal not from tty}
  47.   }
  48.   
  49.   
  50. ***************
  51. *** 56,74 ****
  52.   
  53.   # Make a button bar for the common signals
  54.   frame .bbar
  55. ! button .bbar.kill -text KILL -command { send_signal KILL } -font $menufont
  56.   button .bbar.int -text INT -command { send_signal INT } -font $menufont
  57.   button .bbar.quit -text QUIT -command { send_signal QUIT } -font $menufont
  58.   button .bbar.iot -text IOT -command { send_signal IOT } -font $menufont
  59.   button .bbar.term -text TERM -command { send_signal TERM } -font $menufont
  60.   button .bbar.stop -text STOP -command { send_signal STOP } -font $menufont
  61. - button .bbar.hup -text HUP -command { send_signal HUP } -font $menufont
  62.   
  63. ! pack .bbar.kill  .bbar.int .bbar.quit \
  64. !      .bbar.iot .bbar.term .bbar.stop .bbar.hup \
  65.        -side left -padx 3m -ipadx 6m -pady 3m
  66.   
  67. ! pack .bbar  -side bottom -expand yes -fill x -anchor w
  68.   
  69.   set all_sigs {
  70.   {HUP    1       hangup}
  71. --- 57,76 ----
  72.   
  73.   # Make a button bar for the common signals
  74.   frame .bbar
  75. ! button .bbar.hup -text HUP -command { send_signal HUP } -font $menufont
  76.   button .bbar.int -text INT -command { send_signal INT } -font $menufont
  77.   button .bbar.quit -text QUIT -command { send_signal QUIT } -font $menufont
  78.   button .bbar.iot -text IOT -command { send_signal IOT } -font $menufont
  79. + button .bbar.kill -text KILL -command { send_signal KILL } -font $menufont
  80.   button .bbar.term -text TERM -command { send_signal TERM } -font $menufont
  81.   button .bbar.stop -text STOP -command { send_signal STOP } -font $menufont
  82.   
  83. ! pack .bbar.hup  .bbar.int .bbar.quit \
  84. !      .bbar.iot .bbar.kill .bbar.term .bbar.stop \
  85.        -side left -padx 3m -ipadx 6m -pady 3m
  86.   
  87. ! #pack .bbar  -side bottom -expand yes -fill x -anchor w
  88. ! pack .bbar  -side bottom -fill x -anchor w
  89.   
  90.   set all_sigs {
  91.   {HUP    1       hangup}
  92. ***************
  93. *** 393,403 ****
  94.   pack .mbar.update .mbar.help -side right
  95.   
  96.   ################
  97. ! tk_menuBar .mbar  .mbar.quit \
  98.                     .mbar.options \
  99. !                   .mbar.com_signals \
  100. !                   .mbar.posix_signals  \
  101. !                   .mbar.all_signals 
  102.   
  103.   
  104.   
  105. --- 395,408 ----
  106.   pack .mbar.update .mbar.help -side right
  107.   
  108.   ################
  109. ! #tk_menuBar .mbar  .mbar.quit \
  110. ! #                  .mbar.options \
  111. ! #                  .mbar.com_signals \
  112. ! #                  .mbar.posix_signals  \
  113. ! #                  .mbar.all_signals 
  114. ! tk_menuBar .mbar  .mbar.file \
  115.                     .mbar.options \
  116. !                   .mbar.signals
  117.   
  118.   
  119.   
  120. ***************
  121. *** 416,425 ****
  122.   bind .findbar.filterentry <Return> {update_unix_procs}
  123.   bind .findbar.findentry <Return> {find_unix_proc}
  124.   
  125.   
  126.   pack .findbar.greplabel .findbar.filterentry \
  127.        .findbar.findlabel .findbar.findentry \
  128. !       -side left -padx 6m -ipadx 3m
  129.   
  130.   pack .findbar -side top -fill x -anchor w
  131.   
  132. --- 421,436 ----
  133.   bind .findbar.filterentry <Return> {update_unix_procs}
  134.   bind .findbar.findentry <Return> {find_unix_proc}
  135.   
  136. + button .findbar.renice -relief raised \
  137. +         -text  "Renice:" -command {send_renice $niceval} \
  138. +         -font $menufont
  139. + entry .findbar.niceval -width 20 -relief sunken -bd 2 -textvariable niceval
  140. + bind .findbar.niceval <Return> {send_renice $niceval}
  141.   
  142.   pack .findbar.greplabel .findbar.filterentry \
  143.        .findbar.findlabel .findbar.findentry \
  144. !      .findbar.renice .findbar.niceval \
  145. !       -side left -padx 3m -ipadx 1m
  146.   
  147.   pack .findbar -side top -fill x -anchor w
  148.   
  149. ***************
  150. *** 726,732 ****
  151.    set pids [selected_processes]
  152.    set proceed 1
  153.    if {$pids != {}} {
  154. !   if {$confirm_signals} {set proceed [confirm_dialog $signal $pids]}
  155.     if {$proceed} {
  156.       eval exec [format "kill -%s" $signal] $pids 
  157.     }
  158. --- 737,743 ----
  159.    set pids [selected_processes]
  160.    set proceed 1
  161.    if {$pids != {}} {
  162. !   if {$confirm_signals} {set proceed [confirm_dialog "kill -$signal" $pids]}
  163.     if {$proceed} {
  164.       eval exec [format "kill -%s" $signal] $pids 
  165.     }
  166. ***************
  167. *** 734,739 ****
  168. --- 745,765 ----
  169.    }
  170.   }
  171.   
  172. + # Send renice looks at the currently selected entries in the listbox
  173. + # and sends a renice to all of them.
  174. + proc send_renice {niceval} {
  175. +  global confirm_signals 
  176. +  set pids [selected_processes]
  177. +  set proceed 1
  178. +  if {$pids != {}} {
  179. +   if {$confirm_signals} {set proceed [confirm_dialog "renice $niceval" $pids]}
  180. +   if {$proceed} {
  181. +     eval exec [format "renice %s" $niceval] $pids 
  182. +   }
  183. +   update_unix_procs
  184. +  }
  185. + }
  186.   # get the selected entries from the listbox and extract
  187.   # the pid fields from each selection
  188.   proc selected_processes {} {
  189. ***************
  190. *** 776,782 ****
  191.     set val 1
  192.     # create top level window
  193.     toplevel .confirm -class Dialog
  194. !   wm title .confirm "Confirm Kill Command"
  195.     wm iconname .confirm Dialog
  196.     frame .confirm.top -relief raised -bd 1
  197.     pack .confirm.top -side top -fill both
  198. --- 802,808 ----
  199.     set val 1
  200.     # create top level window
  201.     toplevel .confirm -class Dialog
  202. !   wm title .confirm "Confirm Command"
  203.     wm iconname .confirm Dialog
  204.     frame .confirm.top -relief raised -bd 1
  205.     pack .confirm.top -side top -fill both
  206.