use Application;
use ffi;
use gio::ApplicationFlags;
use glib::object::IsA;
use glib::translate::*;
use rt;
use glib;
use glib_ffi;

impl Application {
    #[cfg(feature = "v3_6")]
    pub fn new<'a, I: Into<Option<&'a str>>>(application_id: I, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
        skip_assert_initialized!();
        try!(rt::init());
        unsafe {
            Option::from_glib_full(
                ffi::gtk_application_new(application_id.into().to_glib_none().0, flags.to_glib()))
                .ok_or(glib::BoolError("Failed to create application"))
        }
    }

    #[cfg(not(feature = "v3_6"))]
    pub fn new(application_id: &str, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
        skip_assert_initialized!();
        try!(rt::init());
        unsafe {
            Option::from_glib_full(
                ffi::gtk_application_new(application_id.to_glib_none().0, flags.to_glib()))
                .ok_or(glib::BoolError("Failed to create application"))
        }
    }
}

use Application;
use ffi;
use gio::ApplicationFlags;
use glib::object::IsA;
use glib::translate::*;
use rt;
use glib;
use glib_ffi;

impl Application {
    #[cfg(feature = "v3_6")]
    fn new(application_id: Option<&str>, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
        skip_assert_initialized!();
        try!(rt::init());
        unsafe {
            Option::from_glib_full(
                ffi::gtk_application_new(application_id.to_glib_none().0, flags.to_glib()))
                .ok_or(glib::BoolError("Failed to create application"))
        }
    }

    #[cfg(not(feature = "v3_6"))]
    fn new(application_id: &str, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
        skip_assert_initialized!();
        try!(rt::init());
        unsafe {
            Option::from_glib_full(
                ffi::gtk_application_new(application_id.to_glib_none().0, flags.to_glib()))
                .ok_or(glib::BoolError("Failed to create application"))
        }
    }
}

--- 
+++ 
@@ -9,18 +9,18 @@
 
 impl Application {
     #[cfg(feature = "v3_6")]
-    fn new(application_id: Option<&str>, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
+    pub fn new<'a, I: Into<Option<&'a str>>>(application_id: I, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
         skip_assert_initialized!();
         try!(rt::init());
         unsafe {
             Option::from_glib_full(
-                ffi::gtk_application_new(application_id.to_glib_none().0, flags.to_glib()))
+                ffi::gtk_application_new(application_id.into().to_glib_none().0, flags.to_glib()))
                 .ok_or(glib::BoolError("Failed to create application"))
         }
     }
 
     #[cfg(not(feature = "v3_6"))]
-    fn new(application_id: &str, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
+    pub fn new(application_id: &str, flags: ApplicationFlags) -> Result<Application, glib::BoolError> {
         skip_assert_initialized!();
         try!(rt::init());
         unsafe {
Change gtk::Application::new parameter to use Into<Option<&str>>

Signed-off-by: Jean Pierre Dudey <341388fa1817ca285e65547384a9727ce7f6d39a@hotmail.com>
