Add routine to initialize the history dialog structure.

Need to implement the paste parts filter.
Minor style fixes.
When pasting parts of history pre-select copied ones.
Merge branch 'paste-parts-filter'

* paste-parts-filter:
  When pasting parts of history pre-select copied ones.
  Add routine to initialize the history dialog structure.