On Sun, 27 Nov 2011 at 17:31:37 +0100, Dario Niedermann wrote:
> Selecting "Save Theme" from WMaker's root menu results in dialog box
> asking for theme name, but then nothing is saved.
> 
> This feature used to work in 0.92.0.

Thansk for the report. The faulty commit is

commit 6bf79945201265dccf62fd1e393f4e062912704c
Author: Tamas TEVESZ <[email protected]>
Date:   Wed Mar 31 04:24:17 2010 +0200

    Style stuff up

    - convert hand-rolled arg parsers to getopt_long
    - sort headers, get rid of some duplicates in the process
    - in fontconv, replace magic numbers with constants (there's
      little practical value to this here, but it's much nicer)
    - slightly redo fontconv.c:strToInt()
    
and 'getstyle' stops working afterwards.

I don't have much time now, but looking at the diff I noticed a problem
when style_file is NULL (but that's unrelated to the problem that makes
getstyle not work here).

Part of the problem seems to go away if with the patch below. After it,
'getstyle -p Theme' saves the theme on your ~/GNUstep (it should be
inside Library/WindowMaker/Themes, but Tamas changed that for some
reason), and 'getstyle' alone no longer segfaults and outputs to
the STDOUT correctly.

But 'getstyle -t some_path' still does not work, and I can't debug
further now.

diff --git a/util/getstyle.c b/util/getstyle.c
index ab3a1be..0a58c2c 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -386,12 +386,14 @@ int main(int argc, char **argv)
        argc -= optind;
        argv += optind;
 
-       if (argc != 1)
+       if (argc != 0)
                print_help(0, 1);
 
        style_file = argv[0];
+       if (style_file) {
        while ((p = strchr(style_file, '/')) != NULL)
                *p = '_';
+       }
 
        if (style_file && !make_pack)   /* what's this? */
                print_help(0, 1);


-- 
To unsubscribe, send mail to [email protected].

Reply via email to