commit 52bbca746861379d52336171a374e8d3dfebda5d
Author: Federico Mena Quintero <federico@gnu.org>
Date:   Thu Jul 12 13:37:41 2007 -0500

    OpenOffice.org lockdown from Michael Meeks

diff --git a/ChangeLog b/ChangeLog
index c2cf02c..a63728e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-03-24  Michael Meeks  <michael.meeks@novell.com>
+
+	Add support for OpenOffice.org lockdown.
+
+	* lib/sources/gconfsource.py: add int/string bits.
+	
+	* admin-tool/lockdownappliersabayon.py: add support
+	for string & int types & re-factor a little.
+
+	pessulus: yes I know I shouldn't commit here, but it's
+	          a branch & I want a simple diff.
+	
+	* admin-tool/lockdown/maindialog.py: add combo
+	settings, and OO.o key path / name / vbox tuples
+
+	* admin-tool/lockdown/lockdowncombo.py: impl. new
+	combo lock-down setup.
+	
+	* admin-tool/lockdown/pessulus.glade: add OO.o widgets
+
 2007-07-12  Federico Mena Quintero  <federico@novell.com>
 
 	* admin-tool/lockdown/disabledapplets.py
diff --git a/admin-tool/lockdown/Makefile.am b/admin-tool/lockdown/Makefile.am
index 6d8765a..4e1080a 100644
--- a/admin-tool/lockdown/Makefile.am
+++ b/admin-tool/lockdown/Makefile.am
@@ -7,6 +7,7 @@ PESSULUSPYTHON= \
         lockdownapplier.py      \
         lockdownbutton.py       \
         lockdowncheckbutton.py  \
+        lockdowncombo.py  	\
         maindialog.py           \
         safeprotocols.py        \
         simpleeditabletreeview.py
diff --git a/admin-tool/lockdown/lockdowncombo.py b/admin-tool/lockdown/lockdowncombo.py
new file mode 100644
index 0000000..8f4c4b3
--- /dev/null
+++ b/admin-tool/lockdown/lockdowncombo.py
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+
+#
+# Copyright (C) 2006 Novell, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
+#
+
+import gobject
+import gtk
+import gconf
+import sys
+import re
+
+import globalvar
+import lockdownbutton
+
+class PessulusLockdownCombo:
+    def __init__ (self, key, combo, type, value_list):
+        self.key = key
+        self.combo = combo
+        self.type = type
+        self.value_list = value_list;
+        self.lockdownbutton = None
+
+    def attach (combo, button, key, type, value_list):
+        lockdown = PessulusLockdownCombo (key, combo, type, value_list)
+        lockdown.lockdownbutton = lockdownbutton.PessulusLockdownButton.new_with_widget (button)
+        # FIXME: connect to toggled ...
+        lockdown.__connect_and_update ()
+        return lockdown
+    attach = staticmethod (attach)
+
+    def __connect_and_update (self):
+        self.lockdownbutton.connect ("toggled",
+                                     self.__on_lockdownbutton_toggled)
+
+        self.combo.connect ("changed", self.__on_combo_changed)
+        self.combo.connect ("destroy", self.__on_destroyed)
+
+        self.notify_id = globalvar.applier.notify_add (self.key,
+                                                       self.__on_notified)
+        self.update_state()
+
+    def update_state(self):
+        if self.isInt():
+            (val, mandatory) = globalvar.applier.get_int (self.key)
+            if val == None:
+                val = "<not-in-list>"
+            else:
+                val = str (val)
+        else:
+            (val, mandatory) = globalvar.applier.get_string (self.key)
+        
+        index = 0
+        for i in range (len(self.value_list)):
+            if self.value_list[i] == val:
+                index = i + 1
+                break
+
+        if self.combo.get_property ("active") != index:
+            self.combo.set_property ("active", index)
+            
+        self.combo.set_sensitive (globalvar.applier.key_is_writable (self.key))
+        if mandatory != self.lockdownbutton.get ():
+            self.lockdownbutton.set (mandatory)
+
+    def __on_notified(self, data):
+        self.update_state()
+        
+    def getValue(self):
+        idx = self.combo.get_property("active")
+        if (idx < 1 or idx > len(self.value_list)):
+            val = None
+        else:
+            val = self.value_list [idx - 1]
+        return val
+        
+    def isUnset(self):
+        if self.getValue() == None or self.getValue() == "":
+            return True
+        else:
+            return False
+        
+    def isInt(self):
+        return self.type == "int"
+
+    def __do_change(self):
+        if self.isUnset():
+# FIXME: we should really use a 'tri-state' scheme & 'unset' the key            
+            return
+        if globalvar.applier and globalvar.applier.key_is_writable (self.key):
+            if self.isInt():
+                globalvar.applier.set_int (self.key, int(self.getValue()),
+                                           self.lockdownbutton.get ())
+            else:
+                globalvar.applier.set_string (self.key, self.getValue(),
+                                              self.lockdownbutton.get ())
+
+    def __on_combo_changed (self, data):
+        self.__do_change()
+
+    def __on_lockdownbutton_toggled (self, lockdownbutton, mandatory):
+        self.__do_change ()
+
+    def __on_destroyed (self, combobox):
+        if self.notify_id:
+            if globalvar.applier:
+                globalvar.applier.notify_remove (self.notify_id)
+            self.notify_id = None
diff --git a/admin-tool/lockdown/maindialog.py b/admin-tool/lockdown/maindialog.py
index 406b6cf..169f5b6 100644
--- a/admin-tool/lockdown/maindialog.py
+++ b/admin-tool/lockdown/maindialog.py
@@ -34,6 +34,7 @@ from sabayon import debuglog
 import disabledapplets
 import lockdownbutton
 import lockdowncheckbutton
