diff options
Diffstat (limited to 'src/setup/gnunet-setup.c')
-rw-r--r-- | src/setup/gnunet-setup.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c index 92f72589..120949d9 100644 --- a/src/setup/gnunet-setup.c +++ b/src/setup/gnunet-setup.c | |||
@@ -38,12 +38,7 @@ static struct GNUNET_GTK_MainLoop *ml; | |||
38 | /** | 38 | /** |
39 | * Name of the configuration file. | 39 | * Name of the configuration file. |
40 | */ | 40 | */ |
41 | static char *cfgName; | 41 | static const char *cfgName; |
42 | |||
43 | /** | ||
44 | * Our log level (FIXME: needed!?) | ||
45 | */ | ||
46 | static char *loglev; | ||
47 | 42 | ||
48 | /** | 43 | /** |
49 | * Our configuration. | 44 | * Our configuration. |
@@ -319,6 +314,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
319 | GtkWidget *main_window; | 314 | GtkWidget *main_window; |
320 | 315 | ||
321 | ml = cls; | 316 | ml = cls; |
317 | cfgName = GNUNET_GTK_main_loop_get_configuration_file (ml); | ||
322 | cfg = GNUNET_CONFIGURATION_create (); | 318 | cfg = GNUNET_CONFIGURATION_create (); |
323 | (void) GNUNET_CONFIGURATION_load (cfg, cfgName); | 319 | (void) GNUNET_CONFIGURATION_load (cfg, cfgName); |
324 | main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); | 320 | main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); |
@@ -342,26 +338,17 @@ int | |||
342 | main (int argc, char *const *argv) | 338 | main (int argc, char *const *argv) |
343 | { | 339 | { |
344 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 340 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
345 | GNUNET_GETOPT_OPTION_CFG_FILE (&cfgName), | ||
346 | GNUNET_GETOPT_OPTION_HELP (gettext_noop ("Setup tool for GNUnet")), | ||
347 | GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), | ||
348 | GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION), | ||
349 | GNUNET_GETOPT_OPTION_END | 341 | GNUNET_GETOPT_OPTION_END |
350 | }; | 342 | }; |
351 | int ret; | 343 | int ret; |
352 | 344 | ||
353 | cfgName = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE); | ||
354 | loglev = GNUNET_strdup ("WARNING"); | ||
355 | |||
356 | if (GNUNET_OK == | 345 | if (GNUNET_OK == |
357 | GNUNET_GTK_main_loop_start ("gnunet-setup", "guunet-setup", argc, argv, | 346 | GNUNET_GTK_main_loop_start ("gnunet-setup", "gnunet-setup", argc, argv, |
358 | options, "gnunet_setup_gtk_main_window.glade", | 347 | options, "gnunet_setup_gtk_main_window.glade", |
359 | &run)) | 348 | &run)) |
360 | ret = gret; | 349 | ret = gret; |
361 | else | 350 | else |
362 | ret = 1; | 351 | ret = 1; |
363 | GNUNET_free (cfgName); | ||
364 | GNUNET_free (loglev); | ||
365 | return ret; | 352 | return ret; |
366 | } | 353 | } |
367 | 354 | ||