From 8711ed0187f9c50c2358b0d152d52f81b1e6f989 Mon Sep 17 00:00:00 2001 From: zhangzihao Date: Thu, 14 Jan 2021 19:37:44 +0800 Subject: [PATCH] fix autostart and add it to start menu --- data/ukui-search-menu.desktop | 13 +++++++++++++ data/ukui-search.desktop | 2 +- src/src.pro | 6 ++++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 data/ukui-search-menu.desktop diff --git a/data/ukui-search-menu.desktop b/data/ukui-search-menu.desktop new file mode 100644 index 0000000..fdaf218 --- /dev/null +++ b/data/ukui-search-menu.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=ukui-search +GenericName=UKUI Global Search +GenericName[zh_CN]=全局搜索 +Comment=ukui-search +Comment[zh_CN]=全局搜索 +Exec=/usr/bin/ukui-search -s +Type=Application +Icon=ukui-search +X-UKUI-AutoRestart=true +OnlyShowIn=UKUI +X-UKUI-Autostart-Phase=Application +Terminal=false diff --git a/data/ukui-search.desktop b/data/ukui-search.desktop index eee82ba..9e1c2e8 100644 --- a/data/ukui-search.desktop +++ b/data/ukui-search.desktop @@ -4,7 +4,7 @@ GenericName=UKUI Global Search GenericName[zh_CN]=全局搜索 Comment=ukui-search Comment[zh_CN]=全局搜索 -Exec=usr/bin/ukui-search %U +Exec=/usr/bin/ukui-search %U Type=Application Icon=ukui-search X-UKUI-AutoRestart=true diff --git a/src/src.pro b/src/src.pro index a059a80..5611ba7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -45,10 +45,11 @@ HEADERS += \ target.path = /usr/bin !isEmpty(target.path): INSTALLS += target -#data.path = /usr/share/applications +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 +INSTALLS += data data-menu RESOURCES += \ resource.qrc @@ -69,6 +70,7 @@ INCLUDEPATH += $$PWD/../libsearch DEPENDPATH += $$PWD/../libsearch DISTFILES += \ + ../data/ukui-search-menu.desktop \ translations/bo.ts \ translations/es.qm \ translations/zh_CN.qm