Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: GitHub noreply@github.com Date: Sun, 28 Jan 2018 19:15:18 UTC Commit: 70396209175217e57af7d0148c53fc9b31cdeced https://github.com/geany/geany-plugins/commit/70396209175217e57af7d0148c53fc...
Log Message: ----------- Merge pull request #653 from Skif-off/geanylua-reloadconf
GeanyLua: Add function geany.reloadconf()
Modified Paths: -------------- geanylua/docs/geanylua-ref.html geanylua/glspi_app.c geanylua/keywords.list
Modified: geanylua/docs/geanylua-ref.html 27 lines changed, 24 insertions(+), 3 deletions(-) =================================================================== @@ -267,18 +267,22 @@ <td class="desc">-- Run a script without the debug hook.</td> </tr> <tr class="odd"> + <td> function <a href="#reloadconf"><b>reloadconf</b></a> ()<br></td> + <td class="desc">-- Reload Configuration.</td> +</tr> +<tr class="even"> <td> function <a href="#rescan"><b>rescan</b></a> ()<br></td> <td class="desc">-- Regenerate the scripts menu.</td> </tr> -<tr class="even"> +<tr class="odd"> <td> function <a href="#stat"><b>stat</b></a> ( filename [, lstat] )<br></td> <td class="desc">-- Retrieve some information about a disk file.</td> </tr> -<tr class="odd"> +<tr class="even"> <td> function <a href="#timeout"><b>timeout</b></a> ( seconds )<br></td> <td class="desc">-- Control maximum time allowed for script execution.</td> </tr> -<tr class="even"> +<tr class="odd"> <td> function <a href="#wkdir"><b>wkdir</b></a> ( [folder] )<br></td> <td class="desc">-- Get or set the current working directory.</td> </tr> @@ -816,6 +820,23 @@ <br><br>
+<a name="reloadconf"></a><hr><h3><tt>geany.reloadconf ()</tt></h3> +<p>This function will cause Geany to reload most of it's configuration files without restarting +(as menu item <b><i>Tools-><u>R</u>eload Configuration</i></b>).</p> +<!-- The list was copied from https://geanypy.readthedocs.io/en/latest/api.html#geany.reload_configuration --> +<p>Currently the following files are reloaded:</p> +<ul> +<li>all template files;</li> +<li>new file templates;</li> +<li>the New (with template) menus will be updated;</li> +<li>Snippets (snippets.conf);</li> +<li>filetype extensions (filetype_extensions.conf);</li> +<li><i>setting</i>s and <i>build_settings</i> sections of the filetype definition files.</li> +</ul> +<p>This function which can be used if you updated one of these configuration files, or modified or added template files.</p> +<br><br> + + <a name="rescan"></a><hr><h3><tt>geany.rescan ()</tt></h3><p> Scans the scripts folder, rebuilds the <b><i>Tools-><u>L</u>ua Scripts</i></b> menu, and re-initializes the GTK accelerator group (keybindings) associated with the plugin.
Modified: geanylua/glspi_app.c 36 lines changed, 22 insertions(+), 14 deletions(-) =================================================================== @@ -604,22 +604,30 @@ static gint glspi_keygrab(lua_State* L) }
+static gint glspi_reloadconf(lua_State* L) +{ + main_reload_configuration(); + return 0; +} + +
static const struct luaL_reg glspi_app_funcs[] = { - {"pluginver", glspi_pluginver}, - {"appinfo", glspi_appinfo}, - {"xsel", glspi_xsel}, - {"signal", glspi_signal}, - {"stat", glspi_stat}, - {"status", glspi_status}, - {"basename", glspi_basename}, - {"dirname", glspi_dirname}, - {"fullpath", glspi_fullpath}, - {"dirlist", glspi_dirlist}, - {"wkdir", glspi_wkdir}, - {"keycmd", glspi_keycmd}, - {"launch", glspi_launch}, - {"keygrab", glspi_keygrab}, + {"pluginver", glspi_pluginver}, + {"appinfo", glspi_appinfo}, + {"xsel", glspi_xsel}, + {"signal", glspi_signal}, + {"stat", glspi_stat}, + {"status", glspi_status}, + {"basename", glspi_basename}, + {"dirname", glspi_dirname}, + {"fullpath", glspi_fullpath}, + {"dirlist", glspi_dirlist}, + {"wkdir", glspi_wkdir}, + {"keycmd", glspi_keycmd}, + {"launch", glspi_launch}, + {"keygrab", glspi_keygrab}, + {"reloadconf", glspi_reloadconf}, {NULL,NULL} };
Modified: geanylua/keywords.list 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -7,4 +7,4 @@ word5=0xf0a000;0xffffff;false;false
## Put this in the [keywords] section: -user1=geany.activate geany.appinfo geany.banner geany.basename geany.batch geany.byte geany.caller geany.caret geany.choose geany.close geany.confirm geany.copy geany.count geany.cut geany.dirlist geany.dirname geany.dirsep geany.documents geany.fileinfo geany.filename geany.find geany.fullpath geany.height geany.input geany.keycmd geany.keygrab geany.launch geany.length geany.lines geany.match geany.message geany.navigate geany.newfile geany.open geany.optimize geany.paste geany.pickfile geany.pluginver geany.rectsel geany.rescan geany.rowcol geany.save geany.scintilla geany.script geany.select geany.selection geany.signal geany.stat geany.status geany.text geany.timeout geany.wkdir geany.word geany.wordchars geany.xsel geany.yield dialog.checkbox dialog.color dialog.file dialog.font dialog.group dialog.heading dialog.hr dialog.label dialog.new dialog.option dialog.password dialog.radio dialog.run dialog.select dialog.text dialog.textarea keyfile.comment keyfile.data keyfile.groups keyfile.has keyfile.keys keyfile.new keyfile.remove keyfile.value +user1=geany.activate geany.appinfo geany.banner geany.basename geany.batch geany.byte geany.caller geany.caret geany.choose geany.close geany.confirm geany.copy geany.count geany.cut geany.dirlist geany.dirname geany.dirsep geany.documents geany.fileinfo geany.filename geany.find geany.fullpath geany.height geany.input geany.keycmd geany.keygrab geany.launch geany.length geany.lines geany.match geany.message geany.navigate geany.newfile geany.open geany.optimize geany.paste geany.pickfile geany.pluginver geany.rectsel geany.reloadconf geany.rescan geany.rowcol geany.save geany.scintilla geany.script geany.select geany.selection geany.signal geany.stat geany.status geany.text geany.timeout geany.wkdir geany.word geany.wordchars geany.xsel geany.yield dialog.checkbox dialog.color dialog.file dialog.font dialog.group dialog.heading dialog.hr dialog.label dialog.new dialog.option dialog.password dialog.radio dialog.run dialog.select dialog.text dialog.textarea keyfile.comment keyfile.data keyfile.groups keyfile.has keyfile.keys keyfile.new keyfile.remove keyfile.value
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).