1 | """ |
---|
2 | Application settings |
---|
3 | """ |
---|
4 | import time |
---|
5 | from sans.guiframe.gui_style import GUIFRAME |
---|
6 | |
---|
7 | # Version of the application |
---|
8 | __appname__ = "PrView" |
---|
9 | __version__ = '0.3.0' |
---|
10 | __download_page__ = 'http://danse.chem.utk.edu' |
---|
11 | __update_URL__ = 'http://danse.chem.utk.edu/prview_version.php' |
---|
12 | |
---|
13 | |
---|
14 | # Debug message flag |
---|
15 | __EVT_DEBUG__ = False |
---|
16 | |
---|
17 | # Flag for automated testing |
---|
18 | __TEST__ = False |
---|
19 | |
---|
20 | # Debug message should be written to a file? |
---|
21 | __EVT_DEBUG_2_FILE__ = False |
---|
22 | __EVT_DEBUG_FILENAME__ = "debug.log" |
---|
23 | |
---|
24 | # About box info |
---|
25 | _do_aboutbox=True |
---|
26 | _acknowledgement = \ |
---|
27 | '''This software was developed by the University of Tennessee as part of the |
---|
28 | Distributed Data Analysis of Neutron Scattering Experiments (DANSE) |
---|
29 | project funded by the US National Science Foundation. |
---|
30 | |
---|
31 | If you use DANSE applications to do scientific research that leads to publication, |
---|
32 | we ask that you acknowledge the use of the software with the following sentence: |
---|
33 | |
---|
34 | "This work benefited from DANSE software developed under NSF award DMR-0520547." |
---|
35 | ''' |
---|
36 | _homepage = "http://danse.chem.utk.edu" |
---|
37 | _download = "http://danse.chem.utk.edu/prview.html" |
---|
38 | _authors = [] |
---|
39 | _paper = "http://danse.us/trac/sans/newticket" |
---|
40 | _license = "mailto:sansdanse@gmail.com" |
---|
41 | |
---|
42 | _nsf_logo = "images/nsf_logo.png" |
---|
43 | _danse_logo = "images/danse_logo.png" |
---|
44 | _inst_logo = "images/utlogo.gif" |
---|
45 | _nsf_url = "http://www.nsf.gov" |
---|
46 | _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" |
---|
47 | _inst_url = "http://www.utk.edu" |
---|
48 | _corner_image = "images/prview.jpg" |
---|
49 | _copyright = "(c) 2008, University of Tennessee" |
---|
50 | #edit the list of file state your plugin can read |
---|
51 | |
---|
52 | APPLICATION_STATE_EXTENSION = '.prv' |
---|
53 | APPLICATION_WLIST = 'P(r) files (*.prv)|*.prv' |
---|
54 | DEFAULT_STYLE = GUIFRAME.DEFAULT_STYLE |
---|
55 | GUIFRAME_WIDTH = 850 |
---|
56 | GUIFRAME_HEIGHT = 780 |
---|
57 | PLUGIN_STATE_EXTENSIONS = ['.prv'] |
---|
58 | PLUGINS_WLIST = ['P(r) files (*.prv)|*.prv'] |
---|
59 | PLOPANEL_WIDTH = 400 |
---|
60 | PLOPANEL_HEIGTH = 400 |
---|
61 | SPLASH_SCREEN_PATH = "images/danse_logo.png" |
---|
62 | SPLASH_SCREEN_WIDTH = 500 |
---|
63 | SPLASH_SCREEN_HEIGHT = 300 |
---|
64 | SS_MAX_DISPLAY_TIME = 3000 #3 sec |
---|
65 | |
---|
66 | |
---|
67 | import wx.lib.newevent |
---|
68 | (StatusBarEvent, EVT_STATUS) = wx.lib.newevent.NewEvent() |
---|
69 | |
---|
70 | def printEVT(message): |
---|
71 | if __EVT_DEBUG__: |
---|
72 | print "%g: %s" % (time.clock(), message) |
---|
73 | |
---|
74 | if __EVT_DEBUG_2_FILE__: |
---|
75 | out = open(__EVT_DEBUG_FILENAME__, 'a') |
---|
76 | out.write("%10g: %s\n" % (time.clock(), message)) |
---|
77 | out.close() |
---|
78 | |
---|