bonobo-conf rewrite.
2001-07-19 Richard Hestilow <hestilow@ximian.com> * bonobo-conf rewrite.
This commit is contained in:
parent
5da79712e0
commit
801e66b748
9 changed files with 676 additions and 728 deletions
|
@ -0,0 +1,20 @@
|
||||||
|
<oaf_info>
|
||||||
|
|
||||||
|
<oaf_server iid="OAFIID:Bonobo_Control_Capplet_background_properties_Factory" type="exe" location="background-properties-capplet">
|
||||||
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
|
<item value="IDL:GNOME/ObjectFactory:1.0"/>
|
||||||
|
</oaf_attribute>
|
||||||
|
|
||||||
|
<oaf_attribute name="name" type="string" value="Background properties capplet factory"/>
|
||||||
|
</oaf_server>
|
||||||
|
|
||||||
|
<oaf_server iid="OAFIID:Bonobo_Control_Capplet_background_properties" type="factory"
|
||||||
|
location="OAFIID:Bonobo_Control_Capplet_background_properties_Factory">
|
||||||
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
|
<item value="IDL:Bonobo/PropertyControl:1.0"/>
|
||||||
|
<item value="IDL:Bonobo/Unknown:1.0"/>
|
||||||
|
</oaf_attribute>
|
||||||
|
<oaf_attribute name="name" type="string" value="Background properties capplet"/>
|
||||||
|
</oaf_server>
|
||||||
|
|
||||||
|
</oaf_info>
|
|
@ -1,3 +1,7 @@
|
||||||
|
2001-07-19 Richard Hestilow <hestilow@ximian.com>
|
||||||
|
|
||||||
|
* bonobo-conf rewrite.
|
||||||
|
|
||||||
2001-07-19 Bradford Hovinen <hovinen@ximian.com>
|
2001-07-19 Bradford Hovinen <hovinen@ximian.com>
|
||||||
|
|
||||||
* Makefile.am: Remove SUBDIRS
|
* Makefile.am: Remove SUBDIRS
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
cappletname = background
|
cappletname = background
|
||||||
cappletgroup =
|
cappletgroup =
|
||||||
bin_PROGRAMS = background-properties
|
bin_PROGRAMS = background-properties-capplet
|
||||||
|
|
||||||
background_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
|
background_properties_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS)
|
||||||
background_properties_SOURCES = \
|
background_properties_capplet_SOURCES = \
|
||||||
main.c\
|
main.c\
|
||||||
prefs-widget.c prefs-widget.h \
|
applier.c applier.h
|
||||||
preferences.c preferences.h \
|
|
||||||
applier.c applier.h
|
|
||||||
|
|
||||||
pixmap_DATA =
|
pixmap_DATA =
|
||||||
|
|
||||||
|
defaultsdir= $(datadir)/control-center/defaults
|
||||||
|
defaults_DATA = background-properties.xml
|
||||||
|
|
||||||
|
oafdir = $(datadir)/oaf
|
||||||
|
oaf_DATA = Bonobo_Control_Capplet_background_properties.oaf
|
||||||
|
|
||||||
##
|
##
|
||||||
## You should not need to modify anything below this line
|
## You should not need to modify anything below this line
|
||||||
##
|
##
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <bonobo.h>
|
||||||
|
|
||||||
#include "applier.h"
|
#include "applier.h"
|
||||||
|
|
||||||
|
@ -44,10 +45,13 @@
|
||||||
#define MONITOR_CONTENTS_WIDTH 157
|
#define MONITOR_CONTENTS_WIDTH 157
|
||||||
#define MONITOR_CONTENTS_HEIGHT 111
|
#define MONITOR_CONTENTS_HEIGHT 111
|
||||||
|
|
||||||
static GtkWidget *preview_widget;
|
#define PDEBUG(pix) (g_print ("file %s: line %d (%s): Setting pixbuf to %i %i\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, gdk_pixbuf_get_width (pix), gdk_pixbuf_get_height (pix)))
|
||||||
|
|
||||||
|
static GtkWidget *preview_widget = NULL;
|
||||||
static gboolean gdk_pixbuf_xlib_inited = FALSE;
|
static gboolean gdk_pixbuf_xlib_inited = FALSE;
|
||||||
|
|
||||||
typedef struct _Renderer Renderer;
|
typedef struct _Renderer Renderer;
|
||||||
|
typedef struct _ApplierPreferences ApplierPreferences;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ARG_0,
|
ARG_0,
|
||||||
|
@ -55,49 +59,77 @@ enum {
|
||||||
|
|
||||||
struct _ApplierPrivate
|
struct _ApplierPrivate
|
||||||
{
|
{
|
||||||
Preferences *root_prefs;
|
ApplierPreferences *root_prefs;
|
||||||
Preferences *preview_prefs;
|
ApplierPreferences *preview_prefs;
|
||||||
|
|
||||||
GdkPixbuf *wallpaper_pixbuf;
|
GdkPixbuf *wallpaper_pixbuf;
|
||||||
gchar *wallpaper_filename;
|
gchar *wallpaper_filename;
|
||||||
|
|
||||||
Renderer *root_renderer;
|
Renderer *root_renderer;
|
||||||
Renderer *preview_renderer;
|
Renderer *preview_renderer;
|
||||||
|
|
||||||
gboolean nautilus_running;
|
gboolean nautilus_running;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Renderer
|
struct _Renderer
|
||||||
{
|
{
|
||||||
gboolean is_root;
|
gboolean is_root;
|
||||||
gboolean is_set;
|
gboolean is_set;
|
||||||
|
|
||||||
Preferences *prefs;
|
ApplierPreferences *prefs;
|
||||||
|
|
||||||
gint x; /* Geometry relative to pixmap */
|
gint x; /* Geometry relative to pixmap */
|
||||||
gint y;
|
gint y;
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
|
|
||||||
gint srcx; /* Geometry relative to pixbuf */
|
gint srcx; /* Geometry relative to pixbuf */
|
||||||
gint srcy; /* (used when the wallpaper is too big) */
|
gint srcy; /* (used when the wallpaper is too big) */
|
||||||
|
|
||||||
gint wx; /* Geometry of wallpaper as rendered */
|
gint wx; /* Geometry of wallpaper as rendered */
|
||||||
gint wy;
|
gint wy;
|
||||||
gint wwidth;
|
gint wwidth;
|
||||||
gint wheight;
|
gint wheight;
|
||||||
|
|
||||||
gint pwidth; /* Geometry of unscaled wallpaper */
|
gint pwidth; /* Geometry of unscaled wallpaper */
|
||||||
gint pheight;
|
gint pheight;
|
||||||
|
|
||||||
gint gwidth; /* Geometry of gradient-only pixmap */
|
gint gwidth; /* Geometry of gradient-only pixmap */
|
||||||
gint gheight;
|
gint gheight;
|
||||||
|
|
||||||
guchar *gradient_data;
|
guchar *gradient_data;
|
||||||
GdkPixbuf *wallpaper_pixbuf; /* Alias only */
|
GdkPixbuf *wallpaper_pixbuf; /* Alias only */
|
||||||
GdkPixbuf *prescaled_pixbuf; /* For tiled on preview */
|
GdkPixbuf *prescaled_pixbuf; /* For tiled on preview */
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
Pixmap pixmap;
|
Pixmap pixmap;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef enum _orientation_t {
|
||||||
|
ORIENTATION_SOLID, ORIENTATION_HORIZ, ORIENTATION_VERT
|
||||||
|
} orientation_t;
|
||||||
|
|
||||||
|
typedef enum _wallpaper_type_t {
|
||||||
|
WPTYPE_TILED, WPTYPE_CENTERED, WPTYPE_SCALED_ASPECT,
|
||||||
|
WPTYPE_SCALED, WPTYPE_EMBOSSED
|
||||||
|
} wallpaper_type_t;
|
||||||
|
|
||||||
|
|
||||||
|
struct _ApplierPreferences
|
||||||
|
{
|
||||||
|
int ref_count;
|
||||||
|
|
||||||
|
gboolean gradient_enabled;
|
||||||
|
gboolean wallpaper_enabled;
|
||||||
|
orientation_t orientation;
|
||||||
|
wallpaper_type_t wallpaper_type;
|
||||||
|
|
||||||
|
GdkColor *color1;
|
||||||
|
GdkColor *color2;
|
||||||
|
|
||||||
|
gchar *wallpaper_filename;
|
||||||
|
|
||||||
|
gboolean adjust_opacity;
|
||||||
|
gint opacity;
|
||||||
};
|
};
|
||||||
|
|
||||||
static GtkObjectClass *parent_class;
|
static GtkObjectClass *parent_class;
|
||||||
|
@ -113,8 +145,8 @@ static void applier_get_arg (GtkObject *object,
|
||||||
guint arg_id);
|
guint arg_id);
|
||||||
|
|
||||||
static void run_render_pipeline (Renderer *renderer,
|
static void run_render_pipeline (Renderer *renderer,
|
||||||
Preferences *old_prefs,
|
ApplierPreferences *old_prefs,
|
||||||
Preferences *new_prefs,
|
ApplierPreferences *new_prefs,
|
||||||
GdkPixbuf *wallpaper_pixbuf);
|
GdkPixbuf *wallpaper_pixbuf);
|
||||||
static void draw_disabled_message (GtkWidget *widget);
|
static void draw_disabled_message (GtkWidget *widget);
|
||||||
|
|
||||||
|
@ -122,7 +154,7 @@ static Renderer *renderer_new (gboolean is_root);
|
||||||
static void renderer_destroy (Renderer *renderer);
|
static void renderer_destroy (Renderer *renderer);
|
||||||
|
|
||||||
static void renderer_set_prefs (Renderer *renderer,
|
static void renderer_set_prefs (Renderer *renderer,
|
||||||
Preferences *prefs);
|
ApplierPreferences *prefs);
|
||||||
static void renderer_set_wallpaper (Renderer *renderer,
|
static void renderer_set_wallpaper (Renderer *renderer,
|
||||||
GdkPixbuf *wallpaper_pixbuf);
|
GdkPixbuf *wallpaper_pixbuf);
|
||||||
|
|
||||||
|
@ -153,14 +185,23 @@ static void tile_composite (GdkPixbuf *dest, GdkPixbuf *src,
|
||||||
gint alpha_value);
|
gint alpha_value);
|
||||||
|
|
||||||
static gboolean render_gradient_p (Renderer *renderer,
|
static gboolean render_gradient_p (Renderer *renderer,
|
||||||
Preferences *prefs);
|
ApplierPreferences *prefs);
|
||||||
static gboolean render_small_pixmap_p (Preferences *prefs);
|
static gboolean render_small_pixmap_p (ApplierPreferences *prefs);
|
||||||
|
|
||||||
static Pixmap make_root_pixmap (gint width, gint height);
|
static Pixmap make_root_pixmap (gint width, gint height);
|
||||||
static void set_root_pixmap (Pixmap pixmap);
|
static void set_root_pixmap (Pixmap pixmap);
|
||||||
|
|
||||||
static gboolean is_nautilus_running (void);
|
static gboolean is_nautilus_running (void);
|
||||||
|
|
||||||
|
/* preferences stuff -- easier than making an object */
|
||||||
|
static ApplierPreferences* applier_preferences_pb_new (Bonobo_PropertyBag pb, CORBA_Environment *ev);
|
||||||
|
static ApplierPreferences* applier_preferences_db_new (Bonobo_ConfigDatabase db, CORBA_Environment *ev);
|
||||||
|
static void applier_preferences_ref (ApplierPreferences *prefs);
|
||||||
|
static void applier_preferences_unref (ApplierPreferences *prefs);
|
||||||
|
static void applier_preferences_free (ApplierPreferences *prefs);
|
||||||
|
|
||||||
|
static GdkColor* bonobo_color_to_gdk (Bonobo_Config_Color *color);
|
||||||
|
|
||||||
guint
|
guint
|
||||||
applier_get_type (void)
|
applier_get_type (void)
|
||||||
{
|
{
|
||||||
|
@ -210,6 +251,7 @@ applier_class_init (ApplierClass *class)
|
||||||
parent_class =
|
parent_class =
|
||||||
GTK_OBJECT_CLASS (gtk_type_class (gtk_object_get_type ()));
|
GTK_OBJECT_CLASS (gtk_type_class (gtk_object_get_type ()));
|
||||||
|
|
||||||
|
g_print ("Entering class_init\n");
|
||||||
if (!gdk_pixbuf_xlib_inited) {
|
if (!gdk_pixbuf_xlib_inited) {
|
||||||
gdk_pixbuf_xlib_inited = TRUE;
|
gdk_pixbuf_xlib_inited = TRUE;
|
||||||
|
|
||||||
|
@ -281,11 +323,9 @@ applier_destroy (GtkObject *object)
|
||||||
renderer_destroy (applier->private->root_renderer);
|
renderer_destroy (applier->private->root_renderer);
|
||||||
|
|
||||||
if (applier->private->root_prefs != NULL)
|
if (applier->private->root_prefs != NULL)
|
||||||
gtk_object_unref
|
applier_preferences_unref (applier->private->root_prefs);
|
||||||
(GTK_OBJECT (applier->private->root_prefs));
|
|
||||||
if (applier->private->preview_prefs != NULL)
|
if (applier->private->preview_prefs != NULL)
|
||||||
gtk_object_unref
|
applier_preferences_unref (applier->private->preview_prefs);
|
||||||
(GTK_OBJECT (applier->private->preview_prefs));
|
|
||||||
|
|
||||||
if (applier->private->wallpaper_pixbuf != NULL)
|
if (applier->private->wallpaper_pixbuf != NULL)
|
||||||
gdk_pixbuf_unref (applier->private->wallpaper_pixbuf);
|
gdk_pixbuf_unref (applier->private->wallpaper_pixbuf);
|
||||||
|
@ -298,27 +338,23 @@ applier_destroy (GtkObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
applier_apply_prefs (Applier *applier, Preferences *prefs,
|
applier_apply_prefs (Applier *applier, Bonobo_PropertyBag pb, Bonobo_ConfigDatabase db, CORBA_Environment *ev, gboolean do_root, gboolean do_preview)
|
||||||
gboolean do_root, gboolean do_preview)
|
|
||||||
{
|
{
|
||||||
Preferences *new_prefs;
|
ApplierPreferences *prefs;
|
||||||
|
|
||||||
g_return_if_fail (applier != NULL);
|
g_return_if_fail (applier != NULL);
|
||||||
g_return_if_fail (IS_APPLIER (applier));
|
g_return_if_fail (IS_APPLIER (applier));
|
||||||
g_return_if_fail (prefs != NULL);
|
g_return_if_fail (pb != NULL);
|
||||||
g_return_if_fail (IS_PREFERENCES (prefs));
|
|
||||||
|
|
||||||
if (do_root && applier->private->nautilus_running) {
|
if (do_root && applier->private->nautilus_running) {
|
||||||
set_root_pixmap (-1);
|
set_root_pixmap (-1);
|
||||||
do_root = FALSE;
|
do_root = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!prefs->enabled) {
|
if (pb != CORBA_OBJECT_NIL)
|
||||||
draw_disabled_message (applier_class_get_preview_widget ());
|
prefs = applier_preferences_pb_new (pb, ev);
|
||||||
return;
|
else
|
||||||
}
|
prefs = applier_preferences_db_new (db, ev);
|
||||||
|
|
||||||
new_prefs = PREFERENCES (preferences_clone (prefs));
|
|
||||||
|
|
||||||
if (((prefs->wallpaper_filename ||
|
if (((prefs->wallpaper_filename ||
|
||||||
applier->private->wallpaper_filename) &&
|
applier->private->wallpaper_filename) &&
|
||||||
|
@ -351,11 +387,11 @@ applier_apply_prefs (Applier *applier, Preferences *prefs,
|
||||||
if (!applier->private->wallpaper_pixbuf) {
|
if (!applier->private->wallpaper_pixbuf) {
|
||||||
g_warning (_("Could not load pixbuf \"%s\"; disabling wallpaper."),
|
g_warning (_("Could not load pixbuf \"%s\"; disabling wallpaper."),
|
||||||
prefs->wallpaper_filename);
|
prefs->wallpaper_filename);
|
||||||
new_prefs->wallpaper_enabled = FALSE;
|
prefs->wallpaper_enabled = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (applier->private->wallpaper_pixbuf == NULL) {
|
else if (applier->private->wallpaper_pixbuf == NULL) {
|
||||||
new_prefs->wallpaper_enabled = FALSE;
|
prefs->wallpaper_enabled = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_preview) {
|
if (do_preview) {
|
||||||
|
@ -365,15 +401,14 @@ applier_apply_prefs (Applier *applier, Preferences *prefs,
|
||||||
|
|
||||||
run_render_pipeline (applier->private->preview_renderer,
|
run_render_pipeline (applier->private->preview_renderer,
|
||||||
applier->private->preview_prefs,
|
applier->private->preview_prefs,
|
||||||
new_prefs,
|
prefs,
|
||||||
applier->private->wallpaper_pixbuf);
|
applier->private->wallpaper_pixbuf);
|
||||||
|
|
||||||
if (applier->private->preview_prefs != NULL)
|
if (applier->private->preview_prefs != NULL)
|
||||||
gtk_object_unref (GTK_OBJECT
|
applier_preferences_unref (applier->private->preview_prefs);
|
||||||
(applier->private->preview_prefs));
|
|
||||||
|
|
||||||
applier->private->preview_prefs = new_prefs;
|
applier->private->preview_prefs = prefs;
|
||||||
gtk_object_ref (GTK_OBJECT (new_prefs));
|
applier_preferences_ref (prefs);
|
||||||
|
|
||||||
if (preview_widget != NULL)
|
if (preview_widget != NULL)
|
||||||
gtk_widget_queue_draw (preview_widget);
|
gtk_widget_queue_draw (preview_widget);
|
||||||
|
@ -387,18 +422,16 @@ applier_apply_prefs (Applier *applier, Preferences *prefs,
|
||||||
|
|
||||||
run_render_pipeline (applier->private->root_renderer,
|
run_render_pipeline (applier->private->root_renderer,
|
||||||
applier->private->root_prefs,
|
applier->private->root_prefs,
|
||||||
new_prefs,
|
prefs,
|
||||||
applier->private->wallpaper_pixbuf);
|
applier->private->wallpaper_pixbuf);
|
||||||
|
|
||||||
if (applier->private->root_prefs != NULL)
|
if (applier->private->root_prefs != NULL)
|
||||||
gtk_object_unref (GTK_OBJECT
|
applier_preferences_unref (applier->private->root_prefs);
|
||||||
(applier->private->root_prefs));
|
applier->private->root_prefs = prefs;
|
||||||
|
applier_preferences_ref (prefs);
|
||||||
applier->private->root_prefs = new_prefs;
|
|
||||||
gtk_object_ref (GTK_OBJECT (new_prefs));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_object_unref (GTK_OBJECT (new_prefs));
|
applier_preferences_unref (prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
|
@ -483,6 +516,16 @@ applier_class_get_preview_widget (void)
|
||||||
return preview_widget;
|
return preview_widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
applier_class_destroy_preview_widget (void)
|
||||||
|
{
|
||||||
|
if (!preview_widget)
|
||||||
|
return;
|
||||||
|
if (GTK_IS_WIDGET (preview_widget))
|
||||||
|
gtk_widget_destroy (preview_widget);
|
||||||
|
preview_widget = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_disabled_message (GtkWidget *widget)
|
draw_disabled_message (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
|
@ -530,8 +573,8 @@ draw_disabled_message (GtkWidget *widget)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
run_render_pipeline (Renderer *renderer,
|
run_render_pipeline (Renderer *renderer,
|
||||||
Preferences *old_prefs,
|
ApplierPreferences *old_prefs,
|
||||||
Preferences *new_prefs,
|
ApplierPreferences *new_prefs,
|
||||||
GdkPixbuf *wallpaper_pixbuf)
|
GdkPixbuf *wallpaper_pixbuf)
|
||||||
{
|
{
|
||||||
gboolean bg_formed = FALSE;
|
gboolean bg_formed = FALSE;
|
||||||
|
@ -539,9 +582,7 @@ run_render_pipeline (Renderer *renderer,
|
||||||
gboolean opt_old_prefs, opt_new_prefs;
|
gboolean opt_old_prefs, opt_new_prefs;
|
||||||
|
|
||||||
g_return_if_fail (renderer != NULL);
|
g_return_if_fail (renderer != NULL);
|
||||||
g_return_if_fail (old_prefs == NULL || IS_PREFERENCES (old_prefs));
|
|
||||||
g_return_if_fail (new_prefs != NULL);
|
g_return_if_fail (new_prefs != NULL);
|
||||||
g_return_if_fail (IS_PREFERENCES (new_prefs));
|
|
||||||
|
|
||||||
renderer_set_prefs (renderer, new_prefs);
|
renderer_set_prefs (renderer, new_prefs);
|
||||||
|
|
||||||
|
@ -646,18 +687,17 @@ renderer_destroy (Renderer *renderer)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
renderer_set_prefs (Renderer *renderer, Preferences *prefs)
|
renderer_set_prefs (Renderer *renderer, ApplierPreferences *prefs)
|
||||||
{
|
{
|
||||||
g_return_if_fail (renderer != NULL);
|
g_return_if_fail (renderer != NULL);
|
||||||
g_return_if_fail (prefs == NULL || IS_PREFERENCES (prefs));
|
|
||||||
|
|
||||||
if (renderer->prefs)
|
if (renderer->prefs)
|
||||||
gtk_object_unref (GTK_OBJECT (renderer->prefs));
|
applier_preferences_unref (renderer->prefs);
|
||||||
|
|
||||||
renderer->prefs = prefs;
|
renderer->prefs = prefs;
|
||||||
|
|
||||||
if (prefs)
|
if (prefs)
|
||||||
gtk_object_ref (GTK_OBJECT (prefs));
|
applier_preferences_ref (prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -714,6 +754,7 @@ renderer_render_background (Renderer *renderer)
|
||||||
(GdkPixbufDestroyNotify)
|
(GdkPixbufDestroyNotify)
|
||||||
g_free,
|
g_free,
|
||||||
NULL);
|
NULL);
|
||||||
|
PDEBUG (renderer->pixbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,6 +782,8 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
&renderer->wwidth, &renderer->wheight,
|
&renderer->wwidth, &renderer->wheight,
|
||||||
&renderer->srcx, &renderer->srcy);
|
&renderer->srcx, &renderer->srcy);
|
||||||
|
|
||||||
|
renderer->pwidth = MAX (renderer->pwidth, renderer->wwidth);
|
||||||
|
|
||||||
if (renderer->prefs->wallpaper_type == WPTYPE_TILED &&
|
if (renderer->prefs->wallpaper_type == WPTYPE_TILED &&
|
||||||
renderer->wwidth != renderer->pwidth &&
|
renderer->wwidth != renderer->pwidth &&
|
||||||
renderer->wheight != renderer->pheight)
|
renderer->wheight != renderer->pheight)
|
||||||
|
@ -768,7 +811,7 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
(gdouble) renderer->pheight;
|
(gdouble) renderer->pheight;
|
||||||
|
|
||||||
if (renderer->prefs->wallpaper_type !=
|
if (renderer->prefs->wallpaper_type !=
|
||||||
WPTYPE_TILED)
|
WPTYPE_TILED)
|
||||||
gdk_pixbuf_composite
|
gdk_pixbuf_composite
|
||||||
(renderer->wallpaper_pixbuf,
|
(renderer->wallpaper_pixbuf,
|
||||||
renderer->pixbuf,
|
renderer->pixbuf,
|
||||||
|
@ -822,6 +865,7 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
GDK_INTERP_BILINEAR,
|
GDK_INTERP_BILINEAR,
|
||||||
alpha_value, 65536,
|
alpha_value, 65536,
|
||||||
colorv, colorv);
|
colorv, colorv);
|
||||||
|
PDEBUG (renderer->pixbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (renderer->wwidth != renderer->pwidth ||
|
else if (renderer->wwidth != renderer->pwidth ||
|
||||||
|
@ -832,7 +876,7 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
(gdouble) renderer->pwidth;
|
(gdouble) renderer->pwidth;
|
||||||
scaley = (gdouble) renderer->wheight /
|
scaley = (gdouble) renderer->wheight /
|
||||||
(gdouble) renderer->pheight;
|
(gdouble) renderer->pheight;
|
||||||
|
g_print ("%i %i:\n", gdk_pixbuf_get_width (renderer->pixbuf), gdk_pixbuf_get_height (renderer->pixbuf));
|
||||||
gdk_pixbuf_scale
|
gdk_pixbuf_scale
|
||||||
(renderer->wallpaper_pixbuf,
|
(renderer->wallpaper_pixbuf,
|
||||||
renderer->pixbuf,
|
renderer->pixbuf,
|
||||||
|
@ -855,10 +899,12 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
renderer->wwidth,
|
renderer->wwidth,
|
||||||
renderer->wheight,
|
renderer->wheight,
|
||||||
GDK_INTERP_BILINEAR);
|
GDK_INTERP_BILINEAR);
|
||||||
|
PDEBUG (renderer->pixbuf);
|
||||||
} else {
|
} else {
|
||||||
renderer->pixbuf =
|
renderer->pixbuf =
|
||||||
renderer->prescaled_pixbuf;
|
renderer->prescaled_pixbuf;
|
||||||
gdk_pixbuf_ref (renderer->pixbuf);
|
gdk_pixbuf_ref (renderer->pixbuf);
|
||||||
|
PDEBUG (renderer->pixbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -874,6 +920,7 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
gdk_pixbuf_unref (renderer->pixbuf);
|
gdk_pixbuf_unref (renderer->pixbuf);
|
||||||
|
|
||||||
renderer->pixbuf = renderer->wallpaper_pixbuf;
|
renderer->pixbuf = renderer->wallpaper_pixbuf;
|
||||||
|
PDEBUG (renderer->pixbuf);
|
||||||
|
|
||||||
gdk_pixbuf_ref (renderer->pixbuf);
|
gdk_pixbuf_ref (renderer->pixbuf);
|
||||||
}
|
}
|
||||||
|
@ -891,7 +938,6 @@ renderer_create_pixmap (Renderer *renderer)
|
||||||
|
|
||||||
g_return_if_fail (renderer != NULL);
|
g_return_if_fail (renderer != NULL);
|
||||||
g_return_if_fail (renderer->prefs != NULL);
|
g_return_if_fail (renderer->prefs != NULL);
|
||||||
g_return_if_fail (IS_PREFERENCES (renderer->prefs));
|
|
||||||
|
|
||||||
if (renderer->is_root) {
|
if (renderer->is_root) {
|
||||||
if (renderer->prefs->gradient_enabled &&
|
if (renderer->prefs->gradient_enabled &&
|
||||||
|
@ -1088,8 +1134,7 @@ get_geometry (wallpaper_type_t wallpaper_type, GdkPixbuf *pixbuf,
|
||||||
if (vwidth < gdk_pixbuf_get_width (pixbuf) &&
|
if (vwidth < gdk_pixbuf_get_width (pixbuf) &&
|
||||||
wallpaper_type == WPTYPE_CENTERED)
|
wallpaper_type == WPTYPE_CENTERED)
|
||||||
{
|
{
|
||||||
*srcx = (gdk_pixbuf_get_width (pixbuf) - vwidth) *
|
*srcx = (gdk_pixbuf_get_width (pixbuf) - vwidth) / 2;
|
||||||
factor / 2;
|
|
||||||
*rwidth = dwidth;
|
*rwidth = dwidth;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1107,8 +1152,7 @@ get_geometry (wallpaper_type_t wallpaper_type, GdkPixbuf *pixbuf,
|
||||||
if (vheight < gdk_pixbuf_get_height (pixbuf) &&
|
if (vheight < gdk_pixbuf_get_height (pixbuf) &&
|
||||||
wallpaper_type == WPTYPE_CENTERED)
|
wallpaper_type == WPTYPE_CENTERED)
|
||||||
{
|
{
|
||||||
*srcy = (gdk_pixbuf_get_height (pixbuf) - vheight) *
|
*srcy = (gdk_pixbuf_get_height (pixbuf) - vheight) / 2;
|
||||||
factor / 2;
|
|
||||||
*rheight = dheight;
|
*rheight = dheight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1207,7 +1251,7 @@ render_tiled_image (Pixmap pixmap, GC xgc, GdkPixbuf *pixbuf,
|
||||||
/* Return TRUE if the gradient should be rendered, false otherwise */
|
/* Return TRUE if the gradient should be rendered, false otherwise */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
render_gradient_p (Renderer *renderer, Preferences *prefs)
|
render_gradient_p (Renderer *renderer, ApplierPreferences *prefs)
|
||||||
{
|
{
|
||||||
return prefs->gradient_enabled &&
|
return prefs->gradient_enabled &&
|
||||||
!(prefs->wallpaper_enabled &&
|
!(prefs->wallpaper_enabled &&
|
||||||
|
@ -1221,7 +1265,7 @@ render_gradient_p (Renderer *renderer, Preferences *prefs)
|
||||||
/* Return TRUE if we can optimize the rendering by using a small thin pixmap */
|
/* Return TRUE if we can optimize the rendering by using a small thin pixmap */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
render_small_pixmap_p (Preferences *prefs)
|
render_small_pixmap_p (ApplierPreferences *prefs)
|
||||||
{
|
{
|
||||||
return prefs->gradient_enabled && !prefs->wallpaper_enabled;
|
return prefs->gradient_enabled && !prefs->wallpaper_enabled;
|
||||||
}
|
}
|
||||||
|
@ -1373,3 +1417,121 @@ is_nautilus_running (void)
|
||||||
|
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gulong
|
||||||
|
pb_get_value_ulong (Bonobo_PropertyBag bag, const gchar *prop)
|
||||||
|
{
|
||||||
|
BonoboArg *arg;
|
||||||
|
gulong val;
|
||||||
|
|
||||||
|
arg = bonobo_property_bag_client_get_value_any (bag, prop, NULL);
|
||||||
|
val = BONOBO_ARG_GET_GENERAL (arg, TC_ulong, CORBA_unsigned_long, NULL);
|
||||||
|
bonobo_arg_release (arg);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PB_GET_VALUE(v) (bonobo_property_bag_client_get_value_any (pb, (v), NULL))
|
||||||
|
|
||||||
|
/* Probably has CORBA memory leaks */
|
||||||
|
static ApplierPreferences*
|
||||||
|
applier_preferences_pb_new (Bonobo_PropertyBag pb, CORBA_Environment *ev)
|
||||||
|
{
|
||||||
|
ApplierPreferences *prefs = g_new0 (ApplierPreferences, 1);
|
||||||
|
|
||||||
|
prefs->orientation = pb_get_value_ulong (pb, "orientation");
|
||||||
|
if (prefs->orientation != ORIENTATION_SOLID)
|
||||||
|
prefs->gradient_enabled = TRUE;
|
||||||
|
|
||||||
|
prefs->wallpaper_type = pb_get_value_ulong (pb, "wallpaper_type");
|
||||||
|
prefs->wallpaper_filename = g_strdup (*((CORBA_char **)(PB_GET_VALUE ("wallpaper_filename"))->_value));
|
||||||
|
if (prefs->wallpaper_filename && strcmp (prefs->wallpaper_filename, "") != 0)
|
||||||
|
prefs->wallpaper_enabled = TRUE;
|
||||||
|
|
||||||
|
prefs->color1 = bonobo_color_to_gdk ((Bonobo_Config_Color *)(PB_GET_VALUE ("color1"))->_value);
|
||||||
|
prefs->color2 = bonobo_color_to_gdk ((Bonobo_Config_Color *)(PB_GET_VALUE ("color2"))->_value);
|
||||||
|
|
||||||
|
prefs->opacity = BONOBO_ARG_GET_LONG (PB_GET_VALUE ("opacity"));
|
||||||
|
if (prefs->opacity != 100)
|
||||||
|
prefs->adjust_opacity = FALSE;
|
||||||
|
|
||||||
|
prefs->ref_count = 1;
|
||||||
|
|
||||||
|
return prefs;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DB_GET_VALUE(v) (bonobo_config_get_value (db, (v), NULL, NULL))
|
||||||
|
|
||||||
|
static ApplierPreferences*
|
||||||
|
applier_preferences_db_new (Bonobo_ConfigDatabase db, CORBA_Environment *ev)
|
||||||
|
{
|
||||||
|
ApplierPreferences *prefs = g_new0 (ApplierPreferences, 1);
|
||||||
|
|
||||||
|
prefs->orientation = bonobo_config_get_ulong (db, "/main/orientation", NULL);
|
||||||
|
if (prefs->orientation != ORIENTATION_SOLID)
|
||||||
|
prefs->gradient_enabled = TRUE;
|
||||||
|
|
||||||
|
prefs->wallpaper_type = bonobo_config_get_ulong (db, "/main/wallpaper_type", NULL);
|
||||||
|
prefs->wallpaper_filename = g_strdup (*((CORBA_char **)(DB_GET_VALUE ("/main/wallpaper_filename"))->_value));
|
||||||
|
if (prefs->wallpaper_filename && strcmp (prefs->wallpaper_filename, "") != 0)
|
||||||
|
prefs->wallpaper_enabled = TRUE;
|
||||||
|
|
||||||
|
prefs->color1 = bonobo_color_to_gdk ((Bonobo_Config_Color *)(DB_GET_VALUE ("/main/color1"))->_value);
|
||||||
|
prefs->color2 = bonobo_color_to_gdk ((Bonobo_Config_Color *)(DB_GET_VALUE ("/main/color2"))->_value);
|
||||||
|
|
||||||
|
prefs->opacity = BONOBO_ARG_GET_LONG (DB_GET_VALUE ("/main/opacity"));
|
||||||
|
if (prefs->opacity != 100)
|
||||||
|
prefs->adjust_opacity = FALSE;
|
||||||
|
|
||||||
|
prefs->ref_count = 1;
|
||||||
|
|
||||||
|
return prefs;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
applier_preferences_ref (ApplierPreferences *prefs)
|
||||||
|
{
|
||||||
|
g_return_if_fail (prefs != NULL);
|
||||||
|
|
||||||
|
prefs->ref_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
applier_preferences_unref (ApplierPreferences *prefs)
|
||||||
|
{
|
||||||
|
g_return_if_fail (prefs != NULL);
|
||||||
|
|
||||||
|
prefs->ref_count--;
|
||||||
|
if (prefs->ref_count < 1)
|
||||||
|
applier_preferences_free (prefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
applier_preferences_free (ApplierPreferences *prefs)
|
||||||
|
{
|
||||||
|
g_return_if_fail (prefs != NULL);
|
||||||
|
|
||||||
|
if (prefs->wallpaper_filename)
|
||||||
|
g_free (prefs->wallpaper_filename);
|
||||||
|
|
||||||
|
if (prefs->color1)
|
||||||
|
g_free (prefs->color1);
|
||||||
|
if (prefs->color2)
|
||||||
|
g_free (prefs->color2);
|
||||||
|
|
||||||
|
g_free (prefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static GdkColor*
|
||||||
|
bonobo_color_to_gdk (Bonobo_Config_Color *color)
|
||||||
|
{
|
||||||
|
GdkColor *ret;
|
||||||
|
|
||||||
|
g_return_val_if_fail (color != NULL, NULL);
|
||||||
|
|
||||||
|
ret = g_new0 (GdkColor, 1);
|
||||||
|
ret->red = color->r * 65535;
|
||||||
|
ret->green = color->g * 65535;
|
||||||
|
ret->blue = color->b * 65535;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#include "preferences.h"
|
#include <bonobo-conf/bonobo-config-database.h>
|
||||||
|
|
||||||
#define APPLIER(obj) GTK_CHECK_CAST (obj, applier_get_type (), Applier)
|
#define APPLIER(obj) GTK_CHECK_CAST (obj, applier_get_type (), Applier)
|
||||||
#define APPLIER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, applier_get_type (), ApplierClass)
|
#define APPLIER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, applier_get_type (), ApplierClass)
|
||||||
|
@ -56,9 +56,14 @@ guint applier_get_type (void);
|
||||||
GtkObject *applier_new (void);
|
GtkObject *applier_new (void);
|
||||||
void applier_destroy (GtkObject *object);
|
void applier_destroy (GtkObject *object);
|
||||||
|
|
||||||
void applier_apply_prefs (Applier *applier, Preferences *prefs,
|
void applier_apply_prefs (Applier *applier,
|
||||||
gboolean do_root, gboolean do_preview);
|
Bonobo_PropertyBag pb,
|
||||||
|
Bonobo_ConfigDatabase db,
|
||||||
|
CORBA_Environment *ev,
|
||||||
|
gboolean do_root,
|
||||||
|
gboolean do_preview);
|
||||||
|
|
||||||
GtkWidget *applier_class_get_preview_widget (void);
|
GtkWidget *applier_class_get_preview_widget (void);
|
||||||
|
void applier_class_destroy_preview_widget (void);
|
||||||
|
|
||||||
#endif /* __APPLIER_H */
|
#endif /* __APPLIER_H */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<GTK-Interface>
|
<GTK-Interface>
|
||||||
|
|
||||||
<project>
|
<project>
|
||||||
<name>New-background-properties</name>
|
<name>new-background-capplet-mockup</name>
|
||||||
<program_name>new-background-properties</program_name>
|
<program_name>new-background-capplet-mockup</program_name>
|
||||||
<directory></directory>
|
<directory></directory>
|
||||||
<source_directory>src</source_directory>
|
<source_directory>src</source_directory>
|
||||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkWindow</class>
|
<class>GtkWindow</class>
|
||||||
<name>window1</name>
|
<name>window1</name>
|
||||||
<title>window2</title>
|
<title>window1</title>
|
||||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||||
<position>GTK_WIN_POS_NONE</position>
|
<position>GTK_WIN_POS_NONE</position>
|
||||||
<modal>False</modal>
|
<modal>False</modal>
|
||||||
|
@ -24,204 +24,72 @@
|
||||||
<auto_shrink>False</auto_shrink>
|
<auto_shrink>False</auto_shrink>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkTable</class>
|
<class>GtkVBox</class>
|
||||||
<name>prefs_widget</name>
|
<name>prefs_widget</name>
|
||||||
<rows>3</rows>
|
|
||||||
<columns>2</columns>
|
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<row_spacing>5</row_spacing>
|
<spacing>0</spacing>
|
||||||
<column_spacing>5</column_spacing>
|
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkCheckButton</class>
|
<class>GtkHBox</class>
|
||||||
<name>disable_toggle</name>
|
<name>hbox3</name>
|
||||||
<can_focus>True</can_focus>
|
<homogeneous>False</homogeneous>
|
||||||
<signal>
|
<spacing>0</spacing>
|
||||||
<name>toggled</name>
|
|
||||||
<handler>disable_toggled_cb</handler>
|
|
||||||
<last_modification_time>Wed, 06 Sep 2000 00:15:45 GMT</last_modification_time>
|
|
||||||
</signal>
|
|
||||||
<label>Use GNOME for setting background</label>
|
|
||||||
<active>True</active>
|
|
||||||
<draw_indicator>True</draw_indicator>
|
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<padding>0</padding>
|
||||||
<right_attach>1</right_attach>
|
<expand>False</expand>
|
||||||
<top_attach>0</top_attach>
|
<fill>False</fill>
|
||||||
<bottom_attach>1</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkVBox</class>
|
||||||
|
<name>preview_holder</name>
|
||||||
|
<homogeneous>False</homogeneous>
|
||||||
|
<spacing>0</spacing>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>True</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>Placeholder</class>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkFrame</class>
|
<class>GtkFrame</class>
|
||||||
<name>color_frame</name>
|
<name>frame4</name>
|
||||||
<label>Colors</label>
|
<label>Background colors</label>
|
||||||
<label_xalign>0</label_xalign>
|
<label_xalign>0</label_xalign>
|
||||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<padding>0</padding>
|
||||||
<right_attach>1</right_attach>
|
<expand>False</expand>
|
||||||
<top_attach>1</top_attach>
|
<fill>False</fill>
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>True</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkTable</class>
|
<class>GtkHBox</class>
|
||||||
<name>table4</name>
|
<name>hbox4</name>
|
||||||
<border_width>4</border_width>
|
<border_width>3</border_width>
|
||||||
<rows>3</rows>
|
|
||||||
<columns>2</columns>
|
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<row_spacing>4</row_spacing>
|
<spacing>3</spacing>
|
||||||
<column_spacing>4</column_spacing>
|
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label5</name>
|
<name>label19</name>
|
||||||
<label>Effect</label>
|
<label>Style:</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0</xalign>
|
<xalign>0.5</xalign>
|
||||||
<yalign>0.5</yalign>
|
<yalign>0.5</yalign>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<padding>0</padding>
|
||||||
<right_attach>1</right_attach>
|
<expand>False</expand>
|
||||||
<top_attach>0</top_attach>
|
<fill>False</fill>
|
||||||
<bottom_attach>1</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkLabel</class>
|
|
||||||
<name>label6</name>
|
|
||||||
<label>Primary color</label>
|
|
||||||
<justify>GTK_JUSTIFY_LEFT</justify>
|
|
||||||
<wrap>False</wrap>
|
|
||||||
<xalign>0</xalign>
|
|
||||||
<yalign>0.5</yalign>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<child>
|
|
||||||
<left_attach>0</left_attach>
|
|
||||||
<right_attach>1</right_attach>
|
|
||||||
<top_attach>1</top_attach>
|
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkLabel</class>
|
|
||||||
<name>color2_label</name>
|
|
||||||
<label>Right or bottom color</label>
|
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
|
||||||
<wrap>False</wrap>
|
|
||||||
<xalign>0</xalign>
|
|
||||||
<yalign>0.5</yalign>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<child>
|
|
||||||
<left_attach>0</left_attach>
|
|
||||||
<right_attach>1</right_attach>
|
|
||||||
<top_attach>2</top_attach>
|
|
||||||
<bottom_attach>3</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GnomeColorPicker</class>
|
|
||||||
<name>color1_select</name>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<signal>
|
|
||||||
<name>color_set</name>
|
|
||||||
<handler>color1_select_color_set_cb</handler>
|
|
||||||
<last_modification_time>Sat, 09 Dec 2000 01:18:26 GMT</last_modification_time>
|
|
||||||
</signal>
|
|
||||||
<dither>True</dither>
|
|
||||||
<use_alpha>False</use_alpha>
|
|
||||||
<title>Pick a color</title>
|
|
||||||
<child>
|
|
||||||
<left_attach>1</left_attach>
|
|
||||||
<right_attach>2</right_attach>
|
|
||||||
<top_attach>1</top_attach>
|
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GnomeColorPicker</class>
|
|
||||||
<name>color2_select</name>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<signal>
|
|
||||||
<name>color_set</name>
|
|
||||||
<handler>color2_select_color_set_cb</handler>
|
|
||||||
<last_modification_time>Sat, 09 Dec 2000 01:18:35 GMT</last_modification_time>
|
|
||||||
</signal>
|
|
||||||
<dither>True</dither>
|
|
||||||
<use_alpha>False</use_alpha>
|
|
||||||
<title>Pick a color</title>
|
|
||||||
<child>
|
|
||||||
<left_attach>1</left_attach>
|
|
||||||
<right_attach>2</right_attach>
|
|
||||||
<top_attach>2</top_attach>
|
|
||||||
<bottom_attach>3</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
@ -229,24 +97,43 @@
|
||||||
<class>GtkOptionMenu</class>
|
<class>GtkOptionMenu</class>
|
||||||
<name>color_option</name>
|
<name>color_option</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<items>Solid Color
|
<items>Solid color
|
||||||
Vertical Gradient
|
Horizontal gradient
|
||||||
Horizontal Gradient
|
Vertical gradient
|
||||||
</items>
|
</items>
|
||||||
<initial_choice>1</initial_choice>
|
<initial_choice>0</initial_choice>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>1</left_attach>
|
<padding>0</padding>
|
||||||
<right_attach>2</right_attach>
|
<expand>False</expand>
|
||||||
<top_attach>0</top_attach>
|
<fill>False</fill>
|
||||||
<bottom_attach>1</bottom_attach>
|
</child>
|
||||||
<xpad>0</xpad>
|
</widget>
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>True</xexpand>
|
<widget>
|
||||||
<yexpand>False</yexpand>
|
<class>GnomeColorPicker</class>
|
||||||
<xshrink>False</xshrink>
|
<name>colorpicker1</name>
|
||||||
<yshrink>False</yshrink>
|
<can_focus>True</can_focus>
|
||||||
<xfill>True</xfill>
|
<dither>True</dither>
|
||||||
<yfill>False</yfill>
|
<use_alpha>False</use_alpha>
|
||||||
|
<title>Pick a color</title>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GnomeColorPicker</class>
|
||||||
|
<name>colorpicker2</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<dither>True</dither>
|
||||||
|
<use_alpha>False</use_alpha>
|
||||||
|
<title>Pick a color</title>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -254,39 +141,30 @@ Horizontal Gradient
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkFrame</class>
|
<class>GtkFrame</class>
|
||||||
<name>wallpaper_frame</name>
|
<name>frame3</name>
|
||||||
<label>Wallpaper</label>
|
<label>Background picture</label>
|
||||||
<label_xalign>0</label_xalign>
|
<label_xalign>0</label_xalign>
|
||||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<padding>0</padding>
|
||||||
<right_attach>2</right_attach>
|
<expand>False</expand>
|
||||||
<top_attach>2</top_attach>
|
<fill>False</fill>
|
||||||
<bottom_attach>3</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>True</xexpand>
|
|
||||||
<yexpand>True</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkTable</class>
|
<class>GtkTable</class>
|
||||||
<name>table3</name>
|
<name>table1</name>
|
||||||
<border_width>4</border_width>
|
<border_width>3</border_width>
|
||||||
<rows>4</rows>
|
<rows>2</rows>
|
||||||
<columns>3</columns>
|
<columns>5</columns>
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<row_spacing>4</row_spacing>
|
<row_spacing>3</row_spacing>
|
||||||
<column_spacing>4</column_spacing>
|
<column_spacing>3</column_spacing>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label3</name>
|
<name>label14</name>
|
||||||
<label>File</label>
|
<label>Image:</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0</xalign>
|
<xalign>0</xalign>
|
||||||
|
@ -311,8 +189,8 @@ Horizontal Gradient
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label4</name>
|
<name>label15</name>
|
||||||
<label>Display Style</label>
|
<label>Style:</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0</xalign>
|
<xalign>0</xalign>
|
||||||
|
@ -336,69 +214,49 @@ Horizontal Gradient
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkOptionMenu</class>
|
<class>GtkAlignment</class>
|
||||||
<name>wp_effect_option</name>
|
<name>alignment1</name>
|
||||||
<can_focus>True</can_focus>
|
<xalign>7.45058e-09</xalign>
|
||||||
<items>Tiled
|
<yalign>0.5</yalign>
|
||||||
Centered
|
<xscale>0</xscale>
|
||||||
Scaled (keep aspect ratio)
|
<yscale>1</yscale>
|
||||||
Stretched (change aspect ratio)
|
|
||||||
</items>
|
|
||||||
<initial_choice>0</initial_choice>
|
|
||||||
<child>
|
|
||||||
<left_attach>1</left_attach>
|
|
||||||
<right_attach>3</right_attach>
|
|
||||||
<top_attach>1</top_attach>
|
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>True</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkButton</class>
|
|
||||||
<name>browse_button</name>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<signal>
|
|
||||||
<name>clicked</name>
|
|
||||||
<handler>browse_button_cb</handler>
|
|
||||||
<last_modification_time>Fri, 08 Dec 2000 21:55:52 GMT</last_modification_time>
|
|
||||||
</signal>
|
|
||||||
<label>Browse...</label>
|
|
||||||
<relief>GTK_RELIEF_NORMAL</relief>
|
|
||||||
<child>
|
|
||||||
<left_attach>2</left_attach>
|
|
||||||
<right_attach>3</right_attach>
|
|
||||||
<top_attach>0</top_attach>
|
|
||||||
<bottom_attach>1</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>False</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkOptionMenu</class>
|
|
||||||
<name>wp_file_option</name>
|
|
||||||
<width>66</width>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<items>(None)
|
|
||||||
</items>
|
|
||||||
<initial_choice>0</initial_choice>
|
|
||||||
<child>
|
<child>
|
||||||
<left_attach>1</left_attach>
|
<left_attach>1</left_attach>
|
||||||
<right_attach>2</right_attach>
|
<right_attach>2</right_attach>
|
||||||
|
<top_attach>1</top_attach>
|
||||||
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<xexpand>False</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>True</xfill>
|
||||||
|
<yfill>False</yfill>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkOptionMenu</class>
|
||||||
|
<name>image_option</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<items>Tiled
|
||||||
|
Centered
|
||||||
|
Scaled (keep aspect ratio)
|
||||||
|
Stretched
|
||||||
|
</items>
|
||||||
|
<initial_choice>0</initial_choice>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GnomeFileEntry</class>
|
||||||
|
<name>image_fileentry</name>
|
||||||
|
<max_saved>10</max_saved>
|
||||||
|
<directory>False</directory>
|
||||||
|
<modal>False</modal>
|
||||||
|
<child>
|
||||||
|
<left_attach>1</left_attach>
|
||||||
|
<right_attach>5</right_attach>
|
||||||
<top_attach>0</top_attach>
|
<top_attach>0</top_attach>
|
||||||
<bottom_attach>1</bottom_attach>
|
<bottom_attach>1</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
|
@ -410,25 +268,34 @@ Stretched (change aspect ratio)
|
||||||
<xfill>True</xfill>
|
<xfill>True</xfill>
|
||||||
<yfill>False</yfill>
|
<yfill>False</yfill>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkEntry</class>
|
||||||
|
<child_name>GnomeEntry:entry</child_name>
|
||||||
|
<name>entry1</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<editable>True</editable>
|
||||||
|
<text_visible>True</text_visible>
|
||||||
|
<text_max_length>0</text_max_length>
|
||||||
|
<text></text>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkCheckButton</class>
|
<class>GtkLabel</class>
|
||||||
<name>adjust_opacity_toggle</name>
|
<name>label16</name>
|
||||||
<can_focus>True</can_focus>
|
<label>Opacity (percent):</label>
|
||||||
<signal>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<name>toggled</name>
|
<wrap>False</wrap>
|
||||||
<handler>adjust_opacity_toggled_cb</handler>
|
<xalign>1</xalign>
|
||||||
<last_modification_time>Thu, 21 Dec 2000 19:54:21 GMT</last_modification_time>
|
<yalign>0.5</yalign>
|
||||||
</signal>
|
<xpad>0</xpad>
|
||||||
<label>Adjust wallpaper's transparency</label>
|
<ypad>0</ypad>
|
||||||
<active>False</active>
|
|
||||||
<draw_indicator>True</draw_indicator>
|
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<left_attach>2</left_attach>
|
||||||
<right_attach>3</right_attach>
|
<right_attach>3</right_attach>
|
||||||
<top_attach>2</top_attach>
|
<top_attach>1</top_attach>
|
||||||
<bottom_attach>3</bottom_attach>
|
<bottom_attach>2</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>False</xexpand>
|
||||||
|
@ -441,107 +308,71 @@ Stretched (change aspect ratio)
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkHBox</class>
|
<class>GtkAlignment</class>
|
||||||
<name>opacity_box</name>
|
<name>alignment2</name>
|
||||||
<homogeneous>False</homogeneous>
|
<xalign>7.45058e-09</xalign>
|
||||||
<spacing>4</spacing>
|
<yalign>0.5</yalign>
|
||||||
|
<xscale>0.5</xscale>
|
||||||
|
<yscale>1</yscale>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<left_attach>3</left_attach>
|
||||||
<right_attach>3</right_attach>
|
<right_attach>4</right_attach>
|
||||||
<top_attach>3</top_attach>
|
<top_attach>1</top_attach>
|
||||||
<bottom_attach>4</bottom_attach>
|
<bottom_attach>2</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>True</xexpand>
|
||||||
<yexpand>True</yexpand>
|
<yexpand>False</yexpand>
|
||||||
<xshrink>False</xshrink>
|
<xshrink>False</xshrink>
|
||||||
<yshrink>False</yshrink>
|
<yshrink>False</yshrink>
|
||||||
<xfill>True</xfill>
|
<xfill>True</xfill>
|
||||||
<yfill>True</yfill>
|
<yfill>False</yfill>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkSpinButton</class>
|
||||||
<name>label8</name>
|
<name>opacity_spin</name>
|
||||||
<label>More Transparent</label>
|
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
|
||||||
<wrap>False</wrap>
|
|
||||||
<xalign>0.5</xalign>
|
|
||||||
<yalign>0.5</yalign>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<child>
|
|
||||||
<padding>0</padding>
|
|
||||||
<expand>False</expand>
|
|
||||||
<fill>False</fill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkHScale</class>
|
|
||||||
<name>opacity_adjust</name>
|
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<draw_value>False</draw_value>
|
<climb_rate>1</climb_rate>
|
||||||
<value_pos>GTK_POS_TOP</value_pos>
|
<digits>0</digits>
|
||||||
<digits>1</digits>
|
<numeric>True</numeric>
|
||||||
<policy>GTK_UPDATE_CONTINUOUS</policy>
|
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||||
<value>0</value>
|
<snap>False</snap>
|
||||||
<lower>0</lower>
|
|
||||||
<upper>256</upper>
|
|
||||||
<step>2.56</step>
|
|
||||||
<page>25.6</page>
|
|
||||||
<page_size>25.6</page_size>
|
|
||||||
<child>
|
|
||||||
<padding>0</padding>
|
|
||||||
<expand>True</expand>
|
|
||||||
<fill>True</fill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkLabel</class>
|
|
||||||
<name>label9</name>
|
|
||||||
<label>More Opaque</label>
|
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0.5</xalign>
|
<value>100</value>
|
||||||
<yalign>0.5</yalign>
|
<lower>0</lower>
|
||||||
<xpad>0</xpad>
|
<upper>10000</upper>
|
||||||
<ypad>0</ypad>
|
<step>1</step>
|
||||||
<child>
|
<page>10</page>
|
||||||
<padding>0</padding>
|
<page_size>10</page_size>
|
||||||
<expand>False</expand>
|
|
||||||
<fill>False</fill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkFrame</class>
|
<class>GtkLabel</class>
|
||||||
<name>monitor_frame</name>
|
<name>label18</name>
|
||||||
<width>210</width>
|
<label></label>
|
||||||
<height>170</height>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<label_xalign>0</label_xalign>
|
<wrap>False</wrap>
|
||||||
<shadow_type>GTK_SHADOW_NONE</shadow_type>
|
<xalign>0</xalign>
|
||||||
<child>
|
<yalign>0.5</yalign>
|
||||||
<left_attach>1</left_attach>
|
<xpad>0</xpad>
|
||||||
<right_attach>2</right_attach>
|
<ypad>0</ypad>
|
||||||
<top_attach>0</top_attach>
|
<child>
|
||||||
<bottom_attach>2</bottom_attach>
|
<left_attach>4</left_attach>
|
||||||
<xpad>0</xpad>
|
<right_attach>5</right_attach>
|
||||||
<ypad>0</ypad>
|
<top_attach>1</top_attach>
|
||||||
<xexpand>False</xexpand>
|
<bottom_attach>2</bottom_attach>
|
||||||
<yexpand>False</yexpand>
|
<xpad>0</xpad>
|
||||||
<xshrink>False</xshrink>
|
<ypad>0</ypad>
|
||||||
<yshrink>False</yshrink>
|
<xexpand>False</xexpand>
|
||||||
<xfill>True</xfill>
|
<yexpand>False</yexpand>
|
||||||
<yfill>True</yfill>
|
<xshrink>False</xshrink>
|
||||||
</child>
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>True</xfill>
|
||||||
<widget>
|
<yfill>False</yfill>
|
||||||
<class>Placeholder</class>
|
</child>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
12
capplets/background/background-properties.xml
Normal file
12
capplets/background/background-properties.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<bonobo-config>
|
||||||
|
<section path="main">
|
||||||
|
<entry name="color1" type="color" value="#000000"/>
|
||||||
|
<entry name="color2" type="color" value="#ffffff"/>
|
||||||
|
<entry name="orientation" type="ulong" value="0"/>
|
||||||
|
<entry name="wallpaper_type" type="ulong" value="0"/>
|
||||||
|
<entry name="wallpaper_filename" type="string" value=""/>
|
||||||
|
<entry name="opacity" type="long" value="100"/>
|
||||||
|
</section>
|
||||||
|
</bonobo-config>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/* -*- mode: c; style: linux -*- */
|
/* -*- mode: c; style: linux -*- */
|
||||||
|
|
||||||
/* main.c
|
/* main.c
|
||||||
* Copyright (C) 2000 Helix Code, Inc.
|
* Copyright (C) 2000-2001 Ximian, 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
@ -25,289 +25,208 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <libgnomeui/gnome-window-icon.h>
|
#include <bonobo.h>
|
||||||
#include <tree.h>
|
|
||||||
#include <parser.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
|
#include <gtk/gtksignal.h>
|
||||||
|
#include "capplet-util.h"
|
||||||
|
#include "applier.h"
|
||||||
|
|
||||||
#include <capplet-widget.h>
|
static Applier *applier;
|
||||||
|
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
|
||||||
# include <ximian-archiver/archive.h>
|
|
||||||
# include <ximian-archiver/location.h>
|
|
||||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
|
||||||
|
|
||||||
#include "preferences.h"
|
|
||||||
#include "prefs-widget.h"
|
|
||||||
|
|
||||||
static Preferences *prefs;
|
|
||||||
static Preferences *old_prefs;
|
|
||||||
static PrefsWidget *prefs_widget;
|
|
||||||
|
|
||||||
static guint ok_handler_id;
|
|
||||||
static guint cancel_handler_id;
|
|
||||||
|
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
|
||||||
|
|
||||||
static Archive *archive;
|
|
||||||
static gboolean outside_location;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
store_archive_data (void)
|
apply_settings (Bonobo_ConfigDatabase db)
|
||||||
{
|
{
|
||||||
Location *location;
|
CORBA_Environment ev;
|
||||||
xmlDocPtr xml_doc;
|
|
||||||
|
CORBA_exception_init (&ev);
|
||||||
if (capplet_get_location () == NULL)
|
applier_apply_prefs (applier, CORBA_OBJECT_NIL, db, &ev, TRUE, FALSE);
|
||||||
location = archive_get_current_location (archive);
|
CORBA_exception_free (&ev);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* 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 void
|
static void
|
||||||
ok_cb (GtkWidget *widget)
|
copy_color_from_legacy (Bonobo_ConfigDatabase db,
|
||||||
|
const gchar *key, const gchar *legacy_key)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
gboolean def;
|
||||||
if (!outside_location) {
|
gchar *val_string;
|
||||||
preferences_save (prefs);
|
|
||||||
preferences_apply_now (prefs);
|
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);
|
||||||
}
|
}
|
||||||
#else /* !HAVE_XIMIAN_ARCHIVER */
|
|
||||||
preferences_save (prefs);
|
g_free (val_string);
|
||||||
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
|
static void
|
||||||
cancel_cb (GtkWidget *widget)
|
get_legacy_settings (Bonobo_ConfigDatabase db)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
gboolean val_boolean, def;
|
||||||
if (!outside_location) {
|
gchar *val_string;
|
||||||
preferences_save (old_prefs);
|
int val_ulong, val_long;
|
||||||
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);
|
COPY_FROM_LEGACY (string, "/main/wallpaper_filename", string, "/Background/Default/wallpaper=none");
|
||||||
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), cancel_handler_id);
|
COPY_FROM_LEGACY (ulong, "/main/wallpaper_type", int, "/Background/Default/wallpaperAlign=0");
|
||||||
gtk_object_destroy (GTK_OBJECT (prefs_widget));
|
copy_color_from_legacy (db, "/main/color1", "/Background/Default/color1");
|
||||||
}
|
copy_color_from_legacy (db, "/main/color2", "/Background/Default/color2");
|
||||||
|
|
||||||
static void
|
/* Code to deal with new enum - messy */
|
||||||
setup_capplet_widget (void)
|
val_ulong = -1;
|
||||||
{
|
val_string = gnome_config_get_string_with_default ("/Background/Default/simple=solid", &def);
|
||||||
preferences_freeze (prefs);
|
if (!def)
|
||||||
|
{
|
||||||
prefs_widget = PREFS_WIDGET (prefs_widget_new (prefs));
|
if (!strcmp (val_string, "solid"))
|
||||||
|
val_ulong = 0;
|
||||||
ok_handler_id =
|
else
|
||||||
gtk_signal_connect (GTK_OBJECT (prefs_widget), "ok",
|
{
|
||||||
GTK_SIGNAL_FUNC (ok_cb), NULL);
|
g_free (val_string);
|
||||||
cancel_handler_id =
|
val_string = gnome_config_get_string_with_default ("/Background/Default/gradient=vertical", &def);
|
||||||
gtk_signal_connect (GTK_OBJECT (prefs_widget), "cancel",
|
if (!def)
|
||||||
GTK_SIGNAL_FUNC (cancel_cb), NULL);
|
val_ulong = !strcmp (val_string, "vertical");
|
||||||
|
|
||||||
gtk_widget_show_all (GTK_WIDGET (prefs_widget));
|
|
||||||
|
|
||||||
preferences_thaw (prefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
#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
|
|
||||||
do_set_xml (gboolean apply_settings)
|
|
||||||
{
|
|
||||||
xmlDocPtr doc;
|
|
||||||
char buffer[16384];
|
|
||||||
GString *doc_str;
|
|
||||||
int t = 0;
|
|
||||||
|
|
||||||
fflush (stdin);
|
|
||||||
|
|
||||||
fcntl (fileno (stdin), F_SETFL, 0);
|
|
||||||
|
|
||||||
doc_str = g_string_new ("");
|
|
||||||
|
|
||||||
while ((t = read (fileno (stdin), buffer, sizeof (buffer) - 1)) != 0) {
|
|
||||||
buffer[t] = '\0';
|
|
||||||
g_string_append (doc_str, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doc_str->len > 0) {
|
|
||||||
doc = xmlParseDoc (doc_str->str);
|
|
||||||
g_string_free (doc_str, TRUE);
|
|
||||||
|
|
||||||
if (doc != NULL) {
|
|
||||||
prefs = preferences_read_xml (doc);
|
|
||||||
|
|
||||||
if (prefs != NULL) {
|
|
||||||
if (apply_settings) {
|
|
||||||
preferences_save (prefs);
|
|
||||||
preferences_apply_now (prefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (prefs != NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
xmlFreeDoc (doc);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
g_critical ("No data to apply");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
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
|
static void
|
||||||
do_restore_from_defaults (void)
|
realize_cb (GtkWidget *widget, Bonobo_PropertyBag bag)
|
||||||
{
|
{
|
||||||
prefs = PREFERENCES (preferences_new ());
|
CORBA_Environment ev;
|
||||||
preferences_save (prefs);
|
|
||||||
preferences_apply_now (prefs);
|
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_construct (0, 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_construct (0, WID ("image_option")));
|
||||||
|
bonobo_peditor_set_property (ed, bag, "wallpaper_type", TC_ulong, NULL);
|
||||||
|
|
||||||
|
CUSTOM_CREATE_PEDITOR (int_range, long, "opacity", "opacity_spin");
|
||||||
|
|
||||||
|
bonobo_event_source_client_add_listener (bag, 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
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
GnomeClient *client;
|
|
||||||
GnomeClientFlags flags;
|
|
||||||
gint token, res;
|
|
||||||
gchar *restart_args[3];
|
|
||||||
|
|
||||||
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
|
|
||||||
textdomain (PACKAGE);
|
|
||||||
|
|
||||||
glade_gnome_init ();
|
glade_gnome_init ();
|
||||||
res = gnome_capplet_init ("background-properties-capplet",
|
capplet_init (argc, argv, apply_settings, create_dialog, setup_dialog, get_legacy_settings);
|
||||||
VERSION, argc, argv, NULL,
|
|
||||||
0, NULL);
|
|
||||||
|
|
||||||
if (res < 0) {
|
|
||||||
g_error ("Could not initialize the capplet.");
|
|
||||||
}
|
|
||||||
else if (res == 3) {
|
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
|
||||||
do_get_xml ();
|
|
||||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (res == 4) {
|
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
|
||||||
do_set_xml (TRUE);
|
|
||||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (res == 5) {
|
|
||||||
do_restore_from_defaults ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
client = gnome_master_client ();
|
|
||||||
flags = gnome_client_get_flags (client);
|
|
||||||
|
|
||||||
if (flags & GNOME_CLIENT_IS_CONNECTED) {
|
|
||||||
token = gnome_startup_acquire_token
|
|
||||||
("GNOME_BACKGROUND_PROPERTIES",
|
|
||||||
gnome_client_get_id (client));
|
|
||||||
|
|
||||||
if (token) {
|
|
||||||
gnome_client_set_priority (client, 20);
|
|
||||||
gnome_client_set_restart_style (client,
|
|
||||||
GNOME_RESTART_ANYWAY);
|
|
||||||
restart_args[0] = argv[0];
|
|
||||||
restart_args[1] = "--init-session-settings";
|
|
||||||
restart_args[2] = NULL;
|
|
||||||
gnome_client_set_restart_command (client, 2,
|
|
||||||
restart_args);
|
|
||||||
} else {
|
|
||||||
gnome_client_set_restart_style (client,
|
|
||||||
GNOME_RESTART_NEVER);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
token = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
gnome_window_icon_set_default_from_file
|
gnome_window_icon_set_default_from_file
|
||||||
(GNOMECC_ICONS_DIR"/gnome-ccbackground.png");
|
(GNOMECC_ICONS_DIR"/gnome-ccbackground.png");
|
||||||
|
|
||||||
#ifdef HAVE_XIMIAN_ARCHIVER
|
|
||||||
archive = ARCHIVE (archive_load (FALSE));
|
|
||||||
|
|
||||||
if (capplet_get_location () != NULL &&
|
|
||||||
strcmp (capplet_get_location (),
|
|
||||||
archive_get_current_location_id (archive)))
|
|
||||||
{
|
|
||||||
outside_location = TRUE;
|
|
||||||
do_set_xml (FALSE);
|
|
||||||
if (prefs == NULL) return -1;
|
|
||||||
preferences_freeze (prefs);
|
|
||||||
} else {
|
|
||||||
outside_location = FALSE;
|
|
||||||
prefs = PREFERENCES (preferences_new ());
|
|
||||||
preferences_load (prefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!outside_location && (token || res == 1)) {
|
|
||||||
preferences_apply_now (prefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* !HAVE_XIMIAN_ARCHIVER */
|
|
||||||
|
|
||||||
prefs = PREFERENCES (preferences_new ());
|
|
||||||
preferences_load (prefs);
|
|
||||||
|
|
||||||
if (token || res == 1)
|
|
||||||
preferences_apply_now (prefs);
|
|
||||||
|
|
||||||
#endif /* HAVE_XIMIAN_ARCHIVER */
|
|
||||||
|
|
||||||
if (!res) {
|
|
||||||
old_prefs = PREFERENCES (preferences_clone (prefs));
|
|
||||||
setup_capplet_widget ();
|
|
||||||
|
|
||||||
capplet_gtk_main ();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,15 +35,6 @@
|
||||||
typedef struct _Preferences Preferences;
|
typedef struct _Preferences Preferences;
|
||||||
typedef struct _PreferencesClass PreferencesClass;
|
typedef struct _PreferencesClass PreferencesClass;
|
||||||
|
|
||||||
typedef enum _orientation_t {
|
|
||||||
ORIENTATION_HORIZ, ORIENTATION_VERT
|
|
||||||
} orientation_t;
|
|
||||||
|
|
||||||
typedef enum _wallpaper_type_t {
|
|
||||||
WPTYPE_TILED, WPTYPE_CENTERED, WPTYPE_SCALED_ASPECT,
|
|
||||||
WPTYPE_SCALED, WPTYPE_EMBOSSED
|
|
||||||
} wallpaper_type_t;
|
|
||||||
|
|
||||||
struct _Preferences
|
struct _Preferences
|
||||||
{
|
{
|
||||||
GtkObject object;
|
GtkObject object;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue