[gnac] Add a man page.
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnac] Add a man page.
- Date: Wed, 19 Aug 2009 10:27:52 +0000 (UTC)
commit f9616a29b6c686ce91e1dc99a21119ef0b701eab
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Wed Aug 19 12:27:22 2009 +0200
Add a man page.
data/Makefile.am | 3 ++
data/gnac.1 | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/gnac-main.c | 40 +++++++++++++++++-------
3 files changed, 120 insertions(+), 12 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 7d21ef5..bb7a46d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -19,6 +19,8 @@ schema_in_files = gnac.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
+man_MANS = gnac.1
+
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
update_desktop_database = update-desktop-database 2>&1 > /dev/null
@@ -115,6 +117,7 @@ DISTCLEANFILES = \
EXTRA_DIST = \
$(config_DATA) \
+ $(man_MANS) \
$(pixmaps_DATA) \
$(schema_in_files) \
$(desktop_DATA) \
diff --git a/data/gnac.1 b/data/gnac.1
new file mode 100644
index 0000000..95ccb74
--- /dev/null
+++ b/data/gnac.1
@@ -0,0 +1,89 @@
+.\"
+.\" Copyright (C) 2007 - 2009 Gnac
+.\"
+.\" GNAC is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" GNAC is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" 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 "2009\-08\-19" "GNOME"
+
+.SH NAME
+Gnac \- GNOME desktop audio converter based on GStreamer
+
+.SH SYNOPSIS
+.B gnac
+.RI [ option... ] " " [ URIs... ]
+
+.SH DESCRIPTION
+.B Gnac
+is an easy to use audio conversion program for the GNOME desktop.
+It is designed to be powerful but simple! It provides easy audio
+files conversion between all GStreamer supported audio formats.
+
+.SH OPTIONS
+.TP
+.B \-\-version
+Show the version of the program and exit
+.TP
+.B \-\-display=DISPLAY
+X display to use
+.TP
+.B \-? ", "\-\-help
+Show help options
+.TP
+.B \-\-help-all
+Show all help options
+.TP
+.B \-\-help-gst
+Show GStreamer Options
+.TP
+.B \-\-help-gtk
+Show GTK+ Options
+
+.SH KEYBINDINGS
+Global keybindings for
+.BR Gnac:
+.P
+Ctrl+i Add new files or folders
+.br
+Ctrl+Shift+c Clear the files list
+.br
+Ctrl+Shift+x Start and stop a conversion
+.br
+Enter Display the properties of the selected file
+.br
+Delete Remove the selected file from the list
+
+.SH FILES
+.I ~/.gnac/profiles/
+.RS
+The profiles directory.
+.RE
+.P
+.I /usr/share/gnac/profiles/default/
+.RS
+The default profiles directory.
+.RE
+
+.SH AUTHOR
+.B Gnac
+was written by Benoit Dupasquier <bdupasqu src gnome org>, David Joaquim
+<djoaquim src gnome org> and Alexandre Roux <alexroux src gnome org>.
+
+.SH DISTRIBUTION
+The latest version of Gnac may be downloaded from http://gnac.sf.net/.
+
+.SH SEE ALSO
+Gnac Homepage:
+.br
+http://gnac.sf.net/
diff --git a/src/gnac-main.c b/src/gnac-main.c
index 44beca4..c3020b5 100644
--- a/src/gnac-main.c
+++ b/src/gnac-main.c
@@ -1228,6 +1228,17 @@ gnac_on_file_monitor_changed_cb(GFileMonitor *monitor,
}*/
+G_GNUC_NORETURN static gboolean
+gnac_option_version_cb(const gchar *option_name,
+ const gchar *value,
+ gpointer data,
+ GError **error)
+{
+ g_print("%s %s\n", APPNAME, VERSION);
+ exit(EXIT_SUCCESS);
+}
+
+
gint
main(gint argc,
gchar **argv)
@@ -1236,7 +1247,12 @@ main(gint argc,
gchar **args_filenames = NULL;
const GOptionEntry entries[] = {
- { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &args_filenames, NULL, NULL },
+ { "version", '\0',
+ G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
+ gnac_option_version_cb,
+ N_("Show the version of the program and exit"), NULL },
+ { G_OPTION_REMAINING, '\0',
+ 0, G_OPTION_ARG_FILENAME_ARRAY, &args_filenames, NULL, NULL },
{ NULL }
};
@@ -1249,17 +1265,6 @@ main(gint argc,
textdomain(GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
- /* make sure every window has its name and icon */
- g_set_application_name(APPNAME);
- gtk_window_set_default_icon_name("gnac");
-
- /* make the links clickable */
- gtk_about_dialog_set_url_hook(gnac_about_url_hook, NULL, NULL);
- gtk_about_dialog_set_email_hook(gnac_about_email_hook, NULL, NULL);
-
- /* Initialisation of libraries */
- gdk_threads_init();
-
/* Parse command line arguments */
context = g_option_context_new(_("[URI...] - Convert your audio files"));
g_option_context_add_main_entries(context, entries, GETTEXT_PACKAGE);
@@ -1276,6 +1281,17 @@ main(gint argc,
}
g_option_context_free(context);
+ /* make sure every window has its name and icon */
+ g_set_application_name(APPNAME);
+ gtk_window_set_default_icon_name("gnac");
+
+ /* make the links clickable */
+ gtk_about_dialog_set_url_hook(gnac_about_url_hook, NULL, NULL);
+ gtk_about_dialog_set_email_hook(gnac_about_email_hook, NULL, NULL);
+
+ /* Initialisation of libraries */
+ gdk_threads_init();
+
conversion_errors = FALSE;
prev_time_left = -1;
gnac_utils_moving_avg_init();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]