1 |
# $Id$ |
# $Id$ |
2 |
|
|
3 |
|
push_config fluxbox_menuitem |
4 |
|
|
5 |
help_fluxbox_menuitem() |
help_fluxbox_menuitem() |
6 |
{ |
{ |
7 |
local serial="${CLASS_ARGV[0]}" |
local serial="${CLASS_ARGV[0]}" |
40 |
control_fluxbox_menuitem() |
control_fluxbox_menuitem() |
41 |
{ |
{ |
42 |
local serial="${CLASS_ARGV[0]}" |
local serial="${CLASS_ARGV[0]}" |
43 |
|
push_config_fluxbox_menuitem "${serial}" |
44 |
|
} |
45 |
|
|
46 |
|
push_config_fluxbox_menuitem() |
47 |
|
{ |
48 |
|
local serial="$1" |
49 |
local values |
local values |
50 |
local id |
local id |
51 |
|
|
58 |
eecho "Name must not be empty id->'${id}'" |
eecho "Name must not be empty id->'${id}'" |
59 |
continue |
continue |
60 |
fi |
fi |
|
if [[ -z ${cfg_fluxbox_menuitem_exec} ]] |
|
|
then |
|
|
eecho "Exec must not be empty id->'${id}'" |
|
|
continue |
|
|
fi |
|
61 |
if [[ -z ${cfg_fluxbox_menuitem_enabled} ]] |
if [[ -z ${cfg_fluxbox_menuitem_enabled} ]] |
62 |
then |
then |
63 |
eecho "Enabled must not be empty id->'${id}'" |
eecho "Enabled must not be empty id->'${id}'" |
67 |
then |
then |
68 |
control_client "${serial}" set fluxbox.menuitem add "${cfg_fluxbox_menuitem_name}" "${cfg_fluxbox_menuitem_exec}" "${cfg_fluxbox_menuitem_workdir}" "${cfg_fluxbox_menuitem_icon}" |
control_client "${serial}" set fluxbox.menuitem add "${cfg_fluxbox_menuitem_name}" "${cfg_fluxbox_menuitem_exec}" "${cfg_fluxbox_menuitem_workdir}" "${cfg_fluxbox_menuitem_icon}" |
69 |
elif [[ ${cfg_fluxbox_menuitem_enabled} = 0 ]] |
elif [[ ${cfg_fluxbox_menuitem_enabled} = 0 ]] |
70 |
|
then |
71 |
control_client "${serial}" set fluxbox.menuitem del "${cfg_fluxbox_menuitem_name}" |
control_client "${serial}" set fluxbox.menuitem del "${cfg_fluxbox_menuitem_name}" |
72 |
# remove from database too |
# remove from database too |
73 |
mysqldo "delete from cfg_fluxbox_menuitem where id='${id}';" |
mysqldo "delete from cfg_fluxbox_menuitem where id='${id}';" |
95 |
control_fluxbox_theme() |
control_fluxbox_theme() |
96 |
{ |
{ |
97 |
local serial="${CLASS_ARGV[0]}" |
local serial="${CLASS_ARGV[0]}" |
98 |
|
push_config_fluxbox_theme "${serial}" |
99 |
|
} |
100 |
|
|
101 |
|
push_config_fluxbox_theme() |
102 |
|
{ |
103 |
|
local serial="$1" |
104 |
local value |
local value |
105 |
|
|
106 |
value=$(mysqldo "select theme from cfg_fluxbox.menuitem where serial='${serial}'") |
value=$(mysqldo "select theme from cfg_fluxbox.menuitem where serial='${serial}'") |