コード例 #1
0
 def __init__(self):
     self.isearch_value = ""
     self.isearch_type = clnch_ini.get("MISC", "isearch_type", "partial")
     self.migemo_pattern = None
     self.migemo_re_pattern = ""
     self.migemo_re_object = None
     self.migemo_re_result = None
     self.migemo_dll_path = clnch_ini.get("MISC", "migemo_dll_path", "")
     self.migemo_dict_path = clnch_ini.get("MISC", "migemo_dict_path", "")
コード例 #2
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configTheme(main_window):
    def enumThemes():

        theme_list = []
        theme_parent = os.path.join(ckit.getAppExePath(), "theme")
        theme_dir_list = os.listdir(theme_parent)

        for theme_dir in theme_dir_list:

            if os.path.exists(os.path.join(theme_parent, theme_dir, "theme.ini")):
                theme_list.append(theme_dir)

        return theme_list

    theme_list = enumThemes()

    current_theme_name = clnch_ini.get("THEME", "name", "")

    try:
        initial_select = theme_list.index(current_theme_name)
    except:
        initial_select = 0

    result = clnch_listwindow.popMenu(main_window, 40, 16, "テーマ", theme_list, initial_select)
    if result < 0:
        return

    clnch_ini.set("THEME", "name", theme_list[result])

    main_window.reloadTheme()

    return False
コード例 #3
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configTheme(main_window):
    def enumThemes():

        theme_list = []
        theme_parent = os.path.join(ckit.getAppExePath(), 'theme')
        theme_dir_list = os.listdir(theme_parent)

        for theme_dir in theme_dir_list:

            if os.path.exists(
                    os.path.join(theme_parent, theme_dir, "theme.ini")):
                theme_list.append(theme_dir)

        return theme_list

    theme_list = enumThemes()

    current_theme_name = clnch_ini.get("THEME", "name", "")

    try:
        initial_select = theme_list.index(current_theme_name)
    except:
        initial_select = 0

    result = clnch_listwindow.popMenu(main_window, 40, 16, "テーマ", theme_list,
                                      initial_select)
    if result < 0: return

    clnch_ini.set("THEME", "name", theme_list[result])

    main_window.reloadTheme()

    return False
コード例 #4
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configDirectorySeparator(main_window):

    items = []

    items.append(("スラッシュ       : / ", "slash"))
    items.append(("バックスラッシュ : \\ ", "backslash"))

    directory_separator = clnch_ini.get("MISC", "directory_separator", "backslash")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == directory_separator:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "ディレクトリ区切り文字", items, initial_select)
    if result < 0:
        return

    clnch_ini.set("MISC", "directory_separator", items[result][1])

    if items[result][1] == "slash":
        ckit.setPathSlash(True)
    else:
        ckit.setPathSlash(False)
コード例 #5
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configDirectorySeparator(main_window):

    items = []

    items.append(("スラッシュ       : / ", "slash"))
    items.append(("バックスラッシュ : \\ ", "backslash"))

    directory_separator = clnch_ini.get("MISC", "directory_separator",
                                        "backslash")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == directory_separator:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "ディレクトリ区切り文字",
                                      items, initial_select)
    if result < 0: return

    clnch_ini.set("MISC", "directory_separator", items[result][1])

    if items[result][1] == "slash":
        ckit.setPathSlash(True)
    else:
        ckit.setPathSlash(False)
コード例 #6
0
ファイル: clnch_isearch.py プロジェクト: byplayer/clnch
 def __init__( self ):
     self.isearch_value = ""
     self.isearch_type = clnch_ini.get( "MISC", "isearch_type", "partial" ) 
     self.migemo_pattern = None
     self.migemo_re_pattern = ""
     self.migemo_re_object = None
     self.migemo_re_result = None
コード例 #7
0
ファイル: clnch_musicplayer.py プロジェクト: byplayer/clnch
    def load( self, section ):
        for i in range(100):
            try:
                item =ckit.normPath( clnch_ini.get( section, "playlist_%d"%(i,) ) )
                self.items.append(item)
            except:
                break
        
        self.cursor = clnch_ini.getint( section, "track", 0 )
        self.position = clnch_ini.getint( section, "position", 0 )

        self.cursor = min( self.cursor, len(self.items) )
        self.song_name = self.items[self.cursor]
        self.play()
        self.seek(self.position)
        self.pause()
        self.main_window.paint()
コード例 #8
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configFontName(main_window):
    font_list = main_window.enumFonts()

    current_font_name = clnch_ini.get("FONT", "name", "")

    try:
        initial_select = font_list.index(current_font_name)
    except:
        initial_select = 0

    result = clnch_listwindow.popMenu(main_window, 40, 16, "フォント", font_list, initial_select)
    if result < 0:
        return

    clnch_ini.set("FONT", "name", font_list[result])

    main_window.updateFont()
コード例 #9
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configFontName(main_window):
    font_list = main_window.enumFonts()

    current_font_name = clnch_ini.get("FONT", "name", "")

    try:
        initial_select = font_list.index(current_font_name)
    except:
        initial_select = 0

    result = clnch_listwindow.popMenu(main_window, 40, 16, "フォント", font_list,
                                      initial_select)
    if result < 0: return

    clnch_ini.set("FONT", "name", font_list[result])

    main_window.updateFont()
