[gtk-css-engine] [moblesse] Automatically generate 'generated.rc' from the CSS.
- From: Robert Staudinger <robsta src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-css-engine] [moblesse] Automatically generate 'generated.rc' from the CSS.
- Date: Tue, 4 Aug 2009 16:45:31 +0000 (UTC)
commit 64a245c8b61ce0709fd78fc2a692ca64a7796c50
Author: Robert Staudinger <robsta gnome org>
Date: Tue Aug 4 18:44:47 2009 +0200
[moblesse] Automatically generate 'generated.rc' from the CSS.
configure.in | 10 ++++++++++
themes/moblesse/gtk-2.0/Makefile.am | 13 +++++++++++++
themes/moblesse/gtk-2.0/gtkrc | 11 +++++++----
3 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/configure.in b/configure.in
index f82e67f..334e299 100644
--- a/configure.in
+++ b/configure.in
@@ -101,6 +101,16 @@ fi
PKG_CHECK_MODULES(GCE, $pkgs)
+AC_CHECK_PROG([CCSS_STYLESHEET_TO_GTKRC], [ccss-stylesheet-to-gtkrc], [ccss-stylesheet-to-gtkrc])
+if test "$CCSS_STYLESHEET_TO_GTKRC" == ""; then
+ AC_MSG_ERROR([`ccss-stylesheet-to-gtkrc' not found, check your libccss-gtk installation])
+fi
+
+AC_CHECK_PROG([TWF], [twf], [twf])
+if test "$TWF" == ""; then
+ AC_MSG_WARN([`twf' (The Widget Factory) not found])
+fi
+
AC_SUBST([GCE_CFLAGS])
AC_SUBST([GCE_LIBS])
AC_SUBST([GCE_DEPS], $pkgs)
diff --git a/themes/moblesse/gtk-2.0/Makefile.am b/themes/moblesse/gtk-2.0/Makefile.am
index 19b8a17..7f5ce11 100644
--- a/themes/moblesse/gtk-2.0/Makefile.am
+++ b/themes/moblesse/gtk-2.0/Makefile.am
@@ -1,8 +1,11 @@
+QUIET_GEN = $(Q:@= echo ' GEN '$@;)
+
themedir = $(datadir)/themes/moblesse/gtk-2.0
dist_theme_DATA = \
gtkrc \
gtkrc.css \
+ generated.rc \
arrow-down-small.png \
arrow-up-small.png \
arrow-down.svg \
@@ -10,3 +13,13 @@ dist_theme_DATA = \
arrow-right.svg \
arrow-up.svg
+BUILT_SOURCES = generated.rc
+
+CLEANFILES = $(BUILT_SOURCES)
+
+generated.rc: gtkrc.css
+ $(QUIET_GEN)$(CCSS_STYLESHEET_TO_GTKRC) --user-agent-css=$(top_srcdir)/data/user-agent.css $< > $@
+
+preview: generated.rc
+ $(QUIET_GEN)$(TWF) moblesse
+
diff --git a/themes/moblesse/gtk-2.0/gtkrc b/themes/moblesse/gtk-2.0/gtkrc
index a5c85de..566db24 100644
--- a/themes/moblesse/gtk-2.0/gtkrc
+++ b/themes/moblesse/gtk-2.0/gtkrc
@@ -1,13 +1,14 @@
-# Create an up-to-date file using "ccss-stylesheet-to-gtkrc" before
-# releasing and uncomment the next line.
-# include "generated.rc"
-
# Set GtkSettings color scheme property.
# This can be overriden (via an xsetting) with eg. the gnome-appearance-properties.
# gtk_color_scheme =
# "fg_color:#515c7d\nbg_color:#f3f0e4\nbase_color:#ffffff\ntext_color:#000000\nselected_bg_color:#688eb2\nselected_fg_color:#f5f5f0\ntooltip_bg_color:#515c7d\ntooltip_fg_color:#f5f5b5"
+# This file contains gtkrc settings translated from gtkrc.css by `ccss-stylesheet-to-gtkrc'.
+# It will be kept up to date automatically by the build system.
+# Use "make preview" to view the theme in The Widget factory.
+include "generated.rc"
+
style "default"
{
GtkEntry::state-hint = 1
@@ -19,9 +20,11 @@ style "default"
}
widget_class "*" style "default"
+# Window manager theming.
style "metacity-frame"
{
bg[SELECTED] = @selected_bg_color
}
class "MetaFrames" style "metacity-frame"
class "GtkWindow" style "metacity-frame"
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]