Fix #2186 (Remove eMail button does not work)

This commit is contained in:
Kovid Goyal 2009-03-31 12:30:38 -07:00
parent 0fbd15a76d
commit 51fa4e639e
5 changed files with 110 additions and 96 deletions

View File

@ -263,7 +263,7 @@ class EmailAccounts(QAbstractTableModel):
def remove(self, index):
if index.isValid():
row = self.index.row()
row = index.row()
account = self.account_order[row]
self.accounts.pop(account)
self.account_order = sorted(self.accounts.keys())
@ -425,6 +425,8 @@ class ConfigDialog(QDialog, Ui_Dialog):
self.email_view.resizeColumnsToContents()
self.connect(self.test_email_button, SIGNAL('clicked(bool)'),
self.test_email)
self.connect(self.email_remove, SIGNAL('clicked()'),
self.remove_email_account)
def add_email_account(self, checked):
index = self._email_accounts.add()
@ -432,6 +434,10 @@ class ConfigDialog(QDialog, Ui_Dialog):
self.email_view.resizeColumnsToContents()
self.email_view.edit(index)
def remove_email_account(self, *args):
idx = self.email_view.currentIndex()
self._email_accounts.remove(idx)
def create_gmail_relay(self, *args):
self.relay_username.setText('@gmail.com')
self.relay_password.setText('')

View File

@ -26,7 +26,8 @@ def initview(request):
5. The feeds for the site (ids)
"""
site_id, cachekey = fjlib.getcurrentsite(request.META['HTTP_HOST'], \
site_id, cachekey = fjlib.getcurrentsite(request.META.get('HTTP_HOST',
'planet.calibre-ebook.com'), \
request.META.get('REQUEST_URI', request.META.get('PATH_INFO', '/')), \
request.META['QUERY_STRING'])
response = fjcache.cache_get(site_id, cachekey)

View File

@ -1,4 +1,4 @@
#!/bin/sh
ssh divok "cd /usr/local/calibre && bzr pull"
ssh divok "cd /usr/local/calibre && bzr up"
ssh divok /etc/init.d/apache2 graceful

View File

@ -667,9 +667,16 @@ class stage3(OptionlessCommand):
def misc(cls):
check_call('ssh divok rm -f %s/calibre-\*.tar.gz'%DOWNLOADS, shell=True)
check_call('scp dist/calibre-*.tar.gz divok:%s/'%DOWNLOADS, shell=True)
check_call('gpg --armor --detach-sign dist/calibre-*.tar.gz',
shell=True)
check_call('scp dist/calibre-*.tar.gz.asc divok:%s/signatures/'%DOWNLOADS,
shell=True)
check_call('''rm -rf dist/* build/*''', shell=True)
check_call('ssh divok bzr update /var/www/calibre.kovidgoyal.net/calibre/',
shell=True)
check_call('ssh divok bzr update /usr/local/calibre',
shell=True)
def run(self):
OptionlessCommand.run(self)