This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  6bf5f947a9c30e7f67ba761404e040de582ea8d1 (commit)
       via  ac8a493ed99411e0a6c2860e122e6fc44ab9dd94 (commit)
       via  5ef03b2a3a43b69a3652e2066d05f5e62e0f3f72 (commit)
      from  385dbdb3d61d55bf4cbdf1e2926456da9e7b6e7f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/6bf5f947a9c30e7f67ba761404e040de582ea8d1

commit 6bf5f947a9c30e7f67ba761404e040de582ea8d1
Author: Carlos R. Mafra <[email protected]>
Date:   Sun Jan 15 02:47:20 2012 +0000

    wmgenmenu: Fix "Save Theme"
    
    Dario Niedermann reported on 27.11.2011:
    
           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.
    
    and the reason for it (if he uses a WMRootMenu generated by wmgenmenu) is
    the incorrect use of the option "-t" instead of "-p" to getstyle.
    
    Furthermore, let the invocation of getstyle reflect the new default location
    for the themes.

diff --git a/util/wmgenmenu.c b/util/wmgenmenu.c
index f934b38..002e025 100644
--- a/util/wmgenmenu.c
+++ b/util/wmgenmenu.c
@@ -243,8 +243,7 @@ int main(int argc, char *argv[])
        L2Menu = WMCreatePLArray(
                WMCreatePLString(_("Save Theme")),
                WMCreatePLString("SHEXEC"),
-               WMCreatePLString("getstyle -t 
$HOME/GNUstep/Library/WindowMaker/Themes/"
-                       ""%a(Theme name, Name to save theme as)""),
+               WMCreatePLString("getstyle -p "%a(Theme name, Name to save 
theme as)""),
                NULL
        );
        WMAddToPLArray(L1Menu, L2Menu);

http://repo.or.cz/w/wmaker-crm.git/commit/ac8a493ed99411e0a6c2860e122e6fc44ab9dd94

commit ac8a493ed99411e0a6c2860e122e6fc44ab9dd94
Author: Carlos R. Mafra <[email protected]>
Date:   Sun Jan 15 02:38:57 2012 +0000

    getstyle: Save theme pack in Themes dir
    
    When invoked as
    
    getstyle -p NewTheme
    
    Instead of saving the theme inside the topdir ~/GNUstep let's save it
    insinde their proper directory ~/GNUstep/Library/WindowMaker/Themes.

diff --git a/util/getstyle.c b/util/getstyle.c
index 6fd4502..624c0e6 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -138,7 +138,7 @@ void print_help(int print_usage, int exitval)
 {
        printf("Usage: %s [-t] [-p] [-h] [-v] [file]n", __progname);
        if (print_usage) {
-               puts("Retrieves style/theme configuration and output to FILE or 
to stdout");
+               puts("Retrieves style/theme configuration and outputs to 
~/GNUstep/Library/WindowMaker/Themes/file.themed/style or to stdout");
                puts("");
                puts("  -h, --help           display this help and exit");
                puts("  -v, --version        output version information and 
exit");
@@ -263,12 +263,15 @@ void makeThemePack(WMPropList * style, char *themeName)
 
        if ((t = wusergnusteppath()) == NULL)
                return;
-       themeNameLen = strlen(t) + 1 /* / */ + strlen(themeName) + 8 /* 
".themed/" */ + 1 /* '0' */;
+       themeNameLen = strlen(t) + strlen(themeName) + 50;
        themeDir = wmalloc(themeNameLen);
-       snprintf(themeDir, themeNameLen, "%s/%s.themed/", t, themeName);
+       snprintf(themeDir, themeNameLen, 
"%s/Library/WindowMaker/Themes/%s.themed/", t, themeName);
        ThemePath = themeDir;
-       if (!wmkdirhier(themeDir))
+
+       if (!wmkdirhier(themeDir)) {
+               wwarning("Could not make theme dir %sn", themeDir);
                return;
+       }
 
        keys = WMGetPLDictionaryKeys(style);
 

http://repo.or.cz/w/wmaker-crm.git/commit/5ef03b2a3a43b69a3652e2066d05f5e62e0f3f72

commit 5ef03b2a3a43b69a3652e2066d05f5e62e0f3f72
Author: Carlos R. Mafra <[email protected]>
Date:   Sun Jan 15 01:20:19 2012 +0000

    getstyle: Fix output to stdout
    
    There is a problem with getstyle invoked with no arguments:
    
    [mafra@Pilar:util]$ ./getstyle
    Usage: getstyle [-t] [-p] [-h] [-v] [file]
    
    or with -t:
    
    [mafra@Pilar:util]$ ./getstyle -t
    Usage: getstyle [-t] [-p] [-h] [-v] [file]
    
    In both cases it is supposed to write to the standard output:
    
    [mafra@Pilar:wmaker.git]$ getstyle -h
    Usage: getstyle [-t] [-p] [-h] [-v] [file]
    Retrieves style/theme configuration and output to FILE or to stdout
    
    This regression was caused by commit 6bf79945201265dccf62 ("style Stuff 
up").
    When that commit did
    
           argc -= optind;
    
           if (argc != 1)
                   print_help(0,1);
    
    it excluded the output to stdout as valid, because in this case
    argc - optind is zero (see the manpage of getopt(3)).
    
    The correct handling is to set the style_file only when there is
    one non-option ARGV-element (argc - optind == 1) and print the
    help message when there are more than one non-option element.

diff --git a/util/getstyle.c b/util/getstyle.c
index 1a9ac31..6fd4502 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -385,17 +385,18 @@ int main(int argc, char **argv)
                                /* NOTREACHED */
                }
 
-       argc -= optind;
-       argv += optind;
-
-       if (argc != 1)
+       /* At most one non-option ARGV-element is accepted (the theme name) */
+       if (argc - optind > 1)
                print_help(0, 1);
 
-       style_file = argv[0];
-       while ((p = strchr(style_file, '/')) != NULL)
-               *p = '_';
+       if (argc - optind == 1) {
+               style_file = argv[argc - 1];
+               while ((p = strchr(style_file, '/')) != NULL)
+                       *p = '_';
+       }
 
-       if (style_file && !make_pack)   /* what's this? */
+       /* A theme name was given but the option to create it (-p) was not */
+       if (style_file && !make_pack)
                print_help(0, 1);
 
        if (make_pack && !style_file) {

-----------------------------------------------------------------------

Summary of changes:
 util/getstyle.c  |   28 ++++++++++++++++------------
 util/wmgenmenu.c |    3 +--
 2 files changed, 17 insertions(+), 14 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("Fork from the last available CVS version of Window Maker")


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

Reply via email to