X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fmoonshot-identity-manager-app.vala;h=4efd4167abf82a657ef02c17c2c30145a1f4bd02;hb=efd11b3fa7c723f33c5cb177e976193416d9026a;hp=a013cfbdae9bb453f4598ba04a6d748e06ab4371;hpb=b947c85961f6d272ac9de2b1865a50ff84267eaf;p=moonshot-ui.git diff --git a/src/moonshot-identity-manager-app.vala b/src/moonshot-identity-manager-app.vala index a013cfb..4efd416 100644 --- a/src/moonshot-identity-manager-app.vala +++ b/src/moonshot-identity-manager-app.vala @@ -345,7 +345,10 @@ public class IdentityManagerApp { static bool explicitly_launched = true; static bool use_flat_file_store = false; +static bool attach_console = false; const GLib.OptionEntry[] options = { + {"attach-console",0,0,GLib.OptionArg.NONE, + ref attach_console,"attach console",null}, {"dbus-launched",0,GLib.OptionFlags.REVERSE,GLib.OptionArg.NONE, ref explicitly_launched,"launch for dbus rpc use",null}, {"flat-file-store",0,0,GLib.OptionArg.NONE, @@ -353,6 +356,7 @@ const GLib.OptionEntry[] options = { {null} }; +public extern int moonshot_attach_console(); public static int main(string[] args){ #if IPC_MSRPC @@ -392,6 +396,16 @@ public static int main(string[] args){ Gtk.Settings settings = Gtk.Settings.get_default (); settings.set_string_property ("gtk-theme-name", "ms-windows", "moonshot"); settings.set_long_property ("gtk-menu-images", 0, "moonshot"); + if (attach_console) { + if (moonshot_attach_console() != 0) { + stdout.printf(_("Attached console\n")); + stdout.flush(); + } + } + else { + stdout.printf("Standard output\n"); + stdout.flush(); + } #endif Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);