After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336084 - Use GOption instead of popt
Use GOption instead of popt
Status: RESOLVED FIXED
Product: bug-buddy
Classification: Deprecated
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Bug-buddy Maintainers
Bug-buddy Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-26 14:19 UTC by Luca Cavalli
Modified: 2006-06-13 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bug-buddy-goption.patch (8.71 KB, patch)
2006-03-26 14:22 UTC, Luca Cavalli
none Details | Review
bug-buddy-goption-2.patch (8.67 KB, patch)
2006-03-28 15:41 UTC, Luca Cavalli
none Details | Review
bug-buddy-goption-3.patch (9.80 KB, patch)
2006-03-29 21:27 UTC, Luca Cavalli
none Details | Review

Description Luca Cavalli 2006-03-26 14:19:03 UTC
Port to GOption API for command line parsing. See also http://live.gnome.org/GnomeGoals/PoptGOption. I can't test my own patch since I'm still on 2.12 and my libgnome is too old, sorry.
Comment 1 Luca Cavalli 2006-03-26 14:22:02 UTC
Created attachment 62041 [details] [review]
bug-buddy-goption.patch
Comment 2 Luca Cavalli 2006-03-28 15:41:00 UTC
Created attachment 62210 [details] [review]
bug-buddy-goption-2.patch

Removed the unnecessary g_option_context_free().
Comment 3 Christian Persch 2006-03-29 13:57:17 UTC
I think these two lines

+	{ "appname",     '\0', 0, G_OPTION_ARG_STRING, &goption_data.app_file,     N_("File name of crashed program"),       N_("FILE") },
[...]
+	{ "core",        '\0', 0, G_OPTION_ARG_STRING, &goption_data.core_file,    N_("Core file from program"),             N_("FILE") },

should ideally use G_OPTION_ARG_FILENAME instead... however that'll require more code changes (use as-is, convert to UTF-8 for display), and the current popt code makes no distinction either, so I think that can be done in a follow-up bug.
Comment 4 Luca Cavalli 2006-03-29 14:16:51 UTC
Thanks Christian. If I will have time I will update the patch in the next few days, otherwise we can file another bug after (if) committing.
Comment 5 Luca Cavalli 2006-03-29 21:27:43 UTC
Created attachment 62333 [details] [review]
bug-buddy-goption-3.patch

I have upgraded the patch. Now 'appname', 'core' and 'include' options are of G_OPTION_ARG_FILENAME type. It was easier than I thought it was, since all strings are displayed from buddy_set_text_widget(), so I convert the string to utf-8 there.
Comment 6 Olav Vitters 2006-06-13 16:36:47 UTC
Fixed in 2.15.0 (although done by smitten.. because of a branch merge).