~ubuntu-branches/ubuntu/karmic/calibre/karmic

« back to all changes in this revision

Viewing changes to src/calibre/gui2/dialogs/user_profiles.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730124941-qjdsmri25zt8zocn
Tags: 0.6.3+dfsg-0ubuntu1
* New upstream release. Please see http://calibre.kovidgoyal.net/new_in_6/
  for the list of new features and changes.
* remove_postinstall.patch: Update for new version.
* build_debug.patch: Does not apply any more, disable for now. Might not be
  necessary any more.
* debian/copyright: Fix reference to versionless GPL.
* debian/rules: Drop obsolete dh_desktop call.
* debian/rules: Add workaround for weird Python 2.6 setuptools behaviour of
  putting compiled .so files into src/calibre/plugins/calibre/plugins
  instead of src/calibre/plugins.
* debian/rules: Drop hal fdi moving, new upstream version does not use hal
  any more. Drop hal dependency, too.
* debian/rules: Install udev rules into /lib/udev/rules.d.
* Add debian/calibre.preinst: Remove unmodified
  /etc/udev/rules.d/95-calibre.rules on upgrade.
* debian/control: Bump Python dependencies to 2.6, since upstream needs
  it now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import time, os
4
4
 
5
5
from PyQt4.QtCore import SIGNAL, QUrl
6
 
from PyQt4.QtGui import QMessageBox, QDesktopServices
 
6
from PyQt4.QtGui import QDesktopServices
7
7
 
8
8
from calibre.web.feeds.recipes import compile_recipe
9
9
from calibre.web.feeds.news import AutomaticNewsRecipe
86
86
            self.source_code.setPlainText('')
87
87
        else:
88
88
            self.source_code.setPlainText(src)
89
 
            #self.highlighter = PythonHighlighter(self.source_code.document())
 
89
            self.highlighter = PythonHighlighter(self.source_code.document())
90
90
            self.stacks.setCurrentIndex(1)
91
91
            self.toggle_mode_button.setText(_('Switch to Basic mode'))
92
92
 
175
175
        try:
176
176
            self.available_profiles.add_item(title, (title, profile), replace=False)
177
177
        except ValueError:
178
 
            d = question_dialog(self, _('Replace recipe?'),
179
 
                    _('A custom recipe named %s already exists. Do you want to replace it?')%title)
180
 
            if d.exec_() == QMessageBox.Yes:
 
178
            if question_dialog(self, _('Replace recipe?'),
 
179
                _('A custom recipe named %s already exists. Do you want to '
 
180
                    'replace it?')%title):
181
181
                self.available_profiles.add_item(title, (title, profile), replace=True)
182
182
            else:
183
183
                return
207
207
                    try:
208
208
                        self.available_profiles.add_item(title, (title, r.text), replace=False)
209
209
                    except ValueError:
210
 
                        d = question_dialog(self, _('Replace recipe?'),
211
 
                                _('A custom recipe named %s already exists. Do you want to replace it?')%title)
212
 
                        if d.exec_() == QMessageBox.Yes:
 
210
                        if question_dialog(self, _('Replace recipe?'),
 
211
                            _('A custom recipe named %s already exists. Do you '
 
212
                                'want to replace it?')%title):
213
213
                            self.available_profiles.add_item(title, (title, r.text), replace=True)
214
214
                        else:
215
215
                            return
231
231
            try:
232
232
                self.available_profiles.add_item(title, (title, src), replace=False)
233
233
            except ValueError:
234
 
                d = question_dialog(self, _('Replace recipe?'),
235
 
                        _('A custom recipe named %s already exists. Do you want to replace it?')%title)
236
 
                if d.exec_() == QMessageBox.Yes:
 
234
                if question_dialog(self, _('Replace recipe?'),
 
235
                    _('A custom recipe named %s already exists. Do you want to '
 
236
                        'replace it?')%title):
237
237
                    self.available_profiles.add_item(title, (title, src), replace=True)
238
238
                else:
239
239
                    return