Merge in some pending patches from Sun

- correct unregistration of keybindings in a multiheaded environment
- have top level window icons respect icon themes
This commit is contained in:
Jody Goldberg 2004-04-07 14:33:18 +00:00
parent e967f6c23f
commit 2908fb0c57
4 changed files with 107 additions and 17 deletions

View file

@ -1,3 +1,8 @@
2004-04-07 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=130623
* capplet-util.c (capplet_set_icon) : respect the icon theme
2004-04-01 Jody Goldberg <jody@gnome.org>
* Release 2.6.0.3

View file

@ -353,12 +353,39 @@ void
capplet_set_icon (GtkWidget *window, char const *icon_file_name)
{
char *path;
GdkPixbuf *icon_pixbuf;
char *tmp;
char *p;
GdkPixbuf *icon_pixbuf = NULL;
GnomeIconTheme *icon_theme;
/* First look up from the icon theme */
icon_theme = gnome_icon_theme_new ();
tmp = g_strdup (icon_file_name);
p = strrchr (tmp, '.');
if (p)
p[0] = '\0';
path = gnome_icon_theme_lookup_icon (icon_theme, tmp, 48, NULL, NULL);
if (path != NULL) {
icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
g_free (path);
}
g_free (tmp);
g_object_unref (icon_theme);
path = g_strconcat (GNOMECC_DATA_DIR "/icons/", icon_file_name, NULL);
icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
g_free (path);
if (icon_pixbuf == NULL) {
/* Then we fallback to the control center icon location */
path = g_strconcat (GNOMECC_DATA_DIR "/icons/", icon_file_name, NULL);
icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
g_free (path);
}
if (icon_pixbuf == NULL) {
/* Then we fallback to the gnome program discovery stuff */
path = gnome_pixmap_file (icon_file_name);
if (path != NULL) {
icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);