1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 02:52:12 +01:00

SpellCheck: Show spellcheck directories in preferences

This commit is contained in:
David Rosca 2016-10-26 11:13:48 +02:00
parent bb67d4e101
commit 81b8adfe95
2 changed files with 64 additions and 40 deletions

View File

@ -413,6 +413,8 @@ Preferences::Preferences(BrowserWindow* window)
QLibraryInfo::location(QLibraryInfo::DataPath) + QL1S("/qtwebengine_dictionaries") QLibraryInfo::location(QLibraryInfo::DataPath) + QL1S("/qtwebengine_dictionaries")
}; };
ui->spellcheckDirectories->setText(dictionariesDirs.join(QL1C('\n')));
for (const QString &path : dictionariesDirs) { for (const QString &path : dictionariesDirs) {
QDir dir(path); QDir dir(path);
const QStringList files = dir.entryList({QSL("*.bdic")}); const QStringList files = dir.entryList({QSL("*.bdic")});

View File

@ -2295,6 +2295,47 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="3">
<widget class="QLabel" name="spellcheckNoLanguages">
<property name="text">
<string>No languages found</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="spellcheckLanguage"/>
</item>
<item row="3" column="2">
<spacer name="verticalSpacer_18">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1" colspan="4">
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="spellcheckDirectories"/>
</item>
</layout>
</widget>
</item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="sizePolicy"> <property name="sizePolicy">
@ -2308,33 +2349,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2">
<widget class="QComboBox" name="spellcheckLanguage"/>
</item>
<item row="5" column="1">
<spacer name="verticalSpacer_17">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="5"> <item row="0" column="0" colspan="5">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_10">
<property name="text"> <property name="text">
<string>&lt;b&gt;Spell Check&lt;/b&gt;</string> <string>&lt;b&gt;Spell Check options&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="spellcheckNoLanguages">
<property name="text">
<string>No languages found</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -2345,23 +2363,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2">
<spacer name="verticalSpacer_18">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1" colspan="4"> <item row="4" column="1" colspan="4">
<widget class="QLabel" name="label_48">
<property name="text">
<string>&lt;b&gt;Dictionary directories&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="4">
<widget class="QLabel" name="label_40"> <widget class="QLabel" name="label_40">
<property name="text"> <property name="text">
<string>For more informations about Spell Check, please see &lt;a href=&quot;https://github.com/QupZilla/qupzilla/wiki/Spell-Check&quot;&gt;wiki&lt;/a&gt;.</string> <string>For more informations about Spell Check, please see &lt;a href=&quot;https://github.com/QupZilla/qupzilla/wiki/Spell-Check&quot;&gt;wiki&lt;/a&gt;.</string>
@ -2374,6 +2383,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1">
<spacer name="verticalSpacer_17">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="otherPage"> <widget class="QWidget" name="otherPage">