Skip to content

Commit 02303b1

Browse files
committed
replace SKK_DEFAULT_PATH with SKK_PATH
1 parent e4ce534 commit 02303b1

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
2121

2222
include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake")
2323

24-
set(SKK_DEFAULT_PATH "/usr/share/skk/SKK-JISYO.L" CACHE STRING "Default path of SKK")
24+
set(SKK_PATH "/usr/share/skk/" CACHE STRING "Default path of SKK directory that has SKK-JISYO.L, could start with \$XDG_DATA_DIRS/")
25+
if("${SKK_DEFAULT_PATH}" MATCHES "SKK-JISYO.L$")
26+
message(FATAL_ERROR "SKK_DEFAULT_PATH is superseded by SKK_PATH")
27+
endif()
2528

2629
include(GNUInstallDirs)
2730

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Please install this packages before build this Program.
3030
- extra-cmake-modules
3131
- gettext
3232

33-
You can specify the skk dictionary path by -DSKK_DEFAULT_PATH=path_you_want
33+
You can specify the skk dictionary path by -DSKK_PATH=path_you_want
3434

35-
By default it's /usr/share/skk/SKK-JISYO.L
35+
By default it's /usr/share/skk/
3636

3737
## Installation
3838

config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef ___CONFIG_H___
22
#define ___CONFIG_H___
33

4-
#define SKK_DEFAULT_PATH "@SKK_DEFAULT_PATH@"
4+
#define SKK_PATH "@SKK_PATH@"
55

66
#endif /* __CONFIG_H__ */

gui/adddictdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void AddDictDialog::browseClicked() {
111111
if (m_ui->typeComboBox->currentIndex() == DictType_System) {
112112
QString dir;
113113
if (path.isEmpty()) {
114-
path = SKK_DEFAULT_PATH;
114+
path = SKK_PATH "SKK-JISYO.L";
115115
}
116116
QFileInfo info(path);
117117
path = QFileDialog::getOpenFileName(this, _("Select Dictionary File"),

src/dictionary_list.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
type=file,file=$FCITX_CONFIG_DIR/skk/user.dict,mode=readwrite
2-
type=file,file=@SKK_DEFAULT_PATH@,mode=readonly
2+
type=file,file=@[email protected],mode=readonly

0 commit comments

Comments
 (0)