<commit_before>
################################################################################
#This software was developed by the University of Tennessee as part of the
#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
#project funded by the US National Science Foundation. 
#
#See the license text in license.txt
#
#copyright 2009, University of Tennessee
################################################################################
import wx
import os
import sys
import copy
#import sans.guiframe.gui_manager as gui
from sans.guiframe.events import StatusEvent  
from sans.guiframe.gui_style import GUIFRAME
from sans.guiframe import gui_manager as CURRENT
from sans.guiframe.customdir  import SetupCustom
# default configuration
DEFAULT_STRINGS = {'GUIFRAME_WIDTH':-1,
                   'GUIFRAME_HEIGHT':-1,
                   'CONTROL_WIDTH':-1,
                   'CONTROL_HEIGHT':-1,
                   'PLOPANEL_WIDTH':-1,
                   'DATAPANEL_WIDTH':-1,
                   'DATALOADER_SHOW':True,
                   'TOOLBAR_SHOW':True,
                   'FIXED_PANEL':True,
                   'WELCOME_PANEL_SHOW':False,
                   'CLEANUP_PLOT':False,
                   'DEFAULT_PERSPECTIVE':'Fitting',
                   'DEFAULT_OPEN_FOLDER': None}
try:
    CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH,
                       'GUIFRAME_HEIGHT':CURRENT.GUIFRAME_HEIGHT,
                       'CONTROL_WIDTH':CURRENT.CONTROL_WIDTH,
                       'CONTROL_HEIGHT':CURRENT.CONTROL_HEIGHT,
                       'PLOPANEL_WIDTH':CURRENT.PLOPANEL_WIDTH,
                       'DATAPANEL_WIDTH':CURRENT.DATAPANEL_WIDTH,
                       'DATALOADER_SHOW':CURRENT.DATALOADER_SHOW,
                       'TOOLBAR_SHOW':CURRENT.TOOLBAR_SHOW,
                       'FIXED_PANEL':CURRENT.FIXED_PANEL,
                       'WELCOME_PANEL_SHOW':CURRENT.WELCOME_PANEL_SHOW,
                       'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT,
                       'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE,
                       'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER}
except:
    CURRENT_STRINGS = DEFAULT_STRINGS
FONT_VARIANT = 0    
if sys.platform.count("win32") > 0:
    PANEL_WIDTH = 265 
    PANEL_HEIGHT = 235
else:
    PANEL_WIDTH = 285
    PANEL_HEIGHT = 215
    
"""
Dialog to set Appication startup configuration
"""
class StartupConfiguration(wx.Dialog):
    """
    Dialog for Startup Configuration
    """
    def __init__(self, parent, gui, id=-1, title="Startup Setting"):
        wx.Dialog.__init__(self, parent, id, title, 
                           size=(PANEL_WIDTH, PANEL_HEIGHT))
        # parent
        self.parent = parent
        self.path = SetupCustom().find_dir()
        self._gui = gui
        # font size 
        self.SetWindowVariant(variant=FONT_VARIANT)
        self.current_string = copy.deepcopy(CURRENT_STRINGS)
        self.return_string = copy.deepcopy(DEFAULT_STRINGS)
        # build layout
        vbox = wx.BoxSizer(wx.VERTICAL)
        title_text = wx.StaticText(self, id=wx.NewId(), label='Set interface configuration')

        default_bt = wx.RadioButton(self, -1, 'Default View', (15, 30), 
                                    style=wx.RB_GROUP)
        default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnDefault)
        default_bt.SetValue(True)
        current_bt = wx.RadioButton(self, -1, 'Current View', (15, 55))
        current_bt.SetValue(False)
        current_bt.Bind(wx.EVT_RADIOBUTTON, self.OnCurrent)
        msg = "\nThis new configuration will take effect when\n"
        msg += "running this application next time."<commit_msg>Uniform window size<commit_after>
