orca r4655 - in trunk: . src/orca
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r4655 - in trunk: . src/orca
- Date: Sun, 29 Mar 2009 14:40:27 +0000 (UTC)
Author: wwalker
Date: Sun Mar 29 14:40:27 2009
New Revision: 4655
URL: http://svn.gnome.org/viewvc/orca?rev=4655&view=rev
Log:
Fix for bug #573535 - Orca should use the 16x16 pixels application icon for Main and Preferences windows
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 Sun Mar 29 14:40:27 2009
@@ -45,22 +45,34 @@
self.widgets = gtk.glade.XML(fileName, windowName, gettext.textdomain())
self.gtkWindow = getattr(self, windowName)
+ # Set default application icon.
+ self.set_orca_icon()
+
instance_attributes = {}
for attribute in dir(self.__class__):
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."""
+ def set_orca_icon(self):
+ """Get the icon in all sizes from the current theme and set them as
+ default for all application windows.
+ """
icon_theme = gtk.icon_theme_get_default()
try:
- icon = icon_theme.load_icon("orca", 48, 0)
+ icon16 = icon_theme.load_icon("orca", 16, 0)
+ icon22 = icon_theme.load_icon("orca", 22, 0)
+ icon24 = icon_theme.load_icon("orca", 24, 0)
+ icon32 = icon_theme.load_icon("orca", 32, 0)
+ icon48 = icon_theme.load_icon("orca", 48, 0)
except:
return
else:
- window.set_icon(icon)
+ gtk.window_set_default_icon_list(icon16,
+ icon22,
+ icon24,
+ icon32,
+ icon48)
def get_widget(self, attribute):
"""Return the requested widget. This routine has been introduced
Modified: trunk/src/orca/orca_gui_find.py
==============================================================================
--- trunk/src/orca/orca_gui_find.py (original)
+++ trunk/src/orca/orca_gui_find.py Sun Mar 29 14:40:27 2009
@@ -79,7 +79,6 @@
"""
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 Sun Mar 29 14:40:27 2009
@@ -47,7 +47,6 @@
"""
mainWindow = self.get_widget("mainWindow")
- self.set_orca_icon(mainWindow)
mainWindow.show()
def hideGUI(self):
Modified: trunk/src/orca/orca_gui_prefs.py
==============================================================================
--- trunk/src/orca/orca_gui_prefs.py (original)
+++ trunk/src/orca/orca_gui_prefs.py Sun Mar 29 14:40:27 2009
@@ -1943,7 +1943,6 @@
"""
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 Sun Mar 29 14:40:27 2009
@@ -50,7 +50,6 @@
"""
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]