Merge branch 'master' of https://github.com/Geenz/hifi into 19514

This commit is contained in:
Geenz 2014-03-13 14:40:10 -04:00
commit 4d5b4081e1
7 changed files with 22 additions and 17 deletions

View file

@ -230,11 +230,7 @@ if (APPLE)
RUNTIME DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/install" COMPONENT Runtime RUNTIME DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/install" COMPONENT Runtime
) )
else (APPLE) else (APPLE)
# remove and then copy the resources files beside the executable # copy the resources files beside the executable
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E remove_directory
$<TARGET_FILE_DIR:${TARGET_NAME}>/resources
)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/resources" "${PROJECT_SOURCE_DIR}/resources"

View file

@ -4,22 +4,22 @@
<context> <context>
<name>Application</name> <name>Application</name>
<message> <message>
<location filename="src/Application.cpp" line="1354"/> <location filename="src/Application.cpp" line="1353"/>
<source>Export Voxels</source> <source>Export Voxels</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="src/Application.cpp" line="1355"/> <location filename="src/Application.cpp" line="1354"/>
<source>Sparse Voxel Octree Files (*.svo)</source> <source>Sparse Voxel Octree Files (*.svo)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="src/Application.cpp" line="3554"/> <location filename="src/Application.cpp" line="3557"/>
<source>Open Script</source> <source>Open Script</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="src/Application.cpp" line="3555"/> <location filename="src/Application.cpp" line="3558"/>
<source>JavaScript Files (*.js)</source> <source>JavaScript Files (*.js)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -45,7 +45,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="src/ui/ChatWindow.cpp" line="110"/> <location filename="src/ui/ChatWindow.cpp" line="115"/>
<source>day</source> <source>day</source>
<translation> <translation>
<numerusform>%n day</numerusform> <numerusform>%n day</numerusform>
@ -53,7 +53,7 @@
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="src/ui/ChatWindow.cpp" line="110"/> <location filename="src/ui/ChatWindow.cpp" line="115"/>
<source>hour</source> <source>hour</source>
<translation> <translation>
<numerusform>%n hour</numerusform> <numerusform>%n hour</numerusform>
@ -61,7 +61,7 @@
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="src/ui/ChatWindow.cpp" line="110"/> <location filename="src/ui/ChatWindow.cpp" line="115"/>
<source>minute</source> <source>minute</source>
<translation> <translation>
<numerusform>%n minute</numerusform> <numerusform>%n minute</numerusform>
@ -76,7 +76,7 @@
</translation> </translation>
</message> </message>
<message> <message>
<location filename="src/ui/ChatWindow.cpp" line="163"/> <location filename="src/ui/ChatWindow.cpp" line="170"/>
<source>%1 online now:</source> <source>%1 online now:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View file

@ -121,8 +121,6 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt
QString& Application::resourcesPath() { QString& Application::resourcesPath() {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
static QString staticResourcePath = QCoreApplication::applicationDirPath() + "/../Resources/"; static QString staticResourcePath = QCoreApplication::applicationDirPath() + "/../Resources/";
#elif defined Q_OS_LINUX
static QString staticResourcePath = "resources/";
#else #else
static QString staticResourcePath = QCoreApplication::applicationDirPath() + "/resources/"; static QString staticResourcePath = QCoreApplication::applicationDirPath() + "/resources/";
#endif #endif

View file

@ -1043,6 +1043,8 @@ void Menu::showChat() {
mainWindow->geometry().y(), mainWindow->geometry().y(),
_chatWindow->width(), _chatWindow->width(),
mainWindow->height()); mainWindow->height());
}
if (!_chatWindow->isVisible()) {
_chatWindow->show(); _chatWindow->show();
} }
_chatWindow->raise(); _chatWindow->raise();

View file

@ -50,6 +50,7 @@ ChatWindow::ChatWindow() :
startTimerForTimeStamps(); startTimerForTimeStamps();
} else { } else {
ui->numOnlineLabel->hide(); ui->numOnlineLabel->hide();
ui->closeButton->hide();
ui->usersWidget->hide(); ui->usersWidget->hide();
ui->messagesScrollArea->hide(); ui->messagesScrollArea->hide();
ui->messagePlainTextEdit->hide(); ui->messagePlainTextEdit->hide();
@ -71,6 +72,10 @@ ChatWindow::~ChatWindow() {
delete ui; delete ui;
} }
void ChatWindow::reject() {
hide();
}
bool ChatWindow::eventFilter(QObject* sender, QEvent* event) { bool ChatWindow::eventFilter(QObject* sender, QEvent* event) {
Q_UNUSED(sender); Q_UNUSED(sender);
@ -136,9 +141,11 @@ void ChatWindow::startTimerForTimeStamps() {
void ChatWindow::connected() { void ChatWindow::connected() {
ui->connectingToXMPPLabel->hide(); ui->connectingToXMPPLabel->hide();
ui->numOnlineLabel->show(); ui->numOnlineLabel->show();
ui->closeButton->show();
ui->usersWidget->show(); ui->usersWidget->show();
ui->messagesScrollArea->show(); ui->messagesScrollArea->show();
ui->messagePlainTextEdit->show(); ui->messagePlainTextEdit->show();
ui->messagePlainTextEdit->setFocus();
#ifdef HAVE_QXMPP #ifdef HAVE_QXMPP
const QXmppMucRoom* publicChatRoom = XmppClient::getInstance().getPublicChatRoom(); const QXmppMucRoom* publicChatRoom = XmppClient::getInstance().getPublicChatRoom();
connect(publicChatRoom, SIGNAL(participantsChanged()), this, SLOT(participantsChanged())); connect(publicChatRoom, SIGNAL(participantsChanged()), this, SLOT(participantsChanged()));

View file

@ -33,6 +33,8 @@ public:
ChatWindow(); ChatWindow();
~ChatWindow(); ~ChatWindow();
virtual void reject();
protected: protected:
bool eventFilter(QObject* sender, QEvent* event); bool eventFilter(QObject* sender, QEvent* event);

View file

@ -185,10 +185,10 @@
<sender>closeButton</sender> <sender>closeButton</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>ChatWindow</receiver> <receiver>ChatWindow</receiver>
<slot>accept()</slot> <slot>hide()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>342</x> <x>390</x>
<y>42</y> <y>42</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">