Permalink
Browse files

notifications might only have an image without a 'message'.

  • Loading branch information...
jpoet committed Feb 25, 2014
1 parent ff70132 commit 1793e7aeb18af332e601fc7353bf12c8ea128692
Showing with 6 additions and 5 deletions.
  1. +4 −3 mythtv/libs/libmythui/mythudplistener.cpp
  2. +2 −2 mythtv/programs/mythutil/messageutils.cpp
@@ -159,17 +159,18 @@ void MythUDPListener::Process(const QByteArray &buf, QHostAddress sender,
n = n.nextSibling();
}
- if (!msg.isEmpty())
+ if (!msg.isEmpty() || !image.isEmpty() || !extra.isEmpty())
{
LOG(VB_GENERAL, LOG_INFO, QString("Received %1 '%2', timeout %3")
- .arg(notification ? "notification" : "message").arg(msg).arg(timeout));
+ .arg(notification ? "notification" : "message")
+ .arg(msg).arg(timeout));
if (timeout > 1000)
timeout = notification ? 5 : 0;
if (notification)
{
origin = origin.isNull() ? tr("UDP Listener") : origin;
ShowNotification(error ? MythNotification::Error :
- MythNotification::TypeFromString(type),
+ MythNotification::TypeFromString(type),
msg, origin, description, image, extra,
progress_text, progress, timeout, fullscreen,
visibility);
@@ -55,7 +55,7 @@ static int SendMessage(const MythUtilCommandLineParser &cmdline)
unsigned short port = 6948;
QString name = cmdline.GetPassthrough();
bool notification = cmdline.toBool("notification");
- QString text = "message";
+ QString text /* = "message" */ ;
QString timeout = "0";
QString image = "";
QString origin = "MythUtils";
@@ -152,7 +152,7 @@ static int SendMessage(const MythUtilCommandLineParser &cmdline)
}
sock->deleteLater();
-
+
return result;
}

0 comments on commit 1793e7a

Please sign in to comment.