Add change search method in ukui-search.

This commit is contained in:
zhangzihao 2021-04-20 16:24:07 +08:00
parent fd9a19ecae
commit 6969fba1fd
28 changed files with 868 additions and 263 deletions

View File

@ -0,0 +1,9 @@
<schemalist gettext-domain="ukui-search">
<schema id="org.ukui.search.settings" path="/org/ukui/ukui-search/settings/">
<key name="index-search" type="b">
<default>false</default>
<summary>search method</summary>
<description>Is current search-method index-search.</description>
</key>
</schema>
</schemalist>

View File

@ -77,8 +77,18 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent)
if (key == STYLE_NAME_KEY) {
//当前主题改变时也发出paletteChanged信号通知主界面刷新
qApp->paletteChanged(qApp->palette());
m_cache.remove(STYLE_NAME_KEY);
m_cache.insert(STYLE_NAME_KEY, m_theme_gsettings->get(STYLE_NAME_KEY).toString());
} else if (key == FONT_SIZE_KEY) {
qApp->paletteChanged(qApp->palette());
m_cache.remove(FONT_SIZE_KEY);
m_cache.insert(FONT_SIZE_KEY, m_theme_gsettings->get(FONT_SIZE_KEY).toDouble());
}
});
m_cache.remove(STYLE_NAME_KEY);
m_cache.insert(STYLE_NAME_KEY, m_theme_gsettings->get(STYLE_NAME_KEY).toString());
m_cache.remove(FONT_SIZE_KEY);
m_cache.insert(FONT_SIZE_KEY, m_theme_gsettings->get(FONT_SIZE_KEY).toDouble());
}
}
@ -258,14 +268,14 @@ void GlobalSettings::setValue(const QString &key, const QVariant &value)
// m_settings->sync();
QtConcurrent::run([=]() {
// qDebug()<<m_settings->status();
// if (m_mutex.tryLock(1000)) {
// if (m_mutex.tryLock(1000)) {
// m_mutex.lock();
m_settings->setValue(key, value);
// qDebug()<<"setvalue========finish!!!"<<key<<":"<<value;
m_settings->sync();
// qDebug()<<"setvalue========sync!!!"<<key<<":"<<value;
// m_mutex.unlock();
// }
// m_mutex.unlock();
// }
});
}

View File

@ -39,10 +39,12 @@
#define TRANSPARENCY_KEY "transparency"
#define THEME_GSETTINGS_ID "org.ukui.style"
#define STYLE_NAME_KEY "styleName"
#define FONT_SIZE_KEY "systemFontSize"
#define INDEX_DATABASE_STATE "index_database_state"
#define CONTENT_INDEX_DATABASE_STATE "content_index_database_state"
#define INDEX_GENERATOR_NORMAL_EXIT "index_generator_normal_exit"
#define INOTIFY_NORMAL_EXIT "inotify_normal_exit"
#define ENABLE_CREATE_INDEX_ASK_DIALOG "enable_create_index_ask_dialog"
#define WEB_ENGINE "web_engine"
#define PATH_EMPTY 1;
#define PATH_NOT_IN_HOME 2;

View File

