aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-20 13:44:21 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-20 13:44:21 -0500
commit51bd7465ac148a34ec37cb8760daf3b282b5ed6a (patch)
tree4f94efe4d5e140e42ac9c5461414d3230a5a4d0d /src/main.c
parentee30bb04d1ee4842fd20bec5c673215df5a878c5 (diff)
downloadayatana-indicator-datetime-51bd7465ac148a34ec37cb8760daf3b282b5ed6a.tar.gz
ayatana-indicator-datetime-51bd7465ac148a34ec37cb8760daf3b282b5ed6a.tar.bz2
ayatana-indicator-datetime-51bd7465ac148a34ec37cb8760daf3b282b5ed6a.zip
remove the --replace command-line argument and property as we're using upstart for that
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/main.c b/src/main.c
index aa29456..c75b2d7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,37 +31,6 @@
****
***/
-static gboolean replace = FALSE;
-
-static void
-parse_command_line (int * argc, char *** argv)
-{
- GError * error;
- GOptionContext * option_context;
-
- static GOptionEntry entries[] =
- {
- { "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "Replace the currently-running service", NULL },
- { NULL }
- };
-
- error = NULL;
- option_context = g_option_context_new ("- indicator-datetime service");
- g_option_context_add_main_entries (option_context, entries, GETTEXT_PACKAGE);
- if (!g_option_context_parse (option_context, argc, argv, &error))
- {
- g_print ("option parsing failed: %s\n", error->message);
- g_error_free (error);
- exit (EXIT_FAILURE);
- }
-
- g_option_context_free (option_context);
-}
-
-/***
-****
-***/
-
static void
on_name_lost (gpointer instance G_GNUC_UNUSED, gpointer loop)
{
@@ -70,7 +39,7 @@ on_name_lost (gpointer instance G_GNUC_UNUSED, gpointer loop)
}
int
-main (int argc, char ** argv)
+main (int argc G_GNUC_UNUSED, char ** argv G_GNUC_UNUSED)
{
GMainLoop * loop;
IndicatorDatetimeService * service;
@@ -80,10 +49,8 @@ main (int argc, char ** argv)
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
textdomain (GETTEXT_PACKAGE);
- parse_command_line (&argc, &argv);
-
/* run */
- service = indicator_datetime_service_new (replace);
+ service = indicator_datetime_service_new ();
loop = g_main_loop_new (NULL, FALSE);
g_signal_connect (service, INDICATOR_DATETIME_SERVICE_SIGNAL_NAME_LOST,
G_CALLBACK(on_name_lost), loop);