diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-02-14 23:25:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-02-14 23:25:43 +0000 |
commit | edd1a29323a3661839cf791484d325ff5133ac1a (patch) | |
tree | 9be1ca15cca8d2c273e3036876fc9c0fb396f623 /rpmdrake.pm | |
parent | 1b93fa3c77361f7caac951c9c95096beaf5f1683 (diff) | |
download | rpmdrake-edd1a29323a3661839cf791484d325ff5133ac1a.tar rpmdrake-edd1a29323a3661839cf791484d325ff5133ac1a.tar.gz rpmdrake-edd1a29323a3661839cf791484d325ff5133ac1a.tar.bz2 rpmdrake-edd1a29323a3661839cf791484d325ff5133ac1a.tar.xz rpmdrake-edd1a29323a3661839cf791484d325ff5133ac1a.zip |
(get_icon) introduce it in order to reuse mcc icon if availlable (#44671)
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r-- | rpmdrake.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index 36da78b8..f252429e 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -69,6 +69,7 @@ our @EXPORT = qw( distro_type fatal_msg getbanner + get_icon interactive_list interactive_list_ interactive_msg @@ -966,6 +967,14 @@ sub run_drakbug { run_as_user('drakbug', '--report', $id); } +mygtk2::add_icon_path('/usr/share/mcc/themes/default/'); +sub get_icon { + my ($mcc_icon, $fallback_icon) = @_; + my $icon = eval { mygtk2::_find_imgfile($mcc_icon) }; + $icon ||= eval { mygtk2::_find_imgfile($fallback_icon) }; + $icon; +} + sub strip_first_underscore { join '', map { s/_//; $_ } @_ } 1; |