[gitg] Return true in option callbacks
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Return true in option callbacks
- Date: Mon, 8 Dec 2014 17:57:05 +0000 (UTC)
commit 16b75d4deebc411d1ebd5915b4b377c209c388ae
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Mon Dec 8 18:55:19 2014 +0100
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.
gitg/gitg-application.vala | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index ba44f7c..636c4ec 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]