Plugin CS minor changes (Events & Couch Search tabs temporarly removed, open_new_tab user to open link in browser)
This commit is contained in:
parent
5842b14a32
commit
e55706ccc1
1 changed files with 3 additions and 3 deletions
|
|
@ -177,8 +177,8 @@ class CS_Plugin():
|
|||
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 @@ class CS_Plugin():
|
|||
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"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue