Changeset 9593:ec97aa75e8e0 in orange


Ignore:
Timestamp:
01/27/12 12:54:01 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

Changed default_reports_dir to standard (My )Documents folder (fixes #1065)

Location:
orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/misc/environ.py

    r9587 r9593  
    149149        application_dir = os.environ["APPDATA"] 
    150150        output_dir = os.path.join(application_dir, version) 
    151         default_reports_dir = os.path.join(home, "My Documents", "Orange Reports") 
     151        default_reports_dir = os.path.join(home, "My Documents") 
    152152    elif sys.platform == "darwin": 
    153153        application_dir = os.path.join(home, "Library", "Application Support") 
    154154        output_dir = os.path.join(application_dir, version) 
    155         default_reports_dir = os.path.join(home, "Library", 
    156                                            "Application Support", 
    157                                            version, "Reports") 
     155        default_reports_dir = os.path.join(home, "Documents") 
    158156    else: 
    159157        application_dir = home 
    160158        output_dir = os.path.join(home, "." + version) 
    161         default_reports_dir = os.path.join(home, "orange-reports") 
     159         
     160        documents = os.path.join(home, "Documents") 
     161        # Need to make sure Documents folder actually exists 
     162        if os.path.exists(documents) and os.path.isdir(documents): 
     163            default_reports_dir = documents 
     164        else: 
     165            default_reports_dir = home 
    162166 
    163167    add_ons_dir_user = os.path.join(output_dir, "add-ons") 
  • orange/orangerc.cfg

    r9592 r9593  
    4747 
    4848# Default reports directory 
    49 default_reports_dir = %(home)s/orange-reports 
     49default_reports_dir = %(home)s/Documents 
    5050 
    5151# Default directory for user installed orange add-ons  
     
    7777 
    7878# Need to redefine all options depending on output_dir  
    79 default_reports_dir = %(home)s/My Documents/Orange Reports 
     79default_reports_dir = %(home)s/My Documents/ 
    8080add_ons_dir_user = %(output_dir)s/add-ons 
    8181orange_settings_dir = %(output_dir)s 
     
    9898canvas_settings_dir = %(output_dir)s/OrangeCanvasQt4 
    9999widget_settings_dir = %(output_dir)s/widgetSettingsQt4 
    100 default_reports_dir = %(output_dir)s/Reports 
     100default_reports_dir = %(home)s/Documents 
    101101buffer_dir = %(home)s/Library/Caches/%(version)s 
Note: See TracChangeset for help on using the changeset viewer.