Increasing the Recent Documents width in Linux Mint 18.2 MATE

From Useful Data
Jump to navigation Jump to search

The Recent Documents list in the menu could not handle the length of file names that I submit to the Open University, as it was too narrow. But it is not just the width of the box that needed to change, but getting it to display longer names.

Changing the menu preferences does not do it. It allows you to add the 'Recent' plug-in which displays the names, but not change the appearance.

Installing dconf-editor seems promising, giving access to settings under com, linuxmint, mintmenu, plugins, recent. This allows you to change the width, which is good, because it allows you to create more space for longer file names. I have set it to 450. Also while in there, increase the value of num-recent-docs to allow more file names. I have gone for 27 for my particular size screen.

The setting you need to change is hidden within the Python code of the plugin itself. Edit it thus:

gksudo xed /usr/lib/linuxmint/mintMenu/plugins/recent.py

and look for def AddRecentBtn( . Within that, change the line

AButton.set_size_request( 200, -1 )

to something like:

AButton.set_size_request( 450, -1 )

where the value you choose is about 10 less than the width you entered in dconf-editor. This small difference prevents horizontal scroll bars.

You can then see much longer filenames.