wiki:Features/PreferenceSystem

Version 2 (modified by szabgab, 3 years ago) (diff)

copy content from Padre.pm

Preference System

There are several types of preferences we can think of. There are the current view printed preferences such as B<Show newlines> or Show Line numbers and there are the project and file oriented preferences such as the use of tabulators or white space for indentation.

Currently some of the preferences are accessible via the Edit => Preferences menu options, others via the View menu option.

We have to make sure that when changing the preferences via the GUI it change for the correct things.

E.g. when changing the Use Tabulators preference it currently applies to all the files open currently or in the future. It should probably apply to the current file and/or the current project. Such options - when changing them - might even be applied retroactively. That is when I change the tabulator/space mode of a file or a project it should ask if I want to reflow the file with the new method of indentation?

On the other hand the Tabulator display size is purely a local, editor oriented preference. It should probably apply to all files currently open.

There are other aspects of preferences as well that might not exactly overlap with the above set:

The developer might work on the same project on different machines. In such case some of the personal preferences should apply only only on one computer while others apply in both places.

In particular if Padre is installed in a Portable Perl it might run on machines with different parameters. Screen size and resolution might be different along other parameters. We would like to make sure the relevant preferences are separated from those that are constant even when moving between computers.

Editor or view oriented preferences

  • Size and location of windows
  • Files recently opened
  • Files that were open last time, cursor location
  • Highlight indentation guide (TO DO)

This should be a separate option available only if the Show indentation guide and brace matching is on.

If SetHighlightGuide? is set to 8 then when the user reaches one side of a pair of braces the indentation guide - if there is one on column 8 - will be highlighted. (in green).

As I understand Padre should constantly adjust the SetHighlightGuide? so that in every block the "correct" indentation guide is highlighted.

  • Tabulator display size
  • Allow experimental features

In order to allow the experimental features one needs to manually turn on the experimental flag to 1 in config.yml. As Padre keeps overwriting this file you'll have to make this change with another editor and while Padre is B<not> open.

The config.yml file is in ~/.padre/ on Linux/Unix? and in general in your home directory on Windows. In any case the Help/About? box will show you the path of the .padre directory of Padre.

Once you set the experimental flag when you start Padre you will see a new menu on the right side of the menu bar called Experimental.

  • Open file policy

What files to open when launching Padre? nothing, new, those that were open last time?

  • Max/Min? number of modules to display in POD viewer

File and Project oriented preferences

  • Indentation should be by tabulators or spaces
  • In case of using spaces for indentation, the width of every indentation level

Tickets

Ticket Resolution Summary Owner Reporter
#1502 Padre release 0.98 and svn rev 19736 crash when setting default_project_directory to anything other than /home/user?/projects myra
#1479 Preferences shortcut peco
#1460 fixed File menu bar disappeared on Preferences Saved adamk, alias, bowtie bowtie
#1455 Wide characters removed from config values when running with LC_ALL=C mikhirev
#1454 Crash when default_projects_directory contains wide characters mikhirev
#1423 Padre crashes on keybind / Padre закрывается при попытке задать гарячие клавиши Negor Negor
#1382 fixed Preferences dialog: empty pull-down menu alias, adamk zenogantner
#1381 Preferences dialog: "Indentation" is confusing alias, adamk zenogantner
#1378 Creating an editor theme file while Padre is running, and then selecting the last Editor Theme in the drop-down box, causes Padre to crash run4flat
#1339 preferences: theme preview ignores bold elements zenogantner
#1337 fixed Tools -> Preferences kills Padre Alias azawawi bowtie
#1307 not relevant Preferences->External tools diff tool dialog has a *.* filter that doesn't work on linux colin
#1298 fixed Changing font in preferences is not applied to existing editors dolmen
#1294 fixed Space in text field for pref "editor_right_margin_colum" stops Padre dolmen
#1290 Cooking up your own colours for controls and backgrounds is Rude! submersible_toaster
#1289 Default Project Folder option non-operational on Windows 7 szabgab ravenhall
#1241 fixed Right margin setting is not respected claudio
#1240 fixed Changed preferences are lost when advanced is clicked claudio claudio
#1198 fixed Preferences 2.0 Default/Reset button azornik
#1197 fixed highlighting and file type bug, at Preferences 2.0 azornik
#1176 fixed Preferences 2.0. Screen is to big Alias bowtie
#1165 not relevant Preferences - Files and Colors - Description and Content-Type show as ARRAY bvierra
#1162 not relevant Moving View/Language to Preferences szabgab
#1154 fixed Warnings from the Advanced Preference Editor szabgab
#1033 fixed preferences dialog: setting description makes no sense zenogantner
#1004 Preferences dialog: Tab navigation hangs at "Default project directory" zenogantner
#999 fixed clean up and extend preferences dialog zenogantner
#877 fixed Clicking "Advanced" button in Tools > Preferences causes current changes to be lost patspam
#834 fixed Preferences dialog should NOT explicit'ify defaults adamk
#706 Remember settings kaare
#668 Configuration: Review this assumption Sewi