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


Python MockView._tooltips方法代码示例

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


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

示例1: start_institution_editor

# 需要导入模块: from bauble.editor import MockView [as 别名]
# 或者: from bauble.editor.MockView import _tooltips [as 别名]
def start_institution_editor():
    glade_path = os.path.join(paths.lib_dir(), "plugins", "garden", "institution.glade")
    from bauble import prefs
    from bauble.editor import GenericEditorView, MockView

    if prefs.testing:
        view = MockView()
    else:
        view = GenericEditorView(glade_path, parent=None, root_widget_name="inst_dialog")
    view._tooltips = {
        "inst_name": _("The full name of the institution."),
        "inst_abbr": _("The standard abbreviation of the " "institution."),
        "inst_code": _("The intitution code should be unique among " "all institions."),
        "inst_contact": _("The name of the person to contact for " "information related to the institution."),
        "inst_tech": _(
            "The email address or phone number of the "
            "person to contact for technical "
            "information related to the institution."
        ),
        "inst_email": _("The email address of the institution."),
        "inst_tel": _("The telephone number of the institution."),
        "inst_fax": _("The fax number of the institution."),
        "inst_addr": _("The mailing address of the institition."),
    }

    o = Institution()
    inst_pres = InstitutionPresenter(o, view)
    response = inst_pres.start()
    if response == gtk.RESPONSE_OK:
        o.write()
        inst_pres.commit_changes()
    else:
        inst_pres.session.rollback()
    inst_pres.session.close()
开发者ID:Ghini,项目名称:ghini.desktop,代码行数:36,代码来源:institution.py


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