From 126bb8cb6b93240bb4d3a2b816b74c286c3d422b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Jul 2014 15:20:38 +0200 Subject: Imported Upstream version 1.7.0 --- lib/gcstar/GCStyle.pm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 lib/gcstar/GCStyle.pm (limited to 'lib/gcstar/GCStyle.pm') diff --git a/lib/gcstar/GCStyle.pm b/lib/gcstar/GCStyle.pm new file mode 100644 index 0000000..f8cfb32 --- /dev/null +++ b/lib/gcstar/GCStyle.pm @@ -0,0 +1,67 @@ +{ + package GCStyle; + +################################################### +# +# Copyright 2005-2010 Christian Jodar +# +# This file is part of GCstar. +# +# GCstar is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GCstar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCstar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +# +################################################### + + use strict; + + use base 'Exporter'; + our @EXPORT = qw(%styles @lists $defaultList @readOnlyStyles); + + use File::Basename; + use GCUtils 'glob'; + + our %styles; + our @lists; + our $defaultList; + our @readOnlyStyles; + + sub initStyles + { + foreach (glob $ENV{GCS_SHARE_DIR}.'/style/*') + { + my $style = basename($_); + next if $style eq 'CVS'; + my %tmpStyle; + $tmpStyle{dir} = $_; + $tmpStyle{rcFile} = $tmpStyle{dir}.'/gtkrc'; + $tmpStyle{name} = $style; + $styles{$style} = \%tmpStyle; + } + foreach (glob $ENV{GCS_SHARE_DIR}.'/list_bg/*') + { + my $bg = basename($_); + next if $bg eq 'CVS'; + push @lists, $bg; + } + foreach (glob $ENV{GCS_SHARE_DIR}.'/panels/*') + { + my $style = basename($_); + next if $style eq 'CVS'; + push @readOnlyStyles, $style; + } + $defaultList = 'Wood'; + } +} + +1; -- cgit v1.2.3