Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

試用版:佇 ascii_composer 檢查日期 #13

Draft
wants to merge 38 commits into
base: taibun
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
08f8d94
ascii_composer ka jit-ki kiam-tsa
niauah Jul 2, 2020
e766ac5
Pau tso 1 e ham-sik
niauah Jul 2, 2020
3d3dca9
...
niauah Jul 2, 2020
07ad612
Theh-tiau 1 tsua tshi khuann-mai
niauah Jul 2, 2020
5f041c4
It-ting ai declare
niauah Jul 2, 2020
9730744
Siu-kai suan-ko hong-sik
niauah Jul 3, 2020
e8e41ed
Pai-pan
niauah Jul 3, 2020
31444de
Merge remote-tracking branch 'origin/taibun' into Tshiiong
niauah Jul 9, 2020
e1e1ef0
改做9/30
niauah Aug 3, 2020
8a33eb6
Merge branch 'taibun' into Tshiiong
sih4sing5hong5 Sep 8, 2020
aecc764
10/31 到期ê版本
sih4sing5hong5 Sep 8, 2020
4a19616
Merge branch 'taibun' into Tshiiong
niauah Oct 19, 2020
6e8199c
日期改做11/30
niauah Oct 19, 2020
6c5b31e
12/31到期
niauah Nov 17, 2020
6dae71d
Update ascii_composer.cc
niauah Dec 4, 2020
4b021bb
3/31到期
niauah Jan 13, 2021
0745d69
5/31到期
niauah Mar 23, 2021
9f1cf6c
Merge branch 'taibun' into Tshiiong
niauah Mar 23, 2021
33a3117
Update ascii_composer.cc
niauah May 26, 2021
1aab99b
9/30到期
niauah Jul 16, 2021
09a4b03
11/30到期
niauah Sep 17, 2021
bb87e59
Update ascii_composer.cc
niauah Nov 29, 2021
aa32267
Merge branch 'taibun' into Tshiiong
niauah Jan 3, 2022
cfc8f2e
3.31到期
niauah Jan 3, 2022
4681e32
Merge branch 'taibun' into Tshiiong
niauah Jan 14, 2022
c775b54
Update ascii_composer.cc
niauah Mar 28, 2022
7a22e39
Merge branch 'taibun' into Tshiiong
niauah May 17, 2022
2d4f971
Update ascii_composer.cc
niauah May 17, 2022
1e81003
Update ascii_composer.cc
niauah Jul 21, 2022
f4b6660
Update ascii_composer.cc
niauah Oct 3, 2022
48b8b24
Update ascii_composer.cc
niauah Nov 28, 2022
b7309f6
Update ascii_composer.cc
niauah Feb 1, 2023
4007f88
Update ascii_composer.cc
niauah Feb 24, 2023
e1fe4c5
Update ascii_composer.cc
niauah May 30, 2023
12de00b
Update ascii_composer.cc
niauah Jul 20, 2023
79136b7
2023.12.1到期
sih4sing5hong5 Aug 30, 2023
f8bfd74
Tshiiong-202401
sih4sing5hong5 Aug 30, 2023
b0531f4
Merge pull request #48 from i3thuan5/Tshiiong-202401
sih4sing5hong5 Sep 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/rime/gear/ascii_composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ AsciiComposer::~AsciiComposer() {
connection_.disconnect();
}

static bool kiamtsa_kauki() {
time_t chitma = time(nullptr);
struct tm tm1;
tm1.tm_hour = 0;
tm1.tm_min = 0;
tm1.tm_sec = 0;
tm1.tm_year = 2024-1900;
tm1.tm_mon = 2-1;
tm1.tm_mday = 1;
time_t kauki = mktime(&tm1);
if(chitma > kauki){
return true;
}
niauah marked this conversation as resolved.
Show resolved Hide resolved
return false;
}

ProcessResult AsciiComposer::ProcessKeyEvent(const KeyEvent& key_event) {
if ((key_event.shift() && key_event.ctrl()) ||
key_event.alt() || key_event.super()) {
Expand Down Expand Up @@ -113,7 +129,8 @@ ProcessResult AsciiComposer::ProcessKeyEvent(const KeyEvent& key_event) {
}
Context* ctx = engine_->context();
bool ascii_mode = ctx->get_option("ascii_mode");
if (ascii_mode) {
bool kauki = kiamtsa_kauki();
if (ascii_mode || kauki) {
if (!ctx->IsComposing()) {
return kRejected; // direct commit
}
Expand Down