Skip to content

Commit

Permalink
Added Lua script function utils.reload_global_prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Nov 4, 2010
1 parent b4e8cc4 commit a111ac3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripting/lua_utils.cpp
Expand Up @@ -22,6 +22,7 @@
// utils.metaphone
// utils.msgbox
// utils.multilistbox
// utils.reload_global_prefs
// utils.sendtofront
// utils.shellexecute
// utils.showdebugstatus
Expand Down Expand Up @@ -1829,6 +1830,14 @@ static int infotypes (lua_State *L)
return 1; // 1 table
} // end of infotypes

// reloads global preferences
static int reload_global_prefs (lua_State *L)
{
App.LoadGlobalsFromDatabase ();

return 0; // no results
} // end of reload_global_prefs


// table of operations
static const struct luaL_reg xmllib [] =
Expand All @@ -1854,6 +1863,7 @@ static const struct luaL_reg xmllib [] =
{"metaphone", metaphone},
{"msgbox", msgbox}, // msgbox - not Unicode
{"multilistbox", multilistbox},
{"reload_global_prefs", reload_global_prefs},
{"showdebugstatus", showdebugstatus},
{"sendtofront", send_to_front},
{"shellexecute", shell_execute},
Expand Down

0 comments on commit a111ac3

Please sign in to comment.