Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1040: tags broken #166

Closed
bkauler opened this issue Mar 26, 2015 · 9 comments
Closed

1040: tags broken #166

bkauler opened this issue Mar 26, 2015 · 9 comments

Comments

@bkauler
Copy link

bkauler commented Mar 26, 2015

I have just upgraded jwm from 976 (which works great) to 1040.

Unfortunately, our jwm themes are broken. Here is error log:

/usr/bin/jwm
JWM: warning: /root/.jwmrc-tray[2]: invalid autohide setting: "false"
JWM: warning: /root/.jwmrc[324]: invalid tag in Active: Text
JWM: warning: /root/.jwmrc[325]: invalid tag in Active: Title
JWM: warning: /root/.jwmrc[329]: invalid tag in WindowStyle: Inactive
JWM: warning: /root/.jwmrc[342]: invalid tag in PagerStyle: ActiveForeground
JWM: warning: /root/.jwmrc[343]: invalid tag in PagerStyle: ActiveBackground
JWM: warning: /root/.jwmrc[350]: invalid tag in MenuStyle: ActiveForeground
JWM: warning: /root/.jwmrc[351]: invalid tag in MenuStyle: ActiveBackground
JWM: warning: /root/.jwm/jwmrc-theme[8]: invalid tag in Active: Text
JWM: warning: /root/.jwm/jwmrc-theme[9]: invalid tag in Active: Title
JWM: warning: /root/.jwm/jwmrc-theme[13]: invalid tag in WindowStyle: Inactive
JWM: warning: /root/.jwm/jwmrc-theme[23]: invalid tag in TaskListStyle: ActiveForeground
JWM: warning: /root/.jwm/jwmrc-theme[24]: invalid tag in TaskListStyle: ActiveBackground
JWM: warning: /root/.jwm/jwmrc-theme[43]: invalid tag in PagerStyle: ActiveForeground
JWM: warning: /root/.jwm/jwmrc-theme[44]: invalid tag in PagerStyle: ActiveBackground
JWM: warning: /root/.jwm/jwmrc-theme[58]: invalid tag in MenuStyle: ActiveForeground
JWM: warning: /root/.jwm/jwmrc-theme[59]: invalid tag in MenuStyle: ActiveBackground

I searched the changelog, there is nothing there about these tags being removed.

Regards,
Barry

@ghost
Copy link

ghost commented Mar 26, 2015

Hi Barry,
Those things did change quite a bit, unfortunately
Here is the link:
http://joewing.net/projects/jwm/release-2.3.shtml

Here is the gist of it:
The ActiveBackground and ActiveForeground tags have been replaced by Background and Foreground under the Active tag. This applies to TrayStyle, TaskListStyle, TrayButtonStyle, PagerStyle, and MenuStyle.

The Inactive tag under WindowStyle has been removed. The tags that used to go within this tag now go directly under the WindowStyle tag.

The autohide attribute in Tray now determines where the tray should be hidden (left, right, top, bottom, or off) instead of true or false.

Oh, also 'Text' became Foreground and 'Title" became Background

@bkauler
Copy link
Author

bkauler commented Mar 26, 2015

OK, thanks. I will close this issue.

I will revert to 976 for now, until we can convert our themes.

Regards,
Barry

@bkauler bkauler closed this as completed Mar 26, 2015
@technosaurus
Copy link
Contributor

I never liked unnecessarily breaking backwards compatibility. At least "false", should be aliased as "off", but marked as deprecated (possibly with a warning message on startup). For the amount of code it takes to implement "true", it would be nice to at least temporarily return but deprecate it (along with "auto" as an alias) ... I have similar feelings about the other changes like background that could easily be aliased with a warning.

On a related note parse.c could benefit with better readability and easier aliases by adding a sorted array of string-value pairs so that a single binary search could return the token for use in a single switch-case statement instead of all of the strcmp if-else trees. I have a similar example at https://github.com/technosaurus/MIMEtype/

@ghost
Copy link

ghost commented Mar 27, 2015

I agree this has made fixing my settings program to work with both old and new themes a bit harder.
And there is no readily available tool to convert old themes into new ones. It would be nice to have a script released to simply run to convert the old to new.

@ml-
Copy link
Contributor

ml- commented Mar 27, 2015

@Israel- Before you start fixing applications, you should wait until Joe creates a new version-tag (v2.3.0).
Adjusting your tools for many/every snapshot will just cause trouble.

Another option would be to have the tool to covert settings between versions v2.2.0 -> v2.2.1 -> v2.2.2 and the conversion from the last official version v2.2.2 to HEAD.

@ghost
Copy link

ghost commented Mar 27, 2015

I am using that snapshot, as it fixes the background scaling issue.
So I need my tool to work with it. 2.2.2 does not scale backgrounds properly, otherwise I would simply use that one. I will continue to adjust if he decides to change compatibility more. I want to be ready for 2.3.0 which I do hope happens soon :)

@joewing
Copy link
Owner

joewing commented Apr 2, 2015

I agree that breaking backward compatibility is annoying, but I also don’t like to have extra cruft to deal with even if it isn’t much. As far as updating is concerned, since the configuration is XML, it might be possible to have an XSLT describe configuration changes between versions, which would make a tool for upgrading pretty easy. I opened issue #168 for this.

In response to @technosaurus’s suggestion, I’ve updated parts of parse.c and lex.c to use sorted arrays with binary search instead of trees of strcmps or using strcmps on an unsorted array. If nothing else, it should make parsing the configuration faster.

@ghost
Copy link

ghost commented Apr 2, 2015

Joe you are amazing! Thanks for all you do!

@ghost
Copy link

ghost commented Apr 22, 2015

@bkauler This new update (s1092) also breaks compatibility.
The main issue will be your clock.
The clock supports menus and executables (as well as different button masks for different actions
for example:

<Clock  format="%a, %e %b %l:%M %p">xclock</Clock>

will no longer work, you will need to add exec:

<Clock  format="%a, %e %b %l:%M %p">exec:xclock</Clock>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants