Index: /branch/NetworkInventory/setup.py
===================================================================
--- /branch/NetworkInventory/setup.py (revision 4289)
+++ /branch/NetworkInventory/setup.py (revision 4300)
@@ -390,5 +390,6 @@
             'License :: OSI Approved :: GNU General Public License (GPL)',
             'Programming Language :: Python :: 2',
-            'Programming Language :: Python :: 2.5'
+            'Programming Language :: Python :: 2.4',
+            'Programming Language :: Python :: 2.5',
             'Programming Language :: Python :: 2.6',
             'Topic :: System :: Networking',
Index: /branch/NetworkInventory/higwidgets/higlabels.py
===================================================================
--- /branch/NetworkInventory/higwidgets/higlabels.py (revision 4028)
+++ /branch/NetworkInventory/higwidgets/higlabels.py (revision 4300)
@@ -131,5 +131,7 @@
     """
     def __init__(self, text=None, underline=False):
-        gtk.Label.__init__(self, text)
+        gtk.Label.__init__(self)
+        if text is not None:
+            self.set_text(text)
         self.set_justify(gtk.JUSTIFY_LEFT)
         self.set_alignment(0, 0.50)
Index: /branch/NetworkInventory/umit/gui/CrashReport.py
===================================================================
--- /branch/NetworkInventory/umit/gui/CrashReport.py (revision 4252)
+++ /branch/NetworkInventory/umit/gui/CrashReport.py (revision 4300)
@@ -174,5 +174,4 @@
         self.destroy()
         gtk.main_quit()
-        sys.exit(0)
 
     def get_description(self):
Index: /branch/NetworkInventory/umit/gui/Search.py
===================================================================
--- /branch/NetworkInventory/umit/gui/Search.py (revision 4252)
+++ /branch/NetworkInventory/umit/gui/Search.py (revision 4300)
@@ -86,5 +86,5 @@
             self.fraction
         except:
-            self.fraction = 0.2        
+            self.fraction = 0.2
         self.progress.set_fraction(self.fraction + self.progress.get_fraction())
 
@@ -92,8 +92,8 @@
     filename = property(get_filename,
                         set_filename,
-                        doc=_("File name been searched"))
+                        doc=_("File's name being searched"))
     path = property(get_path,
                     set_path,
-                    doc=_("Path been scanned"))
+                    doc=_("Path being scanned"))
     fraction = property(get_fraction,
                         set_fraction,
Index: /branch/NetworkInventory/umit/gui/ProfileWizardEditor.py
===================================================================
--- /branch/NetworkInventory/umit/gui/ProfileWizardEditor.py (revision 4252)
+++ /branch/NetworkInventory/umit/gui/ProfileWizardEditor.py (revision 4300)
@@ -194,5 +194,5 @@
         box = HIGHBox()
         box._pack_expand_fill(self.treeview)
-        self.profile_group_sw.add(box)
+        self.profile_group_sw.add_with_viewport(box)
         
         
@@ -290,5 +290,5 @@
         column = gtk.TreeViewColumn("Name", renderer, text=0)
         treeview.append_column(column)
-        self.prop_frame_option.add(treeview)
+        prop_sw.add(treeview)
         self.prop_frame_option.add(prop_sw)
         
@@ -306,8 +306,6 @@
         self.prop_exp = HIGExpander("Proprieties")
 
-        label = gtk.Label('s')
-        self.prop_exp.add(label)
-        self.prop_frame.add(self.prop_exp)    
-        
+        self.prop_frame.add(self.prop_exp)
+
 
 
Index: /branch/NetworkInventory/umit/gui/Splash.py
===================================================================
--- /branch/NetworkInventory/umit/gui/Splash.py (revision 4252)
+++ /branch/NetworkInventory/umit/gui/Splash.py (revision 4300)
@@ -76,5 +76,5 @@
 
 if __name__ == "__main__":
-    from os.path import join
-    s = Splash(join(".", "share", "pixmaps", "splash.png"))
+    import os
+    s = Splash(os.path.join(".", "share", "pixmaps", "umit", "splash.png"))
     gtk.main()
Index: /branch/NetworkInventory/umit/gui/NmapOutputViewer.py
===================================================================
--- /branch/NetworkInventory/umit/gui/NmapOutputViewer.py (revision 4252)
+++ /branch/NetworkInventory/umit/gui/NmapOutputViewer.py (revision 4300)
@@ -417,5 +417,5 @@
 
     buff = n.text_view.get_buffer()
-    buff.set_text(read_file("file_with_encoding_issues.txt"))
-    
+    buff.set_text(open("file_with_encoding_issues.txt", 'rb').read())
+
     gtk.main()
Index: /branch/NetworkInventory/umit/gui/OptionBuilder.py
===================================================================
--- /branch/NetworkInventory/umit/gui/OptionBuilder.py (revision 4252)
+++ /branch/NetworkInventory/umit/gui/OptionBuilder.py (revision 4300)
@@ -1,3 +1,2 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
@@ -21,6 +20,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
+import os
+import sys
 import gtk
-
 from xml.dom import minidom
 
@@ -29,25 +29,18 @@
 from higwidgets.higbuttons import HIGButton
 
-from umit.gui.ScriptManager import ScriptChooserDialog #MAX
+from umit.gui.ScriptManager import ScriptChooserDialog
 from umit.gui.FileChoosers import AllFilesFileChooserDialog
-
-#from umit.core.UmitConf import is_maemo
 
 from umit.core.NmapOptions import NmapOptions
 from umit.core.I18N import _
+from umit.core.Utils import amiroot
 from umit.core.OptionsConf import options_file
-import os, sys
-
-## Integration 
-#class OptionTab(object):
-    #def __init__(self, root_tab, options, constructor, update_func):
-        #actions = {'option_list':self.__parse_option_list,\
-                   #'option_check':self.__parse_option_check}
-
-#<<<<<<< .working
+
+
 class OptionTab(object):
     def __init__(self, root_tab, options, constructor, update_func):
-        actions = {'option_list':self.__parse_option_list,\
-                   'option_check':self.__parse_option_check}
+        actions = {
+                'option_list':self.__parse_option_list,
+                'option_check':self.__parse_option_check}
 
         self.options = options
@@ -57,5 +50,5 @@
 
         options_used = self.constructor.get_options()
-        
+
         # Cannot use list comprehhension because text nodes raise exception
         # when tagName is called
@@ -65,42 +58,30 @@
             else:
                 if option_element.tagName in actions.keys():
-                    self.widgets_list.append(actions[option_element.tagName](option_element, options_used))
+                    self.widgets_list.append(
+                            actions[option_element.tagName](option_element,
+                                options_used))
 
     def __parse_option_list(self, option_list, options_used):
         options = option_list.getElementsByTagName(u'option')
-        
+
         label = HIGEntryLabel(option_list.getAttribute(u'label'))
         opt_list = OptionList()
-        
+
         for opt in options:
             opt_list.append(self.options.get_option(opt.getAttribute(u'name')))
-        
+
         for i, row in enumerate(opt_list.list):
             if row[0] in options_used:
                 opt_list.set_active(i)
-                
+
         return label, opt_list
-    
-    def is_root(self):
-        """
-        Returns if is a root users
-        """
-        
-        root = False
-        try:
-            if sys.platform == 'win32': root = True
-            elif os.getuid() == 0: root = True
-        except: pass
-        return root
-    
+
     def _disable_option(self, need_root):
         """
         enable / disable option if non-root user.
         """
-        is_root = self.is_root()
-
-        return not is_root and need_root
-    
-    
+        return not amiroot() and need_root
+
+
     def __with_icon(self, hint):
         """
