Files
effector/src/gui/app.cpp
T
SiandClaude Opus 5.5 c069de3566 Give Effector its own icon
An E split into its colour channels, with two slices slipped sideways,
replaces the generic applications-graphics icon in the desktop entry and
About Effector, with a one-colour symbolic version for panels. Both are
installed into the hicolor theme; a build run straight from the build tree
falls back to the copy in the sources. The version moves to 0.5.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 10:38:49 +02:00

28 lines
975 B
C++

#include "gui/app.hpp"
#include <gtkmm.h>
#include "gui/window.hpp"
namespace effector {
int runGui(const Options& initial, int argc, char** argv) {
// Our own parser already consumed argv, so GTK must not see it.
(void)argc;
(void)argv;
auto app = Gtk::Application::create("org.effector.Effector",
Gio::Application::Flags::NON_UNIQUE);
app->signal_startup().connect([] {
// An installed Effector finds its icon in the hicolor theme; one run
// straight from the build tree falls back to the copy in the sources.
const char* icon = "org.effector.Effector";
auto theme = Gtk::IconTheme::get_for_display(Gdk::Display::get_default());
if (!theme->has_icon(icon)) theme->add_search_path(EFFECTOR_SOURCE_ICON_DIR);
Gtk::Window::set_default_icon_name(icon);
});
return app->make_window_and_run<EffectorWindow>(0, nullptr, initial);
}
} // namespace effector