summaryrefslogtreecommitdiff
path: root/liblightdm-qt
diff options
context:
space:
mode:
authorChristian Seiler <christian@iwakd.de>2014-02-06 19:47:08 +0100
committerChristian Seiler <christian@iwakd.de>2014-02-06 19:47:08 +0100
commite275b0c51fb06caa2322d67f0540d89bb941e4ab (patch)
tree7104674dcff22ad7661e0ab47c66e018f761e419 /liblightdm-qt
parent88a5b49a0141562e609de6506bfb4d5e88cd1b88 (diff)
downloadlightdm-e275b0c51fb06caa2322d67f0540d89bb941e4ab.tar.gz
Qt bindings: properly hand over prompt and message type
For the showPrompt/showMessage signals, properly hand over the prompt and message types from the underlying glib signals.
Diffstat (limited to 'liblightdm-qt')
-rw-r--r--liblightdm-qt/greeter.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/liblightdm-qt/greeter.cpp b/liblightdm-qt/greeter.cpp
index 8fb287ff..875cac06 100644
--- a/liblightdm-qt/greeter.cpp
+++ b/liblightdm-qt/greeter.cpp
@@ -59,9 +59,8 @@ void GreeterPrivate::cb_showPrompt(LightDMGreeter *greeter, const gchar *text, L
GreeterPrivate *that = static_cast<GreeterPrivate*>(data);
QString message = QString::fromUtf8(text);
- //FIXME prompt type
-
- Q_EMIT that->q_func()->showPrompt(message, Greeter::PromptTypeSecret);
+ Q_EMIT that->q_func()->showPrompt(message, type == LIGHTDM_PROMPT_TYPE_QUESTION ?
+ Greeter::PromptTypeQuestion : Greeter::PromptTypeSecret);
}
void GreeterPrivate::cb_showMessage(LightDMGreeter *greeter, const gchar *text, LightDMMessageType type, gpointer data)
@@ -71,9 +70,8 @@ void GreeterPrivate::cb_showMessage(LightDMGreeter *greeter, const gchar *text,
GreeterPrivate *that = static_cast<GreeterPrivate*>(data);
QString message = QString::fromUtf8(text);
- //FIXME prompt type
-
- Q_EMIT that->q_func()->showMessage(message, Greeter::MessageTypeInfo);
+ Q_EMIT that->q_func()->showMessage(message, type == LIGHTDM_MESSAGE_TYPE_INFO ?
+ Greeter::MessageTypeInfo : Greeter::MessageTypeError);
}
void GreeterPrivate::cb_authenticationComplete(LightDMGreeter *greeter, gpointer data)