[gnome-commander] Replaced deprecated popt with GOption for command-line option parsing



commit b2de5324df7090107226af1a5b05ca2294f7d786
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Dec 20 23:58:07 2010 +0100

    Replaced deprecated popt with GOption for command-line option parsing

 src/main.cc |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 1425061..a5b1fbe 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -62,15 +62,6 @@ extern int created_dirs_cnt;
 extern int deleted_dirs_cnt;
 
 
-struct poptOption popt_options[] = {
-    {"debug", 'd', POPT_ARG_STRING, &debug_flags, 0, N_("Specify debug flags to use"), NULL},
-    {"start-left-dir", 'l', POPT_ARG_STRING, &start_dir_left, 0, N_("Specify the start directory for the left pane"), NULL},
-    {"start-right-dir", 'r', POPT_ARG_STRING, &start_dir_right, 0, N_("Specify the start directory for the right pane"), NULL},
-    {"config-dir", 0, POPT_ARG_STRING, &config_dir, 0, N_("Specify the directory for configuration files"), NULL},
-    {NULL, 0, 0, NULL, 0, NULL, NULL}
-};
-
-
 static const GOptionEntry options [] =
 {
     {"debug", 'd', 0, G_OPTION_ARG_STRING, &debug_flags, N_("Specify debug flags to use"), NULL},
@@ -130,8 +121,7 @@ int main (int argc, char *argv[])
     g_option_context_add_main_entries (option_context, options, NULL);
     program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
                                   argc, argv,
-                                  // GNOME_PARAM_GOPTION_CONTEXT, option_context,
-                                  GNOME_PARAM_POPT_TABLE, popt_options,
+                                  GNOME_PARAM_GOPTION_CONTEXT, option_context,
                                   GNOME_PARAM_HUMAN_READABLE_NAME, _("File Manager"),
                                   GNOME_PARAM_APP_DATADIR, DATADIR,
                                   GNOME_PARAM_NONE);
@@ -204,7 +194,6 @@ int main (int argc, char *argv[])
 
     gnome_vfs_shutdown ();
 
-    g_option_context_free (option_context);
     g_object_unref (app);
     g_object_unref (program);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]