[pulseaudio-commits] src/pavucontrol.cc

Peter Meerwald pmeerw at kemper.freedesktop.org
Mon May 25 06:16:51 PDT 2015


 src/pavucontrol.cc |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 290485e8abe02a9c78d10441ffe7c3dcb4a2987a
Author: Peter Meerwald <pmeerw at pmeerw.net>
Date:   Wed May 20 23:07:55 2015 +0200

    Add --version command line option
    
    allow pavucontrol to display its --version
    see https://bugs.freedesktop.org/show_bug.cgi?id=83147
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc
index c1019b6..7a95c3e 100644
--- a/src/pavucontrol.cc
+++ b/src/pavucontrol.cc
@@ -671,11 +671,22 @@ int main(int argc, char *argv[]) {
     entry3.set_description(_("Maximize the window."));
     group.add_entry(entry3, maximize);
 
+    bool version = false;
+    Glib::OptionEntry entry4;
+    entry4.set_long_name("version");
+    entry4.set_description(_("Show version"));
+    group.add_entry(entry4, version);
+
     options.set_main_group(group);
 
     try {
         Gtk::Main kit(argc, argv, options);
 
+        if (version) {
+            printf("%s\n", PACKAGE_STRING);
+            return 0;
+        }
+
         ca_context_set_driver(ca_gtk_context_get(), "pulse");
 
         MainWindow* mainWindow = MainWindow::create(maximize);



More information about the pulseaudio-commits mailing list