mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-09-15 22:20:00 +00:00
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:
parent
973df228eb
commit
16b75d4dee
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue