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 #ifndef P3CONNMGR_NO_TCP_CONNECTIONS
time_t now = time(NULL);
/* add in attempts ... local(TCP), remote(TCP) /* add in attempts ... local(TCP), remote(TCP)
* udp must come from notify * 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 "LIBS += -L"../../winlibs" -lretroshare -lssl -lcrypto -lpthreadGC2d -lKadC -lminiupnpc -lz -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lskin -lqcheckers -lsmplayer -lgdi32
CONFIG += qt release" CONFIG += qt release"
LIBS += libole32 LIBS += -lole32
} }
!win32 { !win32 {
LIBS += -L../../../../lib -lretroshare -lKadC -lminiupnpc -lssl -lcrypto 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 DESTDIR = lib
LANGUAGE = C++ LANGUAGE = C++
CONFIG += release
#CONFIG += qt warn_on release #CONFIG += qt warn_on release
QT += network QT += network

View file

@ -43,6 +43,10 @@
#include "LinksDialog.h" #include "LinksDialog.h"
#include "GamesDialog.h" #include "GamesDialog.h"
#include "PhotoDialog.h" #include "PhotoDialog.h"
#include "channels/channelsDialog.h"
/* for smplayer */
#include "smplayer.h"
#define FONT QFont(tr("Arial"), 8) #define FONT QFont(tr("Arial"), 8)
@ -63,6 +67,8 @@
#define IMAGE_RSM32 ":/images/rsmessenger32.png" #define IMAGE_RSM32 ":/images/rsmessenger32.png"
#define IMAGE_RSM16 ":/images/rsmessenger16.png" #define IMAGE_RSM16 ":/images/rsmessenger16.png"
#define IMAGE_CLOSE ":/images/close_normal.png" #define IMAGE_CLOSE ":/images/close_normal.png"
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
/* Keys for UI Preferences */ /* Keys for UI Preferences */
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit" #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"))); this->setWindowIcon(QIcon(QString::fromUtf8(":/images/RetroShare16.png")));
loadStyleSheet("Default"); loadStyleSheet("Default");
/* Create the config pages and actions */ /* Create the config pages and actions */
QActionGroup *grp = new QActionGroup(this); QActionGroup *grp = new QActionGroup(this);
@ -90,37 +95,22 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages), ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_TRANSFERS), tr("Links Cloud"), grp)); createPageAction(QIcon(IMAGE_TRANSFERS), tr("Links Cloud"), grp));
// ui.stackPages->add(exampleDialog = new ExampleDialog(ui.stackPages), ChannelsDialog *channelsDialog = NULL;
// createPageAction(QIcon(IMAGE_MESSAGES), tr("Example Application"), grp)); ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
GamesDialog *gamesDialog = NULL; GamesDialog *gamesDialog = NULL;
ui.stackPages->add(gamesDialog = new GamesDialog(ui.stackPages), ui.stackPages->add(gamesDialog = new GamesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Games Launcher"), grp)); 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 */ /* Create the toolbar */
ui.toolBar->addActions(grp->actions()); ui.toolBar->addActions(grp->actions());
ui.toolBar->addSeparator(); ui.toolBar->addSeparator();
connect(grp, SIGNAL(triggered(QAction *)), ui.stackPages, SLOT(showPage(QAction *))); connect(grp, SIGNAL(triggered(QAction *)), ui.stackPages, SLOT(showPage(QAction *)));
/* Create and bind the messenger button */ /* 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. */ /** Shows the config dialog with focus set to the given page. */
void show(Page page); void show(Page page);
private slots: private slots:
@ -82,6 +81,8 @@ private slots:
void toggleVisibility(QSystemTrayIcon::ActivationReason e); void toggleVisibility(QSystemTrayIcon::ActivationReason e);
void toggleVisibilitycontextmenu(); void toggleVisibilitycontextmenu();
void showsmplayer();
protected: protected:
void closeEvent(QCloseEvent *); void closeEvent(QCloseEvent *);

View file

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

View file

@ -65,7 +65,7 @@
#define IMAGE_RSM32 ":/images/rsmessenger32.png" #define IMAGE_RSM32 ":/images/rsmessenger32.png"
#define IMAGE_RSM16 ":/images/rsmessenger16.png" #define IMAGE_RSM16 ":/images/rsmessenger16.png"
#define IMAGE_CLOSE ":/images/close_normal.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 */ /* Keys for UI Preferences */
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit" #define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit"
@ -75,13 +75,6 @@
* #define RS_RELEASE_VERSION 1 * #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 */ /** Constructor */
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
: QMainWindow(parent, flags) : QMainWindow(parent, flags)
@ -159,12 +152,13 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
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));
//#ifdef RS_RELEASE_VERSION #ifdef RS_RELEASE_VERSION
// channelsDialog = NULL; channelsDialog = NULL;
//#else #else
ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages), channelsDialog = NULL;
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp)); // ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),
//#endif // createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
#endif
ui.stackPages->add(new HelpDialog(ui.stackPages), ui.stackPages->add(new HelpDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_ABOUT), tr("About/Help"), grp)); 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_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 #ifdef RS_RELEASE_VERSION
addAction(new QAction(QIcon(IMAGE_PEERS), tr("In Development / New Apps"), ui.toolBar), SLOT(showApplWindow()));
#else #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 #endif
#ifdef NO_MORE_OPTIONS_OR_SS #ifdef NO_MORE_OPTIONS_OR_SS
@ -244,7 +239,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
menu->addAction(_bandwidthAct); menu->addAction(_bandwidthAct);
#endif #endif
menu->addAction(_prefsAct); menu->addAction(_prefsAct);
menu->addAction(_smplayerAct); //menu->addAction(_smplayerAct);
menu->addSeparator(); menu->addSeparator();
menu->addAction(tr("Minimize"), this, SLOT(showMinimized())); menu->addAction(tr("Minimize"), this, SLOT(showMinimized()));
menu->addAction(tr("Maximize"), this, SLOT(showMaximized())); menu->addAction(tr("Maximize"), this, SLOT(showMaximized()));
@ -406,7 +401,7 @@ MainWindow::~MainWindow()
delete _prefsAct; delete _prefsAct;
delete _bandwidthGraph; delete _bandwidthGraph;
delete _messengerwindowAct; delete _messengerwindowAct;
delete _smplayerAct; //delete _smplayerAct;
} }
/** Create and bind actions to events. Setup for initial /** 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); _messengerwindowAct = new QAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this);
connect(_messengerwindowAct, SIGNAL(triggered()),this, SLOT(showMessengerWindow())); connect(_messengerwindowAct, SIGNAL(triggered()),this, SLOT(showMessengerWindow()));
_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this); //_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this);
connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer())); //connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer()));
connect(ui.btntoggletoolbox, SIGNAL(toggled(bool)), this, SLOT(showToolboxFrame(bool))); connect(ui.btntoggletoolbox, SIGNAL(toggled(bool)), this, SLOT(showToolboxFrame(bool)));