mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
31c8233e64
commit
c42ba307a1
@ -13,7 +13,7 @@ from PyQt4.Qt import QIcon, QFont, QLabel, QListWidget, QAction, \
|
||||
QRegExp, QSettings, QSize, QSplitter, \
|
||||
QPainter, QLineEdit, QComboBox, QPen, \
|
||||
QMenu, QStringListModel, QCompleter, QStringList, \
|
||||
QTimer, QRect
|
||||
QTimer, QRect, QFontDatabase
|
||||
|
||||
from calibre.gui2 import NONE, error_dialog, pixmap_to_data, gprefs
|
||||
from calibre.gui2.filename_pattern_ui import Ui_Form
|
||||
@ -299,8 +299,6 @@ class ImageView(QWidget):
|
||||
# }}}
|
||||
|
||||
|
||||
|
||||
|
||||
class FontFamilyModel(QAbstractListModel):
|
||||
|
||||
def __init__(self, *args):
|
||||
@ -312,6 +310,9 @@ class FontFamilyModel(QAbstractListModel):
|
||||
self.families = []
|
||||
print 'WARNING: Could not load fonts'
|
||||
traceback.print_exc()
|
||||
# Restrict to Qt families as Qt tends to crash
|
||||
qt_families = set([unicode(x) for x in QFontDatabase().families()])
|
||||
self.families = list(qt_families.intersection(set(self.families)))
|
||||
self.families.sort()
|
||||
self.families[:0] = [_('None')]
|
||||
|
||||
|
@ -1,23 +1,6 @@
|
||||
{% extends "!layout.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
{% if not embedded %}
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-20736318-1']);
|
||||
_gaq.push(['_setDomainName', '.calibre-ebook.com']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<style type="text/css">
|
||||
.float-left-img { float: left; margin-right: 1em; margin-bottom: 1em }
|
||||
.float-right-img { float: right; margin-left: 1em; margin-bottom: 1em }
|
||||
@ -52,6 +35,23 @@
|
||||
</div>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{% if not embedded %}
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-20736318-1']);
|
||||
_gaq.push(['_setDomainName', '.calibre-ebook.com']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
{%- endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebarlogo %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user