@ -25,8 +25,36 @@
#define NEW_QUEUE(a) a = new QQueue<QString>(); qDebug("---------------------------%s %s %s new at %d..",__FILE__,__FUNCTION__,#a,__LINE__);
//#define DELETE_QUEUE(a )
FirstIndex::FirstIndex(const QString& path) : Traverse_BFS(path)
FirstIndex::FirstIndex()
{
}
FirstIndex::~FirstIndex()
{
qDebug() << "~FirstIndex";
if(this->q_index)
delete this->q_index;
this->q_index = nullptr;
if(this->q_content_index)
delete this->q_content_index;
this->q_content_index = nullptr;
if (this->p_indexGenerator)
delete this->p_indexGenerator;
this->p_indexGenerator = nullptr;
qDebug() << "~FirstIndex end";
}
void FirstIndex::DoSomething(const QFileInfo& fileInfo){
// qDebug() << "there are some shit here"<<fileInfo.fileName() << fileInfo.absoluteFilePath() << QString(fileInfo.isDir() ? "1" : "0");
this->q_index->enqueue(QVector<QString>() << fileInfo.fileName() << fileInfo.absoluteFilePath() << QString((fileInfo.isDir() && (!fileInfo.isSymLink())) ? "1" : "0"));
if ((fileInfo.fileName().split(".", QString::SkipEmptyParts).length() > 1) && (true == targetFileTypeMap[fileInfo.fileName().split(".").last()])){
this->q_content_index->enqueue(fileInfo.absoluteFilePath());
}
}
void FirstIndex::run(){
QTime t1 = QTime::currentTime();
// Create a fifo at ~/.config/org.ukui/ukui-search, the fifo is used to control the order of child processes' running.
QDir fifoDir = QDir(QDir::homePath()+"/.config/org.ukui/ukui-search");
if(!fifoDir.exists())
@ -69,35 +97,6 @@ FirstIndex::FirstIndex(const QString& path) : Traverse_BFS(path)
//this->q_content_index = new QQueue<QString>();
NEW_QUEUE(this->q_content_index);
// this->mlm = new MessageListManager();
}
FirstIndex::~FirstIndex()
{
qDebug() << "~FirstIndex";
if(this->q_index)
delete this->q_index;
this->q_index = nullptr;
if(this->q_content_index)
delete this->q_content_index;
this->q_content_index = nullptr;
if (this->p_indexGenerator)
delete this->p_indexGenerator;
this->p_indexGenerator = nullptr;
qDebug() << "~FirstIndex end";
// delete this->mlm;
// this->mlm = nullptr;
}
void FirstIndex::DoSomething(const QFileInfo& fileInfo){
// qDebug() << "there are some shit here"<<fileInfo.fileName() << fileInfo.absoluteFilePath() << QString(fileInfo.isDir() ? "1" : "0");
this->q_index->enqueue(QVector<QString>() << fileInfo.fileName() << fileInfo.absoluteFilePath() << QString((fileInfo.isDir() && (!fileInfo.isSymLink())) ? "1" : "0"));
if ((fileInfo.fileName().split(".", QString::SkipEmptyParts).length() > 1) && (true == targetFileTypeMap[fileInfo.fileName().split(".").last()])){
this->q_content_index->enqueue(fileInfo.absoluteFilePath());
}
}
void FirstIndex::run(){
QTime t1 = QTime::currentTime();
int fifo_fd;
char buffer[2];
@ -205,7 +204,7 @@ void FirstIndex::run(){
if (p_indexGenerator)
delete p_indexGenerator;
p_indexGenerator = nullptr;
GlobalSettings::getInstance()->forceSync();
// GlobalSettings::getInstance()->forceSync();
::_exit(0);
}
else if(pid < 0)
@ -220,8 +219,8 @@ void FirstIndex::run(){
GlobalSettings::getInstance()->setValue(INOTIFY_NORMAL_EXIT, "2");
int retval = write(fifo_fd, buffer, strlen(buffer));
if(retval == -1)
int retval1 = write(fifo_fd, buffer, strlen(buffer));
if(retval1 == -1)
{
qWarning("write error\n");
}

View File

@ -45,7 +45,7 @@
class FirstIndex : public QThread, public Traverse_BFS
{
public:
FirstIndex(const QString&);
FirstIndex();
~FirstIndex();
virtual void DoSomething(const QFileInfo &) final;
protected:

View File

@ -8,6 +8,7 @@ HEADERS += \
$$PWD/index-generator.h \
$$PWD/inotify-index.h \
$$PWD/search-manager.h \
$$PWD/searchmethodmanager.h \
$$PWD/traverse_bfs.h \
$$PWD/ukui-search-qdbus.h
@ -19,6 +20,7 @@ SOURCES += \
$$PWD/index-generator.cpp \
$$PWD/inotify-index.cpp \
$$PWD/search-manager.cpp \
$$PWD/searchmethodmanager.cpp \
$$PWD/traverse_bfs.cpp \
$$PWD/ukui-search-qdbus.cpp

View File

@ -53,17 +53,12 @@ InotifyIndex::InotifyIndex(const QString& path) : Traverse_BFS(path)
usQDBus.setInotifyMaxUserWatches();
qDebug() << "setInotifyMaxUserWatches end";
m_fd = inotify_init();
qDebug() << "m_fd----------->" <<m_fd;
this->AddWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->firstTraverse();
}
InotifyIndex::~InotifyIndex()
{
IndexGenerator::getInstance()->~IndexGenerator();
qWarning() << "~InotifyIndex";
}
void InotifyIndex::firstTraverse(){
@ -113,7 +108,7 @@ bool InotifyIndex::AddWatch(const QString &path){
return true;
}
bool InotifyIndex::RemoveWatch(const QString &path){
bool InotifyIndex::RemoveWatch(const QString &path, bool removeFromDatabase){
int ret = inotify_rm_watch(m_fd, currentPath.key(path));
if (ret){
qDebug() << "remove path error";
@ -122,26 +117,27 @@ bool InotifyIndex::RemoveWatch(const QString &path){
// Q_ASSERT(ret == 0);
assert(ret == 0);
for (QMap<int, QString>::Iterator i = currentPath.begin(); i != currentPath.end();){
// qDebug() << i.value();
if (removeFromDatabase) {
for (QMap<int, QString>::Iterator i = currentPath.begin(); i != currentPath.end();) {
// qDebug() << i.value();
if (i.value().length() > path.length()){
// if (i.value().mid(0, path.length()) == path){
// if (path.startsWith(i.value())){
// if (i.value().mid(0, path.length()) == path){
// if (path.startsWith(i.value())){
if (i.value().startsWith(path)){
qDebug() << "remove path: " << i.value();
ret = inotify_rm_watch(m_fd, currentPath.key(path));
if (ret){
qDebug() << "remove path error";
// return false;
// return false;
}
// assert(ret == 0);
// assert(ret == 0);
/*--------------------------------*/
//在此调用删除索引
qDebug() << i.value();
IndexGenerator::getInstance()->deleteAllIndex(new QStringList(i.value()));
/*--------------------------------*/
currentPath.erase(i++);
// i++;
// i++;
}
else{
i++;
@ -151,6 +147,32 @@ bool InotifyIndex::RemoveWatch(const QString &path){
i++;
}
}
} else {
for (QMap<int, QString>::Iterator i = currentPath.begin(); i != currentPath.end();) {
// qDebug() << i.value();
if (i.value().length() > path.length()){
// if (i.value().mid(0, path.length()) == path){
// if (path.startsWith(i.value())){
if (i.value().startsWith(path)){
qDebug() << "remove path: " << i.value();
ret = inotify_rm_watch(m_fd, currentPath.key(path));
if (ret){
qDebug() << "remove path error";
// return false;
}
// assert(ret == 0);
currentPath.erase(i++);
// i++;
}
else{
i++;
}
}
else{
i++;
}
}
}
// qDebug() << path;
//这个貌似不用删先mark一下
// currentPath.remove(currentPath.key(path));
@ -228,6 +250,13 @@ next:
}
void InotifyIndex::run(){
m_fd = inotify_init();
qDebug() << "m_fd----------->" <<m_fd;
this->AddWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->firstTraverse();
int fifo_fd;
char buffer[2];
memset(buffer, 0, sizeof(buffer));
@ -256,7 +285,7 @@ void InotifyIndex::run(){
ssize_t numRead;
while (!isInterruptionRequested()) {
while (FileUtils::SearchMethod::INDEXSEARCH == FileUtils::searchMethod) {
// for (;;) { /* Read events forever */
memset(buf, 0x00, BUF_LEN);
numRead = read(m_fd, buf, BUF_LEN);
@ -323,7 +352,7 @@ void InotifyIndex::run(){
qDebug() << "select timeout!";
::free(read_timeout);
IndexGenerator::getInstance()->~IndexGenerator();
GlobalSettings::getInstance()->forceSync();
// GlobalSettings::getInstance()->forceSync();
::_exit(0);
}else{
GlobalSettings::getInstance()->setValue(INOTIFY_NORMAL_EXIT, "0");
@ -343,7 +372,6 @@ void InotifyIndex::run(){
else if (pid > 0){
memset(buf, 0x00, BUF_LEN);
waitpid(pid, NULL, 0);
--FileUtils::_index_status;
}
else{
@ -351,4 +379,11 @@ void InotifyIndex::run(){
}
}
if (FileUtils::SearchMethod::DIRECTSEARCH == FileUtils::searchMethod) {
GlobalSettings::getInstance()->setValue(INOTIFY_NORMAL_EXIT, "3");
RemoveWatch(QStandardPaths::writableLocation(QStandardPaths::HomeLocation), false);
}
}

View File

@ -48,7 +48,7 @@ public:
~InotifyIndex();
bool AddWatch(const QString&);
bool RemoveWatch(const QString&);
bool RemoveWatch(const QString&, bool removeFromDatabase = true);
virtual void DoSomething(const QFileInfo &) final;
void eventProcess(const char*, ssize_t);
@ -56,7 +56,6 @@ public:
protected:
void run() override;
private:
QString* m_watch_path;
int m_fd;
QMap<int, QString> currentPath;

View File

@ -446,7 +446,7 @@ void DirectSearch::run()
}
if (i.fileName().contains(m_keyword)) {
SearchManager::m_mutex1.lock();
qWarning() << i.fileName() << m_keyword;
// qWarning() << i.fileName() << m_keyword;
if (m_uniqueSymbol == SearchManager::uniqueSymbol1) {
// TODO
if (i.isDir() && m_searchResultDir->length() < 51) {

View File

@ -0,0 +1,26 @@
#include "searchmethodmanager.h"
void SearchMethodManager::searchMethod(FileUtils::SearchMethod sm)
{
qWarning() << "searchMethod start: " << static_cast<int>(sm);
if (FileUtils::SearchMethod::INDEXSEARCH == sm || FileUtils::SearchMethod::DIRECTSEARCH == sm) {
FileUtils::searchMethod = sm;
} else {
printf("enum class error!!!\n");
qWarning("enum class error!!!\n");
}
if (FileUtils::SearchMethod::INDEXSEARCH == sm && 0 == FileUtils::_index_status) {
qWarning() << "start first index";
// m_fi = FirstIndex("/home/zhangzihao/Desktop");
m_fi.start();
qWarning() << "start inotify index";
// InotifyIndex ii("/home");
// ii.start();
this->m_ii = InotifyIndex::getInstance("/home");
if (!this->m_ii->isRunning()) {
this->m_ii->start();
}
qDebug()<<"Search method has been set to INDEXSEARCH";
}
qWarning() << "searchMethod end: " << static_cast<int>(FileUtils::searchMethod);
}

View File

@ -0,0 +1,17 @@
#ifndef SEARCHMETHODMANAGER_H
#define SEARCHMETHODMANAGER_H
#include "first-index.h"
#include "inotify-index.h"
class SearchMethodManager
{
public:
SearchMethodManager() = default;
void searchMethod(FileUtils::SearchMethod sm);
private:
FirstIndex m_fi;
InotifyIndex* m_ii;
};
#endif // SEARCHMETHODMANAGER_H

View File

@ -28,12 +28,13 @@
class Traverse_BFS
{
public:
Traverse_BFS() = default;
void Traverse();
virtual ~Traverse_BFS() = default;
virtual void DoSomething(const QFileInfo&) = 0;
void setPath(const QString&);
protected:
explicit Traverse_BFS(const QString&);
Traverse_BFS(const QString&);
QString path = "/home";
private:
Traverse_BFS(const Traverse_BFS&) = delete;

View File

@ -21,15 +21,16 @@
#define LIBSEARCH_H
#include "libsearch_global.h"
#include "index/search-manager.h"
#include "appsearch/app-match.h"
#include "settingsearch/setting-match.h"
#include "file-utils.h"
#include "global-settings.h"
#include "index/first-index.h"
#include "index/searchmethodmanager.h"
#include "index/first-index.h"
#include "index/ukui-search-qdbus.h"
#include "index/inotify-index.h"
#include "index/search-manager.h"
class LIBSEARCH_EXPORT GlobalSearch
{

View File

@ -25,6 +25,7 @@
#include <QDebug>
#include <QTextDocument>
#include <QAbstractTextDocumentLayout>
#include "global-settings.h"
HighlightItemDelegate::HighlightItemDelegate(QObject *parent) : QStyledItemDelegate (parent)
{
@ -83,8 +84,11 @@ QString HighlightItemDelegate::getHtmlText(QPainter *painter, const QStyleOption
{
int indexFindLeft = 0;
QString indexString = index.model()->data(index,Qt::DisplayRole).toString();
QFontMetrics m_QFontMetrics = painter->fontMetrics();
QString indexColString = m_QFontMetrics.elidedText(indexString, Qt::ElideRight, itemOption.rect.width() + 10); //当字体超过Item的长度时显示为省略号
QFont ft(painter->font().family(), GlobalSettings::getInstance()->getValue(FONT_SIZE_KEY).toInt());
QFontMetrics fm(ft);
QString indexColString = fm.elidedText(indexString, Qt::ElideRight, itemOption.rect.width() + 10); //当字体超过Item的长度时显示为省略号
// QFontMetrics m_QFontMetrics = painter->fontMetrics();
// QString indexColString = m_QFontMetrics.elidedText(indexString, Qt::ElideRight, itemOption.rect.width() + 10); //当字体超过Item的长度时显示为省略号
QString htmlString;
if ((indexColString.toUpper()).contains((m_regFindKeyWords.toUpper()))) {
indexFindLeft = indexColString.toUpper().indexOf(m_regFindKeyWords.toUpper()); //得到查找字体在当前整个Item字体中的位置

View File

@ -35,8 +35,12 @@ HomePageItem::HomePageItem(QWidget *parent, const int& type, const QString& path
connect(qApp, &QApplication::paletteChanged, this, [ = ]() {
if (m_namelabel) {
QString name = this->toolTip();
if (m_type == ItemType::Recent) {
m_namelabel->setText(m_namelabel->fontMetrics().elidedText(name, Qt::ElideRight, 250));
} else {
m_namelabel->setText(m_namelabel->fontMetrics().elidedText(name, Qt::ElideRight, 108));
}
}
});
}
@ -51,6 +55,7 @@ HomePageItem::~HomePageItem()
*/
void HomePageItem::setupUi(const int& type, const QString& path) {
m_path = path;
m_type = type;
m_widget = new QWidget(this);
m_widget->setObjectName("MainWidget");
// m_widget->setStyleSheet("QWidget#MainWidget{background: rgba(0, 0, 0, 0.05); border-radius: 4px;}");

View File

@ -56,6 +56,7 @@ private:
QLabel * m_namelabel = nullptr;
double m_transparency = 0;
QString m_path;
int m_type = 0;
};
#endif // HOMEPAGEITEM_H

View File

@ -21,9 +21,13 @@
#include "search-list-view.h"
#include <QDebug>
#include <QFileInfo>
#include "custom-style.h"
SearchListView::SearchListView(QWidget * parent, const QStringList& list, const int& type) : QTreeView(parent)
{
CustomStyle * style = new CustomStyle(GlobalSettings::getInstance()->getValue(STYLE_NAME_KEY).toString());
this->setStyle(style);
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setSelectionBehavior(QAbstractItemView::SelectRows);
setSelectionMode(QAbstractItemView::SingleSelection);

View File

@ -0,0 +1,131 @@
/*
*
* Copyright (C) 2020, KylinSoft Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Authors: zhangjiaping <zhangjiaping@kylinos.cn>
*
*/
#include "create-index-ask-dialog.h"
#include <QPainter>
CreateIndexAskDialog::CreateIndexAskDialog(QWidget *parent) : QDialog(parent)
{
this->setWindowIcon(QIcon::fromTheme("kylin-search"));
this->setWindowTitle(tr("ukui-search"));
initUi();
}
void CreateIndexAskDialog::initUi()
{
this->setFixedSize(380, 202);
m_mainLyt = new QVBoxLayout(this);
this->setLayout(m_mainLyt);
m_mainLyt->setContentsMargins(0, 0, 0, 0);
//标题栏
m_titleFrame = new QFrame(this);
m_titleFrame->setFixedHeight(40);
m_titleLyt = new QHBoxLayout(m_titleFrame);
m_titleLyt->setContentsMargins(8, 8, 8, 8);
m_titleFrame->setLayout(m_titleLyt);
m_iconLabel = new QLabel(m_titleFrame);
m_iconLabel->setFixedSize(24, 24);
m_iconLabel->setPixmap(QIcon::fromTheme("kylin-search").pixmap(QSize(24, 24)));
m_titleLabel = new QLabel(m_titleFrame);
m_titleLabel->setText(tr("Search"));
m_closeBtn = new QPushButton(m_titleFrame);
m_closeBtn->setFixedSize(24, 24);
m_closeBtn->setIcon(QIcon::fromTheme("window-close-symbolic"));
m_closeBtn->setProperty("isWindowButton", 0x02);
m_closeBtn->setProperty("useIconHighlightEffect", 0x08);
m_closeBtn->setFlat(true);
connect(m_closeBtn, &QPushButton::clicked, this, [ = ]() {
this->hide();
Q_EMIT this->closed();
});
m_titleLyt->addWidget(m_iconLabel);
m_titleLyt->addWidget(m_titleLabel);
m_titleLyt->addStretch();
m_titleLyt->addWidget(m_closeBtn);
m_mainLyt->addWidget(m_titleFrame);
//内容区域
m_contentFrame = new QFrame(this);
m_contentLyt = new QVBoxLayout(m_contentFrame);
m_contentFrame->setLayout(m_contentLyt);
m_contentLyt->setContentsMargins(32, 16, 32, 24);
m_tipLabel = new QLabel(m_contentFrame);
m_tipLabel->setText(tr("Creating index can help you getting results quickly, whether to create or not?"));
m_tipLabel->setWordWrap(true);
m_contentLyt->addWidget(m_tipLabel);
m_checkFrame = new QFrame(m_contentFrame);
m_checkLyt = new QHBoxLayout(m_checkFrame);
m_checkLyt->setContentsMargins(0, 0, 0, 0);
m_checkFrame->setLayout(m_checkLyt);
m_checkBox = new QCheckBox(m_checkFrame);
m_checkBox->setText(tr("Don't remind"));
m_checkLyt->addWidget(m_checkBox);
m_checkLyt->addStretch();
m_contentLyt->addWidget(m_checkFrame);
m_contentLyt->addStretch();
m_btnFrame = new QFrame(m_contentFrame);
m_btnLyt = new QHBoxLayout(m_btnFrame);
m_btnFrame->setLayout(m_btnLyt);
m_btnLyt->setContentsMargins(0, 0, 0, 0);
m_cancelBtn = new QPushButton(m_btnFrame);
m_cancelBtn->setText(tr("No"));
m_confirmBtn = new QPushButton(m_btnFrame);
m_confirmBtn->setText(tr("Yes"));
connect(m_cancelBtn, &QPushButton::clicked, this, [ = ]() {
Q_EMIT this->btnClicked(false, m_checkBox->isChecked());
this->hide();
Q_EMIT this->closed();
});
connect(m_confirmBtn, &QPushButton::clicked, this, [ = ]() {
Q_EMIT this->btnClicked(true, m_checkBox->isChecked());
this->hide();
Q_EMIT this->closed();
});
m_btnLyt->addStretch();
m_btnLyt->addWidget(m_cancelBtn);
m_btnLyt->addWidget(m_confirmBtn);
m_contentLyt->addWidget(m_btnFrame);
m_mainLyt->addWidget(m_contentFrame);
}
/**
* @brief CreateIndexAskDialog::paintEvent
*/
void CreateIndexAskDialog::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter p(this);
p.setRenderHint(QPainter::Antialiasing);
QPainterPath rectPath;
rectPath.addRect(this->rect());
p.save();
p.fillPath(rectPath,palette().color(QPalette::Base));
p.restore();
return QDialog::paintEvent(event);
}

View File

@ -0,0 +1,72 @@
/*
*
* Copyright (C) 2020, KylinSoft Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Authors: zhangjiaping <zhangjiaping@kylinos.cn>
*
*/
#ifndef CREATEINDEXASKDIALOG_H
#define CREATEINDEXASKDIALOG_H
#include <QDialog>
#include <QFrame>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QCheckBox>
#include <QLabel>
#include <QPushButton>
#include <QStyleOption>
class CreateIndexAskDialog : public QDialog
{
Q_OBJECT
public:
CreateIndexAskDialog(QWidget *parent = nullptr);
~CreateIndexAskDialog() = default;
private:
void initUi();
QVBoxLayout * m_mainLyt = nullptr;
//标题栏
QFrame * m_titleFrame = nullptr;
QHBoxLayout * m_titleLyt = nullptr;
QLabel * m_iconLabel = nullptr;
QLabel * m_titleLabel = nullptr;
QPushButton * m_closeBtn = nullptr;
//内容区域
QFrame * m_contentFrame = nullptr;
QVBoxLayout * m_contentLyt = nullptr;
QLabel * m_tipLabel = nullptr; //提示语
QFrame * m_checkFrame = nullptr; //"不再提示"选项框区域
QHBoxLayout * m_checkLyt = nullptr;
QCheckBox * m_checkBox = nullptr;
QFrame * m_btnFrame = nullptr; //底部按钮区域
QHBoxLayout * m_btnLyt = nullptr;
QPushButton * m_cancelBtn = nullptr;
QPushButton * m_confirmBtn = nullptr;
void paintEvent(QPaintEvent *);
Q_SIGNALS:
void closed();
void btnClicked(const bool&, const bool&);
};
#endif // CREATEINDEXASKDIALOG_H

18
src/custom-style.cpp Normal file
View File

@ -0,0 +1,18 @@
#include "custom-style.h"
CustomStyle::CustomStyle(const QString &proxyStyleName, QObject *parent) : QProxyStyle(proxyStyleName)
{
}
QSize CustomStyle::sizeFromContents(QStyle::ContentsType type, const QStyleOption *option, const QSize &contentsSize, const QWidget *widget) const
{
switch (type) {
case CT_ItemViewItem: {
QSize size(0, GlobalSettings::getInstance()->getValue(FONT_SIZE_KEY).toDouble() * 2);
return size;
} break;
default: break;
}
return QProxyStyle::sizeFromContents(type, option, contentsSize, widget);
}

14
src/custom-style.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef CUSTOMSTYLE_H
#define CUSTOMSTYLE_H
#include <QProxyStyle>
#include "global-settings.h"
class CustomStyle : public QProxyStyle
{
Q_OBJECT
public:
explicit CustomStyle(const QString &proxyStyleName = "windows",QObject *parent = nullptr);
virtual QSize sizeFromContents(QStyle::ContentsType type, const QStyleOption *option, const QSize &contentsSize, const QWidget *widget = nullptr) const;
};
#endif // CUSTOMSTYLE_H

View File

@ -117,24 +117,31 @@ void centerToScreen(QWidget* widget) {
int y = widget->height();
widget->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 2 - y / 2 + desk_rect.top());
}
/*
void searchMethod(FileUtils::SearchMethod sm){
if (FileUtils::SearchMethod::INDEXSEARCH == sm || FileUtils::SearchMethod::DIRECTSEARCH == sm){
qWarning() << "searchMethod start: " << static_cast<int>(sm);
if (FileUtils::SearchMethod::INDEXSEARCH == sm || FileUtils::SearchMethod::DIRECTSEARCH == sm) {
FileUtils::searchMethod = sm;
} else {
printf("enum class error!!!\n");
qWarning("enum class error!!!\n");
}
if (FileUtils::SearchMethod::INDEXSEARCH == sm) {
if (FileUtils::SearchMethod::INDEXSEARCH == sm && 0 == FileUtils::_index_status) {
qWarning() << "start first index";
FirstIndex fi("/home/zhangzihao/Desktop");
fi.start();
qWarning() << "start inotify index";
// InotifyIndex ii("/home");
// ii.start();
InotifyIndex* ii = InotifyIndex::getInstance("/home");
if (!ii->isRunning()) {
ii->start();
} else if (FileUtils::SearchMethod::DIRECTSEARCH == sm) {
InotifyIndex::getInstance("/home")->requestInterruption();
}
qDebug()<<"Search method has been set to INDEXSEARCH";
}
qWarning() << "searchMethod end: " << static_cast<int>(FileUtils::searchMethod);
}
*/
int main(int argc, char *argv[])
{
// Determine whether the home directory has been created, and if not, keep waiting.
@ -163,7 +170,7 @@ int main(int argc, char *argv[])
}
// Output log to file
// qInstallMessageHandler(messageOutput);
qInstallMessageHandler(messageOutput);
// Register meta type
qDebug() << "ukui-search main start";
@ -266,6 +273,9 @@ int main(int argc, char *argv[])
// w->moveToPanel();
centerToScreen(w);
//请务必在connect之后初始化mainwindow的Gsettings为了保证gsettings第一次读取到的配置值能成功应用
w->initGsettings();
//使用窗管的无边框策略
// w->setProperty("useStyleWindowManager", false); //禁用拖动
// MotifWmHints hints;

View File

@ -65,6 +65,7 @@ MainWindow::MainWindow(QWidget *parent) :
this->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
this->setWindowTitle(tr("ukui-search"));
initUi();
initTimer();
// setProperty("useStyleWindowManager", false); //禁止拖动
m_hints.flags = MWM_HINTS_FUNCTIONS|MWM_HINTS_DECORATIONS;
@ -80,11 +81,6 @@ MainWindow::MainWindow(QWidget *parent) :
setProperty("blurRegion", QRegion(path.toFillPolygon().toPolygon()));
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon()));
const QByteArray id("org.ukui.control-center.personalise");
if (QGSettings::isSchemaInstalled(id)) {
m_transparency_gsettings = new QGSettings(id);
}
connect(qApp, &QApplication::paletteChanged, this, [ = ](const QPalette &pal) {
this->setPalette(pal);
this->update();
@ -144,6 +140,10 @@ MainWindow::MainWindow(QWidget *parent) :
}
}
});
QObject::connect(this, &MainWindow::searchMethodChanged, this, [ = ](FileUtils::SearchMethod sm) {
this->m_searchMethodManager.searchMethod(sm);
});
}
MainWindow::~MainWindow()
@ -160,6 +160,18 @@ MainWindow::~MainWindow()
delete m_settingsWidget;
m_settingsWidget = NULL;
}
if (m_askDialog) {
delete m_askDialog;
m_askDialog = NULL;
}
if (m_askTimer) {
delete m_askTimer;
m_askTimer = NULL;
}
if (m_search_gsettings) {
delete m_search_gsettings;
m_search_gsettings = NULL;
}
}
/**
@ -243,6 +255,7 @@ void MainWindow::initUi()
}
// m_seach_app_thread->stop();
m_contentFrame->setCurrentIndex(0);
m_askTimer->stop();
} else {
m_contentFrame->setCurrentIndex(1);
QTimer::singleShot(10,this,[=](){
@ -253,13 +266,45 @@ void MainWindow::initUi()
m_search_result_thread->start();
}
searchContent(text);
//允许弹窗且当前次搜索(为关闭主界面,算一次搜索过程)未询问且当前为暴力搜索
if (GlobalSettings::getInstance()->getValue(ENABLE_CREATE_INDEX_ASK_DIALOG).toString() != "false" && !m_currentSearchAsked && FileUtils::searchMethod == FileUtils::SearchMethod::DIRECTSEARCH)
m_askTimer->start();
});
}
m_researchTimer->stop(); //如果搜索内容发生改变,则停止建索引后重新搜索的倒计时
});
//初始化homepage
// m_contentFrame->setQuicklyOpenList(list); //如需自定义快捷打开使用本函数
m_contentFrame->initHomePage();
//创建索引询问弹窗
m_askDialog = new CreateIndexAskDialog(this);
MotifWmHints ask_dialog_hints;
ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS|MWM_HINTS_DECORATIONS;
ask_dialog_hints.functions = MWM_FUNC_ALL;
ask_dialog_hints.decorations = MWM_DECOR_BORDER;
XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints);
connect(m_askDialog, &CreateIndexAskDialog::closed, this, [ = ]() {
m_isAskDialogVisible = false;
});
connect(m_askDialog, &CreateIndexAskDialog::btnClicked, this, [ = ](const bool &create_index, const bool &no_longer_ask) {
if (no_longer_ask) {
GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "false");
} else {
GlobalSettings::getInstance()->setValue(ENABLE_CREATE_INDEX_ASK_DIALOG, "true");
}
if (create_index) {
if (m_search_gsettings && m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
m_search_gsettings->set(SEARCH_METHOD_KEY, true);
} else {
//调用创建索引接口
Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
//创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
m_researchTimer->start();
}
}
});
}
/**
@ -289,6 +334,13 @@ void MainWindow::clearSearchResult() {
m_searchLayout->focusOut();
}
/**
* @brief MainWindow::createIndexSlot
*/
void MainWindow::createIndexSlot()
{
}
/**
* @brief loadMainWindow
* main函数里面需要用
@ -414,12 +466,69 @@ void MainWindow::centerToScreen(QWidget* widget) {
widget->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 2 - y / 2 + desk_rect.top());
}
void MainWindow::initGsettings()
{
const QByteArray id(UKUI_SEARCH_SCHEMAS);
if (QGSettings::isSchemaInstalled(id)) {
m_search_gsettings = new QGSettings(id);
connect(m_search_gsettings, &QGSettings::changed, this, [ = ](const QString &key) {
if (key == SEARCH_METHOD_KEY) {
bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
this->setSearchMethod(is_index_search);
}
});
if (m_search_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
bool is_index_search = m_search_gsettings->get(SEARCH_METHOD_KEY).toBool();
this->setSearchMethod(is_index_search);
}
}
}
//使用GSetting获取当前窗口应该使用的透明度
double MainWindow::getTransparentData()
{
return GlobalSettings::getInstance()->getValue(TRANSPARENCY_KEY).toDouble();
}
void MainWindow::initTimer()
{
m_askTimer = new QTimer;
m_askTimer->setInterval(5 * 1000);
connect(m_askTimer, &QTimer::timeout, this, [ = ]() {
if (this->isVisible()) {
m_isAskDialogVisible = true;
m_askDialog->show();
m_currentSearchAsked = true;
}
m_askTimer->stop();
});
m_researchTimer = new QTimer;
m_researchTimer->setInterval(10 * 1000);
connect(m_researchTimer, &QTimer::timeout, this, [ = ]() {
if (this->isVisible()) {
searchContent(m_searchLayout->text());
}
m_researchTimer->stop();
});
}
/**
* @brief MainWindow::setSearchMethod
* @param is_index_search true为索引搜索false为暴力搜索
*/
void MainWindow::setSearchMethod(const bool &is_index_search)
{
if (is_index_search) {
//调用创建索引接口
Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::INDEXSEARCH);
//创建索引十秒后重新搜索一次(如果用户十秒内没有退出搜索界面且没有重新搜索)
m_researchTimer->start();
} else {
Q_EMIT this->searchMethodChanged(FileUtils::SearchMethod::DIRECTSEARCH);
m_researchTimer->stop();
}
}
/**
* @brief MainWindow::nativeEvent
* @param eventType
@ -438,10 +547,15 @@ bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, long *r
switch (event->response_type & ~0x80) {
case XCB_FOCUS_OUT:
if (!m_isAskDialogVisible) {
m_currentSearchAsked = false;
this->hide();
m_askTimer->stop();
m_researchTimer->stop();
m_contentFrame->closeWebView();
m_search_result_thread->requestInterruption();
m_search_result_thread->quit();
}
// m_seach_app_thread->stop();
break;
default:

View File

@ -43,6 +43,7 @@
#include <QKeyEvent>
#include <QGSettings/QGSettings>
#include <QSystemTrayIcon>
#include <QTimer>
#include "content-widget.h"
#include "input-box.h"
@ -51,6 +52,11 @@
#include "libsearch.h"
#include "search-app-thread.h"
#include "xatom-helper.h"
#include "create-index-ask-dialog.h"
#define UKUI_SEARCH_SCHEMAS "org.ukui.search.settings"
#define SEARCH_METHOD_KEY "indexSearch"
class SearchResult;
class MainWindow : public QMainWindow
@ -73,6 +79,7 @@ public:
// The position which mainwindow shows in the center of screen where the cursor in.
void centerToScreen(QWidget* widget);
void initGsettings();
MotifWmHints m_hints;
@ -92,8 +99,7 @@ private:
SearchBarHLayout * m_searchLayout = nullptr; // Search bar layout
SeachBarWidget * m_searchWidget = nullptr; // Search bar
QGSettings * m_transparency_gsettings = nullptr;
double getTransparentData();
QStringList m_dirList;
@ -105,13 +111,29 @@ private:
SearchManager* m_searcher = nullptr;
SettingsMatch *m_settingsMatch = nullptr;
QSystemTrayIcon *m_sys_tray_icon;
QSystemTrayIcon *m_sys_tray_icon = nullptr;
CreateIndexAskDialog * m_askDialog = nullptr;
bool m_isAskDialogVisible = false;
QTimer * m_askTimer = nullptr; //询问是否创建索引弹窗弹出的计时器
QTimer * m_researchTimer = nullptr; //创建索引后重新执行一次搜索的计时器
bool m_currentSearchAsked = false; //本次搜索是否已经询问过是否创建索引了
QGSettings * m_search_gsettings = nullptr;
SearchMethodManager m_searchMethodManager;
void setSearchMethod(const bool&);
double getTransparentData();
void initTimer();
protected:
void paintEvent(QPaintEvent *);
void keyPressEvent(QKeyEvent *event);
void initUi();
Q_SIGNALS:
void searchMethodChanged(FileUtils::SearchMethod);
public Q_SLOTS:
/**
* @brief Monitor screen resolution
@ -126,6 +148,7 @@ public Q_SLOTS:
void bootOptionsFilter(QString opt); // 过滤终端命令
void clearSearchResult(); //清空搜索结果
void createIndexSlot();
};
#endif // MAINWINDOW_H

View File

@ -26,6 +26,8 @@ include(singleapplication/qt-single-application.pri)
SOURCES += \
content-widget.cpp \
create-index-ask-dialog.cpp \
custom-style.cpp \
input-box.cpp \
main.cpp \
mainwindow.cpp \
@ -37,6 +39,8 @@ SOURCES += \
HEADERS += \
content-widget.h \
create-index-ask-dialog.h \
custom-style.h \
input-box.h \
mainwindow.h \
search-app-thread.h \
@ -53,7 +57,9 @@ data-menu.path = /usr/share/applications
data-menu.files += ../data/ukui-search-menu.desktop
data.path = /etc/xdg/autostart
data.files += ../data/ukui-search.desktop
INSTALLS += data data-menu
schemes.path = /usr/share/glib-2.0/schemas/
schemes.files += ../data/org.ukui.search.data.gschema.xml
INSTALLS += data data-menu schemes
RESOURCES += \
resource.qrc
@ -82,3 +88,6 @@ DEPENDPATH += $$PWD/../libsearch
# $$OUT_PWD/.qm/bo.qm \
# $$OUT_PWD/.qm/tr.qm \
# $$OUT_PWD/.qm/zh_CN.qm
DISTFILES += \
../data/org.ukui.search.data.gschema.xml

View File

@ -4,61 +4,94 @@
<context>
<name>ContentWidget</name>
<message>
<location filename="../../src/content-widget.cpp" line="377"/>
<location filename="../../src/content-widget.cpp" line="364"/>
<source>Recently Opened</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="413"/>
<location filename="../../src/content-widget.cpp" line="400"/>
<source>Open Quickly</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="414"/>
<location filename="../../src/content-widget.cpp" line="401"/>
<source>Commonly Used</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="681"/>
<location filename="../../src/content-widget.cpp" line="668"/>
<source>Apps</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="683"/>
<location filename="../../src/content-widget.cpp" line="670"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="685"/>
<location filename="../../src/content-widget.cpp" line="672"/>
<source>Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="687"/>
<location filename="../../src/content-widget.cpp" line="674"/>
<source>Dirs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="689"/>
<location filename="../../src/content-widget.cpp" line="676"/>
<source>File Contents</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="691"/>
<location filename="../../src/content-widget.cpp" line="678"/>
<source>Best Matches</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="693"/>
<location filename="../../src/content-widget.cpp" line="680"/>
<source>Web Pages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="695"/>
<location filename="../../src/content-widget.cpp" line="682"/>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CreateIndexAskDialog</name>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="28"/>
<source>ukui-search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="50"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="75"/>
<source>Creating index can help you getting results quickly, whether to create or not?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="84"/>
<source>Don&apos;t remind</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="95"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="97"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FolderListItem</name>
<message>
@ -70,17 +103,17 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../../src/mainwindow.cpp" line="75"/>
<location filename="../../src/mainwindow.cpp" line="66"/>
<source>ukui-search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/mainwindow.cpp" line="126"/>
<location filename="../../src/mainwindow.cpp" line="120"/>
<source>Global Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/mainwindow.cpp" line="188"/>
<location filename="../../src/mainwindow.cpp" line="196"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
@ -121,7 +154,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../src/main.cpp" line="182"/>
<location filename="../../src/main.cpp" line="191"/>
<source>ukui-search is already running!</source>
<translation type="unfinished"></translation>
</message>
@ -129,7 +162,7 @@
<context>
<name>SearchBarHLayout</name>
<message>
<location filename="../../src/input-box.cpp" line="120"/>
<location filename="../../src/input-box.cpp" line="126"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
@ -137,32 +170,32 @@
<context>
<name>SearchDetailView</name>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="525"/>
<location filename="../../src/control/search-detail-view.cpp" line="545"/>
<source>Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="533"/>
<location filename="../../src/control/search-detail-view.cpp" line="553"/>
<source>Last time modified</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="234"/>
<location filename="../../src/control/search-detail-view.cpp" line="235"/>
<source>Application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="215"/>
<location filename="../../src/control/search-detail-view.cpp" line="216"/>
<source>Introduction: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="353"/>
<location filename="../../src/control/search-detail-view.cpp" line="373"/>
<source>Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="475"/>
<location filename="../../src/control/search-detail-view.cpp" line="495"/>
<source>Preview is not avaliable</source>
<translation type="unfinished"></translation>
</message>
@ -170,55 +203,55 @@
<context>
<name>SettingsWidget</name>
<message>
<location filename="../../src/settings-widget.cpp" line="69"/>
<location filename="../../src/settings-widget.cpp" line="286"/>
<location filename="../../src/settings-widget.cpp" line="519"/>
<location filename="../../src/settings-widget.cpp" line="75"/>
<location filename="../../src/settings-widget.cpp" line="292"/>
<location filename="../../src/settings-widget.cpp" line="526"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="105"/>
<location filename="../../src/settings-widget.cpp" line="107"/>
<location filename="../../src/settings-widget.cpp" line="111"/>
<location filename="../../src/settings-widget.cpp" line="113"/>
<source>...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="117"/>
<location filename="../../src/settings-widget.cpp" line="123"/>
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="126"/>
<location filename="../../src/settings-widget.cpp" line="132"/>
<source>Add ignored folders</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="149"/>
<location filename="../../src/settings-widget.cpp" line="155"/>
<source>Please select search engine you preferred.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="162"/>
<location filename="../../src/settings-widget.cpp" line="168"/>
<source>baidu</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="164"/>
<location filename="../../src/settings-widget.cpp" line="170"/>
<source>sougou</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="166"/>
<location filename="../../src/settings-widget.cpp" line="172"/>
<source>360</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="408"/>
<location filename="../../src/settings-widget.cpp" line="415"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="347"/>
<location filename="../../src/settings-widget.cpp" line="353"/>
<source>Creating ...</source>
<translation type="unfinished"></translation>
</message>
@ -228,102 +261,102 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="98"/>
<location filename="../../src/settings-widget.cpp" line="104"/>
<source>&lt;h2&gt;Settings&lt;/h2&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="103"/>
<location filename="../../src/settings-widget.cpp" line="109"/>
<source>&lt;h3&gt;Index State&lt;/h3&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="115"/>
<location filename="../../src/settings-widget.cpp" line="121"/>
<source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="147"/>
<location filename="../../src/settings-widget.cpp" line="153"/>
<source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="286"/>
<location filename="../../src/settings-widget.cpp" line="292"/>
<source>Whether to delete this directory?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="287"/>
<location filename="../../src/settings-widget.cpp" line="293"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="288"/>
<location filename="../../src/settings-widget.cpp" line="294"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="350"/>
<location filename="../../src/settings-widget.cpp" line="356"/>
<source>Done</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="358"/>
<location filename="../../src/settings-widget.cpp" line="364"/>
<source>Index Entry: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="402"/>
<location filename="../../src/settings-widget.cpp" line="409"/>
<source>Directories</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="403"/>
<location filename="../../src/settings-widget.cpp" line="410"/>
<source>select blocked folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="404"/>
<location filename="../../src/settings-widget.cpp" line="411"/>
<source>Select</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="405"/>
<location filename="../../src/settings-widget.cpp" line="412"/>
<source>Position: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="406"/>
<location filename="../../src/settings-widget.cpp" line="413"/>
<source>FileName: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="407"/>
<location filename="../../src/settings-widget.cpp" line="414"/>
<source>FileType: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="503"/>
<location filename="../../src/settings-widget.cpp" line="510"/>
<source>Choosen path is Empty!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="507"/>
<location filename="../../src/settings-widget.cpp" line="514"/>
<source>Choosen path is not in &quot;home&quot;!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="511"/>
<location filename="../../src/settings-widget.cpp" line="518"/>
<source>Its&apos; parent folder has been blocked!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="515"/>
<location filename="../../src/settings-widget.cpp" line="522"/>
<source>Set blocked folder failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="520"/>
<location filename="../../src/settings-widget.cpp" line="527"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>

View File

@ -4,61 +4,94 @@
<context>
<name>ContentWidget</name>
<message>
<location filename="../../src/content-widget.cpp" line="377"/>
<location filename="../../src/content-widget.cpp" line="364"/>
<source>Recently Opened</source>
<translation>Yeni ılan</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="413"/>
<location filename="../../src/content-widget.cpp" line="400"/>
<source>Open Quickly</source>
<translation>Hızlı </translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="414"/>
<location filename="../../src/content-widget.cpp" line="401"/>
<source>Commonly Used</source>
<translation>Genel olarak kullanılan</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="681"/>
<location filename="../../src/content-widget.cpp" line="668"/>
<source>Apps</source>
<translation>Uygulamalar</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="683"/>
<location filename="../../src/content-widget.cpp" line="670"/>
<source>Settings</source>
<translation>Ayarlar</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="685"/>
<location filename="../../src/content-widget.cpp" line="672"/>
<source>Files</source>
<translation>Dosyalar</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="687"/>
<location filename="../../src/content-widget.cpp" line="674"/>
<source>Dirs</source>
<translation>Dizinler</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="689"/>
<location filename="../../src/content-widget.cpp" line="676"/>
<source>File Contents</source>
<translation>Dosya İçeriği</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="691"/>
<location filename="../../src/content-widget.cpp" line="678"/>
<source>Best Matches</source>
<translation>En İyi Eşleşen</translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="693"/>
<location filename="../../src/content-widget.cpp" line="680"/>
<source>Web Pages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="695"/>
<location filename="../../src/content-widget.cpp" line="682"/>
<source>Unknown</source>
<translation>Bilinmeyen</translation>
</message>
</context>
<context>
<name>CreateIndexAskDialog</name>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="28"/>
<source>ukui-search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="50"/>
<source>Search</source>
<translation type="unfinished">Ara</translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="75"/>
<source>Creating index can help you getting results quickly, whether to create or not?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="84"/>
<source>Don&apos;t remind</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="95"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="97"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FolderListItem</name>
<message>
@ -70,17 +103,17 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../../src/mainwindow.cpp" line="75"/>
<location filename="../../src/mainwindow.cpp" line="66"/>
<source>ukui-search</source>
<translation>ukui-ara</translation>
</message>
<message>
<location filename="../../src/mainwindow.cpp" line="126"/>
<location filename="../../src/mainwindow.cpp" line="120"/>
<source>Global Search</source>
<translation>Genel Arama</translation>
</message>
<message>
<location filename="../../src/mainwindow.cpp" line="188"/>
<location filename="../../src/mainwindow.cpp" line="196"/>
<source>Search</source>
<translation>Ara</translation>
</message>
@ -121,7 +154,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../src/main.cpp" line="182"/>
<location filename="../../src/main.cpp" line="191"/>
<source>ukui-search is already running!</source>
<translation>ukui-bul zaten çalışıyor!</translation>
</message>
@ -129,7 +162,7 @@
<context>
<name>SearchBarHLayout</name>
<message>
<location filename="../../src/input-box.cpp" line="120"/>
<location filename="../../src/input-box.cpp" line="126"/>
<source>Search</source>
<translation>Ara</translation>
</message>
@ -137,32 +170,32 @@
<context>
<name>SearchDetailView</name>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="525"/>
<location filename="../../src/control/search-detail-view.cpp" line="545"/>
<source>Path</source>
<translation>Yol</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="533"/>
<location filename="../../src/control/search-detail-view.cpp" line="553"/>
<source>Last time modified</source>
<translation>Son değiştirilme zamanı</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="234"/>
<location filename="../../src/control/search-detail-view.cpp" line="235"/>
<source>Application</source>
<translation>Uygulama</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="215"/>
<location filename="../../src/control/search-detail-view.cpp" line="216"/>
<source>Introduction: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="353"/>
<location filename="../../src/control/search-detail-view.cpp" line="373"/>
<source>Document</source>
<translation>Belge</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="475"/>
<location filename="../../src/control/search-detail-view.cpp" line="495"/>
<source>Preview is not avaliable</source>
<translation type="unfinished"></translation>
</message>
@ -170,55 +203,55 @@
<context>
<name>SettingsWidget</name>
<message>
<location filename="../../src/settings-widget.cpp" line="69"/>
<location filename="../../src/settings-widget.cpp" line="286"/>
<location filename="../../src/settings-widget.cpp" line="519"/>
<location filename="../../src/settings-widget.cpp" line="75"/>
<location filename="../../src/settings-widget.cpp" line="292"/>
<location filename="../../src/settings-widget.cpp" line="526"/>
<source>Search</source>
<translation>Ara</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="105"/>
<location filename="../../src/settings-widget.cpp" line="107"/>
<location filename="../../src/settings-widget.cpp" line="111"/>
<location filename="../../src/settings-widget.cpp" line="113"/>
<source>...</source>
<translation>...</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="117"/>
<location filename="../../src/settings-widget.cpp" line="123"/>
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation>Aşağıdaki klasörler aranmayacaktır. Klasör ekleyip kaldırarak ayarlayabilirsiniz.</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="126"/>
<location filename="../../src/settings-widget.cpp" line="132"/>
<source>Add ignored folders</source>
<translation>Göz ardı edilen klasörleri ekleyin</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="149"/>
<location filename="../../src/settings-widget.cpp" line="155"/>
<source>Please select search engine you preferred.</source>
<translation>Lütfen tercih ettiğiniz arama motorunu seçin.</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="162"/>
<location filename="../../src/settings-widget.cpp" line="168"/>
<source>baidu</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="164"/>
<location filename="../../src/settings-widget.cpp" line="170"/>
<source>sougou</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="166"/>
<location filename="../../src/settings-widget.cpp" line="172"/>
<source>360</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="408"/>
<location filename="../../src/settings-widget.cpp" line="415"/>
<source>Cancel</source>
<translation>İptal</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="347"/>
<location filename="../../src/settings-widget.cpp" line="353"/>
<source>Creating ...</source>
<translation>Oluşturuluyor...</translation>
</message>
@ -232,102 +265,102 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="98"/>
<location filename="../../src/settings-widget.cpp" line="104"/>
<source>&lt;h2&gt;Settings&lt;/h2&gt;</source>
<translation>&lt;h2&gt;Ayarlar&lt;/h2&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="103"/>
<location filename="../../src/settings-widget.cpp" line="109"/>
<source>&lt;h3&gt;Index State&lt;/h3&gt;</source>
<translation>&lt;h3&gt;Dizin Durumu&lt;/h3&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="115"/>
<location filename="../../src/settings-widget.cpp" line="121"/>
<source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source>
<translation>&lt;h3&gt;Dosya Dizini Ayarları&lt;/h3&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="147"/>
<location filename="../../src/settings-widget.cpp" line="153"/>
<source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source>
<translation>&lt;h3&gt;SArama Motoru Ayarları&lt;/h3&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="286"/>
<location filename="../../src/settings-widget.cpp" line="292"/>
<source>Whether to delete this directory?</source>
<translation>Bu dizini silinsin mi?</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="287"/>
<location filename="../../src/settings-widget.cpp" line="293"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="288"/>
<location filename="../../src/settings-widget.cpp" line="294"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="350"/>
<location filename="../../src/settings-widget.cpp" line="356"/>
<source>Done</source>
<translation>Tamam</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="358"/>
<location filename="../../src/settings-widget.cpp" line="364"/>
<source>Index Entry: %1</source>
<translation>Dizin Girişi: %1</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="402"/>
<location filename="../../src/settings-widget.cpp" line="409"/>
<source>Directories</source>
<translation>Dizinler</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="403"/>
<location filename="../../src/settings-widget.cpp" line="410"/>
<source>select blocked folder</source>
<translation>engellenen klasörü seç</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="404"/>
<location filename="../../src/settings-widget.cpp" line="411"/>
<source>Select</source>
<translation>Seç</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="405"/>
<location filename="../../src/settings-widget.cpp" line="412"/>
<source>Position: </source>
<translation>Pozisyon: </translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="406"/>
<location filename="../../src/settings-widget.cpp" line="413"/>
<source>FileName: </source>
<translation>Dosya Adı: </translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="407"/>
<location filename="../../src/settings-widget.cpp" line="414"/>
<source>FileType: </source>
<translation>Dosya Türü: </translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="503"/>
<location filename="../../src/settings-widget.cpp" line="510"/>
<source>Choosen path is Empty!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="507"/>
<location filename="../../src/settings-widget.cpp" line="514"/>
<source>Choosen path is not in &quot;home&quot;!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="511"/>
<location filename="../../src/settings-widget.cpp" line="518"/>
<source>Its&apos; parent folder has been blocked!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="515"/>
<location filename="../../src/settings-widget.cpp" line="522"/>
<source>Set blocked folder failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="520"/>
<location filename="../../src/settings-widget.cpp" line="527"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>

View File

@ -4,61 +4,94 @@
<context>
<name>ContentWidget</name>
<message>
<location filename="../../src/content-widget.cpp" line="377"/>
<location filename="../../src/content-widget.cpp" line="364"/>
<source>Recently Opened</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="413"/>
<location filename="../../src/content-widget.cpp" line="400"/>
<source>Open Quickly</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="414"/>
<location filename="../../src/content-widget.cpp" line="401"/>
<source>Commonly Used</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="681"/>
<location filename="../../src/content-widget.cpp" line="668"/>
<source>Apps</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="683"/>
<location filename="../../src/content-widget.cpp" line="670"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="685"/>
<location filename="../../src/content-widget.cpp" line="672"/>
<source>Files</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="687"/>
<location filename="../../src/content-widget.cpp" line="674"/>
<source>Dirs</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="689"/>
<location filename="../../src/content-widget.cpp" line="676"/>
<source>File Contents</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="691"/>
<location filename="../../src/content-widget.cpp" line="678"/>
<source>Best Matches</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="693"/>
<location filename="../../src/content-widget.cpp" line="680"/>
<source>Web Pages</source>
<translation></translation>
</message>
<message>
<location filename="../../src/content-widget.cpp" line="695"/>
<location filename="../../src/content-widget.cpp" line="682"/>
<source>Unknown</source>
<translation></translation>
</message>
</context>
<context>
<name>CreateIndexAskDialog</name>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="28"/>
<source>ukui-search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="50"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="75"/>
<source>Creating index can help you getting results quickly, whether to create or not?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="84"/>
<source>Don&apos;t remind</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="95"/>
<source>No</source>
<translation type="unfinished">(N)</translation>
</message>
<message>
<location filename="../../src/create-index-ask-dialog.cpp" line="97"/>
<source>Yes</source>
<translation type="unfinished">(Y)</translation>
</message>
</context>
<context>
<name>FolderListItem</name>
<message>
@ -70,17 +103,17 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../../src/mainwindow.cpp" line="75"/>
<location filename="../../src/mainwindow.cpp" line="66"/>
<source>ukui-search</source>
<translation></translation>
</message>
<message>
<location filename="../../src/mainwindow.cpp" line="126"/>
<location filename="../../src/mainwindow.cpp" line="120"/>
<source>Global Search</source>
<translation></translation>
</message>
<message>
<location filename="../../src/mainwindow.cpp" line="188"/>
<location filename="../../src/mainwindow.cpp" line="196"/>
<source>Search</source>
<translation></translation>
</message>
@ -121,7 +154,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../src/main.cpp" line="182"/>
<location filename="../../src/main.cpp" line="191"/>
<source>ukui-search is already running!</source>
<translation></translation>
</message>
@ -129,7 +162,7 @@
<context>
<name>SearchBarHLayout</name>
<message>
<location filename="../../src/input-box.cpp" line="120"/>
<location filename="../../src/input-box.cpp" line="126"/>
<source>Search</source>
<translation></translation>
</message>
@ -137,32 +170,32 @@
<context>
<name>SearchDetailView</name>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="525"/>
<location filename="../../src/control/search-detail-view.cpp" line="545"/>
<source>Path</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="533"/>
<location filename="../../src/control/search-detail-view.cpp" line="553"/>
<source>Last time modified</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="234"/>
<location filename="../../src/control/search-detail-view.cpp" line="235"/>
<source>Application</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="215"/>
<location filename="../../src/control/search-detail-view.cpp" line="216"/>
<source>Introduction: %1</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="353"/>
<location filename="../../src/control/search-detail-view.cpp" line="373"/>
<source>Document</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="475"/>
<location filename="../../src/control/search-detail-view.cpp" line="495"/>
<source>Preview is not avaliable</source>
<translation></translation>
</message>
@ -175,115 +208,115 @@
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="69"/>
<location filename="../../src/settings-widget.cpp" line="286"/>
<location filename="../../src/settings-widget.cpp" line="519"/>
<location filename="../../src/settings-widget.cpp" line="75"/>
<location filename="../../src/settings-widget.cpp" line="292"/>
<location filename="../../src/settings-widget.cpp" line="526"/>
<source>Search</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="98"/>
<location filename="../../src/settings-widget.cpp" line="104"/>
<source>&lt;h2&gt;Settings&lt;/h2&gt;</source>
<translation>&lt;h2&gt;&lt;/h2&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="103"/>
<location filename="../../src/settings-widget.cpp" line="109"/>
<source>&lt;h3&gt;Index State&lt;/h3&gt;</source>
<translation>&lt;h3&gt;&lt;/h3&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="105"/>
<location filename="../../src/settings-widget.cpp" line="107"/>
<location filename="../../src/settings-widget.cpp" line="111"/>
<location filename="../../src/settings-widget.cpp" line="113"/>
<source>...</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="115"/>
<location filename="../../src/settings-widget.cpp" line="121"/>
<source>&lt;h3&gt;File Index Settings&lt;/h3&gt;</source>
<translation>&lt;h3&gt;&lt;/h3&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="117"/>
<location filename="../../src/settings-widget.cpp" line="123"/>
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="126"/>
<location filename="../../src/settings-widget.cpp" line="132"/>
<source>Add ignored folders</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="147"/>
<location filename="../../src/settings-widget.cpp" line="153"/>
<source>&lt;h3&gt;Search Engine Settings&lt;/h3&gt;</source>
<translation>&lt;h3&gt;&lt;/h3&gt;</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="149"/>
<location filename="../../src/settings-widget.cpp" line="155"/>
<source>Please select search engine you preferred.</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="162"/>
<location filename="../../src/settings-widget.cpp" line="168"/>
<source>baidu</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="164"/>
<location filename="../../src/settings-widget.cpp" line="170"/>
<source>sougou</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="166"/>
<location filename="../../src/settings-widget.cpp" line="172"/>
<source>360</source>
<translation>360</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="286"/>
<location filename="../../src/settings-widget.cpp" line="292"/>
<source>Whether to delete this directory?</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="287"/>
<location filename="../../src/settings-widget.cpp" line="293"/>
<source>Yes</source>
<translation>(Y)</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="288"/>
<location filename="../../src/settings-widget.cpp" line="294"/>
<source>No</source>
<translation>(N)</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="408"/>
<location filename="../../src/settings-widget.cpp" line="415"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="503"/>
<location filename="../../src/settings-widget.cpp" line="510"/>
<source>Choosen path is Empty!</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="507"/>
<location filename="../../src/settings-widget.cpp" line="514"/>
<source>Choosen path is not in &quot;home&quot;!</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="511"/>
<location filename="../../src/settings-widget.cpp" line="518"/>
<source>Its&apos; parent folder has been blocked!</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="515"/>
<location filename="../../src/settings-widget.cpp" line="522"/>
<source>Set blocked folder failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="520"/>
<location filename="../../src/settings-widget.cpp" line="527"/>
<source>OK</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="347"/>
<location filename="../../src/settings-widget.cpp" line="353"/>
<source>Creating ...</source>
<translation></translation>
</message>
@ -292,42 +325,42 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="350"/>
<location filename="../../src/settings-widget.cpp" line="356"/>
<source>Done</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="358"/>
<location filename="../../src/settings-widget.cpp" line="364"/>
<source>Index Entry: %1</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="402"/>
<location filename="../../src/settings-widget.cpp" line="409"/>
<source>Directories</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="403"/>
<location filename="../../src/settings-widget.cpp" line="410"/>
<source>select blocked folder</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="404"/>
<location filename="../../src/settings-widget.cpp" line="411"/>
<source>Select</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="405"/>
<location filename="../../src/settings-widget.cpp" line="412"/>
<source>Position: </source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="406"/>
<location filename="../../src/settings-widget.cpp" line="413"/>
<source>FileName: </source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="407"/>
<location filename="../../src/settings-widget.cpp" line="414"/>
<source>FileType: </source>
<translation></translation>
</message>