Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/fluxbox/fluxbox.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2537 by niro, Wed Sep 16 09:14:30 2015 UTC revision 2542 by niro, Wed Sep 16 10:29:20 2015 UTC
# Line 17  set_fluxbox_menuitem() Line 17  set_fluxbox_menuitem()
17   local id   local id
18    
19   case "${action}" in   case "${action}" in
20   add) id=$(mysqldo "select id from cfg_fluxbox_menuitem where serial='${serial}' and name='${name}';")   add)
21     id=$(mysqldo "select id from cfg_fluxbox_menuitem where serial='${serial}' and name='${name}';")
22   if [[ -n ${id} ]]   if [[ -n ${id} ]]
23   then   then
24   mysqldo "update cfg_fluxbox_menuitem set name='${name}', exec='${exec}', workdir='${workdir}', icon='${icon}' where id=${id};"   mysqldo "update cfg_fluxbox_menuitem set name='${name}', exec='${exec}', workdir='${workdir}', icon='${icon}' where id=${id};"
# Line 42  control_fluxbox_menuitem() Line 43  control_fluxbox_menuitem()
43   local values   local values
44   local id   local id
45    
46     # first delete all menuitems then regen all
47     control_client "${serial}" set fluxbox.menuitem del
48   values=$(mysqldo "select id from cfg_fluxbox_menuitem where serial='${serial}';")   values=$(mysqldo "select id from cfg_fluxbox_menuitem where serial='${serial}';")
49   for id in ${values}   for id in ${values}
50   do   do
# Line 56  control_fluxbox_menuitem() Line 59  control_fluxbox_menuitem()
59   eecho "Exec must not be empty id->'${id}'"   eecho "Exec must not be empty id->'${id}'"
60   continue   continue
61   fi   fi
62   control_client fluxbox.menitem "${serial}" "${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}"
63   done   done
64  }  }
65    

Legend:
Removed from v.2537  
changed lines
  Added in v.2542