Commit f06e5b4f authored by Alberto Fanjul's avatar Alberto Fanjul

Add standalone mode

parent 1c3a2c82
Pipeline #35823 passed with stages
in 22 minutes and 55 seconds
......@@ -42,6 +42,7 @@ public class Application : Gtk.Application
public static bool quit = false;
public static string activity;
public static bool no_wd = false;
public static bool standalone = false;
public static ApplicationCommandLine command_line;
......@@ -64,6 +65,9 @@ public class Application : Gtk.Application
{"no-wd", 0, 0, OptionArg.NONE,
ref no_wd, N_("Do not try to load a repository from the current working directory"), null},
{"standalone", 0, 0, OptionArg.NONE,
ref standalone, N_("Run gitg in standalone mode"), null},
{null}
};
}
......@@ -148,6 +152,11 @@ public class Application : Gtk.Application
return true;
}
if (Options.standalone)
{
set_flags(get_flags() | ApplicationFlags.NON_UNIQUE);
}
if (Options.quit)
{
exit_status = 0;
......
#!/usr/bin/env vala
message ("hello world!");
Regex regexp = new Regex(".*(?:\\s|\\R)*(?P<message>(?:.|\\R)*?)\\s*$");
var m = "hello world\r\n Riti toti.\r\nasdf adfa \r\n a \r\n ";
MatchInfo minfo;
if (regexp.match(m, 0, out minfo))
{
var mes = minfo.fetch_named("message");
message(":"+mes+":");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment