Show confidential meeting details setting added
[qtmeetings] / src / UserInterface / Views / MeetingInfoDialog.cpp
index 9a08de9..760eca9 100644 (file)
@@ -1,7 +1,10 @@
 #include "MeetingInfoDialog.h"
+
 #include "ToolBox.h"
 #include "Meeting.h"
 #include "Room.h"
+#include "Configuration.h"
+
 #include <QLabel>
 #include <QVBoxLayout>
 #include <QPushButton>
@@ -43,11 +46,30 @@ void MeetingInfoDialog::createDialogView(Meeting *aMeeting)
        boldFont.setBold( true );
 
        QLabel *subjectLabel = ToolBox::createLabel( tr( "Subject:" ), boldFont );
-       QLabel *subjectContent = ToolBox::createLabel( aMeeting->subject(), normalFont );
+       QLabel *subjectContent = new QLabel();
+       subjectContent->setFont( normalFont );
 
        QLabel *descriptionLabel = ToolBox::createLabel( tr( "Description:" ), boldFont );
        QTextEdit *descriptionContent = new QTextEdit( "" );
-       descriptionContent->setHtml( aMeeting->description() );
+
+       if( Configuration::instance()->showConfidentialMeetingDetails() )
+       {
+               subjectContent->setText( aMeeting->subject() );
+               descriptionContent->setHtml( aMeeting->description() );
+       }
+
+       if( subjectContent->text().isEmpty() )
+       {
+               subjectContent->setText( tr( "Room reserved", "Meeting Info Subject" ) ); // default subject text
+       }
+
+       qDebug() << "############ Desc: " << descriptionContent->toPlainText().trimmed();
+
+       if( descriptionContent->toPlainText().trimmed().isEmpty() )
+       {
+               descriptionContent->setPlainText( tr( "Room reserved", "Meeting Info Description" ) ); // default description text
+       }
+
        descriptionContent->setReadOnly( true );
        descriptionContent->setFont( normalFont );