orca r4617 - in trunk: . src/orca



Author: wwalker
Date: Mon Mar  2 00:20:24 2009
New Revision: 4617
URL: http://svn.gnome.org/viewvc/orca?rev=4617&view=rev

Log:
Work on bug #573535 - make sure the Orca icon is used on all dialogs shown by Orca.


Modified:
   trunk/ChangeLog
   trunk/src/orca/orca_glade.py
   trunk/src/orca/orca_gui_find.py
   trunk/src/orca/orca_gui_main.py
   trunk/src/orca/orca_gui_prefs.py
   trunk/src/orca/orca_quit.py

Modified: trunk/src/orca/orca_glade.py
==============================================================================
--- trunk/src/orca/orca_glade.py	(original)
+++ trunk/src/orca/orca_glade.py	Mon Mar  2 00:20:24 2009
@@ -50,6 +50,18 @@
             instance_attributes[attribute] = getattr(self, attribute)
         self.widgets.signal_autoconnect(instance_attributes)
 
+    def set_orca_icon(self, window):
+        """Set the "orca.png" icon as the icon for the Orca configuration
+        window."""
+
+        icon_theme = gtk.icon_theme_get_default()
+        try:
+            icon = icon_theme.load_icon("orca", 48, 0)
+        except:
+            return
+        else:
+            window.set_icon(icon)
+
     def get_widget(self, attribute):
         """Return the requested widget. This routine has been introduced
         (and calls to it made by the Orca Glade sub-classes), to prevent

Modified: trunk/src/orca/orca_gui_find.py
==============================================================================
--- trunk/src/orca/orca_gui_find.py	(original)
+++ trunk/src/orca/orca_gui_find.py	Mon Mar  2 00:20:24 2009
@@ -79,6 +79,7 @@
         """
 
         findDialog = self.get_widget("findDialog")
+        self.set_orca_icon(findDialog)
 
         # Set the current time on the Find GUI dialog so that it'll
         # get focus. set_user_time is a new call in pygtk 2.9.2 or later.

Modified: trunk/src/orca/orca_gui_main.py
==============================================================================
--- trunk/src/orca/orca_gui_main.py	(original)
+++ trunk/src/orca/orca_gui_main.py	Mon Mar  2 00:20:24 2009
@@ -41,24 +41,14 @@
     def init(self):
         pass
 
-    def _setMainWindowIcon(self):
-        """Set the "orca.png" icon as the icon for the Orca main window."""
-
-        icon_theme = gtk.icon_theme_get_default()
-        try:
-            icon = icon_theme.load_icon("orca", 48, 0)
-        except:
-            return
-
-        self.get_widget("mainWindow").set_icon(icon)
-
     def showGUI(self):
         """Show the Orca main window GUI. This assumes that the GUI has 
         already been created.
         """
 
-        self._setMainWindowIcon()
-        self.get_widget("mainWindow").show()
+        mainWindow = self.get_widget("mainWindow")
+        self.set_orca_icon(mainWindow)
+        mainWindow.show()
 
     def hideGUI(self):
         """Hide the Orca main window GUI. This assumes that the GUI has

Modified: trunk/src/orca/orca_gui_prefs.py
==============================================================================
--- trunk/src/orca/orca_gui_prefs.py	(original)
+++ trunk/src/orca/orca_gui_prefs.py	Mon Mar  2 00:20:24 2009
@@ -1943,6 +1943,7 @@
         """
 
         orcaSetupWindow = self.get_widget("orcaSetupWindow")
+        self.set_orca_icon(orcaSetupWindow)
 
         # We want the Orca preferences window to have focus when it is
         # shown. First try using the present() call. If this isn't present

Modified: trunk/src/orca/orca_quit.py
==============================================================================
--- trunk/src/orca/orca_quit.py	(original)
+++ trunk/src/orca/orca_quit.py	Mon Mar  2 00:20:24 2009
@@ -50,6 +50,7 @@
         """
 
         quitDialog = self.get_widget("quitDialog")
+        self.set_orca_icon(quitDialog)
 
         # Set the current time on the quit GUI dialog so that it'll
         # get focus. set_user_time is a new call in pygtk 2.9.2 or later.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]