no compile errors, fully functional workspace indicators
This commit is contained in:
16
src/app.cpp
16
src/app.cpp
@@ -6,9 +6,7 @@
|
||||
|
||||
App::App() {
|
||||
this->app = Gtk::Application::create("org.example.mybar");
|
||||
|
||||
this->setupServices();
|
||||
this->notificationService.intialize();
|
||||
this->hyprlandService = HyprlandService::getInstance();
|
||||
|
||||
app->signal_activate().connect([&]() {
|
||||
@@ -21,11 +19,15 @@ App::App() {
|
||||
);
|
||||
|
||||
if (monitor) {
|
||||
auto bar = new Bar(monitor->gobj());
|
||||
auto bar = std::make_shared<Bar>(monitor->gobj());
|
||||
|
||||
bar->set_application(app);
|
||||
bar->show();
|
||||
bar->addLeftWidget(hyprlandService->getWorkspaceIndicatorsForMonitor(i));
|
||||
|
||||
std::string monitorName = monitor->get_connector();
|
||||
bar->addLeftWidget(hyprlandService->getWorkspaceIndicatorsForMonitor(monitorName));
|
||||
hyprlandService->addBar(bar, monitorName);
|
||||
|
||||
bars.push_back(bar);
|
||||
}
|
||||
}
|
||||
@@ -33,16 +35,12 @@ App::App() {
|
||||
|
||||
|
||||
app->signal_shutdown().connect([&]() {
|
||||
for (auto bar : bars) {
|
||||
delete bar;
|
||||
}
|
||||
bars.clear();
|
||||
|
||||
this->trayService->stop();
|
||||
});
|
||||
}
|
||||
|
||||
void App::setupServices() {
|
||||
|
||||
this->trayService->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user