Skip to content

Commit

Permalink
fix cmd args handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaSd committed Sep 12, 2021
1 parent 95b8bd7 commit 5652833
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/eltrafico_main/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,16 @@ fn build_ui(application: &gtk::Application) {
}

pub fn run() {
let application = gtk::Application::new(Some("com.github.eltrfico"), Default::default());
let application = gtk::Application::new(
Some("com.sigmasd.eltrfico"),
gio::ApplicationFlags::HANDLES_COMMAND_LINE,
);

// Don't let gtk handle cmd arguments
application.connect_command_line(|app, _appcmd| {
build_ui(app);
0
});
application.connect_activate(|app| {
build_ui(app);
});
Expand Down
2 changes: 1 addition & 1 deletion src/eltrafico_main/gui/widget_builder.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::Message;
use crate::utils::ifconfig;
use glib::object::Cast;
use gtk::*;
use gtk::prelude::*;
use gtk::*;
use std::cell::RefCell;
use std::collections::HashMap;
use std::io::Write;
Expand Down

0 comments on commit 5652833

Please sign in to comment.