Index: /branch/ggpolo/umitDB/Retrieve.py
===================================================================
--- /branch/ggpolo/umitDB/Retrieve.py (revision 1311)
+++ /branch/ggpolo/umitDB/Retrieve.py (revision 1355)
@@ -142,4 +142,17 @@
         if addr:
             return addr[0]
+        
+        
+    def get_address_pk_for_host_from_db(self, fk_host):
+        """
+        Return address pk from database based on host id.
+        """
+        self.cursor.execute("SELECT address.pk FROM address JOIN _host_address \
+                             ON (_host_address.fk_address=address.pk) WHERE \
+                             _host_address.fk_host=?", (fk_host, ))
+        addr = self.cursor.fetchone()
+        
+        if addr:
+            return addr[0]
 
 
Index: /branch/ggpolo/umitDB/Search.py
===================================================================
--- /branch/ggpolo/umitDB/Search.py (revision 1349)
+++ /branch/ggpolo/umitDB/Search.py (revision 1355)
@@ -24,8 +24,8 @@
 from umitCore.I18N import _
 
-change_text = ( _("change"), _("changes") ) 
-port_text = ( _("port"), _("ports"), _("service") )
-comparison = ( "<", ">", "==", ">=", "<=", "!=" )
-	
+change_text = (_("change"), _("changes"))
+port_text = (_("port"), _("ports"), _("service"))
+comparison = ("<", ">", "==", ">=", "<=", "!=")
+
 def perform_comparison(ports, compare, decider):
     """
@@ -70,4 +70,8 @@
     Performs search on database.
     """
+    search_meths = { "ports": "port_search",
+                     "changes": "changes_search"
+                     }
+        
     
     def __init__(self, db):
