Commit 4b67a3a2 authored by Vladislav's avatar Vladislav

Updated tray_pp, now translations and icon are not required in the directory

parent b03827df
......@@ -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()
......
......@@ -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();
......
......@@ -18,18 +18,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.4\n"
#: example/example_pp.cpp:17
#: example/example_pp.cpp:19
msgid "WINEFILE"
msgstr "WINEFILE"
#: example/example_pp.cpp:19
#: example/example_pp.cpp:21
msgid "TASKMGR"
msgstr "GESTOR DE TAREAS"
#: example/example_pp.cpp:21
#: example/example_pp.cpp:23
msgid "CHANGELOG"
msgstr "LISTA DE CAMBIOS"
#: example/example_pp.cpp:23
#: example/example_pp.cpp:25
msgid "FORCE EXIT"
msgstr "SALIDA FORZADA"
......@@ -18,18 +18,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.4\n"
#: example/example_pp.cpp:17
#: example/example_pp.cpp:19
msgid "WINEFILE"
msgstr "ФАЙЛОВЫЙ МЕНЕДЖЕР"
#: example/example_pp.cpp:19
#: example/example_pp.cpp:21
msgid "TASKMGR"
msgstr "ДИСПЕТЧЕР ЗАДАЧ"
#: example/example_pp.cpp:21
#: example/example_pp.cpp:23
msgid "CHANGELOG"
msgstr "ИЗМЕНЕНИЯ"
#: example/example_pp.cpp:23
#: example/example_pp.cpp:25
msgid "FORCE EXIT"
msgstr "ПРИНУДИТЕЛЬНЫЙ ВЫХОД"
......@@ -5,29 +5,30 @@
#
#, 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"
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:17
#: example/example_pp.cpp:19
msgid "WINEFILE"
msgstr ""
#: example/example_pp.cpp:19
#: example/example_pp.cpp:21
msgid "TASKMGR"
msgstr ""
#: example/example_pp.cpp:21
#: example/example_pp.cpp:23
msgid "CHANGELOG"
msgstr ""
#: example/example_pp.cpp:23
#: example/example_pp.cpp:25
msgid "FORCE EXIT"
msgstr ""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment