GNOME Bugzilla – Bug 393994
use goption in font thumbnailer
Last modified: 2007-02-12 20:13:24 UTC
+++ This bug was initially created as a clone of Bug #333557 +++ The patch from bug 333557 added text string and font size support to the font thumbnailer. But the patch does the argument parsing ad-hoc, instead of using goption. I propose to use goption, and make the text and font-size regular options instead. Since the other patch was just committed, that shouldn't be a compatibility problem if this patch is applied before the next stable release.
Created attachment 79670 [details] [review] patch
Created attachment 79672 [details] [review] updated patch Need to call setlocale.
You're possibly leaking "arguments" in all error paths.
Yes, as well as thumbstr_utf8. I'm not sure how critical that is... the easiest way would be a "goto error" and clean up there, instead of sprinkling it everywhere; what do you think?
Go for it. We've had a policy discussion for goto, and it's cleared for simple cleaning-up routine.
Created attachment 82283 [details] [review] cleanup on error
Still leaking uri = gnome_vfs_make_uri_from_shell_arg (arguments[0]); in the error case. And I'd prefer a more factual goto label...
Created attachment 82416 [details] [review] don't leak uri, and change goto label to "out"
* vfs-methods/fontilus/thumbnailer.c: (main): Use GOption argument parsing here, and fix some leaks in the error paths. Bug #393994.