Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1871)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2007-01-03  Rich Burridge <rich.burridge@sun.com>
+
+        * src/orca/orca-setup.glade:
+          src/orca/orca_gui_prefs.py:
+          Fixed bug #347124 – Orca hangs when attempting to access apps 
+          started via gksu.
+
 2007-01-02  Rich Burridge <rich.burridge@sun.com>
 
         * bugs/bugs.html:
Index: src/orca/orca-setup.glade
===================================================================
--- src/orca/orca-setup.glade	(revision 1871)
+++ src/orca/orca-setup.glade	(working copy)
@@ -141,6 +141,27 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkCheckButton" id="disableKeyGrabCheckButton">
+		      <property name="border_width">5</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Disable gksu _keyboard grab</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="disableKeyGrabChecked" last_modification_time="Wed, 03 Jan 2007 16:37:07 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
 		    <widget class="GtkAlignment" id="alignment47">
 		      <property name="visible">True</property>
 		      <property name="xalign">0.5</property>
@@ -3179,6 +3200,7 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">orcaModKeyEntry</property>
 			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 			  <property name="width_chars">-1</property>
 			  <property name="single_line_mode">False</property>
Index: src/orca/orca_gui_prefs.py
===================================================================
--- src/orca/orca_gui_prefs.py	(revision 1871)
+++ src/orca/orca_gui_prefs.py	(working copy)
@@ -31,6 +31,7 @@
 __license__   = "LGPL"
 
 import os
+import commands
 import sys
 import debug
 import gettext
@@ -560,6 +561,13 @@
         #
         self.showMainWindowCheckButton.set_active(prefs["showMainWindow"])
 
+        self.disableKeyGrabPref = commands.getoutput( \
+                              "gconftool-2 --get /apps/gksu/disable-grab")
+        if self.disableKeyGrabPref == "true":
+            self.disableKeyGrabCheckButton.set_active(True)
+        else:
+            self.disableKeyGrabCheckButton.set_active(False)
+
         if prefs["keyboardLayout"] == settings.GENERAL_KEYBOARD_LAYOUT_DESKTOP:
             self.generalDesktopButton.set_active(True)
         else:
@@ -1813,6 +1821,19 @@
 
         self.prefsDict["showMainWindow"] = widget.get_active()
 
+    def disableKeyGrabChecked(self, widget):
+        """Signal handler for the "toggled" signal for the
+           disableKeyGrabCheckButton GtkCheckButton widget.
+           The user has [un]checked the 'Disable gksu keyboard grab'
+           checkbox. Set the gconf '/apps/gksu/disable-grab' resource
+           to the new value.
+
+        Arguments:
+        - widget: the component that generated the signal.
+        """
+
+        self.disableKeyGrabPref = widget.get_active()
+
     def keyboardLayoutChanged(self, widget):
         """Signal handler for the "toggled" signal for the generalDesktopButton,
            or generalLaptopButton GtkRadioButton widgets. The user has
@@ -1872,6 +1893,13 @@
             settings.HYPERLINK_VOICE : self.hyperlinkVoice
         }
 
+        if self.disableKeyGrabPref:
+            keyGrabState = "true"
+        else:
+            keyGrabState = "false"
+        os.system("gconftool-2 --type bool --set " \
+                  + "/apps/gksu/disable-grab " + keyGrabState)
+
         if orca_prefs.writePreferences(self.prefsDict, self.keyBindingsModel):
             self._say(_("Accessibility support for GNOME has just been enabled."))
             self._say(_("You need to log out and log back in for the change to take effect."))
