From 91d79ee851be9fd141b25d0c6abaa512eef85124 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Tue, 19 Jul 2011 03:18:25 +0200 Subject: [PATCH 1/7] Buddylist showing also the own online status of any account --- plugin/vimchat.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 290192c..64f4aef 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -1096,7 +1096,14 @@ You can type \on to reconnect. ****************************** """ % (curJid)) continue - accountText = u"{{{ [+] %s\n"%(curJid) + accountPresenceInfo = account.jabberGetPresence() + if accountPresenceInfo[0] != None: + status = str(accountPresenceInfo[1]) + if status == "None": + status = '' + accountText = u"{{{ [+] %s\n\t%s: %s\n"%(curJid,str(accountPresenceInfo[0]),status) + else: + accountText = u"{{{ [+] %s\n"%(curJid) rF.write(accountText) roster = account._roster @@ -1125,7 +1132,7 @@ You can type \on to reconnect. if show != u'off': buddyText =\ - u"{{{ (%s) %s\n\t%s \n\tGroups: %s\n\t%s:\n%s\n}}}\n" %\ + u"{{{ (%s) %s\n\t%s \n\tGroups: %s\n\t%s: %s\n}}}\n" %\ (show, name, item, groups, show, status) rF.write(buddyText) From cad516d4e45eecc940548999d859a4c57ec38117 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Tue, 19 Jul 2011 03:29:24 +0200 Subject: [PATCH 2/7] This commit resolves a gvim SEGV on my machine. This is a fix that needs to be tested on other machines and we need to understand the main cause why those imports are not allowed in gvim --- plugin/vimchat.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 64f4aef..54af1da 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -50,7 +50,7 @@ except: pynotify_enabled = False try: - if 'DBUS_SESSION_BUS_ADDRESS' in os.environ: + if 'DBUS_SESSION_BUS_ADDRESS' in os.environ and int(vim.eval("has('gui_running')"))==0: import pynotify pynotify_enabled = True else: @@ -69,7 +69,7 @@ except: pyotr_logging = False gtk_enabled = False -if 'DISPLAY' in os.environ: +if 'DISPLAY' in os.environ and int(vim.eval("has('gui_running')"))==0: try: from gtk import StatusIcon import gtk From e8da145c542cc2d45761adf8657d7dd13c60a57d Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Sun, 24 Jul 2011 14:58:34 +0200 Subject: [PATCH 3/7] A new option allows the vim user to chose whether vimchat should start automatically on vim start. The default is to auto-login off. --- README.md | 3 ++- plugin/vimchat.vim | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 770e1b7..9fc5d3e 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Typing \l will bring up a new tab containing log files for the current user. First install the growl notification system: http://growl.info/ -Then download the growl SDK from: http://growl.info/downloads_developers.php +Then download the growl SDK from: http://growl.info/downloads\_developers.php Finally navigate into the Bindings/python folder and run: sudo python setup.py install @@ -81,6 +81,7 @@ __Optional ~/.vimrc Variables:__ * let g:vimchat\_buddylistmaxwidth = max width of buddy list window, default '' * let g:vimchat\_timestampformat = format of the message timestamp, default "[%H:%M]" * let g:vimchat\_showPresenceNotification = notification if buddy changed status, comma-separated list of states, default "" +* let g:vimchat\_autoLogin = (0 or 1), default is 0 # Contributors diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 54af1da..3c5ad0b 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -29,6 +29,7 @@ " g:vimchat_buddylistmaxwidth = max width of buddy list window default '' " g:vimchat_timestampformat = format of the message timestamp default "[%H:%M]" " g:vimchat_showPresenceNotification = notify if buddy changed status default "" +" g:vimchat_autoLogin = (0 or 1) default is 0 python < Date: Thu, 4 Aug 2011 00:31:20 +0200 Subject: [PATCH 4/7] Update to master --- plugin/vimchat.vim | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 28a9403..077ae96 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -51,7 +51,7 @@ except: pynotify_enabled = False try: - if 'DBUS_SESSION_BUS_ADDRESS' in os.environ and int(vim.eval("has('gui_running')"))==0: + if 'DBUS_SESSION_BUS_ADDRESS' in os.environ: import pynotify pynotify_enabled = True else: @@ -70,7 +70,7 @@ except: pyotr_logging = False gtk_enabled = False -if 'DISPLAY' in os.environ and int(vim.eval("has('gui_running')"))==0: +if 'DISPLAY' in os.environ: try: from gtk import StatusIcon import gtk @@ -1091,14 +1091,7 @@ You can type \on to reconnect. ****************************** """ % (curJid)) continue - accountPresenceInfo = account.jabberGetPresence() - if accountPresenceInfo[0] != None: - status = str(accountPresenceInfo[1]) - if status == "None": - status = '' - accountText = u"{{{ [+] %s\n\t%s: %s\n"%(curJid,str(accountPresenceInfo[0]),status) - else: - accountText = u"{{{ [+] %s\n"%(curJid) + accountText = u"{{{ [+] %s\n"%(curJid) rF.write(accountText) roster = account._roster @@ -1127,7 +1120,7 @@ You can type \on to reconnect. if show != u'off': buddyText =\ - u"{{{ (%s) %s\n\t%s \n\tGroups: %s\n\t%s: %s\n}}}\n" %\ + u"{{{ (%s) %s\n\t%s \n\tGroups: %s\n\t%s:\n%s\n}}}\n" %\ (show, name, item, groups, show, status) rF.write(buddyText) From a042a19439c95a7ed6315dc9dbccb96fc022b1eb Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Thu, 4 Aug 2011 01:58:42 +0200 Subject: [PATCH 5/7] A new option allows the vim user to chose whether vimchat should start automatically on vim start. The default is to auto-login off. --- README.md | 1 + plugin/vimchat.vim | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0560de4..684e284 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ __Optional ~/.vimrc Variables:__ * let g:vimchat\_buddylistmaxwidth = max width of buddy list window, default '' * let g:vimchat\_timestampformat = format of the message timestamp, default "[%H:%M]" * let g:vimchat\_showPresenceNotification = notification if buddy changed status, comma-separated list of states, default "" +* let g:vimchat\_autoLogin = (0 or 1), default is 0 # Hacking diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 4ab3c36..ff66c3b 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -30,6 +30,7 @@ " g:vimchat_timestampformat = format of the msg timestamp default "[%H:%M]" " g:vimchat_showPresenceNotification = " notify if buddy changed status default "" +" g:vimchat_autoLogin = (0 or 1) default is 0 python < Date: Thu, 4 Aug 2011 02:45:42 +0200 Subject: [PATCH 6/7] A new option allows the vim user to chose whether vimchat should start automatically on vim start. The default is to auto-login off. --- plugin/vimchat.vim | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index f3f4aff..ff66c3b 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -30,8 +30,6 @@ " g:vimchat_timestampformat = format of the msg timestamp default "[%H:%M]" " g:vimchat_showPresenceNotification = " notify if buddy changed status default "" -" g:vimchat_timestampformat = format of the message timestamp default "[%H:%M]" -" g:vimchat_showPresenceNotification = notify if buddy changed status default "" " g:vimchat_autoLogin = (0 or 1) default is 0 python < Date: Thu, 4 Aug 2011 07:36:48 +0200 Subject: [PATCH 7/7] Auto login, fix makedown typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73ef7f1..684e284 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Typing \l will bring up a new tab containing log files for the current user. First install the growl notification system: http://growl.info/ -Then download the growl SDK from: http://growl.info/downloads\_developers.php +Then download the growl SDK from: http://growl.info/downloads_developers.php Finally navigate into the Bindings/python folder and run: sudo python setup.py install