[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ring-kde] src: ux: Hide the video dock when there is no calls
From: Emmanuel Lepage Vallee <emmanuel.lepage () savoirfairelinux ! com>
Date: 2015-04-30 23:38:47
Message-ID: E1Yny2Z-0002N8-7K () scm ! kde ! org
[Download RAW message or body]
Git commit 13eccbb830483cbce0855cf407902bb64462c151 by Emmanuel Lepage Vallee.
Committed on 30/04/2015 at 23:38.
Pushed by lepagevalleeemmanuel into branch 'master'.
ux: Hide the video dock when there is no calls
Refs #71995
M +14 -2 src/ring.cpp
M +1 -0 src/ring.h
M +1 -0 src/widgets/bookmarkdock.cpp
http://commits.kde.org/ring-kde/13eccbb830483cbce0855cf407902bb64462c151
diff --git a/src/ring.cpp b/src/ring.cpp
index 0e6ac3d..e0a6628 100644
--- a/src/ring.cpp
+++ b/src/ring.cpp
@@ -72,6 +72,7 @@
#include "extensions/presencecollectionextension.h"
#include "delegates/profilepersisterdelegate.h"
#include "klib/kdeprofilepersistor.h"
+#include "video/renderer.h"
//Ring
@@ -271,7 +272,8 @@ Ring::Ring(QWidget* parent)
connect(CallModel::instance()->selectionModel(),SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),this,SLOT(selectCallTab()));
#ifdef ENABLE_VIDEO
- connect(CallModel::instance(),SIGNAL(rendererAdded(Call*,Video::Renderer*)),this,SLOT(displayVideoDock(Call*,Video::Renderer*)));
+ connect(CallModel::instance(),&CallModel::rendererAdded,this,&Ring::displayVideoDock);
+ connect(CallModel::instance(),&CallModel::rendererRemoved,this,&Ring::hideVideoDock);
#endif
statusBar()->addWidget(m_pStatusBarWidget);
@@ -586,14 +588,24 @@ void Ring::hidePresenceDock()
void Ring::displayVideoDock(Call* c, Video::Renderer* r)
{
Q_UNUSED(c)
+
if (!m_pVideoDW) {
m_pVideoDW = new VideoDock(this);
addDockWidget( Qt::TopDockWidgetArea, m_pVideoDW );
- m_pVideoDW->setFloating(true);
+// m_pVideoDW->setFloating(true);
}
m_pVideoDW->addRenderer(r);
m_pVideoDW->show();
}
+
+void Ring::hideVideoDock(Call* c, Video::Renderer* r)
+{
+ Q_UNUSED(c)
+ Q_UNUSED(r)
+ if (m_pVideoDW) {
+ m_pVideoDW->hide();
+ }
+}
#endif
///The daemon is not found
diff --git a/src/ring.h b/src/ring.h
index b767837..9a18b2a 100644
--- a/src/ring.h
+++ b/src/ring.h
@@ -132,6 +132,7 @@ private Q_SLOTS:
void slotPresenceEnabled ( bool state );
#ifdef ENABLE_VIDEO
void displayVideoDock ( Call* c, Video::Renderer* r );
+ void hideVideoDock ( Call* c, Video::Renderer* r );
#endif
public Q_SLOTS:
diff --git a/src/widgets/bookmarkdock.cpp b/src/widgets/bookmarkdock.cpp
index fb5ffcf..ff8481f 100644
--- a/src/widgets/bookmarkdock.cpp
+++ b/src/widgets/bookmarkdock.cpp
@@ -94,6 +94,7 @@ m_pBookmark(nullptr)
setWidget(mainWidget);
m_pMostUsedCK->setText(i18n("Show most called contacts"));
+ m_pMostUsedCK->setVisible(false); //FIXME
m_pTopWidget->layout()->addWidget ( m_pMostUsedCK );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic