changeset 109:18b0cf49a6f1

Plugin CS minor changes (Events & Couch Search tabs temporarly removed, open_new_tab user to open link in browser)
author Goffi <goffi@goffi.org>
date Tue, 29 Jun 2010 15:19:59 +0800
parents e24e080e6b16
children cb904fa7de3c
files plugins/plugin_misc_cs.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/plugin_misc_cs.py	Mon Jun 28 17:19:35 2010 +0800
+++ b/plugins/plugin_misc_cs.py	Tue Jun 29 15:19:59 2010 +0800
@@ -177,8 +177,8 @@
         interface.addText("(use %name% for contact name and %firstname% for guessed first name)")
         interface.addTextBox('message')
         interface.addButton('plugin_CS_sendMessage', 'sendMessage', _('send'), fields_back=['friends','subject','message'])
-        interface.addCategory(_("Events"), "vertical")
-        interface.addCategory(_("Couch search"), "vertical")
+        #interface.addCategory(_("Events"), "vertical") #TODO: coming soon, hopefuly :)
+        #interface.addCategory(_("Couch search"), "vertical")
         return interface.toXml()
 
     def __meetingPageCB(self, html):
@@ -270,7 +270,7 @@
         soup = BeautifulSoup(html)
         for tag in soup.findAll(lambda tag: tag.name=='strong' and tag.a and tag.a['href'].startswith('messages.html?message_status=inbox')):
             link = "http://www.couchsurfing.org/"+str(tag.a['href'])
-            webbrowser.open(link, new=2) #TODO: the web browser need to already have CS cookies (i.e. already be opened & logged on CS, or be permanently loggued), a warning to the user should be sent
+            webbrowser.open_new_tab(link) #TODO: the web browser need to already have CS cookies (i.e. already be opened & logged on CS, or be permanently loggued), a warning to the user should be sent/or a balloon-tip
 
     def showUnreadMessages(self, id, data, profile):
         """Called when user want to see all unread messages in the external browser"""