+import lockdowncombo
 import globalvar
 import safeprotocols
 
@@ -41,6 +42,7 @@ gettext.install (PACKAGE, LOCALEDIR)
 
 gconfdirs = [
 "/desktop/gnome/lockdown",
+"/apps/openoffice/lockdown",
 "/apps/epiphany/lockdown",
 "/apps/panel/global"
 ]
@@ -63,7 +65,48 @@ lockdownbuttons = (
     ( "/apps/epiphany/lockdown/disable_javascript_chrome", _("Disable _javascript chrome"), "vbox9" ),
     ( "/apps/epiphany/lockdown/disable_toolbar_editing", _("Disable _toolbar editing"), "vbox9" ),
     ( "/apps/epiphany/lockdown/fullscreen", _("_Fullscreen"), "vbox9" ),
-    ( "/apps/epiphany/lockdown/hide_menubar", _("Hide _menubar"), "vbox9" )
+    ( "/apps/epiphany/lockdown/hide_menubar", _("Hide _menubar"), "vbox9" ),
+
+    ( "/apps/openoffice/lockdown/remove_personal_info_on_save", _("Remove personal info from doc. on save"), "ooosecurity" ),
+    ( "/apps/openoffice/lockdown/warn_info_create_pdf", _("Warn if macro creates PDF"), "ooosecurity" ),
+    ( "/apps/openoffice/lockdown/warn_info_printing",   _("Warn if macro prints"), "ooosecurity" ),
+    ( "/apps/openoffice/lockdown/warn_info_saving", _("Warn if macro saves doc"), "ooosecurity" ),
+    ( "/apps/openoffice/lockdown/warn_info_signing", _("Warn if macro signs doc"), "ooosecurity" ),
+    ( "/apps/openoffice/lockdown/recommend_password_on_save", _("Recommend password on save"), "ooosecurity" ),
+
+    ( "/apps/openoffice/auto_save", _("Enable auto-save"), "oooio" ),
+#    ( "/apps/openoffice/auto_save_interval", _("Auto save interval"), "oooio" ),
+    ( "/apps/openoffice/printing_modifies_doc", _("Printing modifies document"), "oooio" ),
+    ( "/apps/openoffice/use_system_file_dialog", _("Use system file chooser"), "oooio" ),
+    ( "/apps/openoffice/create_backup", _("Create backup copy on save"), "oooio" ),
+    ( "/apps/openoffice/warn_alien_format", _("Warn for external formats"), "oooio" ),
+
+    ( "/apps/openoffice/use_opengl", _("Use Open GL"), "oooui" ),
+    ( "/apps/openoffice/use_system_font", _("Use system font"), "oooui" ),
+    ( "/apps/openoffice/use_font_anti_aliasing", _("Use anti-aliasing"), "oooui" ),
+    ( "/apps/openoffice/lockdown/disable_ui_customization", _("Disable UI customization"), "oooui" ),
+    ( "/apps/openoffice/show_menu_inactive_items", _("Show insensitive menu items"), "oooui" ),
+    ( "/apps/openoffice/show_font_preview", _("Show font preview"), "oooui" ),
+    ( "/apps/openoffice/show_font_history", _("Show font history") , "oooui" ),
+    ( "/apps/openoffice/show_menu_icons", _("Show icons in menus"), "oooui" ),
+# Unclear / minority:
+#   ( "/apps/openoffice/optimize_opengl", , "oooui" ),
+#   ( "/apps/openoffice/font_anti_aliasing_min_pixel", , "oooui" ),
+)
+
+lockdowncombos = (
+    ( "/apps/openoffice/lockdown/macro_security_level", "macroSecurityLevel", "int",
+      [ "3", "2", "1", "0" ] ),
+    ( "/apps/openoffice/writer_default_document_format", "writerDefaultFormat", "string",
+      [ "writer8", "MS Word 97", "StarOffice XML (Writer)" ] ),
+    ( "/apps/openoffice/calc_default_document_format", "calcDefaultFormat", "string",
+      [ "calc8", "MS Excel 97", "StarOffice XML (Calc)" ] ),
+    ( "/apps/openoffice/impress_default_document_format", "impressDefaultFormat", "string",
+      [ "impress8", "MS PowerPoint 97", "StarOffice XML (Impress)" ] ),
+    ( "/apps/openoffice/icon_size", "defaultIconSize", "int",
+      [ "2", "1", "0" ] ),
+    ( "/apps/openoffice/undo_steps", "undoSteps", "int",
+      [ "5", "10", "25", "50" ] )
 )
 
 class PessulusMainDialog:
