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()
if
(
CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME
)
add_executable
(
pw_tray
example/example_pp.cpp
)
set_target_properties
(
pw_tray
PROPERTIES CXX_STANDARD 17
)
target_link_libraries
(
pw_tray
PRIVATE tray
)
add_executable
(
tray_gui_pp
example/example_pp.cpp
)
set_target_properties
(
tray_gui_pp
PROPERTIES CXX_STANDARD 17
)
target_link_libraries
(
tray_gui_pp
PRIVATE tray
)
endif
()
...
...
example/example_pp.cpp
View file @
4b67a3a2
...
...
@@ -8,11 +8,13 @@
#define _(STRING) gettext(STRING)
int
main
()
{
setlocale
(
LC_ALL
,
""
);
bindtextdomain
(
"tray"
,
getenv
(
"PWD"
)
);
bindtextdomain
(
"tray"
,
"../locales"
);
textdomain
(
"tray"
);
std
::
string
icon_name
=
"../img/gui/portproton_tray.svg"
;
auto
icon_path
=
std
::
filesystem
::
current_path
()
/
icon_name
;
trays
::
Menu
q
;
q
.
text_
=
_
(
"WINEFILE"
);
trays
::
Menu
w
;
...
...
@@ -22,16 +24,10 @@ int main() {
trays
::
Menu
r
;
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 &"
);
};
w
.
on_click_
=
[](
auto
)
{
system
(
"bash -c pw_tray_taskmgr &"
);
};
e
.
on_click_
=
[](
auto
)
{
system
(
"bash -c open_changelog &"
);
};
r
.
on_click_
=
[](
auto
)
{
system
(
"bash -c tray_icon_click_exit"
);
tray_exit
();
};
trays
::
Tray
t
{
icon_path
.
string
(),
{
q
,
w
,
e
,
r
}};
t
.
run
();
...
...
locales/es.po
View file @
4b67a3a2
...
...
@@ -18,18 +18,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.4\n"
#: example/example_pp.cpp:1
7
#: example/example_pp.cpp:1
9
msgid "WINEFILE"
msgstr "WINEFILE"
#: example/example_pp.cpp:
19
#: example/example_pp.cpp:
21
msgid "TASKMGR"
msgstr "GESTOR DE TAREAS"
#: example/example_pp.cpp:2
1
#: example/example_pp.cpp:2
3
msgid "CHANGELOG"
msgstr "LISTA DE CAMBIOS"
#: example/example_pp.cpp:2
3
#: example/example_pp.cpp:2
5
msgid "FORCE EXIT"
msgstr "SALIDA FORZADA"
locales/ru.po
View file @
4b67a3a2
...
...
@@ -18,18 +18,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.4\n"
#: example/example_pp.cpp:1
7
#: example/example_pp.cpp:1
9
msgid "WINEFILE"
msgstr "ФАЙЛОВЫЙ МЕНЕДЖЕР"
#: example/example_pp.cpp:
19
#: example/example_pp.cpp:
21
msgid "TASKMGR"
msgstr "ДИСПЕТЧЕР ЗАДАЧ"
#: example/example_pp.cpp:2
1
#: example/example_pp.cpp:2
3
msgid "CHANGELOG"
msgstr "ИЗМЕНЕНИЯ"
#: example/example_pp.cpp:2
3
#: example/example_pp.cpp:2
5
msgid "FORCE EXIT"
msgstr "ПРИНУДИТЕЛЬНЫЙ ВЫХОД"
locales/tray.pot
View file @
4b67a3a2
...
...
@@ -4,30 +4,31 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-03 13:04+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: example/example_pp.cpp:17
msgid "WINEFILE"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-26 23:04+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: example/example_pp.cpp:19
msgid
"TASKMGR
"
msgstr
""
msgid
"WINEFILE
"
msgstr ""
#: example/example_pp.cpp:21
msgid
"CHANGELOG
"
msgstr
""
msgid
"TASKMGR
"
msgstr ""
#: example/example_pp.cpp:23
msgid "FORCE EXIT"
msgstr ""
msgid "CHANGELOG"
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