From 91d79ee851be9fd141b25d0c6abaa512eef85124 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Tue, 19 Jul 2011 03:18:25 +0200 Subject: [PATCH 1/5] 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/5] 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 c02a3d37b9fa0f6f08d6a7e0760f407ef05d7d46 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Sun, 24 Jul 2011 14:12:02 +0200 Subject: [PATCH 3/5] Fixes a typo in the project description --- plugin/vimchat.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 54af1da..227957b 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -9,7 +9,7 @@ " but the transports must be set up on another client as vimchat does not " support setting them up yet " -" This branchh supports multiple versions at a time, but probably still +" This branch supports multiple versions at a time, but probably still " has a decent amount of bugs! " " Note: The vimchat_jid and vimchat_password variables have been *changed* From 1fbdd699acf17cffc4f9f9bd386f79f8f7d6adc2 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Thu, 4 Aug 2011 00:31:20 +0200 Subject: [PATCH 4/5] 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 f753e7fb94900fc072e2e7a2bd99156eee8d55be Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Thu, 4 Aug 2011 01:33:18 +0200 Subject: [PATCH 5/5] Fixes a small typo --- plugin/vimchat.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vimchat.vim b/plugin/vimchat.vim index 4ab3c36..f251178 100644 --- a/plugin/vimchat.vim +++ b/plugin/vimchat.vim @@ -9,7 +9,7 @@ " but the transports must be set up on another client as vimchat does not " support setting them up yet " -" This branchh supports multiple versions at a time, but probably still +" This branch supports multiple versions at a time, but probably still " has a decent amount of bugs! " " Note: The vimchat_jid and vimchat_password variables have been *changed*