@@ -79,6 +122,7 @@ class PessulusMainDialog:
         self.glade_file = os.path.join (GLADEDIR, "pessulus.glade")
         self.xml = gtk.glade.XML (self.glade_file, "dialogEditor", PACKAGE)
 
+        self.__init_combos ()
         self.__init_checkbuttons ()
         self.__init_disabledapplets ()
         self.__init_safeprotocols ()
@@ -102,6 +146,12 @@ class PessulusMainDialog:
             box = self.xml.get_widget (box_str)
             box.pack_start (button.get_widget (), False)
 
+    def __init_combos (self):
+        for (key, combo_str, type, value_list) in lockdowncombos:
+            combo = self.xml.get_widget (combo_str)
+            button = self.xml.get_widget (combo_str + "Button")
+            lockdowncombo.PessulusLockdownCombo.attach (combo, button, key, type, value_list)
+
     def __init_disabledapplets (self):
         treeview = self.xml.get_widget ("treeviewDisabledApplets")
         button = self.xml.get_widget ("buttonDisabledApplets")
diff --git a/admin-tool/lockdown/pessulus.glade b/admin-tool/lockdown/pessulus.glade
index d20c44b..b2e4de3 100644
--- a/admin-tool/lockdown/pessulus.glade
+++ b/admin-tool/lockdown/pessulus.glade
@@ -281,6 +281,590 @@
 	  </child>
 
 	  <child>
+	    <widget class="GtkNotebook" id="notebook3">
+	      <property name="border_width">12</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="show_tabs">True</property>
+	      <property name="show_border">True</property>
+	      <property name="tab_pos">GTK_POS_TOP</property>
+	      <property name="scrollable">False</property>
+	      <property name="enable_popup">False</property>
+
+	      <child>
+		<widget class="GtkVBox" id="ooosecurity">
+		  <property name="border_width">12</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox4">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="macroSecurityLevelButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NONE</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label17">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Macro Security Level:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="macroSecurityLevel">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">
+Very High
+High
+Medium
+Low</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label24">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Security</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="oooio">
+		  <property name="border_width">12</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox5">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="writerDefaultFormatButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NONE</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label18">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Writer default format:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="writerDefaultFormat">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">
+OpenDocument (.odt)
+Word 97+ (.doc)
+OpenOffice 1.1 (.sxw)</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox6">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="calcDefaultFormatButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NONE</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label19">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Calc default format:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="calcDefaultFormat">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">
+OpenDocument (.ods)
+Excel 97+ (.xls)
+OpenOffice 1.1 (.sxc)</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox7">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="impressDefaultFormatButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NONE</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label20">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Impress default format:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="impressDefaultFormat">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">
+OpenDocument (.odp)
+PowerPoint 97+ (.ppt)
+OpenOffice 1.1 (.sxi)</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label25">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Load / Save</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="oooui">
+		  <property name="border_width">12</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox8">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="defaultIconSizeButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NONE</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label21">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Default icon size</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="defaultIconSize">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">
+Automatic
+Large
+Small</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox9">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="undoStepsButton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NONE</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label22">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Undo Steps:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="undoSteps">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">
+5
+10
+25
+50</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label26">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">User Interface</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label23">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">OpenOffice</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
 	    <widget class="GtkVBox" id="vbox14">
 	      <property name="border_width">12</property>
 	      <property name="visible">True</property>
