linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00573
[Branch ~linuxdcpp-team/linuxdcpp/trunk] Rev 360: Improve man page and command descriptions
------------------------------------------------------------
revno: 360
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-03-22 20:35:22 -0500
message:
Improve man page and command descriptions
modified:
data/linuxdcpp.1
linux/wulfor.cc
--
lp:linuxdcpp
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk
Your team LinuxDC++ Team is subscribed to branch lp:linuxdcpp.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk/+edit-subscription.
=== modified file 'data/linuxdcpp.1'
--- data/linuxdcpp.1 2010-03-22 16:52:49 +0000
+++ data/linuxdcpp.1 2010-03-23 01:35:22 +0000
@@ -5,30 +5,36 @@
.SH SYNOPSIS
.B linuxdcpp
+.RI [ OPTION ...]
+.RI [ URI ...]
.SH DESCRIPTION
LinuxDC++ is a Direct Connect client based on DC++. Utilizing the latest DC++ core, LinuxDC++ offers similar functionality to the Windows client like segmented downloading, TTH based file integrity, etc. with a GTK+ user interface. LinuxDC++ is free and open source software licensed under the GPL.
.PP
- Direct Connect (DC) is a peer-to-peer (P2P) file-sharing protocol. Clients connect to a central hub where they can chat or share files with one another. Users can view other users' list of shared files or search the hub for files.
+Direct Connect (DC) is a peer-to-peer (P2P) file-sharing protocol. Clients connect to a central hub where they can chat or share files with one another. Users can view other users' list of shared files or search the hub for files.
.SH OPTIONS
-LinuxDC++ specific options are described below.
-.IP "\-m or \-\-magnet=Magnet-link"
-Search for a given magnet link from connected hubs.
-.IP "\-c or \-\-connect=URI"
-Connect to a given hub.
-.IP "\-s or \-\-show"
-Show the running instance. If no other arguments are given and LinuxDC++ is already running, this is the default.
-.IP "\-e or \-\-existing"
-Direct commands to already running instance. If running instance is not found, do nothing.
-.IP "\-r or \-\-refresh"
-Initiate filelist refresh.
-.IP "\-V or \-\-version"
+.TP
+.BI "-c, --connect=" URI
+Connect to the given hub
+.TP
+.B "-e, --existing"
+Direct commands to an already running instance. If a running instance is not found, do nothing.
+.TP
+.B "-h, --help"
+Show help options
+.TP
+.BI "-m, --magnet=" URI
+Search for the given magnet link
+.TP
+.B "-r, --refresh"
+Initiate filelist refresh
+.TP
+.B "-s, --show"
+Show the running instance. This is the default action if no other arguments are supplied.
+.TP
+.B "-v, --version"
Show version information and exit
-.IP "\-h or \-\-help"
-Display summary of accepted LinuxDC++ specific options.
-.IP "\-\-help\-all"
-Display summary of all accepted options.
.SH SEE ALSO
.B Homepage:
=== modified file 'linux/wulfor.cc'
--- linux/wulfor.cc 2010-03-22 19:18:07 +0000
+++ linux/wulfor.cc 2010-03-23 01:35:22 +0000
@@ -83,21 +83,23 @@
gboolean show = FALSE, refresh = FALSE, version = FALSE, existing = FALSE;
GOptionEntry entries[] = {
- { "magnet", 'm', 0, G_OPTION_ARG_STRING_ARRAY, &magnet, N_("Search magnet from connected hubs."), N_("Magnet-link") },
- { "connect", 'c', 0, G_OPTION_ARG_STRING_ARRAY, &address, N_("Connect to given hub."), N_("URI") },
- { "show", 's', 0, G_OPTION_ARG_NONE, &show, N_("Show running instance (this is a default in case no other command was given)"), NULL },
- { "existing", 'e', 0, G_OPTION_ARG_NONE, &existing, N_("Send command to already running instance (do nothing if running instance is not found)."), NULL },
- { "refresh", 'r', 0, G_OPTION_ARG_NONE, &refresh, N_("Refresh filelist. LinuxDC++ has to be running for this to have an effect."), NULL },
- { "version", 'V', 0, G_OPTION_ARG_NONE, &version, N_("Print version information and exit."), NULL },
+ { "connect", 'c', 0, G_OPTION_ARG_STRING_ARRAY, &address, N_("Connect to the given hub"), N_("URI") },
+ { "existing", 'e', 0, G_OPTION_ARG_NONE, &existing, N_("Direct commands to an already running instance"), NULL },
+ { "magnet", 'm', 0, G_OPTION_ARG_STRING_ARRAY, &magnet, N_("Search for the given magnet link"), N_("URI") },
+ { "refresh", 'r', 0, G_OPTION_ARG_NONE, &refresh, N_("Initiate filelist refresh"), NULL },
+ { "show", 's', 0, G_OPTION_ARG_NONE, &show, N_("Show the running instance (default action)"), NULL },
+ { "version", 'v', 0, G_OPTION_ARG_NONE, &version, N_("Show version information and exit"), NULL },
{ NULL }
};
GOptionContext *context;
GError* error = NULL;
- context = g_option_context_new(_("[URI] [MAGNET-LINK]..."));
+ context = g_option_context_new(N_("[URI...]"));
g_option_context_add_main_entries(context, entries, NULL);
// with gtk_get_option_group(TRUE) we don't need to call gtk_init with argc & argv in main.
g_option_context_add_group(context, gtk_get_option_group(TRUE));
+ g_option_context_set_summary(context, N_("File-sharing client for the Direct Connect network"));
+
if (!g_option_context_parse(context, argc, argv, &error))
{
g_print(_("Option parsing failed: %s\n"), error->message);
@@ -188,7 +190,7 @@
if (retval < 0)
{
- std::cout << _("Failed to talk to running LinuxDC++: ") << dcpp::Util::translateError(retval) << std::endl;
+ std::cout << _("Failed to communicate with existing instance: ") << dcpp::Util::translateError(retval) << std::endl;
return -1;
}
@@ -196,7 +198,7 @@
{
// Show profile lock error only if profile is locked and talking to running instance
// fails for some reason
- std::string message = _("Only one instance of LinuxDC++ is allowed per profile. Also failed to talk to already running instance for some reason");
+ std::string message = _("Unable to communicate with existing instance and only one instance is allowed per profile.");
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", message.c_str());
gtk_dialog_run(GTK_DIALOG(dialog));