diff -Naur istanbul-0.2.2.old/bin/istanbul.in istanbul-0.2.2/bin/istanbul.in
--- istanbul-0.2.2.old/bin/istanbul.in	2007-02-23 11:01:12.000000000 +0000
+++ istanbul-0.2.2/bin/istanbul.in	2009-01-09 20:07:55.000000000 +0000
@@ -18,15 +18,9 @@
 import os
 import sys
 
-if not '@PYGTK_DIR@' in sys.path:
-    sys.path.insert(0, '@PYGTK_DIR@')
-
 import pygtk
 pygtk.require('2.0')
 
-if not '@PYTHONDIR@' in sys.path:
-    sys.path.insert(0, '@PYTHONDIR@')
-
 from istanbul.main import main
 from istanbul.configure import config
 
diff -Naur istanbul-0.2.2.old/configure istanbul-0.2.2/configure
--- istanbul-0.2.2.old/configure	2007-02-23 12:00:16.000000000 +0000
+++ istanbul-0.2.2/configure	2009-01-09 20:08:00.000000000 +0000
@@ -22509,7 +22509,7 @@
 
 try:
 
-    import egg.trayicon
+    import sys
 
     sys.exit(0)
 except ImportError:
diff -Naur istanbul-0.2.2.old/data/istanbul.desktop.in istanbul-0.2.2/data/istanbul.desktop.in
--- istanbul-0.2.2.old/data/istanbul.desktop.in	2007-02-23 11:01:12.000000000 +0000
+++ istanbul-0.2.2/data/istanbul.desktop.in	2009-01-09 20:07:03.000000000 +0000
@@ -1,5 +1,4 @@
 [Desktop Entry]
-Encoding=UTF-8
 _Name=Istanbul Desktop Session Recorder
 _GenericName=Desktop Session Recorder
 _Comment=Record a video of your desktop session
@@ -7,5 +6,5 @@
 Terminal=false
 Type=Application
 Icon=istanbul.png
-Categories=GNOME;Application;AudioVideo;
+Categories=GNOME;AudioVideo;
 StartupNotify=false
diff -Naur istanbul-0.2.2.old/doc/man/istanbul.1 istanbul-0.2.2/doc/man/istanbul.1
--- istanbul-0.2.2.old/doc/man/istanbul.1	2007-02-23 11:01:12.000000000 +0000
+++ istanbul-0.2.2/doc/man/istanbul.1	2009-01-09 20:07:10.000000000 +0000
@@ -14,8 +14,9 @@
 area: a click on the icon to start recording, another click to stop.
 .PP
 \fBistanbul\fP preferences can be configured with a right click on the icon.
+You can choose to record full screen, a selected windows or a particular area.
 .TP
-It can also stream to an Icecast2 server.
+It can also record audio from GStreamer default input.
 .PP
 By default it records to ~/desktop-recording.ogg
 .SH OPTIONS
@@ -29,55 +30,13 @@
 .B \-\-version
 Show version of program.
 .TP
-.B \-\-usage
-Display brief usage message
+.B \-\-help\-all
+Print summary of all available options for istanbul.
 .TP