################################################################################
#This software was developed by the University of Tennessee as part of the
#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
#project funded by the US National Science Foundation. 
#
#See the license text in license.txt
#
#copyright 2009, University of Tennessee
################################################################################
import wx
import os
import sys
import copy
#import sans.guiframe.gui_manager as gui
from sans.guiframe.events import StatusEvent  
from sans.guiframe.gui_style import GUIFRAME
from sans.guiframe import gui_manager as CURRENT
from sans.guiframe.customdir  import SetupCustom
# default configuration
DEFAULT_STRINGS = {'GUIFRAME_WIDTH':-1,
                   'GUIFRAME_HEIGHT':-1,
                   'CONTROL_WIDTH':-1,
                   'CONTROL_HEIGHT':-1,
                   'PLOPANEL_WIDTH':-1,
                   'DATAPANEL_WIDTH':-1,
                   'DATALOADER_SHOW':True,
                   'TOOLBAR_SHOW':True,
                   'FIXED_PANEL':True,
                   'WELCOME_PANEL_SHOW':False,
                   'CLEANUP_PLOT':False,
                   'DEFAULT_PERSPECTIVE':'Fitting',
                   'DEFAULT_OPEN_FOLDER': None}
try:
    CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH,
                       'GUIFRAME_HEIGHT':CURRENT.GUIFRAME_HEIGHT,
                       'CONTROL_WIDTH':CURRENT.CONTROL_WIDTH,
                       'CONTROL_HEIGHT':CURRENT.CONTROL_HEIGHT,
                       'PLOPANEL_WIDTH':CURRENT.PLOPANEL_WIDTH,
                       'DATAPANEL_WIDTH':CURRENT.DATAPANEL_WIDTH,
                       'DATALOADER_SHOW':CURRENT.DATALOADER_SHOW,
                       'TOOLBAR_SHOW':CURRENT.TOOLBAR_SHOW,
                       'FIXED_PANEL':CURRENT.FIXED_PANEL,
                       'WELCOME_PANEL_SHOW':CURRENT.WELCOME_PANEL_SHOW,
                       'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT,
                       'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE,
                       'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER}
except:
    CURRENT_STRINGS = DEFAULT_STRINGS
FONT_VARIANT = 0
PANEL_WIDTH = 285
PANEL_HEIGHT = 215

"""
Dialog to set Appication startup configuration
"""
class StartupConfiguration(wx.Dialog):
    """
    Dialog for Startup Configuration
    """
    def __init__(self, parent, gui, id=-1, title="Startup Setting"):
        wx.Dialog.__init__(self, parent, id, title, 
                           size=(PANEL_WIDTH, PANEL_HEIGHT))
        # parent
        self.parent = parent
        self.path = SetupCustom().find_dir()
        self._gui = gui
        # font size 
        self.SetWindowVariant(variant=FONT_VARIANT)
        self.current_string = copy.deepcopy(CURRENT_STRINGS)
        self.return_string = copy.deepcopy(DEFAULT_STRINGS)
        # build layout
        vbox = wx.BoxSizer(wx.VERTICAL)
        title_text = wx.StaticText(self, id=wx.NewId(), label='Set interface configuration')

        default_bt = wx.RadioButton(self, -1, 'Default View', (15, 30), 
                                    style=wx.RB_GROUP)
        default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnDefault)
        default_bt.SetValue(True)
        current_bt = wx.RadioButton(self, -1, 'Current View', (15, 55))
        current_bt.SetValue(False)
        current_bt.Bind(wx.EVT_RADIOBUTTON, self.OnCurrent)
        msg = "\nThis new configuration will take effect when\n"
        msg += "running this application next time."
{'fraction_non_alphanumeric': 0.12919647771051182, 'fraction_numerical': 0.008943313153549808, 'mean_word_length': 2.4046838407494144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3389262', 'n_tokens_mistral': 2238, 'n_tokens_neox': 2084, 'n_words': 401}