Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tray
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
tray
Commits
4b67a3a2
Commit
4b67a3a2
authored
Jul 26, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tray_pp, now translations and icon are not required in the directory
parent
b03827df
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
40 deletions
+37
-40
CMakeLists.txt
CMakeLists.txt
+3
-3
example_pp.cpp
example/example_pp.cpp
+4
-8
es.po
locales/es.po
+4
-4
ru.po
locales/ru.po
+4
-4
tray.pot
locales/tray.pot
+22
-21
No files found.
CMakeLists.txt
View file @
4b67a3a2
...
@@ -28,9 +28,9 @@ endif()
...
@@ -28,9 +28,9 @@ endif()
if
(
CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME
)
if
(
CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME
)
add_executable
(
pw_tray
example/example_pp.cpp
)
add_executable
(
tray_gui_pp
example/example_pp.cpp
)
set_target_properties
(
pw_tray
PROPERTIES CXX_STANDARD 17
)
set_target_properties
(
tray_gui_pp
PROPERTIES CXX_STANDARD 17
)
target_link_libraries
(
pw_tray
PRIVATE tray
)
target_link_libraries
(
tray_gui_pp
PRIVATE tray
)
endif
()
endif
()
...
...
example/example_pp.cpp
View file @
4b67a3a2
...
@@ -8,11 +8,13 @@
...
@@ -8,11 +8,13 @@
#define _(STRING) gettext(STRING)
#define _(STRING) gettext(STRING)
int
main
()
{
int
main
()
{
setlocale
(
LC_ALL
,
""
);
setlocale
(
LC_ALL
,
""
);
bindtextdomain
(
"tray"
,
getenv
(
"PWD"
)
);
bindtextdomain
(
"tray"
,
"../locales"
);
textdomain
(
"tray"
);
textdomain
(
"tray"
);
std
::
string
icon_name
=
"../img/gui/portproton_tray.svg"
;
auto
icon_path
=
std
::
filesystem
::
current_path
()
/
icon_name
;
trays
::
Menu
q
;
trays
::
Menu
q
;
q
.
text_
=
_
(
"WINEFILE"
);
q
.
text_
=
_
(
"WINEFILE"
);
trays
::
Menu
w
;
trays
::
Menu
w
;
...
@@ -22,16 +24,10 @@ int main() {
...
@@ -22,16 +24,10 @@ int main() {
trays
::
Menu
r
;
trays
::
Menu
r
;
r
.
text_
=
_
(
"FORCE EXIT"
);
r
.
text_
=
_
(
"FORCE EXIT"
);
// linux: png, svg
std
::
string
icon_name
=
"portproton_tray.svg"
;
// absolute path for linux.
auto
icon_path
=
std
::
filesystem
::
current_path
()
/
icon_name
;
q
.
on_click_
=
[](
auto
)
{
system
(
"bash -c pw_tray_winefile &"
);
};
q
.
on_click_
=
[](
auto
)
{
system
(
"bash -c pw_tray_winefile &"
);
};
w
.
on_click_
=
[](
auto
)
{
system
(
"bash -c pw_tray_taskmgr &"
);
};
w
.
on_click_
=
[](
auto
)
{
system
(
"bash -c pw_tray_taskmgr &"
);
};
e
.
on_click_
=
[](
auto
)
{
system
(
"bash -c open_changelog &"
);
};
e
.
on_click_
=
[](
auto
)
{
system
(
"bash -c open_changelog &"
);
};
r
.
on_click_
=
[](
auto
)
{
system
(
"bash -c tray_icon_click_exit"
);
tray_exit
();
};
r
.
on_click_
=
[](
auto
)
{
system
(
"bash -c tray_icon_click_exit"
);
tray_exit
();
};
trays
::
Tray
t
{
icon_path
.
string
(),
{
q
,
w
,
e
,
r
}};
trays
::
Tray
t
{
icon_path
.
string
(),
{
q
,
w
,
e
,
r
}};
t
.
run
();
t
.
run
();
...
...
locales/es.po
View file @
4b67a3a2
...
@@ -18,18 +18,18 @@ msgstr ""
...
@@ -18,18 +18,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.4\n"
"X-Generator: Poedit 3.4.4\n"
#: example/example_pp.cpp:1
7
#: example/example_pp.cpp:1
9
msgid "WINEFILE"
msgid "WINEFILE"
msgstr "WINEFILE"
msgstr "WINEFILE"
#: example/example_pp.cpp:
19
#: example/example_pp.cpp:
21
msgid "TASKMGR"
msgid "TASKMGR"
msgstr "GESTOR DE TAREAS"
msgstr "GESTOR DE TAREAS"
#: example/example_pp.cpp:2
1
#: example/example_pp.cpp:2
3
msgid "CHANGELOG"
msgid "CHANGELOG"
msgstr "LISTA DE CAMBIOS"
msgstr "LISTA DE CAMBIOS"
#: example/example_pp.cpp:2
3
#: example/example_pp.cpp:2
5
msgid "FORCE EXIT"
msgid "FORCE EXIT"
msgstr "SALIDA FORZADA"
msgstr "SALIDA FORZADA"
locales/ru.po
View file @
4b67a3a2
...
@@ -18,18 +18,18 @@ msgstr ""
...
@@ -18,18 +18,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.4\n"
"X-Generator: Poedit 3.4.4\n"
#: example/example_pp.cpp:1
7
#: example/example_pp.cpp:1
9
msgid "WINEFILE"
msgid "WINEFILE"
msgstr "ФАЙЛОВЫЙ МЕНЕДЖЕР"
msgstr "ФАЙЛОВЫЙ МЕНЕДЖЕР"
#: example/example_pp.cpp:
19
#: example/example_pp.cpp:
21
msgid "TASKMGR"
msgid "TASKMGR"
msgstr "ДИСПЕТЧЕР ЗАДАЧ"
msgstr "ДИСПЕТЧЕР ЗАДАЧ"
#: example/example_pp.cpp:2
1
#: example/example_pp.cpp:2
3
msgid "CHANGELOG"
msgid "CHANGELOG"
msgstr "ИЗМЕНЕНИЯ"
msgstr "ИЗМЕНЕНИЯ"
#: example/example_pp.cpp:2
3
#: example/example_pp.cpp:2
5
msgid "FORCE EXIT"
msgid "FORCE EXIT"
msgstr "ПРИНУДИТЕЛЬНЫЙ ВЫХОД"
msgstr "ПРИНУДИТЕЛЬНЫЙ ВЫХОД"
locales/tray.pot
View file @
4b67a3a2
...
@@ -4,30 +4,31 @@
...
@@ -4,30 +4,31 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
#, fuzzy
msgid ""
msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n"
msgstr ""
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-07-03 13:04+0500\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"POT-Creation-Date: 2024-07-26 23:04+0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Language: \n"
"Content-Type: text/plain; charset=CHARSET\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: example/example_pp.cpp:17
msgid "WINEFILE"
msgstr ""
#: example/example_pp.cpp:19
#: example/example_pp.cpp:19
msgid
"TASKMGR
"
msgid
"WINEFILE
"
msgstr
""
msgstr ""
#: example/example_pp.cpp:21
#: example/example_pp.cpp:21
msgid
"CHANGELOG
"
msgid
"TASKMGR
"
msgstr
""
msgstr ""
#: example/example_pp.cpp:23
#: example/example_pp.cpp:23
msgid "FORCE EXIT"
msgid "CHANGELOG"
msgstr ""
msgstr ""
#: example/example_pp.cpp:25
msgid "FORCE EXIT"
msgstr ""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment