Fossil Forum

About the "mainmenu" setting
Login

About the "mainmenu" setting

About the "mainmenu" setting

(1) By Marcelo Huerta (richieadler) on 2021-01-30 00:28:39 [source]

  1. There is a typo in item four of the explanation "fouth" instead of "fourth": https://fossil-scm.org/home/file?udc=1&ln=1035&ci=trunk&name=src%2Fsetup.c
  2. Is there a way to restore it to the default value if you've changed it and want to revert the changes?

(2) By Stephan Beal (stephan) on 2021-01-30 01:41:09 in reply to 1 [link] [source]

There is a typo

Fixed.

Is there a way to restore it to the default value if you've changed it and want to revert the changes?

Setting it to empty "should" work but i haven't yet tested that. Other than that, there is no history tracking for that setting, so any older values are lost.

While experimenting/testing, you can also override it directly in the skin's header.txt:

set mainmenu {
 ...
}

(3) By Marcelo Huerta (richieadler) on 2021-01-30 02:07:40 in reply to 2 [link] [source]

Setting it to empty "should" work but i haven't yet tested that.

I have, and it doesn't; it gets an empty menu (useful for cases where you don't want a menu, for instance in the list of repositories, as I mentioned in another post).

Other than that, there is no history tracking for that setting, so any older values are lost.

That's not a problem in my case.

While experimenting/testing, you can also override it directly in the skin's header.txt

Touching those files and recompiling feels weird, I'd rather not.

(4.1) By Stephan Beal (stephan) on 2021-01-30 10:05:12 edited from 4.0 in reply to 3 [link] [source]

Touching those files and recompiling feels weird, I'd rather not.

Recompiling isn't necessary:

fossil ui --skin /path/to/skin/dir

where dir holds the various skin files. Edit the files, then tap reload in your browser.

In a CGI wrapper script it looks like:

$ cat ~/www/wh/cgi-bin/fossil
#!/home/stephan/bin/fossil
repository: /home/stephan/fossil/fossil.fsl
skin:  /home/stephan/fossil/skins/skins/bruised-2020
#skin:  /home/stephan/fossil/fossil/skins/ardoise
#skin:  /home/stephan/fossil/fossil/skins/black_and_white
#skin:  /home/stephan/fossil/fossil/skins/blitz
#skin:  /home/stephan/fossil/fossil/skins/blitz_no_logo
#skin:  /home/stephan/fossil/fossil/skins/bootstrap
#skin:  /home/stephan/fossil/fossil/skins/default
#skin:  /home/stephan/fossil/fossil/skins/eagle
#skin:  /home/stephan/fossil/fossil/skins/enhanced1
#skin:  /home/stephan/fossil/fossil/skins/khaki
#skin:  /home/stephan/fossil/fossil/skins/original
#skin:  /home/stephan/fossil/fossil/skins/plain_gray
#skin:  /home/stephan/fossil/fossil/skins/rounded1
#skin:  /home/stephan/fossil/fossil/skins/xekri
jsmode: separate
#jsmode: inline
#jsmode: bundled

(5) By Stephan Beal (stephan) on 2021-01-30 03:39:02 in reply to 3 [link] [source]

I have, and it doesn't;

PS: i'll look at adding a reset button to the menu editor form this weekend.

(6) By Stephan Beal (stephan) on 2021-01-30 04:03:20 in reply to 1 [link] [source]

Is there a way to restore it to the default value if you've changed it and want to revert the changes?

It only now occurred to me that that could be done with SQL:

echo "delete from config where name='mainmenu'" | fossil sql

But by that point we already had a checkbox to do so in the setup page:

https://fossil-scm.org/fossil/info/8af3d425d2862b72

(7) By Warren Young (wyoung) on 2021-01-30 09:58:33 in reply to 6 [link] [source]

You don’t need the pipe. fossil sql accepts a SQL string arg.

(8) By Andy Bradford (andybradford) on 2021-01-30 15:35:20 in reply to 7 [link] [source]

> You don’t need the pipe.

In his defense, old Unix habits die hard. :-)

People keep telling me that:

filter1 < input.txt | filter2

Is preferable to:

cat input.txt | filter1 | filter2

But I still prefer the latter.

Andy