Commit f7379e2f authored by putro's avatar putro

if X is not running, use vim as editor instead of easygui

parent 21bda95a
......@@ -8,7 +8,7 @@ import traceback
import re
from stats import parse_stats, stats_m, uptime_sort_m, format_stats
from utils import pressKey, validateChoice, chooseList, askPassphrase, askSomething, askYesNo
from utils import chooseSubjType, selectServer, getDomain, validateEmail, isGpg, isAscii
from utils import chooseSubjType, selectServer, getDomain, validateEmail, isGpg, isAscii, X_is_running, editMessage
import gpgfuncts
import easygui
import string
......@@ -264,9 +264,11 @@ def writeMessage():
recipient = raw_input("Insert recipient email address or newsgroup name: ")
text = easygui.textbox(msg='Write your message....', title='Input Box', text='', codebox=0)
if X_is_running():
text = easygui.textbox(msg='Write your message....', title='Input Box', text='', codebox=0)
else:
text = editMessage()
text = filter(lambda x: x in string.printable, text)
if isGpg(text):
print "message already encrypted"
pressKey()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment