]> git.wh0rd.org Git - patches.git/blob - gaim-2.0.0_beta3-always-idle.patch
more random patches. who knows.
[patches.git] / gaim-2.0.0_beta3-always-idle.patch
1 --- gtk/gtkprefs.c
2 +++ gtk/gtkprefs.c
3 @@ -1770,6 +1770,7 @@ away_page()
4                 GAIM_PREF_STRING, "/core/away/idle_reporting",
5                 _("Never"), "none",
6                 _("From last sent message"), "gaim",
7 +               _("Always idle"), "always",
8  #if defined(USE_SCREENSAVER) || defined(HAVE_IOKIT)
9                 _("Based on keyboard or mouse use"), "system",
10  #endif
11 --- libgaim/idle.c
12 +++ libgaim/idle.c
13 @@ -57,6 +57,8 @@ static guint idle_timer = 0;
14  
15  static time_t last_active_time = 0;
16  
17 +static time_t idle_init_time = 0;
18 +
19  static void
20  set_account_idle(GaimAccount *account, int time_idle)
21  {
22 @@ -134,6 +136,10 @@ check_idleness()
23                 /* Use 'Gaim idle' */
24                 time_idle = time(NULL) - last_active_time;
25         }
26 +       else if (!strcmp(idle_reporting, "always"))
27 +       {
28 +               time_idle = time(NULL) - idle_init_time;
29 +       }
30         else
31         {
32                 /* Don't report idle time */
33 @@ -243,6 +249,7 @@ gaim_idle_init()
34                                                 gaim_idle_get_handle(),
35                                                 GAIM_CALLBACK(signing_off_cb), NULL);
36  
37 +       time(&idle_init_time);
38         gaim_idle_touch();
39  }
40