@@ -108,8 +89,6 @@
         """
         return hint!=""
-    
+
     def __parse_option_check(self, option_check, options_used):
-        #arg_type = option_check.getAttribute(u'arg_type')
-        
         option = option_check.getAttribute(u'option')
         arg_type = self.options.get_arg_type(option)
@@ -124,16 +103,15 @@
         else:
             check = OptionCheck(label, opt_parse)
-        check.set_active(option in options_used)  
+        check.set_active(option in options_used)
         if self._disable_option(need_root):
             check.disable_widget()
-        type_mapping = { 
-            "str": OptionEntry,
-            "int": OptionIntSpin,
-            "float": OptionFloatSpin,
-            "level": OptionLevelSpin, 
-            "path": OptionFile,
-            "interface": OptionInterface, 
-            "scriptlist": OptionScriptList
-            }
+        type_mapping = {
+                "str": OptionEntry,
+                "int": OptionIntSpin,
+                "float": OptionFloatSpin,
+                "level": OptionLevelSpin,
+                "path": OptionFile,
+                "interface": OptionInterface,
+                "scriptlist": OptionScriptList}
 
         additional = None
@@ -171,5 +149,5 @@
             elif te == type(OptionInterface()):
                 widget[1].child.connect('changed', self.update_entry, widget[0])
-            
+
     def update_check(self, check, extra):
         if check.get_active():
@@ -191,5 +169,5 @@
 
         self.update_command()
-        
+
     def update_entry(self, widget, check):
         if not check.get_active():
@@ -198,11 +176,11 @@
         self.constructor.remove_option(check.option['name'])
         self.constructor.add_option(check.option['name'], widget.get_text())
-        
+
         self.update_command()
-    
+
     def update_level(self, widget, check):
         if not check.get_active():
             check.set_active(True)
-        
+
         try:
             self.constructor.remove_option(check.option['name'])
@@ -210,8 +188,9 @@
                 check.set_active(False)
             else:
-                self.constructor.add_option(check.option['name'],\
-                                        level=int(widget.get_text()))
+                self.constructor.add_option(
+                        check.option['name'],
+                        level=int(widget.get_text()))
         except:pass
-        
+
         self.update_command()
 
@@ -221,10 +200,10 @@
         else:
             self.constructor.remove_option(widget.last_selected)
-        
+
         option_name = widget.options[widget.get_active()]['name']
-      
+
         self.constructor.add_option(option_name)
         widget.last_selected = option_name
-        
+
         self.update_command()
 
@@ -232,6 +211,6 @@
         if self.update_func:
             self.update_func()
-    
-                 
+
+
 class OptionBuilder(object):
     def __init__(self, xml_file, constructor, update_func):
@@ -248,14 +227,14 @@
         self.constructor = constructor
         self.update_func = update_func
-        
+
         self.root_tag = "interface"
-        
+
         self.xml = self.xml.getElementsByTagName(self.root_tag)[0]
         self.options = NmapOptions(options_file)
-        
+
         self.groups = self.__parse_groups()
         self.section_names = self.__parse_section_names()
         self.tabs = self.__parse_tabs()
-    
+
 
     def __parse_section_names(self):
@@ -265,5 +244,5 @@
             dic[group] = grp.getAttribute(u'label')
         return dic
-    
+
     def __parse_groups(self):
         return [g_name.getAttribute(u'name') for g_name in \
@@ -274,8 +253,9 @@
         dic = {}
         for tab_name in self.groups:
-            dic[tab_name] = OptionTab(self.xml.getElementsByTagName(tab_name)[0],
-                                      self.options,
-                                      self.constructor,
-                                      self.update_func)
+            dic[tab_name] = OptionTab(
+                    self.xml.getElementsByTagName(tab_name)[0],
+                    self.options,
+                    self.constructor,
+                    self.update_func)
         return dic
 
@@ -284,5 +264,5 @@
     def enable_widget(self):
         self.set_sensitive(True)
-    
+
     def disable_widget(self):
         self.set_sensitive(False)
@@ -292,5 +272,5 @@
         self.list = gtk.ListStore(str)
         gtk.ComboBoxEntry.__init__(self, self.list)
-        
+
         cell = gtk.CellRendererText()
         self.pack_start(cell, True)
@@ -301,11 +281,11 @@
         self.list = gtk.ListStore(str)
         gtk.ComboBox.__init__(self, self.list)
-        
+
         cell = gtk.CellRendererText()
         self.pack_start(cell, True)
         self.add_attribute(cell, 'text', 0)
-        
+
         self.options = []
-    
+
     def append(self, option):
         self.list.append([option[u'name']])
@@ -314,7 +294,7 @@
 class OptionCheckIcon(HIGHBox, OptionWidget):
     def __init__(self, label=None, option=None, hint=None):
-        
+
         HIGHBox.__init__(self)
-        
+
         self.cbutton = OptionCheck(label,option)
         self.option = option
@@ -322,11 +302,11 @@
         self.pack_start(self.cbutton, False, False)
         self.pack_start(self.hint, False, False, 5)
-    
+
     def connect(self, action, func, additional):
         """
