[gnac/devel] Added '-a' command-line option
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Added '-a' command-line option
- Date: Tue, 28 Sep 2010 18:55:41 +0000 (UTC)
commit 45a8d91af109dce3d6363b4ea07c8903e68da11c
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Tue Sep 28 19:55:35 2010 +0100
Added '-a' command-line option
man/gnac.1 | 5 ++++-
src/gnac-options.c | 23 +++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/man/gnac.1 b/man/gnac.1
index 9253430..1c6ae36 100644
--- a/man/gnac.1
+++ b/man/gnac.1
@@ -15,7 +15,7 @@
.\" along with GNAC; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor,
.\" Boston, MA 02110-1301 USA
-.TH gnac 1 "2010\-07\-07" "GNOME"
+.TH gnac 1 "2010\-09\-28" "GNOME"
.SH NAME
Gnac \- Audio converter for GNOME
@@ -32,6 +32,9 @@ files conversion between all GStreamer supported audio formats.
.SH OPTIONS
.TP
+.B \-a, \-\-audio-profile=name
+Use audio profile 'name'
+.TP
.B \-\-debug
Show debugging information
.TP
diff --git a/src/gnac-options.c b/src/gnac-options.c
index 376050b..587409a 100644
--- a/src/gnac-options.c
+++ b/src/gnac-options.c
@@ -29,12 +29,19 @@
#include <glib/gi18n.h>
+#include "gnac-gconf.h"
#include "gnac-main.h"
#include "gnac-options.h"
#include "libgnac-debug.h"
static gboolean
+gnac_options_audio_profile_cb(const gchar *option_name,
+ const gchar *value,
+ gpointer data,
+ GError **error);
+
+static gboolean
gnac_options_debug_cb(const gchar *option_name,
const gchar *value,
gpointer data,
@@ -55,6 +62,10 @@ gnac_options_version_cb(const gchar *option_name,
GnacCmdLineOptions options;
const GOptionEntry all_options[] = {
+ { "audio-profile", 'a',
+ 0, G_OPTION_ARG_CALLBACK,
+ gnac_options_audio_profile_cb,
+ N_("Use audio profile 'name'"), N_("name") },
{ "debug", '\0',
G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
gnac_options_debug_cb,
@@ -76,6 +87,18 @@ const GOptionEntry all_options[] = {
static gboolean
+gnac_options_audio_profile_cb(const gchar *option_name,
+ const gchar *value,
+ gpointer data,
+ GError **error)
+{
+ gnac_gconf_set_string(GNAC_GCONF_LAST_USED_PROFILE, value);
+ libgnac_debug("profile \"%s\" selected", value);
+ return TRUE;
+}
+
+
+static gboolean
gnac_options_debug_cb(const gchar *option_name,
const gchar *value,
gpointer data,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]