From 669a1e2f3a7dd336ee030743b4c78e39656c75e9 Mon Sep 17 00:00:00 2001 From: "Bradford Hovinen (Gdict maintainer)" Date: Thu, 6 Dec 2001 23:53:58 +0000 Subject: [PATCH] Removed background rendering code from the background capplet and moved it to a separate static library. --- Makefile.am | 2 +- capplets/background/Makefile.am | 8 +++----- .../background/background-properties-capplet.c | 1 + configure.in | 1 + control-center/capplet-dir-view.c | 6 ------ libbackground/ChangeLog | 0 libbackground/Makefile.am | 16 ++++++++++++++++ {capplets/background => libbackground}/applier.c | 0 {capplets/background => libbackground}/applier.h | 0 .../background => libbackground}/preferences.c | 0 .../background => libbackground}/preferences.h | 0 11 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 libbackground/ChangeLog create mode 100644 libbackground/Makefile.am rename {capplets/background => libbackground}/applier.c (100%) rename {capplets/background => libbackground}/applier.h (100%) rename {capplets/background => libbackground}/preferences.c (100%) rename {capplets/background => libbackground}/preferences.h (100%) diff --git a/Makefile.am b/Makefile.am index 240d214c5..955a1c70b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = libsounds capplets control-center idl po +SUBDIRS = libsounds libbackground capplets control-center idl po #I removed the root-manager for now # # it generated this error : diff --git a/capplets/background/Makefile.am b/capplets/background/Makefile.am index a0d3f0faf..cd85c4852 100644 --- a/capplets/background/Makefile.am +++ b/capplets/background/Makefile.am @@ -3,12 +3,10 @@ cappletgroup = bin_PROGRAMS = background-properties-control bin_SCRIPTS = background-properties-capplet -background_properties_control_LDADD = $(GNOMECC_CAPPLETS_LIBS) +background_properties_control_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(top_builddir)/libbackground/libbackground.a background_properties_control_SOURCES = \ - background-properties-capplet.c \ - preferences.c preferences.h \ - applier.c applier.h + background-properties-capplet.c DESKTOP_EXEC_LINE = gnomecc --run-capplet background-properties BONOBO_CONF_DEFINE=-DBONOBO_CONF_ENABLE @@ -45,7 +43,7 @@ install-data-local: install-data-am: install-data-local ####@###GNOMECC_CAPPLETS_DESKTOP_IN_RULE@ -INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(BONOBO_CONF_DEFINE) +INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(BONOBO_CONF_DEFINE) -I$(top_srcdir)/libbackground CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST) $(defaults_DATA) $(oaf_DATA).in iconsdir = $(GNOMECC_ICONS_DIR) diff --git a/capplets/background/background-properties-capplet.c b/capplets/background/background-properties-capplet.c index 9a5598e18..81b9b7591 100644 --- a/capplets/background/background-properties-capplet.c +++ b/capplets/background/background-properties-capplet.c @@ -254,6 +254,7 @@ create_dialog (void) int main (int argc, char **argv) { + g_type_init (); glade_init (); capplet_init (argc, argv, apply_settings, create_dialog, setup_dialog, get_legacy_settings); diff --git a/configure.in b/configure.in index d3da36c69..e1d4f8fd4 100644 --- a/configure.in +++ b/configure.in @@ -144,6 +144,7 @@ control-center.spec Makefile po/Makefile.in control-center/Makefile +libbackground/Makefile capplets/Makefile capplets/common/Makefile capplets/background/Makefile diff --git a/control-center/capplet-dir-view.c b/control-center/capplet-dir-view.c index 6d07e68c1..2cfd47da5 100644 --- a/control-center/capplet-dir-view.c +++ b/control-center/capplet-dir-view.c @@ -32,9 +32,6 @@ #include "capplet-dir-view.h" -#ifdef USE_HTML -extern CappletDirViewImpl capplet_dir_view_html; -#endif extern CappletDirViewImpl capplet_dir_view_list; extern CappletDirViewImpl capplet_dir_view_tree; @@ -42,9 +39,6 @@ CappletDirViewImpl *capplet_dir_view_impl[] = { NULL, &capplet_dir_view_list, &capplet_dir_view_tree, -#ifdef USE_HTML - &capplet_dir_view_html -#endif }; static GtkObjectClass *parent_class; diff --git a/libbackground/ChangeLog b/libbackground/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/libbackground/Makefile.am b/libbackground/Makefile.am new file mode 100644 index 000000000..41dc73125 --- /dev/null +++ b/libbackground/Makefile.am @@ -0,0 +1,16 @@ +EXTRA_DIST = ChangeLog + +INCLUDES = \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DGNOME_ICONDIR=\""${prefix}/share/pixmaps"\" \ + -DG_LOG_DOMAIN=\"capplet-common\" \ + -I$(top_srcdir)/ \ + -I$(top_srcdir)/intl \ + @CAPPLET_CFLAGS@ + +noinst_LIBRARIES = libbackground.a + +libbackground_a_SOURCES = \ + applier.c applier.h \ + preferences.c preferences.h + diff --git a/capplets/background/applier.c b/libbackground/applier.c similarity index 100% rename from capplets/background/applier.c rename to libbackground/applier.c diff --git a/capplets/background/applier.h b/libbackground/applier.h similarity index 100% rename from capplets/background/applier.h rename to libbackground/applier.h diff --git a/capplets/background/preferences.c b/libbackground/preferences.c similarity index 100% rename from capplets/background/preferences.c rename to libbackground/preferences.c diff --git a/capplets/background/preferences.h b/libbackground/preferences.h similarity index 100% rename from capplets/background/preferences.h rename to libbackground/preferences.h