From 30b6e6c423b02c66f7cb0a62b1f666b5796bed28 Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 25 Jan 2009 18:25:36 +0000 Subject: [PATCH] added if defined for Windows use emoticons from extern git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@948 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/PeersDialog.cpp | 12 ++++++++++-- retroshare-gui/src/gui/chat/PopupChatDialog.cpp | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 59b2d0e99..0b678d198 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -992,7 +992,11 @@ void PeersDialog::displayInfoChatMenu(const QPoint& pos) void PeersDialog::loadEmoticonsgroupchat() { QString sm_codes; - QFile sm_file(QString(":/emoticons/emotes.acs")); + #if defined(Q_OS_WIN32) + QFile sm_file(QApplication::applicationDirPath() + "/emoticons/emotes.acs"); + #else + QFile sm_file(QString(":/emoticons/emotes.acs")); + #endif if(!sm_file.open(QIODevice::ReadOnly)) { std::cerr << "Could not open resouce file :/emoticons/emotes.acs" << endl ; @@ -1039,7 +1043,11 @@ void PeersDialog::loadEmoticonsgroupchat() } i++; if(!smcode.isEmpty() && !smfile.isEmpty()) - smileys.insert(smcode, ":/"+smfile); + #if defined(Q_OS_WIN32) + smileys.insert(smcode, smfile); + #else + smileys.insert(smcode, ":/"+smfile); + #endif } } diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 856811d9e..7eb68b2b5 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -389,7 +389,11 @@ void PopupChatDialog::loadEmoticons2() void PopupChatDialog::loadEmoticons() { QString sm_codes; + #if defined(Q_OS_WIN32) + QFile sm_file(QApplication::applicationDirPath() + "/emoticons/emotes.acs"); + #else QFile sm_file(QString(":/emoticons/emotes.acs")); + #endif if(!sm_file.open(QIODevice::ReadOnly)) { std::cout << "error opening ressource file" << std::endl ; @@ -436,7 +440,12 @@ void PopupChatDialog::loadEmoticons() } i++; if(!smcode.isEmpty() && !smfile.isEmpty()) + #if defined(Q_OS_WIN32) + smileys.insert(smcode, smfile); + #else smileys.insert(smcode, ":/"+smfile); + #endif + } }