コード例 #10
0
ファイル: clnch_musicplayer.py プロジェクト: shgtkfj/clnch
    def load(self, section):
        for i in range(100):
            try:
                item = ckit.normPath(
                    clnch_ini.get(section, "playlist_%d" % (i, )))
                self.items.append(item)
            except:
                break

        self.cursor = clnch_ini.getint(section, "track", 0)
        self.position = clnch_ini.getint(section, "position", 0)

        self.cursor = min(self.cursor, len(self.items))
        self.song_name = self.items[self.cursor]
        self.play()
        self.seek(self.position)
        self.pause()
        self.main_window.paint()
コード例 #11
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configAutoComplete(main_window):

    items = []

    items.append(("自動補完しない", "0"))
    items.append(("自動補完する", "1"))

    auto_complete = clnch_ini.get("MISC", "auto_complete", "1")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == auto_complete:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "自動補完", items,
                                      initial_select)
    if result < 0: return

    clnch_ini.set("MISC", "auto_complete", items[result][1])
コード例 #12
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configAutoComplete(main_window):

    items = []

    items.append(("自動補完しない", "0"))
    items.append(("自動補完する", "1"))

    auto_complete = clnch_ini.get("MISC", "auto_complete", "1")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == auto_complete:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "自動補完", items, initial_select)
    if result < 0:
        return

    clnch_ini.set("MISC", "auto_complete", items[result][1])
コード例 #13
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configHotKeyBehavior(main_window):

    items = []

    items.append(("アクティブ化", "activate"))
    items.append(("トグル", "toggle"))

    hotkey_behavior = clnch_ini.get("MISC", "hotkey_behavior", "activate")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == hotkey_behavior:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "ホットキー動作設定", items,
                                      initial_select)
    if result < 0: return

    clnch_ini.set("MISC", "hotkey_behavior", items[result][1])
    main_window.updateHotKey()
コード例 #14
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configHotKeyBehavior(main_window):

    items = []

    items.append(("アクティブ化", "activate"))
    items.append(("トグル", "toggle"))

    hotkey_behavior = clnch_ini.get("MISC", "hotkey_behavior", "activate")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == hotkey_behavior:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "ホットキー動作設定", items, initial_select)
    if result < 0:
        return

    clnch_ini.set("MISC", "hotkey_behavior", items[result][1])
    main_window.updateHotKey()
コード例 #15
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configInactive(main_window):

    items = []

    items.append(("空欄", "empty"))
    items.append(("時計", "clock"))
    items.append(("非表示", "hide"))

    inactive_behavior = clnch_ini.get("MISC", "inactive_behavior", "clock")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == inactive_behavior:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "非アクティブ時の動作", items,
                                      initial_select)
    if result < 0: return

    clnch_ini.set("MISC", "inactive_behavior", items[result][1])
    main_window.updateInactiveBehavior()
コード例 #16
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configKeyMap(main_window):

    items = []

    items.append(("101キーボード", "101"))
    items.append(("106キーボード", "106"))

    default_keymap = clnch_ini.get("MISC", "default_keymap", "106")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == default_keymap:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "キー割り当て", items,
                                      initial_select)
    if result < 0: return

    clnch_ini.set("MISC", "default_keymap", items[result][1])

    main_window.configure()
コード例 #17
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configTopMost(main_window):

    items = []

    items.append(("通常", "0"))
    items.append(("最前面", "1"))
    items.append(("最前面のなかの最前面", "2"))

    topmost = clnch_ini.get("GEOMETRY", "topmost", "0")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == topmost:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "ウインドウの最前面表示", items, initial_select)
    if result < 0:
        return

    clnch_ini.set("GEOMETRY", "topmost", items[result][1])
    main_window.updateTopMost()
コード例 #18
0
ファイル: clnch_configmenu.py プロジェクト: shgtkfj/clnch
def _configTopMost(main_window):

    items = []

    items.append(("通常", "0"))
    items.append(("最前面", "1"))
    items.append(("最前面のなかの最前面", "2"))

    topmost = clnch_ini.get("GEOMETRY", "topmost", "0")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == topmost:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "ウインドウの最前面表示",
                                      items, initial_select)
    if result < 0: return

    clnch_ini.set("GEOMETRY", "topmost", items[result][1])
    main_window.updateTopMost()
コード例 #19
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configKeyMap(main_window):

    items = []

    items.append(("101キーボード", "101"))
    items.append(("106キーボード", "106"))

    default_keymap = clnch_ini.get("MISC", "default_keymap", "106")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == default_keymap:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "キー割り当て", items, initial_select)
    if result < 0:
        return

    clnch_ini.set("MISC", "default_keymap", items[result][1])

    main_window.configure()
コード例 #20
0
ファイル: clnch_configmenu.py プロジェクト: nitoyon/clnch
def _configInactive(main_window):

    items = []

    items.append(("空欄", "empty"))
    items.append(("時計", "clock"))
    items.append(("非表示", "hide"))

    inactive_behavior = clnch_ini.get("MISC", "inactive_behavior", "clock")

    initial_select = 0
    for i in range(len(items)):
        if items[i][1] == inactive_behavior:
            initial_select = i
            break

    result = clnch_listwindow.popMenu(main_window, 40, 16, "非アクティブ時の動作", items, initial_select)
    if result < 0:
        return

    clnch_ini.set("MISC", "inactive_behavior", items[result][1])
    main_window.updateInactiveBehavior()
コード例 #21
0
ファイル: clnch_consolewindow.py プロジェクト: byplayer/clnch
 def updateFont(self):
     fontname = clnch_ini.get( "FONT", "name", "" )
     self.setFont( fontname, clnch_ini.getint( "FONT", "size", 12 ) )
     window_rect = self.getWindowRect()
     self.setPosSize( window_rect[0], window_rect[1], self.width(), self.height(), 0 )