gtk-css-engine r196 - in trunk: . src themes/gtk-css-test/gtk-2.0
- From: robsta svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-css-engine r196 - in trunk: . src themes/gtk-css-test/gtk-2.0
- Date: Mon, 24 Nov 2008 13:20:20 +0000 (UTC)
Author: robsta
Date: Mon Nov 24 13:20:20 2008
New Revision: 196
URL: http://svn.gnome.org/viewvc/gtk-css-engine?rev=196&view=rev
Log:
* TODO:
* src/css2gtkrc.c (main):
* src/gce-functions.c (url), (color), (mix), (shade), (lighter),
(darker):
* src/gce-properties.c (gce_properties_get_ptable):
* src/gce-properties.h:
* src/gce-theme.c (theme_init):
* themes/gtk-css-test/gtk-2.0/styles.css:
Fix after ccss API changes.
Modified:
trunk/ChangeLog
trunk/TODO
trunk/src/css2gtkrc.c
trunk/src/gce-functions.c
trunk/src/gce-properties.c
trunk/src/gce-properties.h
trunk/src/gce-theme.c
trunk/themes/gtk-css-test/gtk-2.0/styles.css
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Mon Nov 24 13:20:20 2008
@@ -147,3 +147,7 @@
* [Garrett](http://ux.suse.de/~garrett/public/hackweek/oneclick/mockups/oneclick-mockup-trust%20and%20install.png).
* [cypohirogen](http://cypohirogen.deviantart.com/art/Mail-Scrollbar-for-Leopard-79257200).
* [Jimmac](http://jimmac.musichall.cz/guimockups.php?mockup=xgl)
+
+### Other links ###
+* [http://osku.de/simsui/](http://osku.de/simsui/)
+
Modified: trunk/src/css2gtkrc.c
==============================================================================
--- trunk/src/css2gtkrc.c (original)
+++ trunk/src/css2gtkrc.c Mon Nov 24 13:20:20 2008
@@ -28,7 +28,7 @@
char **argv)
{
ccss_stylesheet_t *stylesheet;
- ccss_property_impl_t const *properties;
+ ccss_property_class_t const *properties;
char *gtkrc;
if (argc <= 1) {
@@ -36,8 +36,10 @@
return EXIT_FAILURE;
}
- properties = gce_properties_get_vtable ();
- ccss_init (properties, NULL);
+ ccss_init ();
+
+ properties = gce_properties_get_ptable ();
+ ccss_add_properties (properties);
stylesheet = ccss_stylesheet_new_from_file (argv[1]);
g_assert (stylesheet);
Modified: trunk/src/gce-functions.c
==============================================================================
--- trunk/src/gce-functions.c (original)
+++ trunk/src/gce-functions.c Mon Nov 24 13:20:20 2008
@@ -31,10 +31,7 @@
* TODO make this bullet proof wrt uri scheme.
*/
static char *
-url (ccss_block_t *block,
- char const *property_name,
- char const *function_name,
- GSList const *args)
+url (GSList const *args)
{
char *resolved_path;
char *ret;
@@ -248,10 +245,7 @@
}
static char *
-color (ccss_block_t *block,
- char const *property_name,
- char const *function_name,
- GSList const *args)
+color (GSList const *args)
{
GdkColor result;
gboolean ret;
@@ -272,10 +266,7 @@
}
static char *
-mix (ccss_block_t *block,
- char const *property_name,
- char const *function_name,
- GSList const *args)
+mix (GSList const *args)
{
GSList const *iter;
GdkColor result;
@@ -298,10 +289,7 @@
}
static char *
-shade (ccss_block_t *block,
- char const *property_name,
- char const *function_name,
- GSList const *args)
+shade (GSList const *args)
{
GSList const *iter;
GdkColor result;
@@ -324,10 +312,7 @@
}
static char *
-lighter (ccss_block_t *block,
- char const *property_name,
- char const *function_name,
- GSList const *args)
+lighter (GSList const *args)
{
GSList const *iter;
GdkColor result;
@@ -350,10 +335,7 @@
}
static char *
-darker (ccss_block_t *block,
- char const *property_name,
- char const *function_name,
- GSList const *args)
+darker (GSList const *args)
{
GSList const *iter;
GdkColor result;
Modified: trunk/src/gce-properties.c
==============================================================================
--- trunk/src/gce-properties.c (original)
+++ trunk/src/gce-properties.c Mon Nov 24 13:20:20 2008
@@ -71,15 +71,23 @@
return TRUE;
}
-ccss_property_impl_t const _property_impls[] = {
- { "gtk-default-border", (ccss_property_new_f) gce_gtk_border_new, (ccss_property_free_f) g_free, (ccss_property_convert_f) gce_gtk_border_convert },
-
- { NULL, NULL, NULL, NULL }
+ccss_property_class_t const _ptable[] = {
+ {
+ .name = "gtk-default-border",
+ .property_new = (ccss_property_new_f) gce_gtk_border_new,
+ .property_free = (ccss_property_free_f) g_free,
+ .property_convert = (ccss_property_convert_f) gce_gtk_border_convert
+ }, {
+ .name = NULL,
+ .property_new = NULL,
+ .property_free = NULL,
+ .property_convert = NULL
+ }
};
-ccss_property_impl_t const *
-gce_properties_get_vtable (void)
+ccss_property_class_t const *
+gce_properties_get_ptable (void)
{
- return _property_impls;
+ return _ptable;
}
Modified: trunk/src/gce-properties.h
==============================================================================
--- trunk/src/gce-properties.h (original)
+++ trunk/src/gce-properties.h Mon Nov 24 13:20:20 2008
@@ -24,7 +24,7 @@
G_BEGIN_DECLS
-ccss_property_impl_t const * gce_properties_get_vtable (void);
+ccss_property_class_t const * gce_properties_get_ptable (void);
G_END_DECLS
Modified: trunk/src/gce-theme.c
==============================================================================
--- trunk/src/gce-theme.c (original)
+++ trunk/src/gce-theme.c Mon Nov 24 13:20:20 2008
@@ -36,15 +36,19 @@
G_MODULE_EXPORT void
theme_init (GTypeModule *module)
{
- ccss_property_impl_t const *properties;
+ ccss_property_class_t const *properties;
ccss_function_t const *functions;
gce_rc_style_register_type (module);
gce_style_register_type (module);
- properties = gce_properties_get_vtable ();
+ ccss_cairo_init ();
+
+ properties = gce_properties_get_ptable ();
+ ccss_add_properties (properties);
+
functions = gce_functions_get_vtable ();
- ccss_init (properties, functions);
+ ccss_add_functions (functions);
}
G_MODULE_EXPORT void
Modified: trunk/themes/gtk-css-test/gtk-2.0/styles.css
==============================================================================
--- trunk/themes/gtk-css-test/gtk-2.0/styles.css (original)
+++ trunk/themes/gtk-css-test/gtk-2.0/styles.css Mon Nov 24 13:20:20 2008
@@ -8,8 +8,10 @@
* {
background-color: gtk-color(bg_color);
+ color: black;
}
+/*
arrow {
background-position: center;
background-repeat: no-repeat;
@@ -149,4 +151,4 @@
GtkButton:normal {
background-color: darkkhaki;
}
-
+*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]