aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-17 20:37:21 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-17 20:37:23 +0200
commit9e3b1440c74249fbb1f19e6c321db0d11dc2f345 (patch)
treed7e1251232ce546798e7f4f19f5cf435a276f42c /src
parent1dbb66b455b0362f06c9d49583020cf68700ed65 (diff)
Remove notification, bloated memory usage from 30mb to 80mb
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fa33556..541efae 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,14 +19,12 @@
#include <odhtdb/hex2bin.hpp>
#include <ntp/NtpClient.hpp>
#include <sibs/SafeSerializer.hpp>
-#include <libnotify/notify.h>
#include <X11/Xlib.h>
using namespace std;
using namespace dchat;
static bool focused = true;
-static NotifyNotification *notification = nullptr;
void channelChangeUserNickname(Channel *channel, const StringView data, const odhtdb::Signature::PublicKey &userPublicKey)
{
@@ -66,12 +64,6 @@ void channelAddStoredMessage(Channel *channel, const odhtdb::Hash &requestHash,
{
string msg(decryptedData.data, decryptedData.size);
channel->addLocalMessage(msg, user, ntp::NtpTimestamp::fromCombined(timestamp).seconds, requestHash);
- if(!focused)
- {
- notify_notification_update(notification, "dchat", msg.c_str(), 0);
- notify_notification_set_timeout(notification, 5000); // 5 sec timeout
- notify_notification_show(notification, 0);
- }
break;
}
case ChannelDataType::DELETE_MESSAGE:
@@ -113,8 +105,6 @@ int main(int argc, char **argv)
printf("parent path: %s\n", parentPath.string().c_str());
boost::filesystem::current_path(parentPath); // Ensures loading of resources works no matter which path we run this executable from
*/
- notify_init("dchat");
- notification = notify_notification_new("dchat", "", 0);
const int FRAMERATE_FOCUSED = 200;
const int FRAMERATE_NOT_FOCUSED = 30;