Скрипт меню размера и ориентации экрана.
Пригодится для каких-нибудь программ
Code
import appuifw import os import e32
def ru(x):return x.decode("utf-8")
def normal(): appuifw.app.screen = 'normal'
def large(): appuifw.app.screen = 'large'
def full(): appuifw.app.screen = 'full'
def automatic(): appuifw.app.orientation = 'automatic'
def portrait(): appuifw.app.orientation = 'portrait'
def landscape(): appuifw.app.orientation = 'landscape'
def orient(): orient = [ru('По умолчанию'), ru('Портретный'), ru('Ландшафный')] index = appuifw.popup_menu(orient, ru('Выбрать ориентацию:')) if (index == None): return if index == 0 : automatic() elif index == 1 : portrait() elif index == 2 : landscape()
def razmerek(): razmerek = [ru('По умолчанию'), ru('Средний'), ru('На весь экран')] index = appuifw.popup_menu(razmerek, ru('Выбрать размер экрана:')) if (index == None): return if index == 0 : normal() elif index == 1 : large() elif index == 2 : full()
appuifw.app.menu=[(ru('Экран'),((ru('Ориентация'),orient),(ru('Размер экрана'),razmerek))), (ru('Выход'),os.abort)]
e32.Ao_lock().wait()
|