[Xfce4-commits] <postler:master> Add 'version' or 'V' to command line switches
Christian Dywan
noreply at xfce.org
Sat Dec 11 20:08:01 CET 2010
Updating branch refs/heads/master
to e1222fb75ec5f682f0d92b3ea4f9d34130d0c266 (commit)
from 336a72f2e3e03f06d0308d18766f1b24068c432f (commit)
commit e1222fb75ec5f682f0d92b3ea4f9d34130d0c266
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Dec 10 23:11:14 2010 +0100
Add 'version' or 'V' to command line switches
postler/postler-bureau.vala | 1 +
postler/postler-reader.vala | 13 ++++++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 397d480..b0c12d7 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -352,6 +352,7 @@ public class Postler.Bureau : Gtk.Window {
"authors", authors,
"logo-icon-name", STOCK_INTERNET_MAIL,
"translator-credits", _("translator-credits"),
+ "website", "https://launchpad.net/postler",
null);
}
diff --git a/postler/postler-reader.vala b/postler/postler-reader.vala
index e4955a5..cb75427 100644
--- a/postler/postler-reader.vala
+++ b/postler/postler-reader.vala
@@ -10,12 +10,14 @@
*/
public class Postler.Reader {
- static bool verbose = false;
static string module = null;
+ static bool verbose = false;
+ static bool version = false;
static string[] filenames = null;
const OptionEntry[] options = {
{ "module", 'm', 0, OptionArg.STRING, ref module, N_("Module"), null },
{ "verbose", 'v', 0, OptionArg.NONE, ref verbose, N_("Verbose"), null },
+ { "version", 'V', 0, OptionArg.NONE, ref version, N_("Display program version"), null },
{ "", 0, 0, GLib.OptionArg.STRING_ARRAY, ref filenames, N_("Filenames"), null },
{ null }
};
@@ -38,6 +40,15 @@ public class Postler.Reader {
GLib.error (_("Failed to parse command line: %s"), error.message);
}
+ if (version) {
+ stdout.printf (_("%s %s\n\n"
+ + "Please report comments, suggestions and bugs to:\n"
+ + "\t%s\n"),
+ Config.PACKAGE_NAME, Config.PACKAGE_VERSION,
+ Config.PACKAGE_BUGREPORT);
+ return 0;
+ }
+
if (!verbose) {
LogFunc handler = (domain, level, message) => { };
Log.set_handler (null, LogLevelFlags.LEVEL_DEBUG, handler);
More information about the Xfce4-commits
mailing list