~stub/ubuntu/precise/calibre/devel

« back to all changes in this revision

Viewing changes to src/calibre/customize/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-04-12 11:29:25 UTC
  • mfrom: (42.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110412112925-c7171kt2bb5rmft4
Tags: 0.7.50+dfsg-2
* debian/control: Build with libpodofo-dev to enable PDF metadata.
  (Closes: #619632)
* debian/control: Add libboost1.42-dev build dependency. Apparently it is
  needed in some setups. (Closes: #619807)
* debian/rules: Call dh_sip to generate a proper sip API dependency, to
  prevent crashes like #616372 for partial upgrades.
* debian/control: Bump python-qt4 dependency to >= 4.8.3-2, which reportedly
  fixes crashes on startup. (Closes: #619701, #620125)

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        an optional method validate() that takes no arguments and is called
91
91
        immediately after the user clicks OK. Changes are applied if and only
92
92
        if the method returns True.
 
93
 
 
94
        If for some reason you cannot perform the configuration at this time,
 
95
        return a tuple of two strings (message, details), these will be
 
96
        displayed as a warning dialog to the user and the process will be
 
97
        aborted.
93
98
        '''
94
99
        raise NotImplementedError()
95
100
 
133
138
        except NotImplementedError:
134
139
            config_widget = None
135
140
 
 
141
        if isinstance(config_widget, tuple):
 
142
            from calibre.gui2 import warning_dialog
 
143
            warning_dialog(parent, _('Cannot configure'), config_widget[0],
 
144
                    det_msg=config_widget[1], show=True)
 
145
            return False
 
146
 
136
147
        if config_widget is not None:
137
148
            v.addWidget(config_widget)
138
149
            v.addWidget(button_box)