Index: /branches/release-41/plugins/StyleCatcher/config.yaml
===================================================================
--- /branches/release-41/plugins/StyleCatcher/config.yaml (revision 2743)
+++ /branches/release-41/plugins/StyleCatcher/config.yaml (revision 2743)
@@ -0,0 +1,36 @@
+name: StyleCatcher
+id: StyleCatcher
+key: StyleCatcher
+author_link: http://www.sixapart.com/
+author_name: Six Apart, Ltd.
+description: StyleCatcher lets you easily browse through styles and then apply them to your blog in just a few clicks. To find out more about Movable Type styles, or for new sources for styles, visit the <a href='http://www.sixapart.com/movabletype/styles'>Movable Type styles</a> page.
+version: 2.1
+doc_link: http://www.sixapart.com/movabletype/styles/
+l10n_class: StyleCatcher::L10N
+
+stylecatcher_libraries:
+    sixapart_mt4:
+        url: http://www.sixapart.com/movabletype/styles/mt4/library
+        label: MT 4 Style Library
+        description_label: A collection of styles compatible with Movable Type 4 default templates.
+        order: 1
+
+template_sets:
+    mt_blog:
+        base_css: themes-base/blog.css 
+    universal_website:
+        base_css: themes-base/blog.css 
+
+applications:
+    cms:
+        methods:
+            stylecatcher_theme: $StyleCatcher::StyleCatcher::CMS::view
+            stylecatcher_js: $StyleCatcher::StyleCatcher::CMS::js
+            stylecatcher_apply: $StyleCatcher::StyleCatcher::CMS::apply
+        menus:
+            design:theme:
+                label: Styles
+                order: 300
+                mode: stylecatcher_theme
+                view: blog
+                permission: edit_templates
Index: /branches/release-41/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm
===================================================================
--- /branches/release-41/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm (revision 2576)
+++ /branches/release-41/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm (revision 2743)
@@ -254,6 +254,9 @@
     }
     
-
-    my $url2 = $mtthemebase . "blog.css";
+    my $blog = MT->model('blog')->load($blog_id)    
+      or return $app->json_error( $app->translate('No such blog [_1]', $blog_id) );
+
+    my $r = MT->registry;
+    my $base_css = $r->{"template_sets"}{$blog->template_set}{"base_css"};
 
     # Replacing the theme import or adding a new one at the beginning
@@ -263,8 +266,10 @@
 '/* This is the StyleCatcher theme addition. Do not remove this block. */';
     my $footer = '/* end StyleCatcher imports */';
-    my $styles = $header . "\n" . <<"EOT" . $footer;
-\@import url($url2);
-\@import url($url);
-EOT
+    my $styles = $header . "\n";
+    $styles .= "\@import url(".File::Spec->catfile($app->static_path, $base_css).");\n" if $base_css;
+    $styles .= "\@import url($url);\n";
+    $styles .= $footer;
+    print STDERR "styles=$styles\n";
+
     if ($template_text =~ s/\Q$header\E.*\Q$footer\E/$styles/s) {
         $tmpl->text( $template_text );
@@ -299,6 +304,4 @@
     $tmpl->save or return $app->json_error( $tmpl->errstr );
 
-    my $blog = MT->model('blog')->load($blog_id)    
-      or return $app->json_error( $app->translate('No such blog [_1]', $blog_id) );
     $blog->page_layout($layout);
     $blog->touch();
Index: /anches/release-41/plugins/StyleCatcher/stylecatcher.pl
===================================================================
--- /branches/release-41/plugins/StyleCatcher/stylecatcher.pl (revision 1568)
+++  (revision )
@@ -1,62 +1,0 @@
-# Movable Type (r) Open Source (C) 2005-2008 Six Apart, Ltd.
-# This program is distributed under the terms of the
-# GNU General Public License, version 2.
-#
-# $Id$
-
-package MT::Plugin::StyleCatcher;
-
-use strict;
-use base 'MT::Plugin';
-our $VERSION = '2.0';
-
-my $plugin;
-$plugin = MT::Plugin::StyleCatcher->new({
-    id => 'StyleCatcher',
-    name => "StyleCatcher",
-    version => $VERSION,
-    doc_link => "http://www.sixapart.com/movabletype/styles/",
-    description => q(<MT_TRANS phrase="StyleCatcher lets you easily browse through styles and then apply them to your blog in just a few clicks. To find out more about Movable Type styles, or for new sources for styles, visit the <a href='http://www.sixapart.com/movabletype/styles'>Movable Type styles</a> page.">),
-    author_name => "Six Apart, Ltd.",
-    author_link => "http://www.sixapart.com/",
-    l10n_class => 'StyleCatcher::L10N',
-    registry => {
-        stylecatcher_libraries => {
-            'sixapart_mt4' => {
-                url => 'http://www.sixapart.com/movabletype/styles/mt4/library',
-                label => 'MT 4 Style Library',
-                description_label => "A collection of styles compatible with Movable Type 4 default templates.",
-                order => 1,
-            },
-            # 'sixapart_mt3' => {
-            #     url => 'http://www.sixapart.com/movabletype/styles/mt3/library',
-            #     label => 'MT 3 Style Library',
-            #     description_label => "A collection of styles compatible with Movable Type 3.3+ default templates.",
-            #     order => 1000,
-            # },
-        },
-        applications => {
-            cms => {
-                methods => {
-                    stylecatcher_theme => '$StyleCatcher::StyleCatcher::CMS::view',
-                    stylecatcher_js => '$StyleCatcher::StyleCatcher::CMS::js',
-                    stylecatcher_apply => '$StyleCatcher::StyleCatcher::CMS::apply',
-                },
-                menus => {
-                    'design:theme' => {
-                        label => 'Styles',
-                        order => 300,
-                        mode => 'stylecatcher_theme',
-                        view => "blog",
-                        permission => 'edit_templates',
-                    },
-                },
-            },
-        },
-    },
-});
-MT->add_plugin($plugin);
-
-sub instance { $plugin }
-
-1;
