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


Python MessageArea.show_message方法代码示例

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


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

示例1: fail

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
        def fail(obj, result, _user_data):
            prog.message(_("Failed"))

            self.unset_op(device)
            logging.warning("fail %s" % result)
            msg, tb = e_(result.message)
            MessageArea.show_message(_("Connection Failed: ") + msg, tb)
开发者ID:cschramm,项目名称:blueman,代码行数:9,代码来源:ManagerDeviceMenu.py

示例2: inquiry

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
    def inquiry(self):
        def prop_changed(lst, adapter, key_value):
            key, value = key_value
            if key == "Discovering" and not value:
                prog.finalize()
                self.List.disconnect(s1)
                self.List.disconnect(s2)

        def on_progress(lst, frac):
            if abs(1.0 - frac) <= 0.00001:
                if not prog.started():
                    prog.start()
            else:
                prog.fraction(frac)

        prog = ManagerProgressbar(self, text=_("Searching"))
        prog.connect("cancelled", lambda x: self.List.stop_discovery())
        try:
            self.List.discover_devices()
        except Exception as e:
            prog.finalize()
            MessageArea.show_message(*e_(e))

        s1 = self.List.connect("discovery-progress", on_progress)
        s2 = self.List.connect("adapter-property-changed", prop_changed)
开发者ID:infirit,项目名称:blueman,代码行数:27,代码来源:Manager.py

示例3: success

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
        def success(obj, result, _user_data):
            logging.info("success")
            prog.message(_("Success!"))

            if isinstance(service, SerialPort) and SERIAL_PORT_SVCLASS_ID == service.short_uuid:
                MessageArea.show_message(_("Serial port connected to %s") % result, None, "dialog-information")
            else:
                MessageArea.close()

            self.unset_op(device)
开发者ID:cschramm,项目名称:blueman,代码行数:12,代码来源:ManagerDeviceMenu.py

示例4: success

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
        def success(*args2):
            dprint("success", " ".join(args2))
            prog.message(_("Success!"))

            if isinstance(service, SerialPort) and SERIAL_PORT_SVCLASS_ID == uuid128_to_uuid16(service.uuid):
                MessageArea.show_message(_("Serial port connected to %s") % args2[0], "dialog-information")
            else:
                MessageArea.close()

            self.unset_op(device)
开发者ID:KunLiu1210,项目名称:blueman,代码行数:12,代码来源:ManagerDeviceMenu.py

示例5: success

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
        def success(obj, result, _user_data):
            dprint("success")
            prog.message(_("Success!"))

            if isinstance(service, SerialPort) and SERIAL_PORT_SVCLASS_ID == uuid128_to_uuid16(service.uuid):
                MessageArea.show_message(_("Serial port connected to %s") % result, "dialog-information")
            else:
                MessageArea.close()

            self.unset_op(device)
开发者ID:yars068,项目名称:blueman,代码行数:12,代码来源:ManagerDeviceMenu.py

示例6: success

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
        def success(*args2):
            try:
                uuid16 = sdp_get_serial_type(device.Address, args[0])
            except:
                uuid16 = 0

            dprint("success", args2)
            prog.message(_("Success!"))

            if service_id == "serial" and SERIAL_PORT_SVCLASS_ID in uuid16:
                MessageArea.show_message(_("Serial port connected to %s") % args2[0], "dialog-information")
            else:
                MessageArea.close()

            self.unset_op(device)
开发者ID:GinoM,项目名称:blueman,代码行数:17,代码来源:ManagerDeviceMenu.py

示例7: error

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
				def error(*args):
					self.unset_op(device)
					prog.message(_("Fail"))
					MessageArea.show_message(e_(str(args[0])))					
开发者ID:hackerharp,项目名称:blueman,代码行数:6,代码来源:ManagerDeviceMenu.py

示例8: fail

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
		def fail(*args):
			prog.message(_("Failed"))
			
			self.unset_op(device)
			dprint("fail", args)
			MessageArea.show_message(_("Connection Failed: ") + e_(str(args[0])))
开发者ID:hackerharp,项目名称:blueman,代码行数:8,代码来源:ManagerDeviceMenu.py

示例9: error

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
				def error(*args):
					dprint("err", args)
					prog_msg(_("Fail"))
					MessageArea.show_message(e_(str(args[0])))					
开发者ID:namili,项目名称:blueman,代码行数:6,代码来源:ManagerDeviceMenu.py

示例10: err

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
 def err(obj, result, user_date):
     logging.warning("disconnect failed %s" % result)
     msg, tb = e_(result.message)
     MessageArea.show_message(_("Disconnection Failed: ") + msg, tb)
     self.Generate()
开发者ID:cschramm,项目名称:blueman,代码行数:7,代码来源:ManagerDeviceMenu.py

示例11: on_result

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
 def on_result(res):
     if not res:
         MessageArea.show_message(_("Failed to change profile to %s" % profile))
开发者ID:KunLiu1210,项目名称:blueman,代码行数:5,代码来源:PulseAudioProfile.py

示例12: fail

# 需要导入模块: from blueman.gui.MessageArea import MessageArea [as 别名]
# 或者: from blueman.gui.MessageArea.MessageArea import show_message [as 别名]
        def fail(obj, result, _user_data):
            prog.message(_("Failed"))

            self.unset_op(device)
            dprint("fail", result)
            MessageArea.show_message(_("Connection Failed: ") + e_(str(result.message)))
开发者ID:yars068,项目名称:blueman,代码行数:8,代码来源:ManagerDeviceMenu.py


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