46
46
if (result != Success)
51
51
long *data = (long *) prop_data;
52
gdouble radius = data[0];
53
gdouble opacity = data[1];
52
gdouble aradius = data[0];
53
gdouble aopacity = data[1];
54
gint ax_off = data[2];
55
gint ay_off = data[3];
57
gdouble iradius = data[4];
58
gdouble iopacity = data[5];
59
gint ix_off = data[6];
60
gint iy_off = data[7];
57
61
/* Radius and Opacity are multiplied by 1000 to keep precision,
58
62
* divide by that much to get our real radius and opacity
63
changed = radius != settings->shadow_radius ||
64
opacity != settings->shadow_opacity ||
65
x_off != settings->shadow_offset_x ||
66
y_off != settings->shadow_offset_y;
68
settings->shadow_radius = (gdouble) MAX (0.0, MIN (radius, 48.0));
69
settings->shadow_opacity = (gdouble) MAX (0.0, MIN (opacity, 6.0));
70
settings->shadow_offset_x = (gint) MAX (-16, MIN (x_off, 16));
71
settings->shadow_offset_y = (gint) MAX (-16, MIN (y_off, 16));
69
changed = aradius != settings->active_shadow_radius ||
70
aopacity != settings->active_shadow_opacity ||
71
ax_off != settings->active_shadow_offset_x ||
72
ay_off != settings->active_shadow_offset_y ||
73
iradius != settings->inactive_shadow_radius ||
74
iopacity != settings->inactive_shadow_opacity ||
75
ix_off != settings->inactive_shadow_offset_x ||
76
iy_off != settings->inactive_shadow_offset_y;
78
settings->active_shadow_radius = (gdouble) MAX (0.0, MIN (aradius, 48.0));
79
settings->active_shadow_opacity = (gdouble) MAX (0.0, MIN (aopacity, 6.0));
80
settings->active_shadow_offset_x = (gint) MAX (-16, MIN (ax_off, 16));
81
settings->active_shadow_offset_y = (gint) MAX (-16, MIN (ay_off, 16));
82
settings->inactive_shadow_radius = (gdouble) MAX (0.0, MIN (iradius, 48.0));
83
settings->inactive_shadow_opacity = (gdouble) MAX (0.0, MIN (iopacity, 6.0));
84
settings->inactive_shadow_offset_x = (gint) MAX (-16, MIN (ix_off, 16));
85
settings->inactive_shadow_offset_y = (gint) MAX (-16, MIN (iy_off, 16));
84
98
XTextPropertyToStringList (&shadow_color_xtp, &t_data, &ret_count);
90
104
if (sscanf (t_data[0], "#%2x%2x%2x%2x",
91
105
&c[0], &c[1], &c[2], &c[3]) == 4)
93
settings->shadow_color[0] = c[0] << 8 | c[0];
94
settings->shadow_color[1] = c[1] << 8 | c[1];
95
settings->shadow_color[2] = c[2] << 8 | c[2];
107
settings->active_shadow_color[0] = c[0] << 8 | c[0];
108
settings->active_shadow_color[1] = c[1] << 8 | c[1];
109
settings->active_shadow_color[2] = c[2] << 8 | c[2];
113
if (sscanf (t_data[1], "#%2x%2x%2x%2x",
114
&c[0], &c[1], &c[2], &c[3]) == 4)
116
settings->inactive_shadow_color[0] = c[0] << 8 | c[0];
117
settings->inactive_shadow_color[1] = c[1] << 8 | c[1];
118
settings->inactive_shadow_color[2] = c[2] << 8 | c[2];
133
use_tooltips_changed (GConfClient *client)
135
gboolean new_use_tooltips;
136
gboolean use_tooltips = settings->use_tooltips;
138
new_use_tooltips = gconf_client_get_bool (client,
142
if (new_use_tooltips != use_tooltips)
144
settings->use_tooltips = new_use_tooltips;
152
mutter_draggable_border_width_changed (GConfClient *client)
155
int width = settings->mutter_draggable_border_width;
157
new_width = gconf_client_get_int (client,
158
MUTTER_DRAGGABLE_BORDER_WIDTH_KEY,
161
if (new_width != width)
163
settings->mutter_draggable_border_width = new_width;
171
mutter_attach_modal_dialogs_changed (GConfClient *client)
174
gboolean attach = settings->mutter_attach_modal_dialogs;
176
new_attach = gconf_client_get_bool (client,
177
MUTTER_ATTACH_MODAL_DIALOGS_KEY,
180
if (new_attach != attach)
182
settings->mutter_attach_modal_dialogs = new_attach;
110
190
blur_settings_changed (GConfClient *client)
486
569
if (theme_opacity_changed (client))
572
else if (strcmp (key, MUTTER_DRAGGABLE_BORDER_WIDTH_KEY) == 0)
574
if (mutter_draggable_border_width_changed (client))
577
else if (strcmp (key, MUTTER_ATTACH_MODAL_DIALOGS_KEY) == 0)
579
if (mutter_attach_modal_dialogs_changed (client))
582
else if (strcmp (key, USE_TOOLTIPS_KEY) == 0)
584
if (use_tooltips_changed (client))
491
589
decorations_changed (data);
510
608
GCONF_CLIENT_PRELOAD_ONELEVEL,
611
gconf_client_add_dir (gconf,
613
GCONF_CLIENT_PRELOAD_ONELEVEL,
513
616
g_signal_connect (G_OBJECT (gconf),
515
618
G_CALLBACK (value_changed),
537
640
wheel_action_changed (gconf);
538
641
blur_settings_changed (gconf);
643
mutter_draggable_border_width_changed (gconf);
644
mutter_attach_modal_dialogs_changed (gconf);
645
use_tooltips_changed (gconf);
540
647
g_object_unref (gconf);
543
650
shadow_property_changed (screen);