Add parameter

This commit is contained in:
Mauricio Baeza 2021-02-06 21:50:07 -06:00
parent f0f1ccf19f
commit 79f316edaa
6 changed files with 95 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -269,6 +269,36 @@ Example:
}
Menus
^^^^^
Each menu for show in parent menu.
**MENUS**
* Tuple of dictionaries
* **title** = Label showed, can be multi language.
* **argument** = Argument to pass to extension, not use spaces.
* **context** = In what applications show, if is blank, show in all.
* **icon** = Icon to add, the icon should be in format BMP. The name should be NAME_16.bmp or NAME_26.bmp. Set only NAME in this property.
* **toolbar** = It is True, add to new toolbar too, used same icon.
* **shortcut** = Shortcut keyboard for this menu. For `Shift+Ctrl+Alt+T` used: `T_SHIFT_MOD1_MOD2`
Example:
.. code-block:: python
MENUS = (
{
'title': {'en': 'Option 1', 'es': 'Opción 1'},
'argument': 'option1',
'context': 'calc,writer',
'icon': 'icon',
'toolbar': True,
'shortcut': 'T_SHIFT_MOD1_MOD2',
},
)
.. _Semantic Versioning: https://semver.org/

View File

@ -288,6 +288,40 @@
</pre></div>
</div>
</div>
<div class="section" id="menus">
<h3>Menus<a class="headerlink" href="#menus" title="Permalink to this headline"></a></h3>
<p>Each menu for show in parent menu.</p>
<p><strong>MENUS</strong></p>
<blockquote>
<div><ul class="simple">
<li><dl class="simple">
<dt>Tuple of dictionaries</dt><dd><ul>
<li><p><strong>title</strong> = Label showed, can be multi language.</p></li>
<li><p><strong>argument</strong> = Argument to pass to extension, not use spaces.</p></li>
<li><p><strong>context</strong> = In what applications show, if is blank, show in all.</p></li>
<li><p><strong>icon</strong> = Icon to add, the icon should be in format BMP. The name should be NAME_16.bmp or NAME_26.bmp. Set only NAME in this property.</p></li>
<li><p><strong>toolbar</strong> = It is True, add to new toolbar too, used same icon.</p></li>
<li><p><strong>shortcut</strong> = Shortcut keyboard for this menu. For <cite>Shift+Ctrl+Alt+T</cite> used: <cite>T_SHIFT_MOD1_MOD2</cite></p></li>
</ul>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
<p>Example:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">MENUS</span> <span class="o">=</span> <span class="p">(</span>
<span class="p">{</span>
<span class="s1">&#39;title&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s1">&#39;en&#39;</span><span class="p">:</span> <span class="s1">&#39;Option 1&#39;</span><span class="p">,</span> <span class="s1">&#39;es&#39;</span><span class="p">:</span> <span class="s1">&#39;Opción 1&#39;</span><span class="p">},</span>
<span class="s1">&#39;argument&#39;</span><span class="p">:</span> <span class="s1">&#39;option1&#39;</span><span class="p">,</span>
<span class="s1">&#39;context&#39;</span><span class="p">:</span> <span class="s1">&#39;calc,writer&#39;</span><span class="p">,</span>
<span class="s1">&#39;icon&#39;</span><span class="p">:</span> <span class="s1">&#39;icon&#39;</span><span class="p">,</span>
<span class="s1">&#39;toolbar&#39;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
<span class="s1">&#39;shortcut&#39;</span><span class="p">:</span> <span class="s1">&#39;T_SHIFT_MOD1_MOD2&#39;</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>

View File

@ -1 +1 @@
Search.setIndex({docnames:["index","main/config","main/intro"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","main/config.rst","main/intro.rst"],objects:{},objnames:{},objtypes:{},terms:{"2021":2,"extensi\u00f3n":1,"final":2,"function":2,"new":[1,2],"public":1,"true":1,FOR:1,Ons:1,The:1,With:2,absolut:1,add:[1,2],addin:[1,2],addonmenu:1,along:1,ani:1,base:1,basic:2,befor:1,bool:1,calc:[1,2],can:[1,2],clone:2,code:1,com:[],compon:[1,2],compress:2,conf:1,configur:0,content:0,copi:[1,2],correctli:1,cours:2,creat:[1,2],cuat:2,current:1,descript:1,detail:1,develop:[1,2],dictionari:1,directori:2,displai:1,display_nam:1,distribut:1,domain:2,don:2,done:2,download:2,edit:1,either:1,elmau:[1,2],even:1,exampl:1,extens:0,extensionnam:1,file:[1,2],first:0,fit:1,folder:1,forget:2,foundat:1,free:1,from:2,gener:[1,2],git:2,gitlab:[],gnu:1,gran:1,great:1,have:1,hope:1,http:[1,2],i18n:1,imag:1,impli:1,index:0,info:[1,2],inform:[],instal:[0,1],integ:1,intern:1,introduct:0,invers:1,languag:1,later:1,lib:1,libreoffic:[1,2],libreofric:[],license_:1,license_en:1,like:1,link:1,local:2,logo:1,look:1,macro:[1,2],make:2,manag:1,mauriciobaeza:[],menu_main:1,merchant:1,modifi:1,modul:0,more:1,move:[1,2],multi:1,myfirstextens:2,myfirstextension_v0:2,mygreatextens:1,net:[1,2],nombr:1,normal:1,now:2,officemenubar:1,one:1,onli:1,option:1,org:1,overview:0,oxt:2,page:[0,1],paramet:0,part:1,particular:1,path_pygettext:1,pleas:1,png:1,possibl:1,pot:[1,2],project:[1,2],prueba:1,publish:1,purpos:1,python3:1,python:2,rapid:2,receiv:1,recomend:2,recommend:1,redistribut:1,rel:1,repositori:2,requir:0,script:2,sdk:2,search:0,see:1,semant:1,should:1,show:1,softwar:1,sourc:2,space:1,start:[1,2],string:1,successfulli:2,sucesfulli:2,support:2,term:1,test:[1,2],testext:[],text:1,thi:[1,2],tool:1,two:1,type_extens:1,under:1,uniqu:1,unopkg:2,url:1,use_local:1,used:[1,2],useful:1,user:2,usr:1,valu:1,vim:1,want:1,warranti:1,when:1,where:1,without:1,www:1,you:[1,2],your:1,yournam:1,zaz:[1,2]},titles:["Welcome to ZAZ\u2019s documentation!","Configuration","Introduction"],titleterms:{"new":[],author:1,configur:1,creat:[],current:[],document:0,domain:1,extens:[1,2],first:2,icon:1,indic:0,inform:1,instal:2,introduct:2,licens:1,local:1,main:1,menu:1,name:1,overview:2,paramet:1,parent:1,path:1,pygettext:1,requir:2,tabl:0,type:1,version:1,welcom:0,zaz:0}})
Search.setIndex({docnames:["index","main/config","main/intro"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","main/config.rst","main/intro.rst"],objects:{},objnames:{},objtypes:{},terms:{"2021":2,"extensi\u00f3n":1,"final":2,"function":2,"new":[1,2],"opci\u00f3n":1,"public":1,"true":1,FOR:1,For:1,Ons:1,The:1,With:2,absolut:1,add:[1,2],addin:[1,2],addonmenu:1,all:1,along:1,alt:1,ani:1,applic:1,argument:1,base:1,basic:2,befor:1,blank:1,bmp:1,bool:1,calc:[1,2],can:[1,2],clone:2,code:1,com:[],compon:[1,2],compress:2,conf:1,configur:0,content:0,context:1,copi:[1,2],correctli:1,cours:2,creat:[1,2],ctrl:1,cuat:2,current:1,descript:1,detail:1,develop:[1,2],dictionari:1,directori:2,displai:1,display_nam:1,distribut:1,domain:2,don:2,done:2,download:2,each:1,edit:1,either:1,elmau:[1,2],even:1,exampl:1,extens:0,extensionnam:1,file:[1,2],first:0,fit:1,folder:1,forget:2,format:1,foundat:1,free:1,from:2,gener:[1,2],git:2,gitlab:[],gnu:1,gran:1,great:1,have:1,hope:1,http:[1,2],i18n:1,imag:1,impli:1,index:0,info:[1,2],inform:[],instal:[0,1],integ:1,intern:1,introduct:0,invers:1,keyboard:1,label:1,languag:1,later:1,lib:1,libreoffic:[1,2],libreofric:[],license_:1,license_en:1,like:1,link:1,local:2,logo:1,look:1,macro:[1,2],make:2,manag:1,mauriciobaeza:[],menu_main:1,merchant:1,modifi:1,modul:0,more:1,move:[1,2],multi:1,myfirstextens:2,myfirstextension_v0:2,mygreatextens:1,name_16:1,name_26:1,net:[1,2],nombr:1,normal:1,now:2,officemenubar:1,one:1,onli:1,option1:1,option:1,org:1,overview:0,oxt:2,page:[0,1],paramet:0,part:1,particular:1,pass:1,path_pygettext:1,pleas:1,png:1,possibl:1,pot:[1,2],project:[1,2],properti:1,prueba:1,publish:1,purpos:1,python3:1,python:2,rapid:2,receiv:1,recomend:2,recommend:1,redistribut:1,rel:1,repositori:2,requir:0,same:1,script:2,sdk:2,search:0,see:1,semant:1,set:1,shift:1,shortcut:1,should:1,show:1,softwar:1,sourc:2,space:1,start:[1,2],string:1,successfulli:2,sucesfulli:2,support:2,t_shift_mod1_mod2:1,term:1,test:[1,2],testext:[],text:1,thi:[1,2],titl:1,too:1,tool:1,toolbar:1,tupl:1,two:1,type_extens:1,under:1,uniqu:1,unopkg:2,url:1,use:1,use_local:1,used:[1,2],useful:1,user:2,usr:1,valu:1,vim:1,want:1,warranti:1,what:1,when:1,where:1,without:1,writer:1,www:1,you:[1,2],your:1,yournam:1,zaz:[1,2]},titles:["Welcome to ZAZ\u2019s documentation!","Configuration","Introduction"],titleterms:{"new":[],author:1,configur:1,creat:[],current:[],document:0,domain:1,extens:[1,2],first:2,icon:1,indic:0,inform:1,instal:2,introduct:2,licens:1,local:1,main:1,menu:1,name:1,overview:2,paramet:1,parent:1,path:1,pygettext:1,requir:2,tabl:0,type:1,version:1,welcom:0,zaz:0}})

View File

@ -269,6 +269,36 @@ Example:
}
Menus
^^^^^
Each menu for show in parent menu.
**MENUS**
* Tuple of dictionaries
* **title** = Label showed, can be multi language.
* **argument** = Argument to pass to extension, not use spaces.
* **context** = In what applications show, if is blank, show in all.
* **icon** = Icon to add, the icon should be in format BMP. The name should be NAME_16.bmp or NAME_26.bmp. Set only NAME in this property.
* **toolbar** = It is True, add to new toolbar too, used same icon.
* **shortcut** = Shortcut keyboard for this menu. For `Shift+Ctrl+Alt+T` used: `T_SHIFT_MOD1_MOD2`
Example:
.. code-block:: python
MENUS = (
{
'title': {'en': 'Option 1', 'es': 'Opción 1'},
'argument': 'option1',
'context': 'calc,writer',
'icon': 'icon',
'toolbar': True,
'shortcut': 'T_SHIFT_MOD1_MOD2',
},
)
.. _Semantic Versioning: https://semver.org/