From 556ed59e96a5ef26e5b17a0a986f402c08558f24 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Sep 2010 14:13:12 -0600 Subject: [PATCH 1/2] ... --- src/calibre/gui2/library/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index cfb2b53a4e..d67d286aeb 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -9,7 +9,7 @@ import os from functools import partial from PyQt4.Qt import QTableView, Qt, QAbstractItemView, QMenu, pyqtSignal, \ - QModelIndex + QModelIndex, QIcon from calibre.gui2.library.delegates import RatingDelegate, PubDateDelegate, \ TextDelegate, DateDelegate, TagsDelegate, CcTextDelegate, \ @@ -172,6 +172,7 @@ class BooksView(QTableView): # {{{ if self.can_add_columns: self.column_header_context_menu.addAction( + QIcon(I('column.png')), _('Add your own columns'), partial(self.column_header_context_handler, action='addcustcol', column=col)) From d156b38449785b02f1d95a88251dd380b7468b48 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Sep 2010 18:30:23 -0600 Subject: [PATCH 2/2] ... --- resources/recipes/nejm.recipe | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/recipes/nejm.recipe b/resources/recipes/nejm.recipe index 415377b5c2..c860413926 100644 --- a/resources/recipes/nejm.recipe +++ b/resources/recipes/nejm.recipe @@ -26,13 +26,13 @@ class NYTimes(BasicNewsRecipe): #TO LOGIN def get_browser(self): br = BasicNewsRecipe.get_browser() - br.open('http://content.nejm.org/cgi/login?uri=/') - br.select_form(nr=0) - br['username'] = self.username - br['code'] = self.password + br.open('http://www.nejm.org/action/showLogin?uri=http://www.nejm.org/') + br.select_form(name='frmLogin') + br['login'] = self.username + br['password'] = self.password response = br.submit() raw = response.read() - if 'Welcome' not in raw: + if '>Sign Out<' not in raw: raise Exception('Login failed. Check your username and password') return br