[cheese] show the version with the --version command line flag
- From: Daniel G. Siegel <dgsiegel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] show the version with the --version command line flag
- Date: Sun, 8 Aug 2010 23:35:46 +0000 (UTC)
commit 539418f7c0dc9e559b6e37bff7708cb381436dee
Author: daniel g. siegel <dgsiegel gnome org>
Date: Mon Aug 9 01:33:56 2010 +0200
show the version with the --version command line flag
src/cheese-main.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-main.vala b/src/cheese-main.vala
index 56fde6f..7df17c8 100644
--- a/src/cheese-main.vala
+++ b/src/cheese-main.vala
@@ -30,7 +30,7 @@ public class Cheese.Main
static bool verbose;
static bool wide;
static string device;
- static bool version_only;
+ static bool version;
static FileStream log_file;
static Cheese.MainWindow main_window;
@@ -39,7 +39,7 @@ public class Cheese.Main
{ "verbose", 'v', 0, OptionArg.NONE, ref verbose, N_("Be verbose"), null},
{ "wide", 'w', 0, OptionArg.NONE, ref wide, N_("Enable wide mode"), null},
{ "device", 'd', 0, OptionArg.FILENAME, ref device, N_("Device to use as a camera"), N_("DEVICE")},
- { "version", 0, 0, OptionArg.NONE, ref version_only, N_("Output version information and exit"), null},
+ { "version", 0, 0, OptionArg.NONE, ref version, N_("Output version information and exit"), null},
{ null}
};
@@ -91,6 +91,12 @@ public class Cheese.Main
return 1;
}
+ if (version)
+ {
+ stdout.printf ("%s %s\n", Config.PACKAGE_NAME, Config.PACKAGE_VERSION);
+ return 0;
+ }
+
main_window = new Cheese.MainWindow ();
Unique.App app = new Unique.App ("org.gnome.Cheese", null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]