private function fix_legacy_props($props)
    {
        foreach ($this->legacy_props as $new => $old) {
            if (isset($props[$old])) {
                if (!isset($props[$new])) {
                    $props[$new] = $props[$old];
                }
                unset($props[$old]);
            }
        }

        // convert deprecated numeric timezone value
        if (isset($props['timezone']) && is_numeric($props['timezone'])) {
            if ($tz = self::timezone_name_from_abbr($props['timezone'])) {
                $props['timezone'] = $tz;
            }
            else {
                unset($props['timezone']);
            }
        }

        // translate old `preview_pane` settings to `layout`
        if (isset($props['preview_pane']) && !isset($props['layout'])) {
            $props['layout'] = $props['preview_pane'] ? 'desktop' : 'list';
            unset($props['preview_pane']);
        }

        return $props;
    }