1 -- Authors: Tuomo Valkonen, Etan Reisner
2 -- License: LGPL, version 2.1 or later
7 -- Copyright (c) Tuomo Valkonen 2006.
8 -- Copyright (c) Etan Reisner 2007.
10 -- Ion is free software; you can redistribute it and/or modify it under
11 -- the terms of the GNU Lesser General Public License as published by
12 -- the Free Software Foundation; either version 2.1 of the License, or
13 -- (at your option) any later version.
16 local function notifyact()
17 local act
= ioncore
.activity_first()
21 mod_statusbar
.inform('act_first', act
:name())
22 mod_statusbar
.inform('act_first_hint', 'activity')
23 local function count_act(reg
)
24 actcount
= actcount
+ 1
27 ioncore
.activity_i(count_act
)
28 mod_statusbar
.inform('act_n', tostring(actcount
))
29 mod_statusbar
.inform('act_n_hint', 'activity')
31 mod_statusbar
.inform('act_first', '--')
32 mod_statusbar
.inform('act_first_hint', 'normal')
33 mod_statusbar
.inform('act_n', '0')
34 mod_statusbar
.inform('act_n_hint', 'normal')
38 local function hookhandler(reg
, how
)
39 if how
~= "activity" then
43 ioncore
.defer(function() notifyact() mod_statusbar
.update() end)
46 ioncore
.get_hook('region_notify_hook'):add(hookhandler
)
49 mod_statusbar
.inform('act_first_template', 'Mxxxxxxxxxxxxxx')
50 mod_statusbar
.update(true)