Clean up MainWindow removed unused headers and not needed SMPlayer entries

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1516 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-08-10 23:44:46 +00:00
parent a2e9054cac
commit e7b289b367
2 changed files with 18 additions and 62 deletions

View File

@ -43,9 +43,6 @@
#include "MessengerWindow.h" #include "MessengerWindow.h"
#include "HelpDialog.h" #include "HelpDialog.h"
#include "games/qbackgammon/bgwindow.h"
//#include "smplayer.h"
#ifdef TURTLE_HOPPING #ifdef TURTLE_HOPPING
#include "gui/TurtleSearchDialog.h" #include "gui/TurtleSearchDialog.h"
#endif #endif
@ -102,7 +99,6 @@
#define IMAGE_PHOTO ":/images/lphoto.png" #define IMAGE_PHOTO ":/images/lphoto.png"
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png" #define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
#define IMAGE_ADDFRIEND ":/images/add-friend24.png" #define IMAGE_ADDFRIEND ":/images/add-friend24.png"
//#define IMAGE_INVITEFRIEND ":/images/invite-friend24.png"
#define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png" #define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png"
#define IMAGE_OPTIONS ":/images/settings.png" #define IMAGE_OPTIONS ":/images/settings.png"
#define IMAGE_QUIT ":/images/exit_24x24.png" #define IMAGE_QUIT ":/images/exit_24x24.png"
@ -117,9 +113,6 @@
#define IMAGE_TWOONLINE ":/images/rstray2.png" #define IMAGE_TWOONLINE ":/images/rstray2.png"
/* Keys for UI Preferences */
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit"
/** Constructor */ /** Constructor */
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
: RWindow("MainWindow", parent, flags) : RWindow("MainWindow", parent, flags)
@ -139,8 +132,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
} }
setWindowTitle(tr("RetroShare %1 a secure decentralised commmunication platform").arg(version)); setWindowTitle(tr("RetroShare %1 a secure decentralised commmunication platform").arg(version));
mSMPlayer = NULL;
// Setting icons // Setting icons
this->setWindowIcon(QIcon(QString::fromUtf8(":/images/rstray3.png"))); this->setWindowIcon(QIcon(QString::fromUtf8(":/images/rstray3.png")));
@ -180,29 +171,22 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(peersDialog = new PeersDialog(ui.stackPages), ui.stackPages->add(peersDialog = new PeersDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_PEERS), tr("Friends"), grp)); createPageAction(QIcon(IMAGE_PEERS), tr("Friends"), grp));
//PeersFeed *peersFeed = NULL;
//ui.stackPages->add(peersFeed = new PeersFeed(ui.stackPages),
// createPageAction(QIcon(IMAGE_PEERS), tr("Peers"), grp));
#ifdef TURTLE_HOPPING #ifdef TURTLE_HOPPING
ui.stackPages->add(turtleDialog = new TurtleSearchDialog(ui.stackPages), ui.stackPages->add(turtleDialog = new TurtleSearchDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_TURTLE), tr("Turtle"), grp)); createPageAction(QIcon(IMAGE_TURTLE), tr("Turtle"), grp));
#endif #endif
ui.stackPages->add(searchDialog = new SearchDialog(ui.stackPages), ui.stackPages->add(searchDialog = new SearchDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_SEARCH), tr("Search"), grp)); createPageAction(QIcon(IMAGE_SEARCH), tr("Search"), grp));
ui.stackPages->add(transfersDialog = new TransfersDialog(ui.stackPages), ui.stackPages->add(transfersDialog = new TransfersDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_TRANSFERS), tr("Transfers"), grp)); createPageAction(QIcon(IMAGE_TRANSFERS), tr("Transfers"), grp));
//TransferFeed *transferFeed = NULL;
//ui.stackPages->add(transferFeed = new TransferFeed(ui.stackPages),
// createPageAction(QIcon(IMAGE_LINKS), tr("Transfers"), grp));
ui.stackPages->add(sharedfilesDialog = new SharedFilesDialog(ui.stackPages), ui.stackPages->add(sharedfilesDialog = new SharedFilesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_FILES), tr("Files"), grp)); createPageAction(QIcon(IMAGE_FILES), tr("Files"), grp));
//MsgFeed *msgFeed = NULL;
//ui.stackPages->add(msgFeed = new MsgFeed(ui.stackPages),
// createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));
ui.stackPages->add(messagesDialog = new MessagesDialog(ui.stackPages), ui.stackPages->add(messagesDialog = new MessagesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp)); createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));
@ -268,7 +252,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
connect(sharedfilesDialog, SIGNAL(playFiles( QStringList )), this, SLOT(playFiles( QStringList ))); connect(sharedfilesDialog, SIGNAL(playFiles( QStringList )), this, SLOT(playFiles( QStringList )));
connect(transfersDialog, SIGNAL(playFiles( QStringList )), this, SLOT(playFiles( QStringList ))); connect(transfersDialog, SIGNAL(playFiles( QStringList )), this, SLOT(playFiles( QStringList )));
/** StatusBar section **/ /** StatusBar section ********/
peerstatus = new PeerStatus(); peerstatus = new PeerStatus();
statusBar()->addWidget(peerstatus); statusBar()->addWidget(peerstatus);
@ -299,7 +283,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ratesstatus = new RatesStatus(); ratesstatus = new RatesStatus();
statusBar()->addPermanentWidget(ratesstatus); statusBar()->addPermanentWidget(ratesstatus);
/******* Status Bar end ******/ /** Status Bar end ******/
/* Create the actions that will go in the tray menu */ /* Create the actions that will go in the tray menu */
createActions(); createActions();
@ -314,7 +298,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
tr("System tray unavailable")); tr("System tray unavailable"));
******/ ******/
// Tray icon Menu /** Tray icon Menu **/
menu = new QMenu(this); menu = new QMenu(this);
QObject::connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu())); QObject::connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
toggleVisibilityAction = toggleVisibilityAction =
@ -324,7 +308,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
menu->addAction(_messagesAct); menu->addAction(_messagesAct);
menu->addAction(_bandwidthAct); menu->addAction(_bandwidthAct);
/* bandwidth only in development version */
#ifdef RS_RELEASE_VERSION #ifdef RS_RELEASE_VERSION
#else #else
menu->addAction(_appAct); menu->addAction(_appAct);
@ -336,7 +319,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
menu->addAction(QIcon(IMAGE_MAXIMIZE), tr("Maximize"), this, SLOT(showMaximized())); menu->addAction(QIcon(IMAGE_MAXIMIZE), tr("Maximize"), this, SLOT(showMaximized()));
menu->addSeparator(); menu->addSeparator();
menu->addAction(QIcon(IMAGE_CLOSE), tr("&Quit"), this, SLOT(doQuit())); menu->addAction(QIcon(IMAGE_CLOSE), tr("&Quit"), this, SLOT(doQuit()));
// End of Icon Menu /** End of Icon Menu **/
// Create the tray icon // Create the tray icon
trayIcon = new QSystemTrayIcon(this); trayIcon = new QSystemTrayIcon(this);
@ -628,24 +611,6 @@ void MainWindow::loadStyleSheet(const QString &sheetName)
} }
/** Shows smplayer */
void MainWindow::showsmplayer()
{
return;
#if 0
if (mSMPlayer == 0)
{
mSMPlayer = new SMPlayer(QString::null, this);
mSMPlayer->gui()->hide();
}
else
{
mSMPlayer->gui()->show();
}
#endif
}
void MainWindow::playFiles(QStringList files) void MainWindow::playFiles(QStringList files)
{ {
std::cerr << "MainWindow::playFiles() Can only play first currently" << std::endl; std::cerr << "MainWindow::playFiles() Can only play first currently" << std::endl;

View File

@ -27,7 +27,6 @@
#include <QFileDialog> #include <QFileDialog>
#include <QSystemTrayIcon> #include <QSystemTrayIcon>
#include "NetworkDialog.h" #include "NetworkDialog.h"
#include "PeersDialog.h" #include "PeersDialog.h"
#include "SearchDialog.h" #include "SearchDialog.h"
@ -38,25 +37,20 @@
#include "MessengerWindow.h" #include "MessengerWindow.h"
#include "ApplicationWindow.h" #include "ApplicationWindow.h"
#include "PluginsPage.h" #include "PluginsPage.h"
#ifdef TURTLE_HOPPING #ifdef TURTLE_HOPPING
#include "TurtleSearchDialog.h" #include "TurtleSearchDialog.h"
#endif #endif
#include "Preferences/PreferencesWindow.h" #include "Preferences/PreferencesWindow.h"
#include "Preferences/rsharesettings.h"
#include "bwgraph/bwgraph.h" #include "bwgraph/bwgraph.h"
#include "help/browser/helpbrowser.h" #include "help/browser/helpbrowser.h"
#include "games/qbackgammon/bgwindow.h"
#include "Preferences/ConfirmQuitDialog.h"
#include "channels/channelsDialog.h" #include "channels/channelsDialog.h"
#include "ui_MainWindow.h" #include "ui_MainWindow.h"
#include "Preferences/rsharesettings.h"
class SMPlayer;
class PeerStatus; class PeerStatus;
class DHTStatus; class DHTStatus;
@ -72,15 +66,15 @@ class MainWindow : public RWindow
public: public:
/** Main dialog pages. */ /** Main dialog pages. */
enum Page { enum Page {
Network = 0, /** Network page. */ Network = 0, /** Network page. */
Friends, /** Peers page. */ Friends, /** Peers page. */
Search, /** Search page. */ Search, /** Search page. */
Transfers, /** Transfers page. */ Transfers, /** Transfers page. */
SharedDirectories, /** Shared Directories page. */ SharedDirectories, /** Shared Directories page. */
Messages, /** Messages page. */ Messages, /** Messages page. */
Links, /** Links page. */ Links, /** Links page. */
Channels, /** Channels page. */ Channels, /** Channels page. */
Forums /** Forums page. */ Forums /** Forums page. */
}; };
@ -111,7 +105,6 @@ public:
ApplicationWindow *applicationWindow; ApplicationWindow *applicationWindow;
PluginsPage* pluginsPage ; PluginsPage* pluginsPage ;
SMPlayer * mSMPlayer;
public slots: public slots:
/** Called when this dialog is to be displayed */ /** Called when this dialog is to be displayed */
@ -135,7 +128,6 @@ private slots:
void addFriend(); void addFriend();
void showMessengerWindow(); void showMessengerWindow();
void showApplWindow(); void showApplWindow();
void showsmplayer();
void showabout(); void showabout();
void openShareManager(); void openShareManager();
void displaySystrayMsg(const QString&,const QString&) ; void displaySystrayMsg(const QString&,const QString&) ;
@ -203,7 +195,6 @@ private:
QAction *toggleVisibilityAction, *toolAct; QAction *toggleVisibilityAction, *toolAct;
QMenu *menu; QMenu *menu;
//QLabel *statusRates;
PeerStatus *peerstatus; PeerStatus *peerstatus;
DHTStatus *dhtstatus; DHTStatus *dhtstatus;
NATStatus *natstatus; NATStatus *natstatus;