diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index a74b40467..36ba88a4a 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,10 @@ +2004-01-12 Jody Goldberg + + * Makefile.am : As long as we're hard coding the path hard code it in + only one place. Passing in datadir then adding the magic subdir in + C then building in Makefile seems unnecessary. + Use GNOMECC_CAPPLETS_* + 2004-01-12 Rodney Dawes * Makefile.am: Add install hook to create data directory diff --git a/capplets/background/Makefile.am b/capplets/background/Makefile.am index 0a4455faf..95daf2fd7 100644 --- a/capplets/background/Makefile.am +++ b/capplets/background/Makefile.am @@ -1,14 +1,13 @@ -INCLUDES = \ - $(CAPPLET_CFLAGS) \ - -DDATADIR=\""$(datadir)"\" \ - -DGNOMELOCALEDIR=\""$(localedir)"\" +WALLPAPER_DATADIR = $(datadir)/gnome-wallpaper-properties + +INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) -DWALLPAPER_DATADIR=\""$(WALLPAPER_DATADIR)"\" bin_PROGRAMS = gnome-wallpaper-properties noinst_LTLIBRARIES = libgnomewp.la gnome_wallpaper_properties_LDADD = \ - $(CAPPLET_LIBS) \ + $(GNOMECC_CAPPLETS_LIBS) \ libgnomewp.la gnome_wallpaper_properties_SOURCES = \ @@ -21,7 +20,7 @@ libgnomewp_la_SOURCES = \ gnome-wp-xml.c gnome-wp-xml.h libgnomewp_la_LIBADD = \ - $(CAPPLET_LIBS) + $(GNOMECC_CAPPLETS_LIBS) desktopdir = $(GNOMECC_DESKTOP_DIR) desktop_in_files = background.desktop.in @@ -30,7 +29,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ install-data-local: - $(mkinstalldirs) $(datadir)/gnome-wallpaper-properties + $(mkinstalldirs) $(WALLPAPER_DATADIR) EXTRA_DIST = \ $(desktop_in_files) diff --git a/capplets/background/gnome-wp-item.c b/capplets/background/gnome-wp-item.c index 624e98a05..98b98a2d0 100644 --- a/capplets/background/gnome-wp-item.c +++ b/capplets/background/gnome-wp-item.c @@ -20,6 +20,7 @@ #include "gnome-wp-item.h" #include "gnome-wp-utils.h" +#include void gnome_wp_item_free (GnomeWPItem * item) { if (item == NULL) { diff --git a/capplets/background/gnome-wp-utils.c b/capplets/background/gnome-wp-utils.c index b051a1f06..e9063bb93 100644 --- a/capplets/background/gnome-wp-utils.c +++ b/capplets/background/gnome-wp-utils.c @@ -19,6 +19,7 @@ */ #include "gnome-wp-utils.h" +#include GdkPixbuf * gnome_wp_pixbuf_new_gradient (GtkOrientation orientation, GdkColor * c1, @@ -106,7 +107,6 @@ GdkPixbuf * gnome_wp_pixbuf_new_solid (GdkColor * color, GdkPixbuf * gnome_wp_pixbuf_tile (GdkPixbuf * src_pixbuf, GdkPixbuf * dest_pixbuf) { gdouble cx, cy; - gdouble colorv; gint dwidth, dheight; gint swidth, sheight; guint alpha = 255; @@ -136,7 +136,6 @@ GdkPixbuf * gnome_wp_pixbuf_tile (GdkPixbuf * src_pixbuf, GdkPixbuf * gnome_wp_pixbuf_center (GdkPixbuf * src_pixbuf, GdkPixbuf * dest_pixbuf) { gdouble cx, cy; - gdouble colorv; gint dwidth, dheight; gint swidth, sheight; guint alpha = 255; diff --git a/capplets/background/gnome-wp-xml.c b/capplets/background/gnome-wp-xml.c index 708b81d51..df8f1a927 100644 --- a/capplets/background/gnome-wp-xml.c +++ b/capplets/background/gnome-wp-xml.c @@ -297,9 +297,8 @@ void gnome_wp_xml_load_list (GnomeWPCapplet * capplet) { g_strfreev (xdgdirs); g_free (xdgdirslist); - wpdbfile = g_build_filename (DATADIR, "gnome-wallpaper-properties", NULL); - if (g_file_test (wpdbfile, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { - gnome_vfs_directory_list_load (&list, wpdbfile, + if (g_file_test (WALLPAPER_DATADIR, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { + gnome_vfs_directory_list_load (&list, WALLPAPER_DATADIR, GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS); @@ -309,18 +308,17 @@ void gnome_wp_xml_load_list (GnomeWPCapplet * capplet) { if (strcmp (".", info->name) != 0 && strcmp ("..", info->name) != 0) { gchar * filename; - filename = g_build_filename (wpdbfile, info->name, NULL); + filename = g_build_filename (WALLPAPER_DATADIR, info->name, NULL); gnome_wp_xml_load_xml (capplet, filename); g_free (filename); } } g_list_free (list); - gnome_vfs_monitor_add (&handle, wpdbfile, GNOME_VFS_MONITOR_DIRECTORY, + gnome_vfs_monitor_add (&handle, WALLPAPER_DATADIR, GNOME_VFS_MONITOR_DIRECTORY, (GnomeVFSMonitorCallback) gnome_wp_file_changed, capplet); } - g_free (wpdbfile); gnome_wp_load_legacy (capplet); }