Package Gnumed :: Package timelinelib :: Package config :: Module dotfile |
[frames] | no frames]

# Module dotfile

source code

Handle application configuration.

This module is global and can be used by all modules. Before accessing configurations, the read function should be called. To save the current configuration back to file, call the write method.

Classes
| Config Provide read and write access to application configuration settings.

Functions
read_config(path) | source code
setatt(name) | source code

Variables
| SELECTED_EVENT_BOX_DRAWER = `"selected_event_box_drawer"`
| WINDOW_WIDTH = `"window_width"`
| WINDOW_HEIGHT = `"window_height"`
| WINDOW_XPOS = `"window xpos"`
| WINDOW_YPOS = `"window ypos"`
| RECENT_FILES = `"recent_files"`
| WEEK_START = `"week_start"`
| DATE_FORMAT = `"date_format"`
| DEFAULTS = `{SELECTED_EVENT_BOX_DRAWER: "Default Event box draw`...``
| MAX_NBR_OF_RECENT_FILES_SAVED = `5`
| ENCODING = `"utf-8"`
| BOOLEAN_CONFIGS = `{'name': 'show_toolbar', 'default': 'True'},`...``
| INT_CONFIGS = `{'name': 'sidebar_width', 'default': '200'}, {'n`...``
| STR_CONFIGS = `{'name': 'experimental_features', 'default': ''}`...``
| COLOUR_CONFIGS = `{'name': 'now_line_colour', 'default': '(200,`...``
| FONT_CONFIGS = `{'name': 'minor_strip_font', 'default': '10:74:`...``
| BOOLEANS = `[d ['name'] for d in BOOLEAN_CONFIGS]`
| INTS = `[d ['name'] for d in INT_CONFIGS]`
| COLOURS = `[d ['name'] for d in COLOUR_CONFIGS]`
| FONTS = `[d ['name'] for d in FONT_CONFIGS]`

Imports: ConfigParser, DEFAULTSECT, os, sys, wx, GregorianDateFormatter, DateFormatParser, Observable, Font, display_information_message

Variables Details

  ### DEFAULTS Value:
      {SELECTED_EVENT_BOX_DRAWER: "Default Event box drawer", WINDOW_WIDTH:
      "900", WINDOW_HEIGHT: "500", WINDOW_XPOS: "-1", WINDOW_YPOS: "-1", REC
      ENT_FILES: "", WEEK_START: "monday", DATE_FORMAT: "yyyy-mm-dd",}

  ### BOOLEAN_CONFIGS Value:
      {'name': 'show_toolbar', 'default': 'True'}, {'name': 'show_sidebar',
      'default': 'True'}, {'name': 'show_legend', 'default': 'True'}, {'name
      ': 'window_maximized', 'default': 'False'}, {'name': 'open_recent_at_s
      tartup', 'default': 'True'}, {'name': 'balloon_on_hover', 'default': '
      True'}, {'name': 'use_inertial_scrolling', 'default': 'False'}, {'name
      ': 'never_show_period_events_as_point_events', 'default': 'False'}, {'
      name': 'draw_point_events_to_right', 'default': 'False'}, {'name': 'ev
      ent_editor_show_period', 'default': 'False'}, {'name': 'event_editor_s
      ...

  ### INT_CONFIGS Value:
      {'name': 'sidebar_width', 'default': '200'}, {'name': 'divider_line_sl
      ider_pos', 'default': '50'}, {'name': 'vertical_space_between_events',
       'default': '5'}, {'name': 'legend_pos', 'default': '0'},

  ### STR_CONFIGS Value:
      {'name': 'experimental_features', 'default': ''}, {'name': 'event_edit
      or_tab_order', 'default': '01234:'}, {'name': 'fuzzy_icon', 'default':
       'fuzzy.png'}, {'name': 'locked_icon', 'default': 'locked.png'}, {'nam
      e': 'hyperlink_icon', 'default': 'hyperlink.png'},

  ### COLOUR_CONFIGS Value:
      {'name': 'now_line_colour', 'default': '(200, 0, 0)'}, {'name': 'weeke
      nd_colour', 'default': '(255, 255, 255)'}, {'name': 'bg_colour', 'defa
      ult': '(255, 255, 255)'}, {'name': 'minor_strip_divider_line_colour',
      'default': '(200, 200, 200)'}, {'name': 'major_strip_divider_line_colo
      ur', 'default': '(200, 200, 200)'},

  ### FONT_CONFIGS Value:
      {'name': 'minor_strip_font', 'default': '10:74:90:90:False:Tahoma:33:(
      0, 0, 0, 255)'}, {'name': 'major_strip_font', 'default': '10:74:90:90:
      False:Tahoma:33:(0, 0, 0, 255)'}, {'name': 'legend_font', 'default': '
      10:74:90:90:False:Tahoma:33:(0, 0, 0, 255)'}, {'name': 'balloon_font',
       'default': '10:74:90:90:False:Tahoma:33:(0, 0, 0, 255)'},