@@ -83,13 +87,16 @@
         Convenience method. Performs searches for host_id.
         """
-        if query.split()[0] in port_text:
-            res = self.port_search(host_id, query)
+        likely_category = query.split()[0]
+        meth = None
+        
+        if likely_category in port_text:
+            meth = self.search_meths["ports"]
+        elif likely_category in change_text:
+            meth = self.search_meths["changes"]
+
+        if meth:
+            res = getattr(self, meth)(host_id, query)
             if res:
                 return res
-            
-        #if query.split()[0] in change_text:
-        #    res = self.changes_search(host_id, query)
-        #    if res:
-        #        return res
             
         if self.search_for_hostname_for_host_from_db(host_id, query):
@@ -144,5 +151,5 @@
         results = ''
         portnumber = False
-        #porttext = False # porttext includes product, version, extrainfo
+        
         try:
             int(looking_for)
@@ -207,4 +214,31 @@
             return _("Service info")
     
+    
+    def changes_search(self, host_id, query):
+        """
+        Search in _inventory_changes for something like query for host_id.
+        """
+        debug("Searching under Inventory changes for %s for \
+host_id %d.." % (query, host_id))
+        
+        query = query.split()
+        if len(query) < 2 or (not query[0] in change_text):
+            # bad syntax for changes search
+            return None
+        
+        address_id = self.get_address_pk_for_host_from_db(host_id)
+        
+        looking_for = query[1:]
+
+        bquery = '%' + ' '.join(looking_for) + '%'
+        
+        self.cursor.execute("SELECT pk FROM _inventory_changes \
+                           WHERE fk_address=? AND short_description LIKE ?", 
+                           (address_id, bquery))
+        results = self.cursor.fetchall()
+        
+        if results:
+            return _("Changes")
+        
     
     def search_for_hostname_for_host_from_db(self, host_id, query):
Index: /branch/ggpolo/scheduler-umit
===================================================================
--- /branch/ggpolo/scheduler-umit (revision 1349)
+++ /branch/ggpolo/scheduler-umit (revision 1355)
@@ -158,8 +158,11 @@
 
     # try to set especified config dir
-    try:
-        setup_homedir(sys.argv[2])
-    except IndexError: # no path especified
-        setup_homedir(os.path.join(os.path.expanduser("~"), '.umit'))
+    if CONFIG_DIR:
+        setup_homedir(CONFIG_DIR)
+    else:
+        try:
+            setup_homedir(sys.argv[2])
+        except IndexError: # no path especified
+            setup_homedir(os.path.join(os.path.expanduser("~"), '.umit'))
 
     cmds = {"start": start,
Index: /branch/ggpolo/umitInventory/Viewer.py
===================================================================
--- /branch/ggpolo/umitInventory/Viewer.py (revision 1349)
+++ /branch/ggpolo/umitInventory/Viewer.py (revision 1355)
@@ -50,4 +50,5 @@
 from umitInventory.ConfigureDataRemoval import ConfigureDataRemoval
 from umitInventory.SchedulerLog import SchedLog
+from umitInventory.About import About
 
 umitdb = Path.umitdb_ng
@@ -578,8 +579,14 @@
         self.main_action_group = gtk.ActionGroup("MainActionGroup")
         
+        about_icon = None
+        try: about_icon = gtk.STOCK_ABOUT
+        except: pass
+        
         main_actions = [ \
             ("File", None, _("_File"), None),
             ("Edit", None, _("_Edit"), None),
             ("Scheduler", None, _("_Scheduler"), None),
+            ("Help", None, _("_Help"), None),
+            
             ("ToolbarOpt", None, _("Tool_bar"), None),
             ("InvTabs", None, _("_Tabs"), None),
@@ -613,5 +620,10 @@
              self.schedctrl.status_text,
              None, self.schedctrl.status_text,
-             self.schedctrl._scheduler_control)
+             self.schedctrl._scheduler_control),
+            
+            # Help
+            ('About', about_icon, _("_About"), '<Control>a',
+             _("About UMIT Network Inventory"), self._show_about)
+            
         ]
         
@@ -668,4 +680,7 @@
                     <menuitem action='Sched Control' />
                 </menu>
+                <menu action='Help'>
+                    <menuitem action='About' />
+                </menu>
             </menubar>
             <toolbar>
@@ -720,4 +735,12 @@
         winlog.show_all()
     
+    
+    def _show_about(self, event):
+        """
+        Open about window.
+        """
+        awin = About()
+        awin.show_all()
+        
 
     def _exit_ni(self, event):
Index: /branch/ggpolo/umitInventory/About.py
===================================================================
--- /branch/ggpolo/umitInventory/About.py (revision 1355)
+++ /branch/ggpolo/umitInventory/About.py (revision 1355)
@@ -0,0 +1,90 @@
+# Copyright (C) 2007 Insecure.Com LLC.
+#
+# Author:  Guilherme Polo <ggpolo@gmail.com>
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 
+# USA
+
+import os
+import gtk
+
+from higwidgets.higwindows import HIGWindow
+from higwidgets.higboxes import HIGVBox, HIGHBox, hig_box_space_holder
+from higwidgets.higbuttons import HIGButton
+
+from umitCore.Paths import Path, VERSION, REVISION
+
+pixmaps_dir = Path.pixmaps_dir
+if pixmaps_dir:
+    logo = os.path.join(pixmaps_dir,'logo.png')
+else:
+    logo = None
+    
+NI_BUILD = "623"
+
+class About(HIGWindow):
+    def __init__(self):
+        HIGWindow.__init__(self)
+
+        self.lbl_program_version = gtk.Label(_("""
+<span size='30000' weight='heavy'>UMIT %s</span>
+<span size='10000' weight='heavy'>Rev. %s</span>
+<span size='10000' weight='heavy'>Network Inventory Build %s</span>""" % (VERSION, 
+                                                        REVISION, NI_BUILD)))
+        self.lbl_program_description = gtk.Label(_("""
+UMIT Network Inventory is an UMIT extension developed
+by Guilherme Polo <ggpolo@gmail.com> and was 
+sponsored by Google during the Summer of Code 2007. 
+Thanks Google!"""))
+        self.lbl_copyright = gtk.Label("<small>Copyright (C) 2007 \
+Insecure.Com LLC.</small>")
+        self.logo_img = gtk.Image()
+        self.logo_img.set_from_file(logo)
+        self.btn_close = HIGButton(stock=gtk.STOCK_CLOSE)
+        
+        self.btn_close.connect('clicked', lambda x,y=None:self.destroy())
+        
+        self.__set_props()
+        self.__do_layout()
+
+    
+    def __set_props(self):
+        self.set_title(_("About UMIT Network Inventory"))
+        self.set_position(gtk.WIN_POS_CENTER)
+        self.lbl_program_version.set_use_markup(True)
+        self.lbl_copyright.set_use_markup(True)
+        self.lbl_program_description.set_justify(gtk.JUSTIFY_CENTER)
+        
+        self.lbl_copyright.set_selectable(True)
+        self.lbl_program_description.set_selectable(True)
+        self.lbl_program_version.set_selectable(True)
+
+        
+    def __do_layout(self):
+        main_vbox = HIGVBox()
+        btns_box = HIGHBox()
+        
+        main_vbox.pack_start(self.logo_img)
+        main_vbox.pack_start(self.lbl_program_version)
+        main_vbox.pack_start(self.lbl_program_description)
+        main_vbox.pack_start(self.lbl_copyright)
+        
+        btns_box.pack_end(self.btn_close)
+        main_vbox._pack_noexpand_nofill(btns_box)
+        
+        self.btn_close.grab_focus()
+        
+        self.add(main_vbox)
+        
