diff --git a/ChangeLog b/ChangeLog index ddcd51eaeb2865c96e8deb4a9ee1f313ef923fae..75f1cebaac2a4a69feee35c71d037f1e3909779a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-02-15 Benedikt Meurer <benny@xfce.org> + + * THANKS, thunar-uca/thunar-uca-editor.c: Apply patch provided by + Nick Schermer <nickschermer@gmail.com> to fix a crash in the + thunar-uca plugin if the icon specified for an action cannot + be loaded. Bug #1458. + 2006-02-14 Benedikt Meurer <benny@xfce.org> * thunar-vfs/thunar-vfs-xfer.c, thunar-vfs/thunar-vfs-chmod-job.c, diff --git a/THANKS b/THANKS index c80a8f59adcd73538beba001383540a0a10e8e07..d6e0c7d90d61406170880ee92e4efd2f5040be58 100644 --- a/THANKS +++ b/THANKS @@ -62,3 +62,6 @@ Other contributors (sorted by name): Danny Milosavljevic <danny.milo@gmx.net> * patches + Nick Schermer <nickschermer@gmail.com> + * patches + diff --git a/thunar-uca/thunar-uca-editor.c b/thunar-uca/thunar-uca-editor.c index 6e7b536ba2c17e1a3b726914fa1ceb5423cfee82..d7032ac1bf65ae3b82c0a1ea70802bbe730af60c 100644 --- a/thunar-uca/thunar-uca-editor.c +++ b/thunar-uca/thunar-uca-editor.c @@ -724,16 +724,6 @@ thunar_uca_editor_set_icon_name (ThunarUcaEditor *uca_editor, { /* load the icon from the file */ icon = gdk_pixbuf_new_from_file (icon_name, NULL); - - /* scale down the icon if required */ - icon_width = gdk_pixbuf_get_width (icon); - icon_height = gdk_pixbuf_get_height (icon); - if (G_UNLIKELY (icon_width > 48 || icon_height > 48)) - { - icon_scaled = exo_gdk_pixbuf_scale_ratio (icon, 48); - g_object_unref (G_OBJECT (icon)); - icon = icon_scaled; - } } else if (icon_name != NULL) { @@ -750,6 +740,16 @@ thunar_uca_editor_set_icon_name (ThunarUcaEditor *uca_editor, /* setup the icon button */ if (G_LIKELY (icon != NULL)) { + /* scale down the icon if required */ + icon_width = gdk_pixbuf_get_width (icon); + icon_height = gdk_pixbuf_get_height (icon); + if (G_UNLIKELY (icon_width > 48 || icon_height > 48)) + { + icon_scaled = exo_gdk_pixbuf_scale_ratio (icon, 48); + g_object_unref (G_OBJECT (icon)); + icon = icon_scaled; + } + /* setup an image for the icon */ image = gtk_image_new_from_pixbuf (icon); gtk_container_add (GTK_CONTAINER (uca_editor->icon_button), image);