Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow multiple instances to be run simultaneously #85

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::ptr;
use std::{io, time::Duration};

use configuration::{Configuration, APP_CONFIG};
use gdk_pixbuf::gio::ApplicationFlags;
use gdk_pixbuf::{Pixbuf, PixbufLoader};
use gtk::prelude::*;

Expand Down Expand Up @@ -297,7 +298,13 @@ fn run_satty() -> Result<()> {
};

// start GUI
let app = RelmApp::new("com.gabm.satty").with_args(vec![]);
let app = relm4::main_application();
app.set_application_id(Some("com.gabm.satty"));
// set flag to allow to run multiple instances
app.set_flags(ApplicationFlags::NON_UNIQUE);

// create relm app and run
let app = RelmApp::from_app(app).with_args(vec![]);
relm4_icons::initialize_icons();
app.run::<App>(image);
Ok(())
Expand Down
Loading