diff --git a/admin-tool/lockdownappliersabayon.py b/admin-tool/lockdownappliersabayon.py
index b943a9f..93ec1da 100644
--- a/admin-tool/lockdownappliersabayon.py
+++ b/admin-tool/lockdownappliersabayon.py
@@ -64,20 +64,45 @@ class LockdownApplierSabayon (lockdownapplier.PessulusLockdownApplier):
             return self.changes_model[iter][sessionwindow.ProfileChangesModel.COLUMN_MANDATORY]
         
         return self.source.get_gconf_key_is_mandatory (key)
-        
-    def get_bool (self, key):
+
+    def get_value (self, key):
         iter = self.changes_model.find (self.source, key)
         if iter:
             change = self.changes_model[iter][sessionwindow.ProfileChangesModel.COLUMN_CHANGE]
-            val = change.value.get_bool()
+            val = change.value
         else:
-            val = self.client.get_bool (key)
+            val = self.client.get (key)
+        return val
         
+    def get_bool (self, key):
+        val = self.get_value (key)
+        if val == None:
+            val = False
+        else:
+            val = val.get_bool()
         return (val, self.__is_mandatory (key))
-            
+
+    def get_int (self, key):
+        val = self.get_value (key)
+        if val != None:
+            val = val.get_int()
+        return (val, self.__is_mandatory (key))
+
+    def get_string (self, key):
+        val = self.get_value (key)
+        if val != None:
+            val = val.get_string()
+        return (val, self.__is_mandatory (key))
+
     def set_bool (self, key, value, mandatory):
         return self.source.set_gconf_boolean (key, value, mandatory)
 
+    def set_int (self, key, value, mandatory):
+        return self.source.set_gconf_int (key, value, mandatory)
+
+    def set_string (self, key, value, mandatory):
+        return self.source.set_gconf_string (key, value, mandatory)
+
     def get_list (self, key, list_type):
         value = self.client.get_list (key, list_type)
         return (value, self.__is_mandatory (key))
diff --git a/lib/sources/gconfsource.py b/lib/sources/gconfsource.py
index 17d1c9c..d8b588b 100755
--- a/lib/sources/gconfsource.py
+++ b/lib/sources/gconfsource.py
@@ -336,14 +336,27 @@ class GConfSource (userprofile.ProfileSource):
             return True
         return False
 
-    def set_gconf_boolean (self, key, value, mandatory):
-        gconf_value = gconf.Value (gconf.VALUE_BOOL)
-        gconf_value.set_bool (value)
+    def set_value (self, key, gconf_value, mandatory):
         change = GConfChange (self, key, gconf_value)
         change.set_mandatory (mandatory)
-        self.client.set_bool (key, value)
+        self.client.set (key, gconf_value)
         self.emit_change (change)
 
+    def set_gconf_boolean (self, key, value, mandatory):
+        gconf_value = gconf.Value (gconf.VALUE_BOOL)
+        gconf_value.set_bool (value)
+        self.set_value (key, gconf_value, mandatory);
+
+    def set_gconf_int (self, key, value, mandatory):
+        gconf_value = gconf.Value (gconf.VALUE_INT)
+        gconf_value.set_int (value)
+        self.set_value (key, gconf_value, mandatory);
+
+    def set_gconf_string (self, key, value, mandatory):
+        gconf_value = gconf.Value (gconf.VALUE_STRING)
+        gconf_value.set_string (value)
+        self.set_value (key, gconf_value, mandatory);
+
     def set_gconf_list (self, key, list_type, value, mandatory):
         gconf_value = gconf.Value (gconf.VALUE_LIST)
         list = []
@@ -356,10 +369,7 @@ class GConfSource (userprofile.ProfileSource):
             list.append (item_value)
         gconf_value.set_list_type (list_type)
         gconf_value.set_list (list)
-        change = GConfChange (self, key, gconf_value)
-        change.set_mandatory (mandatory)
-        self.client.set_list (key, list_type, value)
-        self.emit_change (change)
+        self.set_value (key, gconf_value, mandatory);
 
 gobject.type_register (GConfSource)
 
