Tweaks to the GUI side.

* Fixed the fonts, and default entries in GamesLauncher.
 * Shifted all the unfinished stuff to "In Development" section.
 * Fixed smplayer/rs project files.
 * duplicate variable in p3connmgr.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@371 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-03 14:12:39 +00:00
parent 85aa75ef5d
commit 9e954e9c0f
7 changed files with 55 additions and 123 deletions

View File

@ -1517,7 +1517,6 @@ void p3ConnectMgr::peerStatus(std::string id,
#ifndef P3CONNMGR_NO_TCP_CONNECTIONS
time_t now = time(NULL);
/* add in attempts ... local(TCP), remote(TCP)
* udp must come from notify
*/

View File

@ -315,12 +315,12 @@ win32 {
"LIBS += -L"../../winlibs" -lretroshare -lssl -lcrypto -lpthreadGC2d -lKadC -lminiupnpc -lz -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lskin -lqcheckers -lsmplayer -lgdi32
CONFIG += qt release"
LIBS += libole32
LIBS += -lole32
}
!win32 {
LIBS += -L../../../../lib -lretroshare -lKadC -lminiupnpc -lssl -lcrypto
LIBS += -lqcheckers -lsmplayer -lole32
LIBS += -lqcheckers -lsmplayer
}

View File

@ -3,6 +3,7 @@ CONFIG += staticlib
DESTDIR = lib
LANGUAGE = C++
CONFIG += release
#CONFIG += qt warn_on release
QT += network

View File

@ -43,6 +43,10 @@
#include "LinksDialog.h"
#include "GamesDialog.h"
#include "PhotoDialog.h"
#include "channels/channelsDialog.h"
/* for smplayer */
#include "smplayer.h"
#define FONT QFont(tr("Arial"), 8)
@ -63,6 +67,8 @@
#define IMAGE_RSM32 ":/images/rsmessenger32.png"
#define IMAGE_RSM16 ":/images/rsmessenger16.png"
#define IMAGE_CLOSE ":/images/close_normal.png"
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
/* Keys for UI Preferences */
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit"
@ -82,7 +88,6 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
this->setWindowIcon(QIcon(QString::fromUtf8(":/images/RetroShare16.png")));
loadStyleSheet("Default");
/* Create the config pages and actions */
QActionGroup *grp = new QActionGroup(this);
@ -90,37 +95,22 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_TRANSFERS), tr("Links Cloud"), grp));
// ui.stackPages->add(exampleDialog = new ExampleDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_MESSAGES), tr("Example Application"), grp));
ChannelsDialog *channelsDialog = NULL;
ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
GamesDialog *gamesDialog = NULL;
ui.stackPages->add(gamesDialog = new GamesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Games Launcher"), grp));
// PhotoDialog *photoDialog = NULL;
// ui.stackPages->add(photoDialog = new PhotoDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_MESSAGES), tr("Photo View"), grp));
//ui.stackPages->add(groupsDialog = new GroupsDialog(ui.stackPages),
// createPageAction(QIcon(), tr("Groups"), grp));
//ui.stackPages->add(new StatisticDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_STATISTIC), tr("Statistics"), grp));
// statusBar()->addWidget(new QLabel(tr("Application Users: 0 Files: 0 ")));
// statusBar()->addPermanentWidget(new QLabel(tr("Down: 0.0 Up: 0.0 ")));
// statusBar()->addPermanentWidget(new QLabel(tr("Connections: 0/45 ")));
/* Create the toolbar */
ui.toolBar->addActions(grp->actions());
ui.toolBar->addSeparator();
connect(grp, SIGNAL(triggered(QAction *)), ui.stackPages, SLOT(showPage(QAction *)));
/* Create and bind the messenger button */
//addAction(new QAction(QIcon(IMAGE_RSM32), tr("Messenger"), ui.toolBar), SLOT(showMessengerWindow()));
addAction(new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), ui.toolBar), SLOT(showsmplayer()));
}
@ -232,4 +222,15 @@ void ApplicationWindow::loadStyleSheet(const QString &sheetName)
}
/** Shows smplayer */
void ApplicationWindow::showsmplayer()
{
static SMPlayer * smplayer = 0;
if (smplayer == 0) {
smplayer = new SMPlayer(QString::null, this);
}
smplayer->gui()->show();
}

View File

@ -73,7 +73,6 @@ public slots:
/** Shows the config dialog with focus set to the given page. */
void show(Page page);
private slots:
@ -82,6 +81,8 @@ private slots:
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
void toggleVisibilitycontextmenu();
void showsmplayer();
protected:
void closeEvent(QCloseEvent *);

View File

