Return true in option callbacks

This fixes the issue where the return value from these
callbacks is just a random value, for example false, which
in turn makes -c/--commit not work.
This commit is contained in:
Jesse van den Kieboom 2014-12-08 18:55:19 +01:00
parent 973df228eb
commit 16b75d4dee

View file

@ -45,9 +45,10 @@ public class Application : Gtk.Application
public static ApplicationCommandLine command_line;
private static void commit_activity()
private static bool commit_activity()
{
activity = "commit";
return true;
}
public static const OptionEntry[] entries = {
@ -74,13 +75,14 @@ public class Application : Gtk.Application
Options.activity = "";
}
private static void show_version_and_quit()
private static bool show_version_and_quit()
{
stdout.printf("%s %s\n",
Environment.get_application_name(),
Config.VERSION);
Options.quit = true;
return true;
}
private void parse_command_line(ref unowned string[] argv) throws OptionError