summary refs log tree commit diff
path: root/src/TextInputWidget.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-08-14 01:03:27 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-08-14 01:03:27 +0200
commitf157602a52278519370c45cde4c9a0b12ede8d7e (patch)
tree26aaa10a71a1f44117605d4248c670a359427bb5 /src/TextInputWidget.cpp
parentBump flatpak dependency (diff)
downloadnheko-f157602a52278519370c45cde4c9a0b12ede8d7e.tar.xz
Disable call support, when GStreamer is unavailable
Integrating that in our CI is currently a bit hard, so disable it for
now, if GStreamer isn't found. Just make sure to build against GStreamer
for call support!
Diffstat (limited to 'src/TextInputWidget.cpp')
-rw-r--r--src/TextInputWidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp

index 9aadc101..a3392170 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp
@@ -453,12 +453,14 @@ TextInputWidget::TextInputWidget(QWidget *parent) topLayout_->setSpacing(0); topLayout_->setContentsMargins(13, 1, 13, 0); +#ifdef GSTREAMER_AVAILABLE callBtn_ = new FlatButton(this); changeCallButtonState(WebRTCSession::State::DISCONNECTED); connect(&WebRTCSession::instance(), &WebRTCSession::stateChanged, this, &TextInputWidget::changeCallButtonState); +#endif QIcon send_file_icon; send_file_icon.addFile(":/icons/icons/ui/paper-clip-outline.png"); @@ -528,7 +530,9 @@ TextInputWidget::TextInputWidget(QWidget *parent) emojiBtn_->setIcon(emoji_icon); emojiBtn_->setIconSize(QSize(ButtonHeight, ButtonHeight)); +#ifdef GSTREAMER_AVAILABLE topLayout_->addWidget(callBtn_); +#endif topLayout_->addWidget(sendFileBtn_); topLayout_->addWidget(input_); topLayout_->addWidget(emojiBtn_); @@ -536,7 +540,9 @@ TextInputWidget::TextInputWidget(QWidget *parent) setLayout(topLayout_); +#ifdef GSTREAMER_AVAILABLE connect(callBtn_, &FlatButton::clicked, this, &TextInputWidget::callButtonPress); +#endif connect(sendMessageBtn_, &FlatButton::clicked, input_, &FilteredTextEdit::submit); connect(sendFileBtn_, SIGNAL(clicked()), this, SLOT(openFileSelection())); connect(input_, &FilteredTextEdit::message, this, &TextInputWidget::sendTextMessage);