summaryrefslogtreecommitdiff
path: root/panels/background/Makefile.am
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-02-10 20:30:57 +0000
committerBastien Nocera <hadess@hadess.net>2011-02-10 20:35:02 +0000
commitca14846ef95ab65b6a01b87e2975913e8b93074e (patch)
tree0b4b2164a2e377acb8630fabb60f472d7913f2d1 /panels/background/Makefile.am
parent9a209fa181bd2b480317228e5e847e946c50d190 (diff)
downloadgnome-control-center-ca14846ef95ab65b6a01b87e2975913e8b93074e.tar.gz
background: Major rework of the CcBackgroundItem code
It now is a full GObject, will be able to track the original XML file for a wallpaper, as well as which values are set in it. This will allow us to restore wallpapers properly, and only offer editing options when those aren't already hard-coded inside the item.
Diffstat (limited to 'panels/background/Makefile.am')
-rw-r--r--panels/background/Makefile.am28
1 files changed, 27 insertions, 1 deletions
diff --git a/panels/background/Makefile.am b/panels/background/Makefile.am
index cba8746b2..601e5fa45 100644
--- a/panels/background/Makefile.am
+++ b/panels/background/Makefile.am
@@ -34,6 +34,8 @@ libbackground_la_SOURCES = \
cc-background-panel.h \
cc-background-item.c \
cc-background-item.h \
+ gdesktop-enums-types.c \
+ gdesktop-enums-types.h \
bg-source.c \
bg-source.h \
bg-pictures-source.c \
@@ -60,12 +62,36 @@ INCLUDES += $(SOCIALWEB_CFLAGS)
libbackground_la_LIBADD += $(SOCIALWEB_LIBS)
endif
+gdesktop-enums-types.h: stamp-gdesktop-enums-types.h
+ @true
+
+stamp-gdesktop-enums-types.h: $(includedir)/gsettings-desktop-schemas/gdesktop-enums.h cc-background-item.h Makefile
+ $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) \
+ --fhead "#ifndef __GDESKTOP_ENUMS_TYPES_H__\n#define __GDESKTOP_ENUMS_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define G_DESKTOP_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __GDESKTOP_ENUMS_TYPES_H__ */" $(includedir)/gsettings-desktop-schemas/gdesktop-enums.h cc-background-item.h) >> xgen-gtbh \
+ && (cmp -s xgen-gtbh gdesktop-enums-types.h || cp xgen-gtbh gdesktop-enums-types.h ) \
+ && rm -f xgen-gtbh \
+ && echo timestamp > $(@F)
+
+gdesktop-enums-types.c: $(includedir)/gsettings-desktop-schemas/gdesktop-enums.h cc-background-item.h Makefile gdesktop-enums-types.h
+ $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) \
+ --fhead "#include <gdesktop-enums.h>\n#include \"gdesktop-enums-types.h\"\n#include \"cc-background-item.h\"" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $(includedir)/gsettings-desktop-schemas/gdesktop-enums.h cc-background-item.h) > xgen-gtbc \
+ && cp xgen-gtbc gdesktop-enums-types.c \
+ && rm -f xgen-gtbc
+
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = gnome-background-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-CLEANFILES = $(desktop_in_files) $(desktop_DATA)
+CLEANFILES = $(desktop_in_files) $(desktop_DATA) stamp-gdesktop-enums-types.h gdesktop-enums-types.h gdesktop-enums-types.c
-include $(top_srcdir)/git.mk