[Gpredict-svn] SF.net SVN: gpredict:[574] trunk/src/main.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <cs...@us...> - 2010-01-04 17:16:17
|
Revision: 574
http://gpredict.svn.sourceforge.net/gpredict/?rev=574&view=rev
Author: csete
Date: 2010-01-04 17:16:11 +0000 (Mon, 04 Jan 2010)
Log Message:
-----------
Added summary.
Modified Paths:
--------------
trunk/src/main.c
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2010-01-04 16:14:12 UTC (rev 573)
+++ trunk/src/main.c 2010-01-04 17:16:11 UTC (rev 574)
@@ -59,6 +59,22 @@
GtkWidget *app;
+/** \brief Command line flag for cleaning TLE data. */
+static gboolean cleantle = FALSE;
+
+/** \brief Command line flag for cleaning TRSP data */
+static gboolean cleantrsp = FALSE;
+
+/** \brief Command line options. */
+static GOptionEntry entries[] =
+{
+ { "clean-tle", 0, 0, G_OPTION_ARG_NONE, &cleantle, "Clean the TLE data in user's configuration directory", NULL },
+ { "clean-trsp", 0, 0, G_OPTION_ARG_NONE, &cleantrsp, "Clean the transponder data in user's configuration directory", NULL },
+ { NULL }
+};
+
+
+
const gchar *dummy = N_("just to have a pot");
@@ -90,8 +106,11 @@
int main (int argc, char *argv[])
{
+ GError *err = NULL;
+ GOptionContext *context;
guint error = 0;
+
#ifdef G_OS_WIN32
printf ("Starting gpredict. This may take some time...\n");
#endif
@@ -105,11 +124,24 @@
gtk_set_locale ();
gtk_init (&argc, &argv);
+ context = g_option_context_new ("");
+ g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+ g_option_context_set_summary (context,
+ _("Gpredict is a graphical real-time satellite tracking "\
+ "and orbit prediction program.\n"\
+ "Gpredict does not require any command line options for "\
+ "nominal operation."));
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
+ if (!g_option_context_parse (context, &argc, &argv, &err)) {
+ g_print (_("Option parsing failed: %s\n"), err->message);
+ }
+
+
/* start logger first, so that we can catch error messages if any */
sat_log_init ();
- if (!g_thread_supported ())
- g_thread_init (NULL);
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
/* check that user settings are ok */
error = first_time_check_run ();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|