As long as we're hard coding the path hard code it in only one place.
2004-01-12 Jody Goldberg <jody@gnome.org> * 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_*
This commit is contained in:
parent
acdde5d39d
commit
55a692788a
5 changed files with 19 additions and 15 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-01-12 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* 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 <dobey@ximian.com>
|
||||
|
||||
* Makefile.am: Add install hook to create data directory
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "gnome-wp-item.h"
|
||||
#include "gnome-wp-utils.h"
|
||||
#include <string.h>
|
||||
|
||||
void gnome_wp_item_free (GnomeWPItem * item) {
|
||||
if (item == NULL) {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "gnome-wp-utils.h"
|
||||
#include <string.h>
|
||||
|
||||
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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue