Ticket #375 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Make dumpnet & dumpnodes use C glib rather than Glibmm

Reported by: mekstran Assigned to: bshearer
Priority: critical Milestone:
Component: Goanna Version:
Keywords: Cc:
Blocking:

Description (Last modified by mekstran)

Dumpnet and Dumpnodes (in the src/ directory) need to be modified to use straight C glib rather than glibmm (the C++ wrappers).

Known things that need to be done

  • Glib::set_application_name becomes g_set_application_name
  • Each program needs to include glib.h.
  • Nothing should include anything in glibmm.
  • Glib::locale_to_utf8(foo) becomes GTKWrap::unicode::from_locale(foo).
  • The command-line handling (parse-args() in common.h needs to be modified to use C stuff rather than C++. Basically, Gtk::Option* becomes GtkOption*, and the appropriate C calls used instead of C++. Look at src/goanna/App.cpp for usage of the C API's. The basic set of things the new code needs to do:
    • Have a static global array of GOptionEntry structures, like the one in App.cpp, declaring the options instead of the various Glib::OptionEntry setup things in parse_args
    • Create a GOptionContext
    • Add the array of parameters to the GOptionContext with g_option_context_add_main_entries.
    • Parse with g_option_context_parse
    • We won't need to try/catch for Glib::OptionError; rather, check to see if the parse call returns true and use its err output variable for error message

Notes

This ticket blocks #371.

Change History

12/18/06 21:42:08 changed by mekstran

  • description changed.

Fixed minor formatting error.

12/19/06 16:52:51 changed by mekstran

  • description changed.

Fixed wiki link

12/19/06 16:55:52 changed by mekstran

12/19/06 23:07:24 changed by bshearer

  • status changed from new to closed.
  • resolution set to fixed.

(In [1458]) Closes #375. Ported from glibmm to glib.