Beispiel #1
0

def notify_proxy_changed():
    old_proxy_state = last_proxy_state
    new_proxy_state = update_tip()
    if new_proxy_state:
        text = '设置由:\n%s\n变更为:\n%s' % (old_proxy_state, new_proxy_state)
        balloons_warning(text, '系统代理改变')


last_main_menu = None
last_proxy_state = None
quit_item = '退出', on_quit
systray_GotoX = SysTrayIcon(icon_gotox,
                            'GotoX',
                            None,
                            quit_item,
                            left_click=on_left_click,
                            right_click=on_right_click)
systray_GotoX.start()
start_GotoX()
#load_config()
#os.environ['HTTPS_PROXY'] = os.environ['HTTP_PROXY'] = LISTEN_AUTO.http
sleep(0.1)
balloons_info('''
GotoX 已经启动。        

左键单击:打开菜单

左键双击:打开配置

右键单击:隐显窗口
Beispiel #2
0
    main_menu = (('GotoX 设置', sub_menu1, icon_gotox, MFS_DEFAULT),
                 ('更新直连 IP 库', sub_menu2),
                 (None, '-'),
                 ('显示窗口', on_show, show_state, MFT_RADIOCHECK),
                 ('隐藏窗口', on_hide, hide_state, MFT_RADIOCHECK),
                 ('设置系统(IE)代理', sub_menu3),
                 ('重启 GotoX', on_refresh),
                 (None, '-'),
                 ('关于', on_about))
    if main_menu != last_main_menu:
        systray.update(menu=main_menu)
        last_main_menu = main_menu

quit_item = '退出', on_quit
systray_GotoX = SysTrayIcon(icon_gotox, 'GotoX', None, quit_item,
                            left_click=on_left_click,
                            right_click=on_right_click)
systray_GotoX.start()
start_GotoX()
#LISTEN_GAE, LISTEN_AUTO = get_listen_addr()

from time import sleep

proxy_state = get_proxy_state()
sleep(1)
systray_GotoX.update(
    hover_text='GotoX\n当前系统(IE)代理:\n%s' % proxy_state,
    balloons=('\nGotoX 已经启动。        \n\n'
              '左键单击:打开菜单\n\n'
              '左键双击:打开配置\n\n'
              '右键单击:隐藏窗口\n\n'