Commit 49377981 authored by Bradford Hovinen's avatar Bradford Hovinen Committed by Bradford Hovinen (Gdict maintainer)

Remove IMLIB check (GNOMECC_CAPPLETS_DESKTOP_IN_RULE): Add sed expression

2001-07-25  Bradford Hovinen  <hovinen@ximian.com>

	* configure.in: Remove IMLIB check
	(GNOMECC_CAPPLETS_DESKTOP_IN_RULE): Add sed expression to cover
	macro DESKTOP_EXEC_LINE
	(LIBCOMMON_DIR): Add option --enable-bonobo-conf

	* all: Added support for optionally compiling without bonobo-conf enabled
parent 429b2504
2001-07-25 Bradford Hovinen <hovinen@ximian.com>
* configure.in: Remove IMLIB check
(GNOMECC_CAPPLETS_DESKTOP_IN_RULE): Add sed expression to cover
macro DESKTOP_EXEC_LINE
(LIBCOMMON_DIR): Add option --enable-bonobo-conf
* all: Added support for optionally compiling without bonobo-conf enabled
2001-07-25 Chema Celorio <chema@celorio.com>
* configure.in (dnl): remove the sawfish dir
......
......@@ -7,7 +7,7 @@
#undef HAVE_LIBSM
#undef HAVE_PROGRAM_INVOCATION_SHORT_NAME
#undef HAVE_PROGRAM_INVOCATION_NAME
#undef HAVE_XIMIAN_ARCHIVER
#undef HAVE_BONOBO
#undef GNOMECC_ICONS_DIR
#undef GNOMECC_GLADE_DIR
......
......@@ -20,7 +20,14 @@ INCLUDES = \
@ARCHIVER_CFLAGS@ \
@MONIKER_CFLAGS@
bin_PROGRAMS = bonobo-moniker-archiver config-archiver
if MONIKER_ENABLE
BONOBO_MONIKER_ARCHIVER_BIN=bonobo-moniker-archiver
else
BONOBO_MONIKER_ARCHIVER_BIN=
endif
bin_PROGRAMS = $(BONOBO_MONIKER_ARCHIVER_BIN) config-archiver
lib_LTLIBRARIES = libconfig_archiver.la
libconfig_archiver_la_SOURCES = \
......
always_built_SUBDIRS = \
common background keyboard mouse screensaver sound \
background keyboard mouse screensaver sound \
default-applications desktop-links
SUBDIRS = $(always_built_SUBDIRS)
EXTRA_DIST =
SUBDIRS = $(always_built_SUBDIRS) $(LIBCOMMON_DIR)
2001-07-24 Bradford Hovinen <hovinen@ximian.com>
* main.c (setup_dialog): Use bonobo_peditor_option_menu_construct
2001-07-25 Richard Hestilow <hestilow@ximian.com>
* main.c (setup_dialog): Hide opacity settings for now.
......
......@@ -3,11 +3,24 @@ cappletgroup =
bin_PROGRAMS = background-properties-capplet
background_properties_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS)
background_properties_capplet_SOURCES = \
main.c\
applier.c applier.h
# prefs-widget.c prefs-widget.h \
#preferences.c preferences.h \
bonobo_sources = \
background-properties-capplet.c \
applier.c applier.h
legacy_sources = \
main.c \
applier.c applier.h \
prefs-widget.c prefs-widget.h \
preferences.c preferences.h
if BONOBO_CONF_ENABLE
DESKTOP_EXEC_LINE = gnomecc --run-capplet background-properties
background_properties_capplet_SOURCES = $(bonobo_sources)
else
DESKTOP_EXEC_LINE = background-properties-capplet
background_properties_capplet_SOURCES = $(legacy_sources)
endif
pixmap_DATA =
......@@ -27,7 +40,7 @@ oaffile = $(oaf_DATA)
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST) $(defaults_DATA) $(oaf_DATA).in
EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST) $(defaults_DATA) $(oaf_DATA).in $(bonobo_sources) $(legacy_sources)
iconsdir = $(GNOMECC_ICONS_DIR)
Gladedir = $(GNOMECC_GLADE_DIR)
pixmapdir = $(GNOMECC_PIXMAPS_DIR)
......
/* -*- mode: c; style: linux -*- */
/* main.c
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Written by: Bradford Hovinen <hovinen@ximian.com>
* Richard Hestilow <hestilow@ximian.com>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include <bonobo.h>
#include <glade/glade.h>
#include <gtk/gtksignal.h>
#include "capplet-util.h"
#include "applier.h"
static void
bonobo_config_set_filename (Bonobo_ConfigDatabase db,
const char *key,
const char *value,
CORBA_Environment *opt_ev);
static Applier *applier = NULL;
/* Popt option for compat reasons */
static gchar *background_image = NULL;
const struct poptOption options [] = {
{ "background-image", 'b', POPT_ARG_STRING, &background_image, 0,
N_("Set background image."), N_("IMAGE-FILE") },
{NULL, '\0', 0, NULL, 0}
};
static void
apply_settings (Bonobo_ConfigDatabase db)
{
CORBA_Environment ev;
CORBA_exception_init (&ev);
if (!applier)
applier = APPLIER (applier_new ());
/* HAckity hackty */
if (background_image)
{
bonobo_config_set_filename (db, "/main/wallpaper_filename", background_image, NULL);
Bonobo_ConfigDatabase_sync (db, &ev);
}
applier_apply_prefs (applier, CORBA_OBJECT_NIL, db, &ev, TRUE, FALSE);
CORBA_exception_free (&ev);
}
static CORBA_any*
gdk_color_to_bonobo (const gchar *colorstr)
{
GdkColor tmp;
CORBA_Environment ev;
DynamicAny_DynAny dyn;
CORBA_any *any;
g_return_val_if_fail (colorstr != NULL, NULL);
CORBA_exception_init (&ev);
gdk_color_parse (colorstr, &tmp);
dyn = CORBA_ORB_create_dyn_struct (bonobo_orb (),
TC_Bonobo_Config_Color, &ev);
DynamicAny_DynAny_insert_double (dyn, ((double)tmp.red)/65535, &ev);
DynamicAny_DynAny_next (dyn, &ev);
DynamicAny_DynAny_insert_double (dyn, ((double)tmp.green)/65535, &ev);
DynamicAny_DynAny_next (dyn, &ev);
DynamicAny_DynAny_insert_double (dyn, ((double)tmp.blue)/65535, &ev);
DynamicAny_DynAny_next (dyn, &ev);
DynamicAny_DynAny_insert_double (dyn, 0, &ev);
any = DynamicAny_DynAny_to_any (dyn, &ev);
CORBA_Object_release ((CORBA_Object) dyn, &ev);
CORBA_exception_free (&ev);
return any;
}
static void
copy_color_from_legacy (Bonobo_ConfigDatabase db,
const gchar *key, const gchar *legacy_key)
{
gboolean def;
gchar *val_string;
g_return_if_fail (key != NULL);
g_return_if_fail (legacy_key != NULL);
val_string = gnome_config_get_string_with_default (legacy_key, &def);
if (!def)
{
CORBA_any *color = gdk_color_to_bonobo (val_string);
bonobo_config_set_value (db, key, color, NULL);
bonobo_arg_release (color);
}
g_free (val_string);
}
static void
bonobo_config_set_filename (Bonobo_ConfigDatabase db,
const char *key,
const char *value,
CORBA_Environment *opt_ev)
{
CORBA_any *any;
any = bonobo_arg_new (TC_Bonobo_Config_FileName);
*((CORBA_char **)(any->_value)) = CORBA_string_dup ((value)?(value):"");
bonobo_config_set_value (db, key, any, opt_ev);
bonobo_arg_release (any);
}
static void
get_legacy_settings (Bonobo_ConfigDatabase db)
{
gboolean val_boolean, def;
gchar *val_string, *val_filename;
int val_ulong, val_long;
COPY_FROM_LEGACY (filename, "/main/wallpaper_filename", string, "/Background/Default/wallpaper=none");
COPY_FROM_LEGACY (ulong, "/main/wallpaper_type", int, "/Background/Default/wallpaperAlign=0");
copy_color_from_legacy (db, "/main/color1", "/Background/Default/color1");
copy_color_from_legacy (db, "/main/color2", "/Background/Default/color2");
/* Code to deal with new enum - messy */
val_ulong = -1;
val_string = gnome_config_get_string_with_default ("/Background/Default/simple=solid", &def);
if (!def)
{
if (!strcmp (val_string, "solid"))
val_ulong = 0;
else
{
g_free (val_string);
val_string = gnome_config_get_string_with_default ("/Background/Default/gradient=vertical", &def);
if (!def)
val_ulong = !strcmp (val_string, "vertical");
}
}
g_free (val_string);
if (val_ulong != -1)
bonobo_config_set_ulong (db, "/main/orientation", val_ulong, NULL);
val_boolean = gnome_config_get_bool_with_default ("/Background/Default/adjustOpacity=true", &def);
if (!def && val_boolean)
{
COPY_FROM_LEGACY (long, "/main/opacity", int, "/Background/Default/opacity=100");
}
}
static void
property_change_cb (BonoboListener *listener,
char *event_name,
CORBA_any *any,
CORBA_Environment *ev,
Bonobo_PropertyBag pb)
{
applier_apply_prefs (applier, pb, CORBA_OBJECT_NIL, ev, FALSE, TRUE);
}
static void
realize_cb (GtkWidget *widget, Bonobo_PropertyBag bag)
{
CORBA_Environment ev;
CORBA_exception_init (&ev);
applier_apply_prefs (applier, bag, CORBA_OBJECT_NIL, &ev, FALSE, TRUE);
CORBA_exception_free (&ev);
}
#define CUSTOM_CREATE_PEDITOR(type, corba_type, key, widget) \
{ \
BonoboPEditor *ed = BONOBO_PEDITOR \
(bonobo_peditor_##type##_construct (WID (widget))); \
bonobo_peditor_set_property (ed, bag, key, TC_##corba_type, NULL); \
}
static void
setup_dialog (GtkWidget *widget, Bonobo_PropertyBag bag)
{
BonoboPEditor *ed;
GladeXML *dialog;
dialog = gtk_object_get_data (GTK_OBJECT (widget), "glade-data");
ed = BONOBO_PEDITOR (bonobo_peditor_option_menu_construct (WID ("color_option")));
bonobo_peditor_set_property (ed, bag, "orientation", TC_ulong, NULL);
CUSTOM_CREATE_PEDITOR (color, Bonobo_Config_Color, "color1", "colorpicker1");
CUSTOM_CREATE_PEDITOR (color, Bonobo_Config_Color, "color2", "colorpicker2");
CUSTOM_CREATE_PEDITOR (filename, Bonobo_Config_FileName, "wallpaper_filename", "image_fileentry");
ed = BONOBO_PEDITOR (bonobo_peditor_option_menu_construct (WID ("image_option")));
bonobo_peditor_set_property (ed, bag, "wallpaper_type", TC_ulong, NULL);
CUSTOM_CREATE_PEDITOR (int_range, long, "opacity", "opacity_spin");
gtk_widget_hide (WID ("opacity_spin"));
gtk_widget_hide (WID ("opacity_label"));
bonobo_event_source_client_add_listener (bag, (BonoboListenerCallbackFn) property_change_cb,
NULL, NULL, bag);
gtk_signal_connect_after (GTK_OBJECT (applier_class_get_preview_widget ()), "realize", realize_cb, bag);
}
static GtkWidget*
create_dialog (void)
{
GtkWidget *holder;
GtkWidget *widget;
GladeXML *dialog;
dialog = glade_xml_new (GNOMECC_GLADE_DIR "/background-properties.glade", "prefs_widget");
widget = glade_xml_get_widget (dialog, "prefs_widget");
gtk_object_set_data (GTK_OBJECT (widget), "glade-data", dialog);
applier = APPLIER (applier_new ());
/* Minor GUI addition */
holder = WID ("preview_holder");
gtk_box_pack_start (GTK_BOX (holder),
applier_class_get_preview_widget (),
TRUE, TRUE, 0);
gtk_widget_show_all (holder);
gtk_signal_connect_object (GTK_OBJECT (widget), "destroy",
GTK_SIGNAL_FUNC (gtk_object_destroy),
GTK_OBJECT (dialog));
return widget;
}
int
main (int argc, char **argv)
{
const gchar* legacy_files[] = { "Background", NULL };
glade_gnome_init ();
gnomelib_register_popt_table (options, "background options");
capplet_init (argc, argv, legacy_files, apply_settings, create_dialog, setup_dialog, get_legacy_settings);
gnome_window_icon_set_default_from_file
(GNOMECC_ICONS_DIR"/gnome-ccbackground.png");
return 0;
}
[Desktop Entry]
_Name=Background
_Comment=Configuration of the desktop's background
Exec=gnomecc --run-capplet background-properties-capplet
Exec=@DESKTOP_EXEC_LINE@
Icon=gnome-ccbackground.png
Terminal=0
Type=Application
/* -*- mode: c; style: linux -*- */
/* main.c
* Copyright (C) 2000-2001 Ximian, Inc.
* Copyright (C) 2000 Helix Code, Inc.
*
* Written by Bradford Hovinen (hovinen@helixcode.com)
*
* Written by: Bradford Hovinen <hovinen@ximian.com>
* Richard Hestilow <hestilow@ximian.com>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
......@@ -25,253 +25,289 @@
# include <config.h>
#endif
#include <gtk/gtk.h>
#include <gnome.h>
#include <bonobo.h>
#include <libgnomeui/gnome-window-icon.h>
#include <tree.h>
#include <parser.h>
#include <fcntl.h>
#include <glade/glade.h>
#include <gtk/gtksignal.h>
#include "capplet-util.h"
#include "applier.h"
static void
bonobo_config_set_filename (Bonobo_ConfigDatabase db,
const char *key,
const char *value,
CORBA_Environment *opt_ev);
#include <capplet-widget.h>
static Applier *applier = NULL;
#ifdef HAVE_XIMIAN_ARCHIVER
# include <ximian-archiver/archive.h>
# include <ximian-archiver/location.h>
#endif /* HAVE_XIMIAN_ARCHIVER */
/* Popt option for compat reasons */
static gchar *background_image = NULL;
#include "preferences.h"
#include "prefs-widget.h"
const struct poptOption options [] = {
{ "background-image", 'b', POPT_ARG_STRING, &background_image, 0,
N_("Set background image."), N_("IMAGE-FILE") },
{NULL, '\0', 0, NULL, 0}
};
static Preferences *prefs;
static Preferences *old_prefs;
static PrefsWidget *prefs_widget;
static void
apply_settings (Bonobo_ConfigDatabase db)
{
CORBA_Environment ev;
CORBA_exception_init (&ev);
if (!applier)
applier = APPLIER (applier_new ());
/* HAckity hackty */
if (background_image)
{
bonobo_config_set_filename (db, "/main/wallpaper_filename", background_image, NULL);
Bonobo_ConfigDatabase_sync (db, &ev);
}
static guint ok_handler_id;
static guint cancel_handler_id;
applier_apply_prefs (applier, CORBA_OBJECT_NIL, db, &ev, TRUE, FALSE);
CORBA_exception_free (&ev);
}
#ifdef HAVE_XIMIAN_ARCHIVER
static CORBA_any*
gdk_color_to_bonobo (const gchar *colorstr)
{
GdkColor tmp;
CORBA_Environment ev;
DynamicAny_DynAny dyn;
CORBA_any *any;
g_return_val_if_fail (colorstr != NULL, NULL);
CORBA_exception_init (&ev);
gdk_color_parse (colorstr, &tmp);
dyn = CORBA_ORB_create_dyn_struct (bonobo_orb (),
TC_Bonobo_Config_Color, &ev);
DynamicAny_DynAny_insert_double (dyn, ((double)tmp.red)/65535, &ev);
DynamicAny_DynAny_next (dyn, &ev);
DynamicAny_DynAny_insert_double (dyn, ((double)tmp.green)/65535, &ev);
DynamicAny_DynAny_next (dyn, &ev);
DynamicAny_DynAny_insert_double (dyn, ((double)tmp.blue)/65535, &ev);
DynamicAny_DynAny_next (dyn, &ev);
DynamicAny_DynAny_insert_double (dyn, 0, &ev);
any = DynamicAny_DynAny_to_any (dyn, &ev);
CORBA_Object_release ((CORBA_Object) dyn, &ev);
CORBA_exception_free (&ev);
return any;
}
static Archive *archive;
static gboolean outside_location;
static void
copy_color_from_legacy (Bonobo_ConfigDatabase db,
const gchar *key, const gchar *legacy_key)
store_archive_data (void)
{
gboolean def;
gchar *val_string;
g_return_if_fail (key != NULL);
g_return_if_fail (legacy_key != NULL);
val_string = gnome_config_get_string_with_default (legacy_key, &def);
if (!def)
{
CORBA_any *color = gdk_color_to_bonobo (val_string);
bonobo_config_set_value (db, key, color, NULL);
bonobo_arg_release (color);
}
g_free (val_string);
Location *location;
xmlDocPtr xml_doc;
if (capplet_get_location () == NULL)
location = archive_get_current_location (archive);
else
location = archive_get_location (archive,
capplet_get_location ());
xml_doc = preferences_write_xml (prefs);
location_store_xml (location, "background-properties-capplet",
xml_doc, STORE_MASK_PREVIOUS);
xmlFreeDoc (xml_doc);
archive_close (archive);
}
static void
bonobo_config_set_filename (Bonobo_ConfigDatabase db,
const char *key,
const char *value,
CORBA_Environment *opt_ev)
{
CORBA_any *any;
any = bonobo_arg_new (TC_Bonobo_Config_FileName);
*((CORBA_char **)(any->_value)) = CORBA_string_dup ((value)?(value):"");
bonobo_config_set_value (db, key, any, opt_ev);
bonobo_arg_release (any);
}
#endif /* HAVE_XIMIAN_ARCHIVER */
static void
get_legacy_settings (Bonobo_ConfigDatabase db)
ok_cb (GtkWidget *widget)
{
gboolean val_boolean, def;
gchar *val_string, *val_filename;
int val_ulong, val_long;
COPY_FROM_LEGACY (filename, "/main/wallpaper_filename", string, "/Background/Default/wallpaper=none");
COPY_FROM_LEGACY (ulong, "/main/wallpaper_type", int, "/Background/Default/wallpaperAlign=0");
copy_color_from_legacy (db, "/main/color1", "/Background/Default/color1");
copy_color_from_legacy (db, "/main/color2", "/Background/Default/color2");
/* Code to deal with new enum - messy */
val_ulong = -1;
val_string = gnome_config_get_string_with_default ("/Background/Default/simple=solid", &def);
if (!def)
{
if (!strcmp (val_string, "solid"))
val_ulong = 0;
else
{
g_free (val_string);
val_string = gnome_config_get_string_with_default ("/Background/Default/gradient=vertical", &def);
if (!def)
val_ulong = !strcmp (val_string, "vertical");
}
}
g_free (val_string);
if (val_ulong != -1)
bonobo_config_set_ulong (db, "/main/orientation", val_ulong, NULL);
val_boolean = gnome_config_get_bool_with_default ("/Background/Default/adjustOpacity=true", &def);
if (!def && val_boolean)
{
COPY_FROM_LEGACY (long, "/main/opacity", int, "/Background/Default/opacity=100");
#ifdef HAVE_XIMIAN_ARCHIVER
if (!outside_location) {
preferences_save (prefs);
preferences_apply_now (prefs);
}
#else /* !HAVE_XIMIAN_ARCHIVER */
preferences_save (prefs);
preferences_apply_now (prefs);
#endif /* HAVE_XIMIAN_ARCHIVER */
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), ok_handler_id);
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), cancel_handler_id);
gtk_object_destroy (GTK_OBJECT (prefs_widget));
#ifdef HAVE_XIMIAN_ARCHIVER
store_archive_data ();
#endif /* HAVE_XIMIAN_ARCHIVER */
}
static void
property_change_cb (BonoboListener *listener,
char *event_name,
CORBA_any *any,
CORBA_Environment *ev,
Bonobo_PropertyBag pb)
cancel_cb (GtkWidget *widget)
{
applier_apply_prefs (applier, pb, CORBA_OBJECT_NIL, ev, FALSE, TRUE);
#ifdef HAVE_XIMIAN_ARCHIVER
if (!outside_location) {
preferences_save (old_prefs);
preferences_apply_now (old_prefs);
}
#else /* !HAVE_XIMIAN_ARCHIVER */
preferences_save (prefs);
preferences_apply_now (prefs);
#endif /* HAVE_XIMIAN_ARCHIVER */
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), ok_handler_id);
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), cancel_handler_id);
gtk_object_destroy (GTK_OBJECT (prefs_widget));
}
static void
realize_cb (GtkWidget *widget, Bonobo_PropertyBag bag)
static void
setup_capplet_widget (void)
{
CORBA_Environment ev;
preferences_freeze (prefs);
prefs_widget = PREFS_WIDGET (prefs_widget_new (prefs));
CORBA_exception_init (&ev);
applier_apply_prefs (applier, bag, CORBA_OBJECT_NIL, &ev, FALSE, TRUE);
CORBA_exception_free (&ev);
ok_handler_id =
gtk_signal_connect (GTK_OBJECT (prefs_widget), "ok",
GTK_SIGNAL_FUNC (ok_cb), NULL);
cancel_handler_id =
gtk_signal_connect (GTK_OBJECT (prefs_widget), "cancel",
GTK_SIGNAL_FUNC (cancel_cb), NULL);
gtk_widget_show_all (GTK_WIDGET (prefs_widget));
preferences_thaw (prefs);
}
#define CUSTOM_CREATE_PEDITOR(type, corba_type, key, widget) \
{ \
BonoboPEditor *ed = BONOBO_PEDITOR \
(bonobo_peditor_##type##_construct (WID (widget))); \
bonobo_peditor_set_property (ed, bag, key, TC_##corba_type, NULL); \
}
#ifdef HAVE_XIMIAN_ARCHIVER
static void
do_get_xml (void)
{
Preferences *prefs;
xmlDocPtr doc;
prefs = PREFERENCES (preferences_new ());
preferences_load (prefs);
doc = preferences_write_xml (prefs);
xmlDocDump (stdout, doc);
gtk_object_destroy (GTK_OBJECT (prefs));
}
static void
setup_dialog (GtkWidget *widget, Bonobo_PropertyBag bag)
do_set_xml (gboolean apply_settings)
{
BonoboPEditor *ed;
GladeXML *dialog;
xmlDocPtr doc;
char buffer[16384];
GString *doc_str;
int t = 0;
dialog = gtk_object_get_data (GTK_OBJECT (widget), "glade-data");
ed = BONOBO_PEDITOR (bonobo_peditor_option_construct (0, WID ("color_option")));
bonobo_peditor_set_property (ed, bag, "orientation", TC_ulong, NULL);
fflush (stdin);
CUSTOM_CREATE_PEDITOR (color, Bonobo_Config_Color, "color1", "colorpicker1");
CUSTOM_CREATE_PEDITOR (color, Bonobo_Config_Color, "color2", "colorpicker2");
CUSTOM_CREATE_PEDITOR (filename, Bonobo_Config_FileName, "wallpaper_filename", "image_fileentry");
fcntl (fileno (stdin), F_SETFL, 0);
ed = BONOBO_PEDITOR (bonobo_peditor_option_construct (0, WID ("image_option")));
bonobo_peditor_set_property (ed, bag, "wallpaper_type", TC_ulong, NULL);
doc_str = g_string_new ("");
CUSTOM_CREATE_PEDITOR (int_range, long, "opacity", "opacity_spin");
gtk_widget_hide (WID ("opacity_spin"));
gtk_widget_hide (WID ("opacity_label"));
while ((t = read (fileno (stdin), buffer, sizeof (buffer) - 1)) != 0) {
buffer[t] = '\0';
g_string_append (doc_str, buffer);
}
bonobo_event_source_client_add_listener (bag, property_change_cb,
NULL, NULL, bag);
if (doc_str->len > 0) {
doc = xmlParseDoc (doc_str->str);
g_string_free (doc_str, TRUE);
gtk_signal_connect_after (GTK_OBJECT (applier_class_get_preview_widget ()), "realize", realize_cb, bag);
}
if (doc != NULL) {