X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=icons%2Fimport%2Fimport_oxygen.pl;h=c6fb8177327f67bb5ad289b791afa665c56b94a7;hb=32c0bb666209932d7540c22ddc393fd4550d5418;hp=4a84bcfe304426c32effd1bb55d7ba03b1fdbeff;hpb=6310438a4efce3d2ecbd5faf1d3ceebe0c6524c2;p=quassel.git diff --git a/icons/import/import_oxygen.pl b/icons/import/import_oxygen.pl index 4a84bcfe..c6fb8177 100755 --- a/icons/import/import_oxygen.pl +++ b/icons/import/import_oxygen.pl @@ -42,10 +42,9 @@ close BLACKLIST; # We now grep the source for things like SmallIcon("fubar") and generate size and name from that print "Grepping $source for requested icons...\n"; -my @results = `grep -r Icon\\(\\" $source`; +my @results = `grep -r QIcon::fromTheme\\(\\" $source`; foreach(@results) { - next unless my ($type, $name) = /\W+(\s|Desktop|Bar|MainBar|Small|Panel|Dialog)Icon\("([-\w]+)/; - $type = "Desktop" if $type =~ /\s+/; + next unless my ($name) = /\W+QIcon::fromTheme\(\"([-\w]+)/; $req_icons{$name} = 1 unless exists $blacklist{$name}; } @@ -73,8 +72,6 @@ foreach my $sizestr (readdir BASEDIR) { opendir (SIZEDIR, "$oxygen/$sizestr") or die "Could not open dir $sizestr\n"; foreach my $cat (readdir SIZEDIR) { next if $cat eq '.' or $cat eq '..'; - #system "mkdir -p $output/$sizestr/$cat" and die "Could not create category dir\n"; - system "mkdir -p $output/scalable/$cat" and die "Could not create category dir\n"; opendir (CATDIR, "$oxygen/$sizestr/$cat") or die "Could not open category dir\n"; foreach my $icon (readdir CATDIR) { $icon =~ s/\.png$//; @@ -106,13 +103,13 @@ foreach my $icon (keys %req_icons) { print "Warning: Missing icon $icon\n"; } +# Copy license etc. +system "cp $oxygen/AUTHORS $oxygen/CONTRIBUTING $oxygen/COPYING $oxygen/index.theme $output/"; + # Generate .qrc my @file_list; generate_qrc($output, $qrcfile_kde); -# Copy license etc. -system "cp $oxygen/AUTHORS $oxygen/CONTRIBUTING $oxygen/COPYING $oxygen/index.theme $output/"; - print "Done.\n"; ######################################################################################## @@ -136,7 +133,7 @@ sub generate_qrc { } sub push_icon_path { - return unless /\.png$/; + return unless /\.png$/ or /^index.theme$/; push @file_list, " $File::Find::name"; }