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 + } }