From c449d54bcbb14aa7efcea80860f02bf4f6dd3f41 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 5 Sep 2012 10:45:59 +0000 Subject: (Gtk2::Banner->new) fix crashing when a banner icon doesn't exist (mga#5223) (backported from trunk) --- perl-install/NEWS | 1 + perl-install/ugtk2.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/perl-install/NEWS b/perl-install/NEWS index e21048b2d..5b970016d 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -9,6 +9,7 @@ - drakxservices: o when listing services ensure disabled services that can be enabled are shown (mga#6843) +- fix crashing when a banner icon doesn't exist (mga#5223) Version 14.21 - 11 May 2012 diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 65f07cc0d..69185247c 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1448,6 +1448,7 @@ sub new { $darea->set_size_request(-1, $d_height); $darea->modify_font(Gtk2::Pango::FontDescription->from_string("13")); eval { $darea->{icon} = ugtk2::gtkcreate_pixbuf($icon) }; + $darea->{icon} ||= ugtk2::gtkcreate_pixbuf(ugtk2::wm_icon()); my $blue_part = eval { gtknew('Pixbuf', file => 'banner-blue-part', flip => mygtk2::text_direction_rtl()) }; my $blue_width = $blue_part->get_width; $darea->{text} = $text; -- cgit v1.2.1