-Istanbul accepts also GStreamer options.
-A summary of them is included below.
-.TP
-.B \-\-gst\-version
-Print the GStreamer version
-.TP
-.B \-\-gst\-fatal\-warnings
-Make all warnings fatal
-.TP
-.B \-\-gst\-debug\-help
-Print available debug categories and exit
-.TP
-.B \-\-gst\-debug\-level=LEVEL
-Default debug level from 1 (only error) to 5 (anything) or 0 for no output
-.TP
-.B \-\-gst\-debug=LIST
-Comma-separated list of category_name:level pairs to set specific levels for the individual categories
-.TP
-.B \-\-gst\-debug\-no\-color
-Disable colored debugging output
-.TP
-.B \-\-gst\-debug\-disable
-Disable debugging
-.TP
-.B \-\-gst\-disable\-cpu\-opt
-Disable accelerated CPU instructions
-.TP
-.B \-\-gst\-plugin\-spew
-Enable verbose plugin loading diagnostics
-.TP
-.B \-\-gst\-plugin\-path=PATHS
-path list for loading plugins (separated by ':')
-.TP
-.B \-\-gst\-plugin\-load=PLUGINS 
-Comma-separated list of plugins to preload in addition to the list stored in environment variable GST_PLUGIN_PATH
-.TP
-.B \-\-gst\-disable\-segtrap
-Disable trapping of segmentation faults during plugin loading
-.TP
-.B \-\-gst\-scheduler=SCHEDULER
-Scheduler to use (default is 'opt')
-.TP
-.B \-\-gst\-registry=REGISTRY
-Registry to use
-.SH AUTHOR
-Istanbul was written by  Zaheer Abbas Merali <zaheerabbas@merali.org>.
+.B \-\-help\-gst
+Print summary of available options for the gstreamer framework.
+.SH AUTHORS
+Istanbul was written by Zaheer Abbas Merali <zaheerabbas@merali.org>.
 .PP
 This manual page was written by Luca Bruno <luca.br@uno.it>,
 for the Debian project (but may be used by others).
diff -Naur istanbul-0.2.2.old/istanbul/main/save_window.py istanbul-0.2.2/istanbul/main/save_window.py
--- istanbul-0.2.2.old/istanbul/main/save_window.py	2007-02-23 11:01:12.000000000 +0000
+++ istanbul-0.2.2/istanbul/main/save_window.py	2009-01-09 20:07:07.000000000 +0000
@@ -253,11 +253,12 @@
 
         if Preferences().has_gnomevfs():
             import gnomevfs
+            XFER_TARGET_DEFAULT_PERMS = 1 << 12
             try:
                 trysave = gnomevfs.xfer_uri(gnomevfs.URI("file://%s" % self.location), 
                     gnomevfs.URI(self.filechooser.get_uri()), 
                     gnomevfs.XFER_DELETE_ITEMS,
-                    gnomevfs.XFER_ERROR_MODE_ABORT, 
+                    gnomevfs.XFER_ERROR_MODE_ABORT | XFER_TARGET_DEFAULT_PERMS, 
                     gnomevfs.XFER_OVERWRITE_MODE_ABORT)
             except gnomevfs.FileExistsError:
                 dialog = gtk.MessageDialog(self,
@@ -276,7 +277,7 @@
                         gnomevfs.URI("file://%s" % self.location), 
                         gnomevfs.URI(self.filechooser.get_uri()), 
                         gnomevfs.XFER_DELETE_ITEMS,
-                        gnomevfs.XFER_ERROR_MODE_ABORT, 
+                        gnomevfs.XFER_ERROR_MODE_ABORT | XFER_TARGET_DEFAULT_PERMS, 
                         gnomevfs.XFER_OVERWRITE_MODE_REPLACE)
                     except Exception:
                         dialog = gtk.MessageDialog(self,
@@ -299,7 +300,10 @@
             import shutil
 
             try:
+                umask = os.umask(0)
+                empty_umask = os.umask(umask)
                 shutil.move(self.location, self.filechooser.get_uri()[7:])
+                os.chmod(self.filechooser.get_uri()[7:], 0777-umask)
             except Exception:
                 dialog = gtk.MessageDialog(self,
                     gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
diff -Naur istanbul-0.2.2.old/istanbul/main/window_select.py istanbul-0.2.2/istanbul/main/window_select.py
--- istanbul-0.2.2.old/istanbul/main/window_select.py	2007-02-23 11:01:12.000000000 +0000
+++ istanbul-0.2.2/istanbul/main/window_select.py	2009-01-09 20:08:03.000000000 +0000
@@ -85,7 +85,7 @@
                 return child
 
         for child in children:
-            result = self._get_client_window_check_children(window)
+            result = self._get_client_window_check_children(child)
             if result != None:
                 return result
 
