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

MenuStyle: Remove Depreciated options and non colorset #757

Merged
merged 5 commits into from
Nov 10, 2022

Conversation

somiaj
Copy link
Collaborator

@somiaj somiaj commented Nov 10, 2022

MenuStyle updates. Remove the old parser, it has been depreciated long enough. Same for the old 'FooOff' options.

Remove the ability to configure the menu using the old Foreground, Background, Greyed, and MenuFace options. This is all done via Colorsets now. This address #753

This just removes the ability to configure or set MenuStyle via those old methods, there is still a lot of cleanup left in the code. There are multiple macros like ST_MENU_COLORS that no longer need to be used, in addition lots of conditional statements around them that can be removed, as it can now be assumed there will always be a colorset configured.

This is just a draft to start.

  The old parser has been depreciated for a long time now,
  removing legacy compatibility.
@somiaj somiaj added the type:breaking Issue is not backwards-compatible and will break configs/build label Nov 10, 2022
@somiaj somiaj requested a review from ThomasAdam November 10, 2022 08:04
@somiaj somiaj force-pushed the js/menustyle-remove-old-methods branch from 75cef73 to b5add14 Compare November 10, 2022 08:06
@ThomasAdam
Copy link
Member

Hey @somiaj

Wow. Thanks for this -- I had already started to look at this, but you've beaten me to it and done a better job of it anyway. 😀

I think this all looks good. One thing I was wondering though is when we're removing the commands -- can we replace those strings with the empty string? That would mean we wouldn't need to change all of the 'case' statements just because the ordering is different.

This would depend though on whether the parser is happy with the empty string or not.

@somiaj
Copy link
Collaborator Author

somiaj commented Nov 10, 2022

Didn't think about using the empty string, though at this point it is done, no need to test out if the parser is okay with the empty string (found out you can do math with vim find/replace so it wasn't to bad to update all the numbers once I figured out the syntax).

@somiaj
Copy link
Collaborator Author

somiaj commented Nov 10, 2022

@ThomasAdam well I took the butcher knife to the old code, everything is working here on my tests with the default-config and no-config. Though I suspect this will need a good amount of testing, by users who do more advance things with menu appearances.

@somiaj somiaj marked this pull request as ready for review November 10, 2022 18:02
@somiaj
Copy link
Collaborator Author

somiaj commented Nov 10, 2022

Provided you don't find anything glaring wrong that needs fixed with this, I don't have any more thoughts on it, so you can push it to users and let the shake out the bugs.

  Remove MenuStyle Foreground, Background, Greyed, and MenuFace options
  and force the use of colorsets. Colorset 0 is now used as default,
  as colorsets are now core in fvwm, no need to support multiple
  ways to color the menus. This also removes the color option
  from HilightBack and ActiveFore, these MenuStyles are now only
  used to turn on/off hilighting the active menu item.
  Remove all the old macros, structures, and functions for MenuStyle
  non colorset options, including all of the MenuFace code. This
  is no longer being used with the removal of the old Foreground,
  Background, Greyed, and MenuFace options. Use colorsets instead.
  Use Colorset[0] for the default instead of the default color
  definitions (since it is now defined) in the few places remaining.
@somiaj somiaj force-pushed the js/menustyle-remove-old-methods branch from b1d4c94 to 6916a70 Compare November 10, 2022 22:40
@ThomasAdam ThomasAdam added this to the 1.0.6 milestone Nov 10, 2022
@ThomasAdam ThomasAdam merged commit 2095ed0 into master Nov 10, 2022
@ThomasAdam ThomasAdam deleted the js/menustyle-remove-old-methods branch November 10, 2022 23:46
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 15, 2023
# Changelog

## [1.0.6a](https://github.com/fvwmorg/fvwm3/tree/1.0.6a) (2023-01-16)

## What's Changed
### Other Changes
* dist: doc: include all doc sources by @ThomasAdam in fvwmorg/fvwm3#806


**Full Changelog**: fvwmorg/fvwm3@1.0.6...1.0.6a
## [1.0.6](https://github.com/fvwmorg/fvwm3/tree/1.0.6) (2023-01-14)

