summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-02-19 10:23:34 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-02-19 10:23:34 +0100
commit090bd68e7cda97a605d16312eb99918a4fea9061 (patch)
tree13326b5f996673f54f2801b6f52c3177fb610a58
parent3cf7b4e69606306a4a4869aeb19e46ce37915f93 (diff)
downloadweechat-090bd68e7cda97a605d16312eb99918a4fea9061.zip
Fix "inactivity" value when no key has been pressed since WeeChat started (bug #28930)
-rw-r--r--ChangeLog4
-rw-r--r--src/gui/gui-keyboard.c16
2 files changed, 5 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index b47302722..45ff89629 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
FlashCode <flashcode@flashtux.org>
-v0.3.2-dev, 2010-02-18
+v0.3.2-dev, 2010-02-19
Version 0.3.2 (under dev!)
@@ -26,6 +26,8 @@ Version 0.3.2 (under dev!)
and in buffer infolist
* api: add description of arguments for functions hook_info and hook_infolist
* api: fix function "color" in Lua script API
+* api: fix "inactivity" value when no key has been pressed since WeeChat started
+ (bug #28930)
* irc: add SASL authentication, with PLAIN and DH-BLOWFISH mechanisms
(task #8829)
* irc: fix crash with SSL connection if option ssl_cert is set (bug #28752)
diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c
index 2f726de64..1bc5c245e 100644
--- a/src/gui/gui-keyboard.c
+++ b/src/gui/gui-keyboard.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <time.h>
#include "../core/weechat.h"
#include "../core/wee-hook.h"
@@ -76,20 +77,7 @@ gui_keyboard_init ()
gui_key_combo_buffer[0] = '\0';
gui_key_grab = 0;
gui_key_grab_count = 0;
-}
-
-/*
- * gui_keyboard_init_last_activity_time: init last activity time with current
- * time
- */
-
-void
-gui_keyboard_init_last_activity_time ()
-{
- struct timeval tv_time;
-
- gettimeofday (&tv_time, NULL);
- gui_keyboard_last_activity_time = tv_time.tv_sec;
+ gui_keyboard_last_activity_time = time (NULL);
}
/*