diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2010-05-19 08:58:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:43:05 +0200 |
commit | b76270bf9e6dd375e495fec92140a79a79415d27 (patch) | |
tree | 3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/xap/xfce/patches/migrate-itheme-smartly.diff | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.xz |
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits. The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription. Consider picking up
a copy to help support the project. Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality. :-)
Enjoy!
Diffstat (limited to '')
-rw-r--r-- | source/xap/xfce/patches/migrate-itheme-smartly.diff | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/source/xap/xfce/patches/migrate-itheme-smartly.diff b/source/xap/xfce/patches/migrate-itheme-smartly.diff deleted file mode 100644 index e9c66ed2e..000000000 --- a/source/xap/xfce/patches/migrate-itheme-smartly.diff +++ /dev/null @@ -1,92 +0,0 @@ -Index: scripts/xfconf-migration-4.6.pl.in -=================================================================== ---- a/scripts/xfconf-migration-4.6.pl.in (revision 29645) -+++ b/scripts/xfconf-migration-4.6.pl.in (working copy) -@@ -256,6 +256,77 @@ - return $mcs.'.xml'; - } - -+sub icon_theme_exists -+{ -+ my ($dirref,$themename) = @_; -+ my @dirs = @{$dirref}; -+ -+ foreach my $d (@dirs) { -+ return 1 if(-f "$d/$themename/index.theme"); -+ } -+ -+ return 0; -+} -+ -+sub migrate_icon_theme -+{ -+ my ($ref,$chan) = @_; -+ my %opts = %{$ref}; -+ my $opt = 'Net/IconThemeName'; -+ -+ return if(!defined($opts{$opt})); -+ my $val = $opts{$opt}->{'value'}; -+ -+ if(lc($val) eq 'rodent') { -+ # we don't ship rodent anymore, so try to find something suitable -+ my @icondirs; -+ if(defined($ENV{'XDG_DATA_HOME'})) { -+ @icondirs = ( $ENV{'XDG_DATA_HOME'} . '/icons' ); -+ } else { -+ @icondirs = ( $ENV{'HOME'} . '/.local/share/icons' ); -+ } -+ -+ if(defined($ENV{'XDG_DATA_DIRS'})) { -+ push(@icondirs, split(/:/, $ENV{'XDG_DATA_DIRS'})); -+ } else { -+ push(@icondirs, ( '/usr/share/icons', '/usr/local/share/icons' )); -+ } -+ -+ $val = undef; -+ foreach my $itheme (('Tango', 'gnome', 'crystalsvg')) { -+ if(icon_theme_exists(\@icondirs, $itheme)) { -+ $val = $itheme; -+ last; -+ } -+ } -+ -+ if(!defined($val)) { -+ # pick the first one that is not 'hicolor' -+ foreach my $d (@icondirs) { -+ opendir(DIR, $d) and do { -+ my @subdirs = grep { $_ ne 'hicolor' && -d "$d/$_" } readdir(DIR); -+ foreach my $sd (@subdirs) { -+ if(-f "$d/$sd/index.theme") { -+ $val = $sd; -+ last; -+ } -+ } -+ closedir(DIR); -+ }; -+ last if(defined($val)); -+ } -+ -+ if(!defined($val)) { -+ # ok, their system is kinda b0rked; not much we can do -+ warn("Couldn't find a suitable icon theme to migrate to"); -+ return; -+ } -+ } -+ } -+ -+ xfconf_set($chan, 'string', '/Net/IconThemeName', $val); -+} -+ - sub migrate_xsettings - { - my $mcs = 'gtk'; -@@ -283,8 +354,7 @@ - '/Net/CursorBlinkTime', 'int'); - save_xfconf_prop($ref, $chan, 'Net/DndDragThreshold', - '/Net/DndDragThreshold', 'int'); -- save_xfconf_prop($ref, $chan, 'Net/IconThemeName', -- '/Net/IconThemeName', 'string'); -+ migrate_icon_theme($ref, $chan); - save_xfconf_prop($ref, $chan, 'Net/ThemeName', - '/Net/ThemeName', 'string'); - |