From 47d95fff0cf6ddd650bcfef7c034e781aec16304 Mon Sep 17 00:00:00 2001 From: Li Fanxi Date: Thu, 16 Dec 2010 00:42:01 +0800 Subject: [PATCH] [Device] Adjust plugin settings dialog box. --- src/calibre/devices/bambook/driver.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/calibre/devices/bambook/driver.py b/src/calibre/devices/bambook/driver.py index b1731306ca..07f6be929b 100644 --- a/src/calibre/devices/bambook/driver.py +++ b/src/calibre/devices/bambook/driver.py @@ -397,12 +397,24 @@ class BAMBOOK(DeviceConfig, DevicePlugin): else: print "Unable to get file from Bambook:", path - # @classmethod - # def config_widget(cls): - # ''' - # Should return a QWidget. The QWidget contains the settings for the device interface - # ''' - # raise NotImplementedError() + @classmethod + def config_widget(cls): + ''' + Should return a QWidget. The QWidget contains the settings for the device interface + ''' + from calibre.gui2.device_drivers.configwidget import ConfigWidget + cw = ConfigWidget(cls.settings(), cls.FORMATS, cls.SUPPORTS_SUB_DIRS, + cls.MUST_READ_METADATA, cls.SUPPORTS_USE_AUTHOR_SORT, + cls.EXTRA_CUSTOMIZATION_MESSAGE) + # Turn off the Save template + cw.opt_save_template.setVisible(False) + cw.label.setVisible(False) + # Repurpose the metadata checkbox + cw.opt_read_metadata.setVisible(False) + # Repurpose the use_subdirs checkbox + cw.opt_use_subdirs.setVisible(False) + return cw + # @classmethod # def save_settings(cls, settings_widget):