Ejemplo n.º 1
0
    def configure(self):
    
        ckit.Keymap.init()

        self.editor = "notepad.exe"
        self.data_path = ckit.dataPath()

        ckit.reloadConfigScript( self.config_filename )
        ckit.callConfigFunc("configure",self)
Ejemplo n.º 2
0
    def configure(self):

        ckit.Keymap.init()

        self.editor = "notepad.exe"
        self.data_path = ckit.dataPath()

        ckit.reloadConfigScript(self.config_filename)
        ckit.callConfigFunc("configure", self)
Ejemplo n.º 3
0
    def __init__(self, config_filename, debug, profile):

        ckit.Window.__init__(
            self,
            x=0,
            y=0,
            width=1,
            height=1,
            title_bar=True,
            title="cmemo manager",
            show=False,
            sysmenu=True,
            endsession_handler=self._onEndSession,
        )

        self.command = ckit.CommandMap(self)

        self.config_filename = config_filename  # config.py のファイルパス
        self.editor = ""  # config.pyを編集するためのテキストエディタ
        self.data_path = ckit.dataPath()  # メモデータ置き場
        self.debug = debug  # デバッグモード
        self.profile = profile  # プロファイルモード

        self.font_name = "MS Gothic"
        self.font_size = 12

        self.memowindow_table = {}

        self.creating_memowindow = False

        self.color_choose_table = ((0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
                                   (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
                                   (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
                                   (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0))
        self.default_memo_color = (255, 255, 192)

        self.loadState()

        self.user_input_ownership = threading.Lock()
        self.user_input_other_acquire_handler = None

        self.setTimer(self._onTimerCheckFileAll, 3 * 1000)
        self.setTimer(self._onTimerFlushIniFile, 10 * 1000)

        self.console_window = cmemo_consolewindow.ConsoleWindow(self, debug)

        self.task_tray_icon = cmemo_tasktrayicon.TaskTrayIcon(
            self.console_window, self)

        self.console_window.registerStdio()
Ejemplo n.º 4
0
    def __init__( self, config_filename, debug, profile ):

        ckit.Window.__init__(
            self,
            x = 0,
            y = 0,
            width = 1,
            height = 1,
            title_bar = True,
            title = "cmemo manager",
            show = False,
            sysmenu=True,
            endsession_handler = self._onEndSession,
            )
        
        self.command = ckit.CommandMap(self)

        self.config_filename = config_filename  # config.py のファイルパス
        self.editor = ""                        # config.pyを編集するためのテキストエディタ
        self.data_path = ckit.dataPath()        # メモデータ置き場
        self.debug = debug                      # デバッグモード
        self.profile = profile                  # プロファイルモード
        
        self.memowindow_table = {}
    
        self.color_choose_table = ( (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0), (0,0,0) )
        self.default_memo_color = (255,255,192)
        
        self.loadState()

        self.user_input_ownership = threading.Lock()
        self.user_input_other_acquire_handler = None
        
        self.setTimer( self._onTimerCheckFileAll, 3*1000 )
        self.setTimer( self._onTimerFlushIniFile, 10*1000 )

        self.console_window = cmemo_consolewindow.ConsoleWindow( self, debug )

        self.task_tray_icon = cmemo_tasktrayicon.TaskTrayIcon( self.console_window, self )
    
        self.console_window.registerStdio()
Ejemplo n.º 5
0
    if option[0] == "-d":
        debug = True
    elif option[0] == "-p":
        profile = True

#--------------------------------------------------------------------

ckit.registerWindowClass("Keyhac")

# exeと同じ位置にある設定ファイルを優先する
if os.path.exists(os.path.join(ckit.getAppExePath(), 'config.py')):
    ckit.setDataPath(ckit.getAppExePath())
else:
    ckit.setDataPath(
        os.path.join(ckit.getAppDataPath(), keyhac_resource.keyhac_dirname))
    if not os.path.exists(ckit.dataPath()):
        os.mkdir(ckit.dataPath())

default_config_filename = os.path.join(ckit.getAppExePath(), '_config.py')
config_filename = os.path.join(ckit.dataPath(), 'config.py')
keyhac_ini.ini_filename = os.path.join(ckit.dataPath(), 'keyhac.ini')

# config.py がどこにもない場合は作成する
if not os.path.exists(config_filename) and os.path.exists(
        default_config_filename):
    shutil.copy(default_config_filename, config_filename)

keyhac_ini.read()

ckit.setThemeDefault()
Ejemplo n.º 6
0
import clnch_ini
import clnch_misc

ckit.registerWindowClass( "Clnch" )
ckit.registerCommandInfoConstructor( ckit.CommandInfo )

sys.path[0:0] = [
    os.path.join( ckit.getAppExePath(), 'extension' ),
    ]

# exeと同じ位置にある設定ファイルを優先する
if os.path.exists( os.path.join( ckit.getAppExePath(), 'config.py' ) ):
    ckit.setDataPath( ckit.getAppExePath() )
else:    
    ckit.setDataPath( os.path.join( ckit.getAppDataPath(), clnch_resource.clnch_dirname ) )
    if not os.path.exists(ckit.dataPath()):
        os.mkdir(ckit.dataPath())

default_config_filename = os.path.join( ckit.getAppExePath(), '_config.py' )
config_filename = os.path.join( ckit.dataPath(), 'config.py' )
clnch_ini.ini_filename = os.path.join( ckit.dataPath(), 'clnch.ini' )

# config.py がどこにもない場合は作成する
if not os.path.exists(config_filename) and os.path.exists(default_config_filename):
    shutil.copy( default_config_filename, config_filename )

clnch_ini.read()

ckit.JobQueue.createDefaultQueue()

_main_window = clnch_mainwindow.MainWindow(
Ejemplo n.º 7
0
for option in option_list:
    if option[0]=="-d":
        debug = True
    elif option[0]=="-p":
        profile = True

#--------------------------------------------------------------------

ckit.registerWindowClass( "Keyhac" )
    
# exeと同じ位置にある設定ファイルを優先する
if os.path.exists( os.path.join( ckit.getAppExePath(), 'config.py' ) ):
    ckit.setDataPath( ckit.getAppExePath() )
else:    
    ckit.setDataPath( os.path.join( ckit.getAppDataPath(), keyhac_resource.keyhac_dirname ) )
    if not os.path.exists(ckit.dataPath()):
        os.mkdir(ckit.dataPath())

default_config_filename = os.path.join( ckit.getAppExePath(), '_config.py' )
config_filename = os.path.join( ckit.dataPath(), 'config.py' )
keyhac_ini.ini_filename = os.path.join( ckit.dataPath(), 'keyhac.ini' )

# config.py がどこにもない場合は作成する
if not os.path.exists(config_filename) and os.path.exists(default_config_filename):
    shutil.copy( default_config_filename, config_filename )
    
keyhac_ini.read()

ckit.setThemeDefault()

ckit.JobQueue.createDefaultQueue()
Ejemplo n.º 8
0
import clnch_misc

ckit.registerWindowClass("Clnch")
ckit.registerCommandInfoConstructor(ckit.CommandInfo)

sys.path[0:0] = [
    os.path.join(ckit.getAppExePath(), 'extension'),
]

# exeと同じ位置にある設定ファイルを優先する
if os.path.exists(os.path.join(ckit.getAppExePath(), 'config.py')):
    ckit.setDataPath(ckit.getAppExePath())
else:
    ckit.setDataPath(
        os.path.join(ckit.getAppDataPath(), clnch_resource.clnch_dirname))
    if not os.path.exists(ckit.dataPath()):
        os.mkdir(ckit.dataPath())

default_config_filename = os.path.join(ckit.getAppExePath(), '_config.py')
config_filename = os.path.join(ckit.dataPath(), 'config.py')
clnch_ini.ini_filename = os.path.join(ckit.dataPath(), 'clnch.ini')

# config.py がどこにもない場合は作成する
if not os.path.exists(config_filename) and os.path.exists(
        default_config_filename):
    shutil.copy(default_config_filename, config_filename)

clnch_ini.read()

ckit.JobQueue.createDefaultQueue()