wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit 87302084d9e84dc0a2a9ff2fefa6d540c4ba4c50
parent 93c3a9af3abf88dcc62cd300eebefb6fc48f8497
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Thu, 21 Sep 2006 15:57:45 -0700

[project @ 8244883b9c526033d4e2fe5f81b38ddbec7059fc]

[project @ 121]
up  recovery dialog message
fix forgotten changes from show_menu() returning nil

Diffstat:
wmiirc | 6++++--
wmiirc-config.rb | 10++++++----
2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/wmiirc b/wmiirc @@ -20,13 +20,15 @@ require 'logger' -# Provide a means by which the user can rescue themselves. +# Provide a means by which the user can rescue themselves after an exception. def throw_life_saver aError system 'xterm &' - IO.popen('xmessage -file -', 'w') do |f| + IO.popen('xmessage -file - -buttons recover:0,ignore:1', 'w') do |f| f.puts aError.inspect, aError.backtrace end + + system($0 + ' &') if $?.exitstatus == 0 end diff --git a/wmiirc-config.rb b/wmiirc-config.rb @@ -219,14 +219,16 @@ SHORTCUTS = { # launch an internal action by choosing from a menu "#{MENU_SEQ}i" => lambda do - action = show_menu(ACTION_MENU) - system(action << '&') unless action.empty? + if action = show_menu(ACTION_MENU) + system(action << '&') + end end, # launch an external program by choosing from a menu "#{MENU_SEQ}e" => lambda do - program = show_menu(PROGRAM_MENU) - system(program << '&') unless program.empty? + if program = show_menu(PROGRAM_MENU) + system(program << '&') + end end, # focus any view by choosing from a menu