Shows system notification message via dbus.

        `title`
            Notification title.
        `message`
            Notification message.
508298
def _dbus_notify(title, message):
    

    try:
        # fetch main account manager interface
        bus = dbus.SessionBus()
        obj = bus.get_object('org.freedesktop.Notifications',
                             '/org/freedesktop/Notifications')
        if obj:
            iface = dbus.Interface(obj, 'org.freedesktop.Notifications')

            if iface:
                # dispatch notification message
                iface.Notify('Focus', 0, '', title, message, [], {}, 5)

    except dbus.exceptions.DBusException:
        pass
975024
def show_toast(self, title="Notification", msg="Here comes the message",
                    icon_path=None, duration=5, threaded=False):
        
        if not threaded:
            self._show_toast(title, msg, icon_path, duration)
        else:
            if self.notification_active():
                # We have an active notification, let is finish so we don't spam them
                return False

            self._thread = threading.Thread(target=self._show_toast, args=(title, msg, icon_path, duration))
            self._thread.start()
        return True
1079866
def message_info(message):
    """"""
    method = message.get('method')
    msgid = message.get('id')
    error = message.get('error')
    if method and msgid is not None:
        return 'method call "{}", id = "{}"'.format(method, msgid)
    elif method:
        return 'notification "{}"'.format(method)
    elif error is not None and msgid is not None:
        return 'error reply to id = "{}"'.format(msgid)
    elif error is not None:
        code = error.get('code', '(none)')
        return 'error reply: {}'.format(errorcode.get(code, code))
    else:
        return 'method return for id = "{}"'.format(msgid)
132331
def showMessageDialog(title, text):
    '''
    
    '''
    dlg = QgsMessageOutput.createMessageOutput()
    dlg.setTitle(title)
    dlg.setMessage(text, QgsMessageOutput.MessageHtml)
    dlg.showMessage()
1060700
def _notify(self, title, message, expected_action=None):
        
        if self.editor is None:
            return
        inital_value = self.editor.save_on_focus_out
        self.editor.save_on_focus_out = False
        self._flg_notify = True
        dlg_type = (QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
        expected_action = (
            lambda *x: None) if not expected_action else expected_action
        if (self._auto_reload or QtWidgets.QMessageBox.question(
                self.editor, title, message, dlg_type,
                QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.Yes):
            expected_action(self.editor.file.path)
        self._update_mtime()
        self.editor.save_on_focus_out = inital_value
422501
static void showWarning(final String caption, final String description) {

        Notification warning = new Notification(caption, description, Type.WARNING_MESSAGE, true);
        warning.setDelayMsec(-1);
        warning.show(UI.getCurrent().getPage());

    }
898226
def notificationResponse():
    """"""
    a = TpPd(pd=0x6)
    b = MessageType(mesType=0x26)  # 00100110
    c = MobileStationClassmark2()
    d = MobileId()
    e = DescriptiveGroupOrBroadcastCallReference()
    packet = a / b / c / d / e
    return packet
578710
def send_notification(self, title, message, typ=1, url=None, sender=None):
        
        self.user.send_notification(title=title, message=message, typ=typ, url=url,
                                    sender=sender)
1001573
public void displayInfo (String bundle, String message, String localtype)
    {
        displaySystem(bundle, message, SystemMessage.INFO, localtype);
    }
840376
def message(self):
        ''' '''
        name = self.__class__.__name__
        return "{0} {1}".format(humanize(name),
                                pp(*self.expectedArgs, **self.expectedKwArgs))
1056808
def _agent_notification(self, context, method, hosting_devices, operation):
        """"""
        admin_context = context.is_admin and context or context.elevated()
        for hosting_device in hosting_devices:
            agents = self._dmplugin.get_cfg_agents_for_hosting_devices(
                admin_context, hosting_device['id'], admin_state_up=True,
                schedule=True)
            for agent in agents:
                LOG.debug('Notify %(agent_type)s at %(topic)s.%(host)s the '
                          'message %(method)s',
                          {'agent_type': agent.agent_type,
                           'topic': agent.topic,
                           'host': agent.host,
                           'method': method})
                cctxt = self.client.prepare(server=agent.host)
                cctxt.cast(context, method)
852206
def _notify(p, **data):
    """"""
    message = data.get("message")
    if not message and not sys.stdin.isatty():
        message = click.get_text_stream("stdin").read()
    data["message"] = message

    data = clean_data(data)

    ctx = click.get_current_context()
    if ctx.obj.get("env_prefix"):
        data["env_prefix"] = ctx.obj["env_prefix"]

    rsp = p.notify(**data)
    rsp.raise_on_errors()
    click.secho(f"Succesfully sent a notification to {p.name}!", fg="green")
984369
def show_warning_messages(self, title=_(u"Incorrect Operation"), box_type='warning'):
        
        msg = self.current.task_data['msg']
        self.current.output['msgbox'] = {'type': box_type, "title": title, "msg": msg}
        del self.current.task_data['msg']
340367
def notice(self, client, message):
        """"""
        if client and message:
            messages = utils.split_message(message, self.config.max_length)
            for msg in messages:
                client.fwrite(':{c.srv} NOTICE {c.nick} :{msg}', msg=msg)
1209990
def notify_user(self, msg, level="info", rate_limit=5, title=None, icon=None):
        
        module_name = self._module.module_full_name
        if isinstance(msg, Composite):
            msg = msg.text()
        if title is None:
            title = "py3status: {}".format(module_name)
        elif isinstance(title, Composite):
            title = title.text()
        # force unicode for python2 str
        if self._is_python_2:
            if isinstance(msg, str):
                msg = msg.decode("utf-8")
            if isinstance(title, str):
                title = title.decode("utf-8")
        if msg:
            self._py3_wrapper.notify_user(
                msg=msg,
                level=level,
                rate_limit=rate_limit,
                module_name=module_name,
                title=title,
                icon=icon,
            )
54424
def notice(self, msg, *args, **kw):
        """"""
        if self.isEnabledFor(NOTICE):
            self._log(NOTICE, msg, args, **kw)
600791
def notify(msg, msg_type=0, t=None):
    msg = msg.replace('"', '\\"')
    ""
    if platform.system() == "Darwin":
        command = notify_command_osx(msg, msg_type, t)
    else:
        command = notify_command_linux(msg, t)

    try:
        subprocess.call(command)
        return True
    except OSError as e:
        return False