Changeset View
Changeset View
Standalone View
Standalone View
src/gtkconfigkcmodule.cpp
Show All 31 Lines | |||||
32 | #include <QMenu> | 32 | #include <QMenu> | ||
33 | #include <QDebug> | 33 | #include <QDebug> | ||
34 | #include <QDir> | 34 | #include <QDir> | ||
35 | #include <config.h> | 35 | #include <config.h> | ||
36 | #include "ui_gui.h" | 36 | #include "ui_gui.h" | ||
37 | #include "abstractappearance.h" | 37 | #include "abstractappearance.h" | ||
38 | #include "iconthemesmodel.h" | 38 | #include "iconthemesmodel.h" | ||
39 | #include "fontshelpers.h" | 39 | #include "fontshelpers.h" | ||
40 | #include <QSortFilterProxyModel> | ||||
40 | #include <qstringlistmodel.h> | 41 | #include <qstringlistmodel.h> | ||
41 | 42 | | |||
42 | K_PLUGIN_FACTORY_WITH_JSON(GTKConfigKCModuleFactory, "kde-gtk-config.json", registerPlugin<GTKConfigKCModule>();) | 43 | K_PLUGIN_FACTORY_WITH_JSON(GTKConfigKCModuleFactory, "kde-gtk-config.json", registerPlugin<GTKConfigKCModule>();) | ||
43 | 44 | | |||
44 | QMap<QString, int> gtkToolbarInit() | 45 | QMap<QString, int> gtkToolbarInit() | ||
45 | { | 46 | { | ||
46 | QMap<QString, int> gtkToolbar; | 47 | QMap<QString, int> gtkToolbar; | ||
47 | gtkToolbar["GTK_TOOLBAR_ICONS"] = 0; | 48 | gtkToolbar["GTK_TOOLBAR_ICONS"] = 0; | ||
Show All 20 Lines | 63 | { | |||
68 | acercade->addAuthor(i18n("José Antonio Sánchez Reynaga (antonioJASR)"),i18n("Main Developer"), "joanzare@gmail.com"); | 69 | acercade->addAuthor(i18n("José Antonio Sánchez Reynaga (antonioJASR)"),i18n("Main Developer"), "joanzare@gmail.com"); | ||
69 | acercade->addAuthor(i18n("Aleix Pol i Gonzalez"), i18n("Feature development. Previews, code refactoring."), "aleixpol@blue-systems.com"); | 70 | acercade->addAuthor(i18n("Aleix Pol i Gonzalez"), i18n("Feature development. Previews, code refactoring."), "aleixpol@blue-systems.com"); | ||
70 | acercade->addCredit(i18n("Manuel Tortosa (manutortosa)"), i18n("Ideas, tester, internationalization")); | 71 | acercade->addCredit(i18n("Manuel Tortosa (manutortosa)"), i18n("Ideas, tester, internationalization")); | ||
71 | acercade->addCredit(i18n("Adrián Chaves Fernández (Gallaecio)"), i18n("Internationalization")); | 72 | acercade->addCredit(i18n("Adrián Chaves Fernández (Gallaecio)"), i18n("Internationalization")); | ||
72 | setAboutData(acercade); | 73 | setAboutData(acercade); | ||
73 | setButtons(KCModule::Default | KCModule::Apply); | 74 | setButtons(KCModule::Default | KCModule::Apply); | ||
74 | ui->setupUi(this); | 75 | ui->setupUi(this); | ||
75 | appareance = new AppearenceGTK; | 76 | appareance = new AppearenceGTK; | ||
77 | | ||||
76 | m_cursorsModel = new CursorThemesModel(this); | 78 | m_cursorsModel = new CursorThemesModel(this); | ||
77 | ui->cb_cursor->setModel(m_cursorsModel); | 79 | QSortFilterProxyModel *cursorsProxyModel = new QSortFilterProxyModel(this); | ||
80 | cursorsProxyModel->setSourceModel(m_cursorsModel); | ||||
81 | cursorsProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); | ||||
82 | cursorsProxyModel->setSortRole(Qt::DisplayRole); | ||||
83 | cursorsProxyModel->sort(0); | ||||
84 | ui->cb_cursor->setModel(cursorsProxyModel); | ||||
85 | | ||||
78 | m_iconsModel = new IconThemesModel(false, this); | 86 | m_iconsModel = new IconThemesModel(false, this); | ||
79 | ui->cb_icon->setModel(m_iconsModel); | 87 | QSortFilterProxyModel *iconsProxyModel = new QSortFilterProxyModel(this); | ||
80 | ui->cb_icon_fallback->setModel(m_iconsModel); | 88 | iconsProxyModel->setSourceModel(m_iconsModel); | ||
89 | iconsProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); | ||||
90 | iconsProxyModel->setSortRole(Qt::DisplayRole); | ||||
91 | iconsProxyModel->sort(0); | ||||
92 | ui->cb_icon->setModel(iconsProxyModel); | ||||
93 | ui->cb_icon_fallback->setModel(iconsProxyModel); | ||||
81 | 94 | | |||
82 | m_tempGtk2Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/gtkrc-2.0"; | 95 | m_tempGtk2Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/gtkrc-2.0"; | ||
83 | m_tempGtk3Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/.config/gtk-3.0/settings.ini"; | 96 | m_tempGtk3Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/.config/gtk-3.0/settings.ini"; | ||
84 | 97 | | |||
85 | const QIcon previewIcon = QIcon::fromTheme("document-preview"); | 98 | const QIcon previewIcon = QIcon::fromTheme("document-preview"); | ||
86 | ui->gtk2Preview->setIcon(previewIcon); | 99 | ui->gtk2Preview->setIcon(previewIcon); | ||
87 | ui->gtk3Preview->setIcon(previewIcon); | 100 | ui->gtk3Preview->setIcon(previewIcon); | ||
88 | 101 | | |||
▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines |