aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-02-14 23:25:43 +0000
committerThierry Vignaud <tv@mandriva.org>2009-02-14 23:25:43 +0000
commitedd1a29323a3661839cf791484d325ff5133ac1a (patch)
tree9be1ca15cca8d2c273e3036876fc9c0fb396f623 /rpmdrake.pm
parent1b93fa3c77361f7caac951c9c95096beaf5f1683 (diff)
downloadrpmdrake-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.pm9
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;