-        connect checkbox 
+        connect checkbox
         """
         self.cbutton.connect(action, func, additional)
-    
+
     def set_active(self, value):
         """
@@ -334,30 +314,30 @@
         """
         self.cbutton.set_active(value)
-        
+
     def get_active(self):
         return self.cbutton.get_active()
-    
+
     def get_checkbox(self):
         """
-        Returns checkbox 
+        Returns checkbox
         example, to do connection
         """
         return self.cbutton
-    
+
     def get_option(self):
         return self.cbutton.get_option()
 
 class OptionScriptList(HIGHBox, OptionWidget, object):
-    # From MAX
     def __init__(self):
         HIGHBox.__init__(self)
-        
+
         self.entry = OptionEntry()
         self.button = HIGButton(stock=gtk.STOCK_EDIT)
-        
+
         self._pack_expand_fill(self.entry)
         self._pack_noexpand_nofill(self.button)
-        
+
         self.button.connect('clicked', self.open_dialog_cb)
+
     def open_dialog_cb(self, widget):
         dialog = ScriptChooserDialog(self.entry.get_text())
@@ -369,7 +349,7 @@
     def __init__(self, label=None, option=None):
         gtk.CheckButton.__init__(self, label)
-        
+
         self.option = option
-    
+
     def get_option(self):
         return self.option
@@ -400,8 +380,8 @@
     def __init__(self, param=""):
         HIGHBox.__init__(self)
-        
+
         self.entry = OptionEntry()
         self.button = HIGButton(stock=gtk.STOCK_OPEN)
-        
+
         self._pack_expand_fill(self.entry)
         self._pack_noexpand_nofill(self.button)
@@ -409,5 +389,5 @@
         self.entry.set_text(param)
         self.button.connect('clicked', self.open_dialog_cb)
-    
+
     def open_dialog_cb(self, widget):
         dialog = AllFilesFileChooserDialog(_("Choose file"))
@@ -429,11 +409,12 @@
 
         self.hint_image = gtk.Image()
-        self.hint_image.set_from_stock(gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_SMALL_TOOLBAR)
+        self.hint_image.set_from_stock(
+                gtk.STOCK_DIALOG_INFO,
+                gtk.ICON_SIZE_SMALL_TOOLBAR)
 
         self.add(self.hint_image)
         self.add_events(gtk.gdk.BUTTON_MOTION_MASK)
         self.connect("button-press-event", self.show_hint)
-        #self.connect("enter-notify-event", self.show_hint)
-         
+
 
     def show_hint(self, widget, event=None):
@@ -441,12 +422,12 @@
         hint_window.show_all()
 
-    
+
 class HintWindow(gtk.Window):
-    
+
     def __init__(self, hint):
         gtk.Window.__init__(self, gtk.WINDOW_POPUP)
         self.set_position(gtk.WIN_POS_MOUSE)
         bg_color = gtk.gdk.color_parse("#fbff99")
-        
+
         self.modify_bg(gtk.STATE_NORMAL, bg_color)
 
@@ -455,9 +436,8 @@
         self.event.set_border_width(10)
         self.event.connect("button-press-event", self.close)
-        #self.event.connect("leave-notify-event", self.close)        
         self.hint_label = gtk.Label(hint)
         self.hint_label.set_use_markup(True)
         self.hint_label.set_line_wrap(True)
-        
+
         self.event.add(self.hint_label)
         self.add(self.event)
@@ -465,12 +445,2 @@
     def close(self, widget, event=None):
         self.destroy()
-        
-if __name__ == '__main__':
-    o = OptionBuilder('profile_editor.xml')
-
-    ol = OptionFile()
-    w = gtk.Window()
-    w.add(ol)
-    w.show_all()
-    w.connect('delete-event', lambda x,y,z=None: gtk.main_quit())
-    gtk.main()
