use only g[PREFIX] to display
authorvunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 24 Oct 2014 03:22:17 +0000 (12:22 +0900)
committervunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 24 Oct 2014 03:22:17 +0000 (12:22 +0900)
docs/conf.py
rainbowstream/rainbow.py
setup.py

index 628c223..03182df 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '1.1.9'
+version = '1.2.0'
 # The full version, including alpha/beta/rc tags.
-release = '1.1.9'
+release = '1.2.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index f06b510..236c1b8 100644 (file)
@@ -204,8 +204,7 @@ def init(args):
     name = credential['name']
     if not get_config('PREFIX'):
         set_config('PREFIX', screen_name)
-    c['PREFIX'] = emojize(c['PREFIX'])
-    g['PREFIX'] = u2str(c['PREFIX'])
+    g['PREFIX'] = u2str(emojize(c['PREFIX']))
     c['original_name'] = g['original_name'] = screen_name[1:]
     g['full_name'] = name
     g['decorated_name'] = lambda x: color_func(
@@ -1964,7 +1963,7 @@ def reconn_notice():
         light_green("h stream") + \
         light_magenta(" for more details.")
     printNicely(guide)
-    sys.stdout.write(g['decorated_name'](c['PREFIX']))
+    sys.stdout.write(g['decorated_name'](g['PREFIX']))
     sys.stdout.flush()
 
 
@@ -2053,10 +2052,10 @@ def stream(domain, args, name='Rainbow Stream'):
                 # the 1st character of that word
                 if current_buffer and g['cmd'] != current_buffer:
                     sys.stdout.write(
-                        g['decorated_name'](c['PREFIX']) + str2u(current_buffer))
+                        g['decorated_name'](g['PREFIX']) + current_buffer)
                     sys.stdout.flush()
                 elif not c['HIDE_PROMPT']:
-                    sys.stdout.write(g['decorated_name'](c['PREFIX']))
+                    sys.stdout.write(g['decorated_name'](g['PREFIX']))
                     sys.stdout.flush()
             elif tweet.get('direct_message'):
                 # Check the semaphore pause and lock (stream process only)
@@ -2073,7 +2072,7 @@ def stream(domain, args, name='Rainbow Stream'):
         printNicely(
             magenta("We have connection problem with twitter'stream API right now :("))
         detail_twitter_error(e)
-        sys.stdout.write(g['decorated_name'](c['PREFIX']))
+        sys.stdout.write(g['decorated_name'](g['PREFIX']))
         sys.stdout.flush()
 
 
index 0e34739..ed0362c 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '1.1.9'
+version = '1.2.0'
 
 # Require
 install_requires = [