@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>578</width>
<width>598</width>
<height>519</height>
</rect>
</property>
@ -23,7 +23,7 @@
<widget class="QLabel" name="label" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -35,37 +35,17 @@
<widget class="QComboBox" name="gameComboBox" >
<item>
<property name="text" >
<string>QtChess</string>
<string>GameType: 0. Want to Add your Game here?</string>
</property>
</item>
<item>
<property name="text" >
<string>Backgammon</string>
<string>GameType: 1. Get In Touch with the developers</string>
</property>
</item>
<item>
<property name="text" >
<string>QGo</string>
</property>
</item>
<item>
<property name="text" >
<string>Snakes</string>
</property>
</item>
<item>
<property name="text" >
<string>BigTwo</string>
</property>
</item>
<item>
<property name="text" >
<string>Poker</string>
</property>
</item>
<item>
<property name="text" >
<string>Checkers</string>
<string>GameType: 2.</string>
</property>
</item>
</widget>
@ -78,7 +58,7 @@
<widget class="QLabel" name="label_4" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -110,7 +90,7 @@
<widget class="QPushButton" name="createButton" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -125,7 +105,7 @@
<widget class="QCheckBox" name="checkInviteAll" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -184,23 +164,6 @@
<string>GameID</string>
</property>
</column>
<item>
<property name="text" >
<string>QtChess</string>
</property>
<property name="text" >
<string>DrBob</string>
</property>
<property name="text" >
<string>Invites</string>
</property>
<property name="text" >
<string>2</string>
</property>
<property name="text" >
<string/>
</property>
</item>
</widget>
<widget class="QTreeWidget" name="peertreeWidget" >
<property name="contextMenuPolicy" >
@ -226,34 +189,6 @@
<string>Accept</string>
</property>
</column>
<item>
<property name="text" >
<string>Pauly</string>
</property>
<property name="text" >
<string>Yes</string>
</property>
<property name="text" >
<string>Yes</string>
</property>
<property name="text" >
<string>Yes</string>
</property>
</item>
<item>
<property name="text" >
<string>New Item</string>
</property>
<property name="text" >
<string/>
</property>
<property name="text" >
<string/>
</property>
<property name="text" >
<string>Np</string>
</property>
</item>
</widget>
</widget>
</item>
@ -263,7 +198,7 @@
<widget class="QPushButton" name="deleteButton" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -278,7 +213,7 @@
<widget class="QPushButton" name="inviteButton" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -293,7 +228,7 @@
<widget class="QPushButton" name="moveUpButton" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -308,7 +243,7 @@
<widget class="QPushButton" name="moveDownButton" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >
@ -323,7 +258,7 @@
<widget class="QPushButton" name="playButton" >
<property name="font" >
<font>
<pointsize>14</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" >

View File

@ -65,7 +65,7 @@
#define IMAGE_RSM32 ":/images/rsmessenger32.png"
#define IMAGE_RSM16 ":/images/rsmessenger16.png"
#define IMAGE_CLOSE ":/images/close_normal.png"
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
/* Keys for UI Preferences */
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit"
@ -75,13 +75,6 @@
* #define RS_RELEASE_VERSION 1
****/
/* TEST (1) * friends/neighbours: okay for 16 hours! */
/* TEST (2) * all but transfer/sharedfiles: crashed in under 8 hours! */
/* TEST (3) * friends/neighbour/msg/channels: crashed in under 8 hours */
/* TEST (4) * friends/neighbour/channels: crashes */
/* TEST (5) * all but msg/channels: short term okay*/
/* TEST (5) * all but channels: stable longterm! */
/** Constructor */
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
@ -159,12 +152,13 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(messagesDialog = new MessagesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));
//#ifdef RS_RELEASE_VERSION
// channelsDialog = NULL;
//#else
ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
//#endif
#ifdef RS_RELEASE_VERSION
channelsDialog = NULL;
#else
channelsDialog = NULL;
// ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
#endif
ui.stackPages->add(new HelpDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_ABOUT), tr("About/Help"), grp));
@ -188,13 +182,14 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
addAction(new QAction(QIcon(IMAGE_RSM32), tr("Messenger"), ui.toolBar), SLOT(showMessengerWindow()));
addAction(new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), ui.toolBar), SLOT(showsmplayer()));
//addAction(new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), ui.toolBar), SLOT(showsmplayer()));
#ifdef RS_RELEASE_VERSION
addAction(new QAction(QIcon(IMAGE_PEERS), tr("In Development / New Apps"), ui.toolBar), SLOT(showApplWindow()));
#else
addAction(new QAction(QIcon(IMAGE_PEERS), tr("Apps"), ui.toolBar), SLOT(showApplWindow()));
addAction(new QAction(QIcon(IMAGE_PEERS), tr("In Development / New Apps"), ui.toolBar), SLOT(showApplWindow()));
#endif
#ifdef NO_MORE_OPTIONS_OR_SS
@ -244,7 +239,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
menu->addAction(_bandwidthAct);
#endif
menu->addAction(_prefsAct);
menu->addAction(_smplayerAct);
//menu->addAction(_smplayerAct);
menu->addSeparator();
menu->addAction(tr("Minimize"), this, SLOT(showMinimized()));
menu->addAction(tr("Maximize"), this, SLOT(showMaximized()));
@ -406,7 +401,7 @@ MainWindow::~MainWindow()
delete _prefsAct;
delete _bandwidthGraph;
delete _messengerwindowAct;
delete _smplayerAct;
//delete _smplayerAct;
}
/** Create and bind actions to events. Setup for initial
@ -424,8 +419,8 @@ void MainWindow::createActions()
_messengerwindowAct = new QAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this);
connect(_messengerwindowAct, SIGNAL(triggered()),this, SLOT(showMessengerWindow()));
_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this);
connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer()));
//_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this);
//connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer()));
connect(ui.btntoggletoolbox, SIGNAL(toggled(bool)), this, SLOT(showToolboxFrame(bool)));