diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/CMakeLists.txt | 57 | ||||
| -rw-r--r-- | app/desktop.in | 10 | ||||
| -rw-r--r-- | app/metainfo.xml | 38 | ||||
| -rw-r--r-- | app/mime.xml | 9 | ||||
| -rw-r--r-- | app/schemas/ch.arknet.Turns.gschema.xml | 25 | ||||
| -rw-r--r-- | app/src/main.cpp | 97 |
6 files changed, 0 insertions, 236 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt deleted file mode 100644 index a231ec6..0000000 --- a/app/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ -add_executable("app" - "src/main.cpp" -) - -target_link_libraries("app" PRIVATE - "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:gcov>" - - "PkgConfig::gtkmm" - "adwaitamm::adwaitamm" - - "turns::core" - "turns::lang" - - "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--whole-archive>" - "turns::ui" - "turns::style" - "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--no-whole-archive>" -) - -target_add_glib_resources("app" - PREFIX "/ch/arknet/Turns" - UI_FILES "metainfo.xml" -) - -set_target_properties("app" PROPERTIES - OUTPUT_NAME "turns" -) - -install(TARGETS "app" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -) - -install(FILES - "${CMAKE_CURRENT_SOURCE_DIR}/metainfo.xml" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" - RENAME "ch.arknet.Turns.metainfo.xml" -) - -configure_file("desktop.in" - "turns.desktop" -) - -install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/turns.desktop" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" - RENAME "ch.arknet.Turns.desktop" -) - -configure_file("mime.xml" - "turns.xml" -) - -install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/turns.xml" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages" - RENAME "ch.arknet.Turns.xml" -) diff --git a/app/desktop.in b/app/desktop.in deleted file mode 100644 index 99c0307..0000000 --- a/app/desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Turns -Name[de]=Züge -GenericName=Turn Tracker -Icon=ch.arknet.Turns -StartupNotify=true -Exec=@CMAKE_INSTALL_FULL_BINDIR@/turns %u -Categories=Utility; -MimeType=text/x-turn-order;
\ No newline at end of file diff --git a/app/metainfo.xml b/app/metainfo.xml deleted file mode 100644 index 621c1ee..0000000 --- a/app/metainfo.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component type="desktop"> - <id>ch.arknet.Turns</id> - <metadata_license>CC-BY-SA-4.0</metadata_license> - <project_license>LGPL-2.1-or-later</project_license> - <name>Turns</name> - <name xml:lang="de">Züge</name> - <summary>A simple turn order tracker</summary> - <description> - <p> - Turns is an application to track turn order for TTRPGs like Dungeons and Dragons or Call of Cthulhu. - </p> - </description> - <releases> - <release version="1.0" date="2025-12-31" type="stable"> - <description> - <p>This is the first public release</p> - </description> - </release> - </releases> - <recommends> - <control>keyboard</control> - <control>pointing</control> - </recommends> - <content_rating type="oars-1.1" /> - <keywords> - <keyword>Role-playing Games</keyword> - <keyword>Tabletop Games</keyword> - </keywords> - <developer id="ch.arknet"> - <name>Felix Morgner</name> - </developer> - <update_contact>felix.morgner@gmail.com</update_contact> - <launchable type="desktop-id">ch.arknet.Turns.desktop</launchable> - <url type="homepage">https://source.arknet.ch/fmorgner/turns</url> - <url type="bugtracker">https://source.arknet.ch/fmorgner/turns/-/issues</url> - <url type="vcs-browser">https://source.arknet.ch/fmorgner/turns</url> -</component>
\ No newline at end of file diff --git a/app/mime.xml b/app/mime.xml deleted file mode 100644 index 92e0ff4..0000000 --- a/app/mime.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> - <mime-type type="text/x-turn-order"> - <comment>Turn order file</comment> - <icon name="text-plain"/> - <glob-deleteall/> - <glob pattern="*.trns"/> - </mime-type> -</mime-info>
\ No newline at end of file diff --git a/app/schemas/ch.arknet.Turns.gschema.xml b/app/schemas/ch.arknet.Turns.gschema.xml deleted file mode 100644 index d764608..0000000 --- a/app/schemas/ch.arknet.Turns.gschema.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<schemalist> - <schema path="/ch/arknet/Turns/" id="ch.arknet.Turns"> - <key name="disposition-color-friendly" type="s"> - <default>'#33d17a'</default> - <summary>Friendly Disposition Color</summary> - <description>The color used to shade friendly participants.</description> - </key> - <key name="disposition-color-hostile" type="s"> - <default>'#e01b24'</default> - <summary>Hostile Disposition Color</summary> - <description>The color used to shade hostile participants.</description> - </key> - <key name="disposition-color-secret" type="s"> - <default>'#9141ac'</default> - <summary>Secret Disposition Color</summary> - <description>The color used to shade secret participants.</description> - </key> - <key name="skip-defeated" type="b"> - <default>false</default> - <summary>Skip Defeated Participants</summary> - <description>Whether or not defeated participants shall be skipped while stepping through the turn order.</description> - </key> - </schema> -</schemalist>
\ No newline at end of file diff --git a/app/src/main.cpp b/app/src/main.cpp deleted file mode 100644 index f179cf8..0000000 --- a/app/src/main.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include "turns/core/init.hpp" -#include "turns/core/settings.hpp" -#include "turns/ui/init.hpp" -#include "turns/ui/tracker.hpp" - -#include <sigc++/adaptors/bind.h> -#include <sigc++/functors/mem_fun.h> - -#include <glibmm/refptr.h> - -#include <giomm/application.h> -#include <giomm/settings.h> - -#include <gtkmm/application.h> -#include <gtkmm/builder.h> -#include <gtkmm/object.h> - -#include <adwaitamm/aboutdialog.hpp> -#include <adwaitamm/application.hpp> -#include <adwaitamm/enums.hpp> -#include <adwaitamm/stylemanager.hpp> - -#include <libintl.h> - -#include <clocale> -#include <print> - -auto show_about(Glib::RefPtr<Adwaita::Application> app) -{ - auto active_window = app->get_active_window(); - auto dialog = Gtk::make_managed<Adwaita::AboutDialog>("/ch/arknet/Turns/metainfo.xml", ""); - dialog->present(active_window); -} - -auto main(int argc, char * argv[]) -> int -{ - setlocale(LC_ALL, ""); - bindtextdomain("turns", LOCALEDIR); - bind_textdomain_codeset("turns", "UTF-8"); - textdomain("turns"); - - auto app = Adwaita::Application::create("ch.arknet.Turns", Gio::Application::Flags::HANDLES_OPEN); - auto settings = turns::core::get_settings(); - - turns::core::register_types(); - - app->signal_startup().connect([app] { - turns::ui::register_types(); - - auto style_manager = Adwaita::StyleManager::get_default(); - style_manager->set_color_scheme(Adwaita::ColorScheme::PreferLight); - - app->add_action("quit", sigc::mem_fun(*app, &Adwaita::Application::quit)); - app->add_action("about", sigc::bind(&show_about, app)); - app->set_accel_for_action("app.quit", "<Primary>q"); - app->set_accel_for_action("win.clear", "<Primary>x"); - app->set_accel_for_action("win.next", "<Primary>space"); - app->set_accel_for_action("win.previous", "<Primary>BackSpace"); - app->set_accel_for_action("win.add_participant", "<Primary>a"); - app->set_accel_for_action("win.open", "<Primary>o"); - app->set_accel_for_action("win.preferences", "<Primary>comma"); - app->set_accel_for_action("win.save", "<Primary>s"); - app->set_accel_for_action("win.save-as", "<Primary><Shift>s"); - }); - - app->signal_activate().connect([app, settings] { - auto window = new turns::ui::Tracker{app, settings}; - window->present(); - }); - - app->signal_open().connect([app, settings](auto files, auto) { - auto windows = app->get_windows(); - auto window = static_cast<turns::ui::Tracker *>(nullptr); - - if (windows.empty()) - { - window = new turns::ui::Tracker{app, settings}; - } - else - { - window = dynamic_cast<turns::ui::Tracker *>(windows[0]); - } - - window->present(); - window->load(files[0]); - }); - - app->signal_window_removed().connect([](auto window) { - auto tracker = dynamic_cast<turns::ui::Tracker *>(window); - if (tracker) - { - delete tracker; - } - }); - - return app->run(argc, argv); -}
\ No newline at end of file |
