From 48a16528a844b21fff94d7fd601c0ac98ebb0118 Mon Sep 17 00:00:00 2001 From: daa Date: Sun, 14 May 2017 00:30:34 +0300 Subject: [PATCH] Change application id for debug mode --- src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index d555dea..a9df73c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,12 @@ const ENABLE_EXTERNAL_POPUP: &'static str = "--enable-external-popup"; fn main() { env_logger::init().expect("Can't initialize env_logger"); - let app = gtk::Application::new(Some("org.daa.NeovimGtk"), gio::ApplicationFlags::empty()) + let app = if cfg!(debug_assertions) { + gtk::Application::new(Some("org.daa.NeovimGtkDebug"), + gio::ApplicationFlags::empty()) + } else { + gtk::Application::new(Some("org.daa.NeovimGtk"), gio::ApplicationFlags::empty()) + } .expect("Failed to initialize GTK application"); app.connect_activate(activate); @@ -111,8 +116,8 @@ mod tests { fn test_external_menu() { assert_eq!(true, external_popup(vec!["neovim-gtk", "--enable-external-popup"] - .iter() - .map(|s| s.to_string()))); + .iter() + .map(|s| s.to_string()))); } #[test]