当前位置: 首页>>代码示例>>Python>>正文


Python StandardWindow.data["lb"]方法代码示例

本文整理汇总了Python中efl.elementary.window.StandardWindow.data["lb"]方法的典型用法代码示例。如果您正苦于以下问题:Python StandardWindow.data["lb"]方法的具体用法?Python StandardWindow.data["lb"]怎么用?Python StandardWindow.data["lb"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在efl.elementary.window.StandardWindow的用法示例。


在下文中一共展示了StandardWindow.data["lb"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: config_clicked

# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import data["lb"] [as 别名]
def config_clicked(obj, data=None):
    siname = "_TestConfigSocketImage_"

    win = StandardWindow("config", "Configuration", autodel=True,
        size=(400,500))
    global ad
    ad = App_Data()
    win.data["ad"] = ad
    ad.win = win
    ad.profiles = elm_conf.profile_list

    bx = Box(win, size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
    sc = Scroller(win, content=bx, bounce=(False, True),
        size_hint_weight=EXPAND_BOTH)
    win.resize_object_add(sc)

    fr, bx2 = FRAME(win, bx, "Current window profile")
    # TODO: Add this code
    #ee = ecore_evas_ecore_evas_get(evas_object_evas_get(win));
    #supported = ecore_evas_window_profile_supported_get(ee);
    supported = True
    buf = "Virtual desktop window profile support: <b>{0}</b>".format(
        "Yes" if supported else "No")
    lb = LOG(win, buf)
    bx2.pack_end(lb)

    lb = LOG(win, "Profile: <b>N/A</b><br/>Available profiles:")
    bx2.pack_end(lb)
    win.data["lb"] = lb

    lb = LOG(win, "<br/>Window profile")
    bx2.pack_end(lb)
    ad.curr.rdg = radio_add(win, bx2)

    bt = Button(win, text="Set")
    bt.callback_clicked_add(bt_profile_set, win)
    bx2.pack_end(bt)
    bt.show()

    lb = LOG(win, "Window available profiles")
    bx2.pack_end(lb)
    ad.curr.cks = check_add(win, bx2)

    bt = Button(win, text="Set")
    bt.callback_clicked_add(bt_available_profiles_set, win)
    bx2.pack_end(bt)
    bt.show()

    fr, bx2 = FRAME(win, bx, "Socket")
    if socket_add(siname):
        lb = LOG(win, "Starting socket image.")
        bx2.pack_end(lb)
    else:
        lb = LOG(win,
            "Failed to create socket.<br/>Please check whether another "
            "test configuration window is<br/>already running and providing "
            "socket image.")
        bx2.pack_end(lb)

    fr, bx2 = FRAME(win, bx, "Plug")
    if not plug_add(win, bx2, siname):
        lb = LOG(win, "Failed to connect to server.")
        bx2.pack_end(lb)

    fr, bx2 = FRAME(win, bx, "Create new window with profile")
    lb = LOG(win, "Window profile")
    bx2.pack_end(lb)
    ad.new.rdg = radio_add(win, bx2)

    lb = LOG(win, "Window available profiles")
    bx2.pack_end(lb)
    ad.new.cks = check_add(win, bx2)

    bt = Button(win, text="Create")
    bt.callback_clicked_add(bt_win_add, win)
    bx2.pack_end(bt)
    bt.show()

    win.callback_profile_changed_add(win_profile_changed_cb)
    win.callback_delete_request_add(win_del_cb)
    if obj is None:
        win.callback_delete_request_add(lambda o: elementary.exit())

    if data:
        if data.available_profiles:
            win.available_profiles = data.available_profiles
        if data.profile:
            win.profile = data.profile

        profile_update(win)

    bx.show()
    sc.show()

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:97,代码来源:test_config.py


注:本文中的efl.elementary.window.StandardWindow.data["lb"]方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。