## What's Changed
### Breaking Changes
* remove fvwm-config by @ThomasAdam in fvwmorg/fvwm3#731
* ta/alloca by @ThomasAdam in fvwmorg/fvwm3#722
* deprecate color commands by @ThomasAdam in fvwmorg/fvwm3#738
* Ensure a default colorset is always configured. by @somiaj in fvwmorg/fvwm3#740
* commands: remove DefaultColors & DefaultColorset by @ThomasAdam in fvwmorg/fvwm3#749
* MenuStyle: Remove Depreciated options and non colorset  by @somiaj in fvwmorg/fvwm3#757
### Enhancements
* decor: allow window borders separate colours by @ThomasAdam in fvwmorg/fvwm3#730
* Update Move shuffle logic to jump to next monitor by @somiaj in fvwmorg/fvwm3#742
* conditional: screen: simplify logic by @ThomasAdam in fvwmorg/fvwm3#746
* Allow SidePic in default-config. by @somiaj in fvwmorg/fvwm3#762
* Move shuffle, ensure window inside working area. by @somiaj in fvwmorg/fvwm3#767
* Translucent Menus by @somiaj in fvwmorg/fvwm3#760
* Updates to FvwmPager scaling math to improve visual aspects due to rounding errors. by @somiaj in fvwmorg/fvwm3#790
### Other Changes
* doc: don't install fvwm3_manpage_source by @ThomasAdam in fvwmorg/fvwm3#712
* Rename .stalonetrayrc to stalonetrayrc by @wfp5p in fvwmorg/fvwm3#713
* Fix background resetting in default-config by @somiaj in fvwmorg/fvwm3#714
* desk_add: fix window counting by @ThomasAdam in fvwmorg/fvwm3#716
* remove unused variable by @omar-polo in fvwmorg/fvwm3#718
* two clock_t and time_t casts for portability by @omar-polo in fvwmorg/fvwm3#719
* changing sprintf -> snprintf & co by @omar-polo in fvwmorg/fvwm3#720
* DesktopConfiguration: send status_send() by @ThomasAdam in fvwmorg/fvwm3#724
* FvwmScript.c: fix wrong size of TabCom array by @slazav in fvwmorg/fvwm3#725
* gotodesk: simplify logic for shared/global by @ThomasAdam in fvwmorg/fvwm3#727
* Add a multicolor border example to default-config by @somiaj in fvwmorg/fvwm3#732
* Some pedantic clean up of whitespace and add missing translation strings. by @somiaj in fvwmorg/fvwm3#733
* Tweak HilightBorderColorset by @lgsobalvarro in fvwmorg/fvwm3#737
* docs: remove obsolete GNOME references by @ThomasAdam in fvwmorg/fvwm3#739
* MWMBorder: fix calculation by @ThomasAdam in fvwmorg/fvwm3#743
* Don't set border colorsets by default. by @somiaj in fvwmorg/fvwm3#747
* style: silence warning for unconsumed string by @ThomasAdam in fvwmorg/fvwm3#745
* Add split manpages to default-config. by @somiaj in fvwmorg/fvwm3#750
* FvwnIconMan use font as fallback for tips font. by @somiaj in fvwmorg/fvwm3#751
* FvwmIconMan: Don't chop window display string by @somiaj in fvwmorg/fvwm3#752
* fvwm-config: remove .in file by @ThomasAdam in fvwmorg/fvwm3#758
* FvwmPager make mini windows always round down. by @somiaj in fvwmorg/fvwm3#756
* Clean up some build warnings by @somiaj in fvwmorg/fvwm3#759
* Move shuffle modifications. by @somiaj in fvwmorg/fvwm3#764
* borders: treat 0 pixels as 1 pixel border by @ThomasAdam in fvwmorg/fvwm3#765
* AddWindow: don't crash reparenting by @ThomasAdam in fvwmorg/fvwm3#786
* ModuleSynchronous: don't segfault on free() by @ThomasAdam in fvwmorg/fvwm3#787
* FvwmIconMan: fix segfault in initialisation by @ThomasAdam in fvwmorg/fvwm3#800
* randr: quit when no screens found & not active by @ThomasAdam in fvwmorg/fvwm3#801

## New Contributors
* @wfp5p made their first contribution in fvwmorg/fvwm3#713

**Full Changelog**: fvwmorg/fvwm3@1.0.5...1.0.6
## [1.0.5](https://github.com/fvwmorg/fvwm3/tree/1.0.5) (2022-09-28)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:breaking Issue is not backwards-compatible and will break configs/build
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants