diff options
author | Dexter Morgan <dmorgan@mageia.org> | 2011-06-02 20:40:54 +0000 |
---|---|---|
committer | Dexter Morgan <dmorgan@mageia.org> | 2011-06-02 20:40:54 +0000 |
commit | c317ff62fe84d142f8c5f20647d7314374517558 (patch) | |
tree | 803ddbdc456111529c71cc744b5cf1ed1e21664d /icons | |
download | rpmdrake-c317ff62fe84d142f8c5f20647d7314374517558.tar rpmdrake-c317ff62fe84d142f8c5f20647d7314374517558.tar.gz rpmdrake-c317ff62fe84d142f8c5f20647d7314374517558.tar.bz2 rpmdrake-c317ff62fe84d142f8c5f20647d7314374517558.tar.xz rpmdrake-c317ff62fe84d142f8c5f20647d7314374517558.zip |
Branch for updates
Diffstat (limited to 'icons')
-rw-r--r-- | icons/bugfix-update.png | bin | 0 -> 1545 bytes | |||
-rwxr-xr-x | icons/create_titles.pl | 68 | ||||
-rw-r--r-- | icons/general-update.png | bin | 0 -> 1635 bytes | |||
-rw-r--r-- | icons/security-update.png | bin | 0 -> 1636 bytes | |||
-rw-r--r-- | icons/selected.png | bin | 0 -> 344 bytes | |||
-rw-r--r-- | icons/semiselected.png | bin | 0 -> 238 bytes | |||
-rw-r--r-- | icons/state_base.png | bin | 0 -> 869 bytes | |||
-rw-r--r-- | icons/state_installed.png | bin | 0 -> 1008 bytes | |||
-rw-r--r-- | icons/state_to_install.png | bin | 0 -> 893 bytes | |||
-rw-r--r-- | icons/state_to_remove.png | bin | 0 -> 974 bytes | |||
-rw-r--r-- | icons/state_to_update.png | bin | 0 -> 1298 bytes | |||
-rw-r--r-- | icons/state_uninstalled.png | bin | 0 -> 188 bytes | |||
-rw-r--r-- | icons/title-install.png | bin | 0 -> 4436 bytes | |||
-rw-r--r-- | icons/title-media.png | bin | 0 -> 3837 bytes | |||
-rw-r--r-- | icons/title-tile.png | bin | 0 -> 174 bytes | |||
-rw-r--r-- | icons/title-update.png | bin | 0 -> 4414 bytes | |||
-rw-r--r-- | icons/unselected.png | bin | 0 -> 172 bytes |
17 files changed, 68 insertions, 0 deletions
diff --git a/icons/bugfix-update.png b/icons/bugfix-update.png Binary files differnew file mode 100644 index 00000000..c2f3e752 --- /dev/null +++ b/icons/bugfix-update.png diff --git a/icons/create_titles.pl b/icons/create_titles.pl new file mode 100755 index 00000000..437171cd --- /dev/null +++ b/icons/create_titles.pl @@ -0,0 +1,68 @@ +#!/usr/bin/perl + +# For faster multiple execs, start a gimp, and do Xtns/Perl/Server. +# Warning! Error message are the worst ever. Unquote the "set_trace" if you need troubleshooting. + +use Gimp qw(:consts main xlfd_size :auto); +use MDK::Common; + +Gimp::init(); +#Gimp::set_trace(TRACE_ALL); + +$| = 1; + +sub create_file { + my ($backimg, $fontname, $text, $outfile) = @_; + my $img = gimp_file_load($backimg, $backimg); + gimp_palette_set_foreground([255, 255, 255]); + my $layer = gimp_text_fontname($img, -1, 0, 10, $text, 0, 1, 250, 1, $fontname); + my $width = gimp_drawable_width($layer); + gimp_image_merge_visible_layers($img, 0); + gimp_crop($img, $width, 40, 0, 0); + gimp_file_save($img, gimp_image_active_drawable($img), $outfile, $outfile); +} + +my $wd = chomp_(`pwd`); + +my $font = 'SOME NICE FONT'; +my %meuh = (install => 'Software Packages Installation', remove => 'Software Packages Removal', update => 'Mandrake Update'); + +mkdir "title/en"; +create_file("$wd/title-back.png", $font, $meuh{$_}, "$wd/title/en/title-$_.png") foreach keys %meuh; + +foreach my $po (glob('../po/*.po')) { + my ($poname) = $po =~ m|/([^/\.]+)\.po$|; + print "[$poname] "; + my $charset; + my @lines = cat_($po); + foreach (@lines) { + /^"Content-Type: .*; charset=(.*)/ and $charset = $1; + } + if ($charset =~ /^(iso-8859-15?)|(utf-8)/i) { + foreach my $k (keys %meuh) { + my $str = $meuh{$k}; + my $i18n; + each_index { /^msgid "\Q$str/ && ($lines[$::i-1] !~ /fuzzy/) and $i18n = $lines[$::i+1] } @lines; + if ($i18n =~ /^msgstr "(.+)"$/) { + $i18n = $1; + if ($charset =~ /^utf-8/i) { + output("/tmp/create_titles_temp", $i18n); + $i18n = `iconv -f UTF8 -t iso-8859-1 /tmp/create_titles_temp 2>/dev/null`; + $? and next; + } + mkdir "title/$poname"; + create_file("$wd/title-back.png", + $font, + $i18n, + "$wd/title/$poname/title-$k.png"); + print "."; + } + } + } else { + print "- ignoring, charset is not iso-8859-1 or UTF8\n"; + } + print "\n"; +} + +Gimp::end(); + diff --git a/icons/general-update.png b/icons/general-update.png Binary files differnew file mode 100644 index 00000000..258e2b34 --- /dev/null +++ b/icons/general-update.png diff --git a/icons/security-update.png b/icons/security-update.png Binary files differnew file mode 100644 index 00000000..f838654d --- /dev/null +++ b/icons/security-update.png diff --git a/icons/selected.png b/icons/selected.png Binary files differnew file mode 100644 index 00000000..49b225b9 --- /dev/null +++ b/icons/selected.png diff --git a/icons/semiselected.png b/icons/semiselected.png Binary files differnew file mode 100644 index 00000000..c026805b --- /dev/null +++ b/icons/semiselected.png diff --git a/icons/state_base.png b/icons/state_base.png Binary files differnew file mode 100644 index 00000000..8cfea7fb --- /dev/null +++ b/icons/state_base.png diff --git a/icons/state_installed.png b/icons/state_installed.png Binary files differnew file mode 100644 index 00000000..cf0777cc --- /dev/null +++ b/icons/state_installed.png diff --git a/icons/state_to_install.png b/icons/state_to_install.png Binary files differnew file mode 100644 index 00000000..cd302f31 --- /dev/null +++ b/icons/state_to_install.png diff --git a/icons/state_to_remove.png b/icons/state_to_remove.png Binary files differnew file mode 100644 index 00000000..47643240 --- /dev/null +++ b/icons/state_to_remove.png diff --git a/icons/state_to_update.png b/icons/state_to_update.png Binary files differnew file mode 100644 index 00000000..3b4dd1eb --- /dev/null +++ b/icons/state_to_update.png diff --git a/icons/state_uninstalled.png b/icons/state_uninstalled.png Binary files differnew file mode 100644 index 00000000..21aeacd6 --- /dev/null +++ b/icons/state_uninstalled.png diff --git a/icons/title-install.png b/icons/title-install.png Binary files differnew file mode 100644 index 00000000..d63e82cc --- /dev/null +++ b/icons/title-install.png diff --git a/icons/title-media.png b/icons/title-media.png Binary files differnew file mode 100644 index 00000000..93ef1aaf --- /dev/null +++ b/icons/title-media.png diff --git a/icons/title-tile.png b/icons/title-tile.png Binary files differnew file mode 100644 index 00000000..a2747af5 --- /dev/null +++ b/icons/title-tile.png diff --git a/icons/title-update.png b/icons/title-update.png Binary files differnew file mode 100644 index 00000000..85ec1ca3 --- /dev/null +++ b/icons/title-update.png diff --git a/icons/unselected.png b/icons/unselected.png Binary files differnew file mode 100644 index 00000000..689a4eb0 --- /dev/null +++ b/icons/unselected.png |