Merge branch 'Video-Player-page-for-MainWindow' into master

This commit is contained in:
defnax 2020-02-22 17:59:20 +01:00 committed by GitHub
commit 3e7f670203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 399 additions and 29 deletions

View file

@ -57,6 +57,7 @@
#include "chat/ChatDialog.h"
#include "RetroShareLink.h"
#include "SoundManager.h"
#include "PlayerPage.h"
#include "notifyqt.h"
#include "common/UserNotify.h"
#include "gui/ServicePermissionDialog.h"
@ -189,6 +190,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
gxschannelDialog=NULL;
gxsforumDialog=NULL;
postedDialog=NULL;
playerDialog=NULL;
/* Invoke the Qt Designer generated QObject setup routine */
ui->setupUi(this);
@ -416,6 +418,7 @@ void MainWindow::initStackedPage()
addPage(gxschannelDialog = new GxsChannelDialog(ui->stackPages), grp, &notify);
addPage(gxsforumDialog = new GxsForumsDialog(ui->stackPages), grp, &notify);
addPage(postedDialog = new PostedDialog(ui->stackPages), grp, &notify);
addPage(playerDialog = new PlayerPage(ui->stackPages), grp, NULL);
#ifdef RS_USE_NEW_PEOPLE_DIALOG
PeopleDialog *peopleDialog = NULL;
@ -994,6 +997,9 @@ void SetForegroundWindowInternal(HWND hWnd)
case Posted:
_instance->ui->stackPages->setCurrentPage( _instance->postedDialog );
return true ;
case Player:
_instance->ui->stackPages->setCurrentPage( _instance->playerDialog );
return true ;
default:
std::cerr << "Show page called on value that is not handled yet. Please code it! (value = " << page << ")" << std::endl;
}
@ -1076,6 +1082,8 @@ void SetForegroundWindowInternal(HWND hWnd)
return _instance->gxsforumDialog;
case Posted:
return _instance->postedDialog;
case Player:
return _instance->playerDialog;
}
return NULL;