Customizing the KOffice GUI

KOffice: A General Introduction
Prev | Chapter 6. Optimizing KOffice and Your System | Next

# 6.2. Customizing the KOffice GUI

While KOffice comes out of the box with a GUI (graphical user interface) that should suit most people's needs, there are good reasons why you may want to change the way the programs look. My mother, for example, is a bit afraid of buttons and menu entries she doesn't understand. To tailor KOffice to her needs, I reduced the GUI to a bare minimum of functionality. As she only needs to write letters and use certain templates, there is no need for much more functionality than saving, loading, printing, etc.

Thanks to the "action" concept of Qt and KDE, you can freely customize KOffice menu bars and tool bars. Unfortunately, at the moment, there are no easy-to-use dialogs to do this. KOffice stores its GUI configuration in XML files and you'll have to edit those. Hopefully, this situation will change in the future; for now, you'll need some basic knowledge of how an XML document works (or HTML, which is a subset of XML). [The "action" concept needs to be discussed in more detail -- kt.]

Normally, each KOffice application has at least two of those XML files: one describing the GUI of the shell (basically, that's what you see if there is no document open) and one describing the GUI of the respective part (that's what you see normally). For example, for KWord, these two XML files are named `kword_shell.rc` and `kword.rc`.

Here's a simple example of such an rc-file.

Example 6-2. An example of a simple rc-file

     <!DOCTYPE QConfig ><QConfig>
     <MenuBar>
      <Menu name="Edit"><text>Edit</text>
       <Action name="edit_cut"/>
       <Action name="edit_copy"/>
       <Action name="edit_paste"/>
       <Separator/>
       <Action name="edit_find"/>
      </Menu>
      <Menu name="Insert"><text>Insert</text>
       <Action name="insert_picture"/>
       <Action name="insert_clipart"/>
       <Menu name="Variable"><text>Variable</text>
        <Action name="insert_var_datefix"/>
        <Action name="insert_var_datevar"/>
       </Menu>
      </Menu>
     </MenuBar>
     <ToolBars>
      <ToolBar name="edit_toolbar" position="right">
       <Action name="edit_cut"/>
       <Action name="edit_copy"/>
       <Action name="edit_paste"/>
      </ToolBar>
     </ToolBars>
     </QConfig>

Prev | Home | Next
Optimizing KOffice and Your System | Up | How to get more information