Use dedicated icon for each category
@ -22,10 +22,10 @@ install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
|
||||
FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svgz"
|
||||
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE)
|
||||
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
|
||||
install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
|
||||
FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svgz"
|
||||
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE)
|
||||
PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
|
||||
install(FILES linux/keepassxc.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
|
||||
endif(UNIX AND NOT APPLE)
|
||||
|
BIN
share/icons/application/32x32/actions/document-edit.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
share/icons/application/32x32/actions/document-properties.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
share/icons/application/32x32/actions/key-enter.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
share/icons/application/32x32/actions/view-history.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
share/icons/application/32x32/apps/internet-web-browser.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
share/icons/application/32x32/apps/preferences-desktop-icons.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
share/icons/application/32x32/categories/preferences-other.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
share/icons/application/32x32/status/security-high.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
share/icons/svg/document-properties.svgz
Normal file
BIN
share/icons/svg/internet-web-browser.svgz
Normal file
BIN
share/icons/svg/key-enter.svgz
Normal file
BIN
share/icons/svg/preferences-desktop-icons.svgz
Normal file
BIN
share/icons/svg/preferences-other.svgz
Normal file
BIN
share/icons/svg/security-high.svgz
Normal file
BIN
share/icons/svg/view-history.svgz
Normal file
@ -54,34 +54,47 @@
|
||||
#ifdef WITH_XC_HTTP
|
||||
class HttpPlugin: public ISettingsPage
|
||||
{
|
||||
public:
|
||||
HttpPlugin(DatabaseTabWidget * tabWidget) {
|
||||
m_service = new Service(tabWidget);
|
||||
}
|
||||
virtual ~HttpPlugin() {
|
||||
//delete m_service;
|
||||
}
|
||||
virtual QString name() {
|
||||
return QObject::tr("Browser Integration");
|
||||
}
|
||||
virtual QWidget * createWidget() {
|
||||
OptionDialog * dlg = new OptionDialog();
|
||||
QObject::connect(dlg, SIGNAL(removeSharedEncryptionKeys()), m_service, SLOT(removeSharedEncryptionKeys()));
|
||||
QObject::connect(dlg, SIGNAL(removeStoredPermissions()), m_service, SLOT(removeStoredPermissions()));
|
||||
return dlg;
|
||||
}
|
||||
virtual void loadSettings(QWidget * widget) {
|
||||
qobject_cast<OptionDialog*>(widget)->loadSettings();
|
||||
}
|
||||
virtual void saveSettings(QWidget * widget) {
|
||||
qobject_cast<OptionDialog*>(widget)->saveSettings();
|
||||
if (HttpSettings::isEnabled())
|
||||
m_service->start();
|
||||
else
|
||||
m_service->stop();
|
||||
}
|
||||
private:
|
||||
Service *m_service;
|
||||
public:
|
||||
HttpPlugin(DatabaseTabWidget * tabWidget)
|
||||
{
|
||||
m_service = new Service(tabWidget);
|
||||
}
|
||||
|
||||
~HttpPlugin() = default;
|
||||
|
||||
QString name() override
|
||||
{
|
||||
return QObject::tr("Browser Integration");
|
||||
}
|
||||
|
||||
QIcon icon() override
|
||||
{
|
||||
return FilePath::instance()->icon("apps", "internet-web-browser");
|
||||
}
|
||||
|
||||
QWidget * createWidget() override
|
||||
{
|
||||
OptionDialog * dlg = new OptionDialog();
|
||||
QObject::connect(dlg, SIGNAL(removeSharedEncryptionKeys()), m_service, SLOT(removeSharedEncryptionKeys()));
|
||||
QObject::connect(dlg, SIGNAL(removeStoredPermissions()), m_service, SLOT(removeStoredPermissions()));
|
||||
return dlg;
|
||||
}
|
||||
|
||||
void loadSettings(QWidget * widget) override
|
||||
{
|
||||
qobject_cast<OptionDialog*>(widget)->loadSettings();
|
||||
}
|
||||
|
||||
void saveSettings(QWidget * widget) override
|
||||
{
|
||||
qobject_cast<OptionDialog*>(widget)->saveSettings();
|
||||
if (HttpSettings::isEnabled())
|
||||
m_service->start();
|
||||
else
|
||||
m_service->stop();
|
||||
}
|
||||
private:
|
||||
Service *m_service;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -58,8 +58,8 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
|
||||
m_secUi->setupUi(m_secWidget);
|
||||
m_generalUi->setupUi(m_generalWidget);
|
||||
addPage(tr("General"), FilePath::instance()->icon("apps", "keepassxc"), m_generalWidget);
|
||||
addPage(tr("Security"), FilePath::instance()->icon("apps", "keepassxc"), m_secWidget);
|
||||
addPage(tr("General"), FilePath::instance()->icon("categories", "preferences-other"), m_generalWidget);
|
||||
addPage(tr("Security"), FilePath::instance()->icon("status", "security-high"), m_secWidget);
|
||||
|
||||
m_generalUi->autoTypeShortcutWidget->setVisible(autoType()->isAvailable());
|
||||
m_generalUi->autoTypeShortcutLabel->setVisible(autoType()->isAvailable());
|
||||
@ -88,12 +88,12 @@ SettingsWidget::~SettingsWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void SettingsWidget::addSettingsPage(ISettingsPage *page)
|
||||
void SettingsWidget::addSettingsPage(ISettingsPage* page)
|
||||
{
|
||||
QWidget * widget = page->createWidget();
|
||||
QWidget* widget = page->createWidget();
|
||||
widget->setParent(this);
|
||||
m_extraPages.append(ExtraPage(page, widget));
|
||||
addPage(page->name(), FilePath::instance()->icon("apps", "keepassxc"), widget);
|
||||
addPage(page->name(), page->icon(), widget);
|
||||
}
|
||||
|
||||
void SettingsWidget::loadSettings()
|
||||
|
@ -29,6 +29,7 @@ class ISettingsPage {
|
||||
public:
|
||||
virtual ~ISettingsPage() {}
|
||||
virtual QString name() = 0;
|
||||
virtual QIcon icon() = 0;
|
||||
virtual QWidget * createWidget() = 0;
|
||||
virtual void loadSettings(QWidget * widget) = 0;
|
||||
virtual void saveSettings(QWidget * widget) = 0;
|
||||
|
@ -90,7 +90,7 @@ EditEntryWidget::~EditEntryWidget()
|
||||
void EditEntryWidget::setupMain()
|
||||
{
|
||||
m_mainUi->setupUi(m_mainWidget);
|
||||
addPage(tr("Entry"), FilePath::instance()->icon("apps", "keepassxc"), m_mainWidget);
|
||||
addPage(tr("Entry"), FilePath::instance()->icon("actions", "document-edit"), m_mainWidget);
|
||||
|
||||
m_mainUi->togglePasswordButton->setIcon(filePath()->onOffIcon("actions", "password-show"));
|
||||
m_mainUi->togglePasswordGeneratorButton->setIcon(filePath()->icon("actions", "password-generator", false));
|
||||
@ -115,7 +115,7 @@ void EditEntryWidget::setupMain()
|
||||
void EditEntryWidget::setupAdvanced()
|
||||
{
|
||||
m_advancedUi->setupUi(m_advancedWidget);
|
||||
addPage(tr("Advanced"), FilePath::instance()->icon("apps", "keepassxc"), m_advancedWidget);
|
||||
addPage(tr("Advanced"), FilePath::instance()->icon("categories", "preferences-other"), m_advancedWidget);
|
||||
|
||||
m_attachmentsModel->setEntryAttachments(m_entryAttachments);
|
||||
m_advancedUi->attachmentsView->setModel(m_attachmentsModel);
|
||||
@ -139,13 +139,13 @@ void EditEntryWidget::setupAdvanced()
|
||||
|
||||
void EditEntryWidget::setupIcon()
|
||||
{
|
||||
addPage(tr("Icon"), FilePath::instance()->icon("apps", "keepassxc"), m_iconsWidget);
|
||||
addPage(tr("Icon"), FilePath::instance()->icon("apps", "preferences-desktop-icons"), m_iconsWidget);
|
||||
}
|
||||
|
||||
void EditEntryWidget::setupAutoType()
|
||||
{
|
||||
m_autoTypeUi->setupUi(m_autoTypeWidget);
|
||||
addPage(tr("Auto-Type"), FilePath::instance()->icon("apps", "keepassxc"), m_autoTypeWidget);
|
||||
addPage(tr("Auto-Type"), FilePath::instance()->icon("actions", "key-enter"), m_autoTypeWidget);
|
||||
|
||||
m_autoTypeDefaultSequenceGroup->addButton(m_autoTypeUi->inheritSequenceButton);
|
||||
m_autoTypeDefaultSequenceGroup->addButton(m_autoTypeUi->customSequenceButton);
|
||||
@ -177,13 +177,13 @@ void EditEntryWidget::setupAutoType()
|
||||
|
||||
void EditEntryWidget::setupProperties()
|
||||
{
|
||||
addPage(tr("Properties"), FilePath::instance()->icon("apps", "keepassxc"), m_editWidgetProperties);
|
||||
addPage(tr("Properties"), FilePath::instance()->icon("actions", "document-properties"), m_editWidgetProperties);
|
||||
}
|
||||
|
||||
void EditEntryWidget::setupHistory()
|
||||
{
|
||||
m_historyUi->setupUi(m_historyWidget);
|
||||
addPage(tr("History"), FilePath::instance()->icon("apps", "keepassxc"), m_historyWidget);
|
||||
addPage(tr("History"), FilePath::instance()->icon("actions", "view-history"), m_historyWidget);
|
||||
|
||||
m_sortModel->setSourceModel(m_historyModel);
|
||||
m_sortModel->setDynamicSortFilter(true);
|
||||
|