Skip to content

Commit e86003d

Browse files
sync: from linuxdeepin/dde-session-shell
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#44
1 parent 9bfe3b0 commit e86003d

File tree

6 files changed

+35
-8
lines changed

6 files changed

+35
-8
lines changed

.tx/config

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[main]
22
host = https://www.transifex.com
3-
minimum_perc = 80
4-
mode = developer
53

6-
[o:linuxdeepin:p:deepin-desktop-environment:r:dde-session-shell]
4+
[o:linuxdeepin:p:deepin-desktop-environment:r:7b6846181f3a648d8293f3e4693d31cc]
75
file_filter = translations/dde-session-shell_<lang>.ts
86
source_file = translations/dde-session-shell_en.ts
97
source_lang = en
108
type = QT
119

12-
[o:linuxdeepin:p:deepin-desktop-environment:r:login-gesture]
10+
[o:linuxdeepin:p:deepin-desktop-environment:r:ba0d8d02ba70d7f954ec191e4d0303be]
1311
file_filter = plugins/login-gesture/translations/login-gesture_<lang>.ts
1412
source_file = plugins/login-gesture/translations/login-gesture_en.ts
1513
source_lang = en
1614
type = QT
15+

plugins/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ if (DISABLE_DSS_SNIPE)
44
endif()
55
# add_subdirectory(examples)
66
# add_subdirectory(assist_login)
7-
# add_subdirectory("login-gesture")

plugins/login-gesture/translations/login-gesture_pl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@
6767
</message>
6868
<message>
6969
<source>Cancel</source>
70-
<translation type="unfinished"/>
70+
<translation>Anuluj</translation>
7171
</message>
7272
<message>
7373
<source>Ok</source>
74-
<translation type="unfinished"/>
74+
<translation>Ok</translation>
7575
</message>
7676
<message>
7777
<source>Drawing error, %1 chances left. Contact the administrator to reset</source>
7878
<translation type="unfinished"/>
7979
</message>
8080
<message>
8181
<source>Setup completed Start unlock</source>
82-
<translation type="unfinished"/>
82+
<translation>Konfiguracja zakończona, przejdź do logowania</translation>
8383
</message>
8484
<message>
8585
<source>Unlock with gesture password</source>

src/dde-lock/lockframe.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ bool LockFrame::event(QEvent *event)
171171
}
172172

173173
if (keyValue != "") {
174+
#ifdef ENABLE_DSS_SNIPE
175+
// v25 dde-daemon接受小驼峰命名的name
176+
emit sendKeyValue(qtifyName(keyValue));
177+
#else
174178
emit sendKeyValue(keyValue);
179+
#endif
175180
}
176181
}
177182
return FullScreenBackground::event(event);

src/global_util/public_func.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,21 @@ bool isSleepLock()
356356
return value.toBool();
357357
}
358358
#endif
359+
360+
QString qtifyName(const QString &name) {
361+
bool next_cap = false;
362+
QString result;
363+
364+
for (auto it = name.cbegin(); it != name.cend(); ++it) {
365+
if (*it == '-') {
366+
next_cap = true;
367+
} else if (next_cap) {
368+
result.append(it->toUpper());
369+
next_cap = false;
370+
} else {
371+
result.append(*it);
372+
}
373+
}
374+
375+
return result;
376+
}

src/global_util/public_func.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,10 @@ void configWebEngine();
8282
bool isSleepLock();
8383
#endif
8484

85+
/**
86+
* @brief convert 'some-key' to 'someKey'.
87+
*/
88+
89+
QString qtifyName(const QString &name);
90+
8591
#endif // PUBLIC_FUNC_H

0 commit comments

Comments
 (0)