home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / p2demo21.exe / PEL / CONFIG.PEL < prev    next >
Text File  |  1995-04-10  |  4KB  |  110 lines

  1. # $Header:   P:\source\wmacros\config.pev   1.31   10 Apr 1995 10:19:08   PFHJXM0  $
  2.  
  3. ##############################################################################
  4. #
  5. #       Compuware Corporation
  6. #         31440 Northwestern Highway
  7. #           Farmington Hills, Michigan 48334-2564
  8. #
  9. #   This source code listing contains information that is
  10. #   proprietary to Compuware Corporation and may not be copied
  11. #   duplicated, translated, transmitted, stored, retrieved
  12. #   or in any manner or by any method conveyed or disclosed
  13. #   to a third party or parties without express written
  14. #   permission from Compuware Corporation.
  15. #
  16. #  
  17. ##############################################################################
  18.  
  19. local settings_data[]
  20. local settings_index   = 1
  21.  
  22. global function settings_config()
  23. {
  24.    local new_array
  25.  
  26.    # start with fresh info
  27.    delete settings_data
  28.  
  29.    settings_data[ settings_index++ ] = sprintf( "# Settings Information\n" )
  30.  
  31.    settings_data[ settings_index++ ] = sprintf( "%s\n", toupper(emulation_mode) )
  32.    
  33.    settings_data[ settings_index++ ] = sprintf( "DEF_TABS \"%s\", %d, %d\n",
  34.                                                 default_buffer_tabs,
  35.                                                 default_wp_right_margin,
  36.                                                 default_wp_left_margin );
  37.  
  38.    settings_data[ settings_index++ ] = sprintf( "WORD_DELIM \"%s\"\n", word_delimiter);
  39.  
  40.    gsub("\\n", "\\n", search_pattern);
  41.    gsub("\\n", "\\n", replace_pattern);
  42.    settings_data[ settings_index++ ] = sprintf( "SRCH_REPL %d, \"%s\", \"%s\"\n", 
  43.                                                 search_flags,
  44.                                                 search_pattern,
  45.                                                 replace_pattern )
  46.  
  47.    settings_data[ settings_index++ ] = sprintf( "BACKUP %d, \"%s\"\n", 
  48.                                                 backup_files_enabled, 
  49.                                                 backup_directory )
  50.  
  51.    settings_data[ settings_index++ ] = 
  52.          sprintf( "DEF_COLS %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",
  53.                   color_help_bg,
  54.                   color_help_fg,
  55.                   color_message_bg,
  56.                   color_message_fg,
  57.                   color_notify_bg,
  58.                   color_notify_fg,
  59.                   color_warning_bg,
  60.                   color_warning_fg,
  61.                   color_error_bg,
  62.                   color_error_fg,
  63.                   color_bookmark_bg,
  64.                   color_bookmark_fg )
  65.  
  66.    settings_data[ settings_index++ ] = 
  67.          sprintf( "CURSORS 0x%x, 0x%x, 0x%x, 0x%x\n",
  68.                   cursor_normal,
  69.                   cursor_overtype,
  70.                   cursor_virtual,
  71.                   cursor_virtual_overtype)
  72.  
  73.    settings_data[ settings_index++ ] = sprintf( "STAT 0x%x, %d\n",
  74.                                                 status_bar_flags,
  75.                                                 !!status_bar_flags )
  76.  
  77.    store_default_font("default", "Fonts")
  78.    settings_data[ settings_index++ ] = sprintf("load_default_font \"default\" \"Fonts\"\n")
  79.  
  80.    settings_data[settings_index++] = 
  81.          sprintf("set_file_access %d \"%s\" %d \"%s\" %d \"%s\"\n", 
  82.                   lock_lan_files_on_mod, copy_lan_files_on_action,
  83.                   lock_local_files_on_mod, copy_local_files_on_action,
  84.                   lock_floppy_files_on_mod, copy_floppy_files_on_action )
  85.  
  86.    new_array = optional_function( "pvcs_settings", settings_index );
  87.    settings_data = merge_arrays( settings_data, new_array.array );
  88.  
  89.    new_array = optional_function( "tags_settings"    , new_array.index );
  90.    settings_data = merge_arrays( settings_data, new_array.array );
  91.  
  92.    new_array = optional_function( "toolbar_settings" , new_array.index );
  93.    settings_data = merge_arrays( settings_data, new_array.array );
  94.  
  95.    new_array = optional_function( "autosave_settings", new_array.index );
  96.    settings_data = merge_arrays( settings_data, new_array.array );
  97.  
  98.    new_array = optional_function( "mdi_settings"     , new_array.index );
  99.    settings_data = merge_arrays( settings_data, new_array.array );
  100.  
  101.    settings_data[ new_array.index++ ] = "\n"
  102.  
  103.    # update window settings here because MDI/SDI modes can change defaults
  104.    # without calling the notebook
  105.    optional_function( "window_settings1_config" )
  106.  
  107.    return settings_data
  108. }
  109.  
  110.