Difference between revisions of "Tutorial Toolbar"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (slightly different path for the file in the install directory)
m
Line 16: Line 16:
 
For the moment we will focus only on the installation pieces, so: $OOoInstall/Basis/share/config/soffice.cfg/modules/StartModule/toolbar/standardbar.xml has what we're interested in, and we'll modify that:
 
For the moment we will focus only on the installation pieces, so: $OOoInstall/Basis/share/config/soffice.cfg/modules/StartModule/toolbar/standardbar.xml has what we're interested in, and we'll modify that:
  
<pre>
+
<syntaxhighlight lang="cpp>
 
--- modules/StartModule/toolbar/standardbar.xml 2005-07-23 15:08:51.788751294 +0530
 
--- modules/StartModule/toolbar/standardbar.xml 2005-07-23 15:08:51.788751294 +0530
 
+++ modules/StartModule/toolbar/standardbar.xml 2005-07-23 15:06:41.962949847 +0530
 
+++ modules/StartModule/toolbar/standardbar.xml 2005-07-23 15:06:41.962949847 +0530
Line 26: Line 26:
 
+ &lt;toolbar:toolbaritem xlink:href=".uno:Quit"/&gt;
 
+ &lt;toolbar:toolbaritem xlink:href=".uno:Quit"/&gt;
 
  &lt;/toolbar:toolbar&gt;
 
  &lt;/toolbar:toolbar&gt;
</pre>
+
</syntaxhighlight>
  
 
And run the application. Typically, it should work! :-)
 
And run the application. Typically, it should work! :-)

Revision as of 14:07, 27 August 2021

Hack! - The toolbar Tutorial_Help

The UI elements in OOo 2.0 are maintained as xml files in two locations from the installation onwards and in five locations overall, but that sounds more complicated than it is, really :-)

UI elements are toolbars, menus, accelerators and statusbars. And once installed, they are in $OOoInstall/share/config/soffice.sfg/ in different locations based on which product they are for. So Writer has its own set of UI elements, and so does Calc and so in fact does the base framework with no document open in it, which is what we will target now :-)

Now what would be interesting is if we could add in a toolbar item of our own and since there is no toolbar item to exit the application with one click, that is what we'll try.

For the moment we will focus only on the installation pieces, so: $OOoInstall/Basis/share/config/soffice.cfg/modules/StartModule/toolbar/standardbar.xml has what we're interested in, and we'll modify that:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


--- modules/StartModule/toolbar/standardbar.xml 2005-07-23 15:08:51.788751294 +0530
+++ modules/StartModule/toolbar/standardbar.xml 2005-07-23 15:06:41.962949847 +0530
@@ -8,4 +8,5 @@
  &lt;toolbar:toolbarseparator/&gt;
  &lt;toolbar:toolbaritem xlink:href=".uno:HelpIndex"/&gt;

  &lt;toolbar:toolbaritem xlink:href=".uno:ExtendedHelp" toolbar:visible="false"/&gt;
+ &lt;toolbar:toolbaritem xlink:href=".uno:Quit"/&gt;
 &lt;/toolbar:toolbar&gt;

And run the application. Typically, it should work! :-)

But if it does not, it would probably be because if any UI elements are modified, the modification is copied into the user's OOo config directory which is usually ~/.ooo-2.0* and cached etc to make things run faster. This is a typical problem to look for when other changes are not reflected in the application for changes elsewhere as well. Removing that directory, and relaunching soffice does this time show up our change and clicking the icon brings us back to square one :-)

[ The file to target in the build tree for this change would be framework/uiconfig/startmodule/toolbar/standardbar.xml, which is then copied over into the solver/ directory when it is 'deliver'ed over. Then postprocess/ zips up all UI elements in the solver into a consolidated uiconfig.zip and 'deliver's it back into the solver, which is then packed up to be part of the installation packet. On installation, this uiconfig.zip is picked up and unzipped into the installation. The other projects UI elements would be in the top-level sw/, sd/ sc/, starmath/, basctl/ and sch/ ]


add-about-toolbar.diff Next: Tutorial_About
Personal tools