gimp r26815 - in trunk: . app/widgets libgimpwidgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26815 - in trunk: . app/widgets libgimpwidgets
- Date: Fri, 29 Aug 2008 15:54:10 +0000 (UTC)
Author: mitch
Date: Fri Aug 29 15:54:10 2008
New Revision: 26815
URL: http://svn.gnome.org/viewvc/gimp?rev=26815&view=rev
Log:
2008-08-29 Michael Natterer <mitch gimp org>
* app/widgets/gimplayertreeview.c
* libgimpwidgets/gimpcolorscales.c
* libgimpwidgets/gimppropwidgets.c
* libgimpwidgets/gimpscaleentry.c
* libgimpwidgets/gimpwidgets.c: use gtk_adjustment_get_value()
instead of adjustment->value.
Modified:
trunk/ChangeLog
trunk/app/widgets/gimplayertreeview.c
trunk/libgimpwidgets/gimpcolorscales.c
trunk/libgimpwidgets/gimppropwidgets.c
trunk/libgimpwidgets/gimpscaleentry.c
trunk/libgimpwidgets/gimpwidgets.c
Modified: trunk/app/widgets/gimplayertreeview.c
==============================================================================
--- trunk/app/widgets/gimplayertreeview.c (original)
+++ trunk/app/widgets/gimplayertreeview.c Fri Aug 29 15:54:10 2008
@@ -1001,7 +1001,7 @@
if (layer)
{
- gdouble opacity = adjustment->value / 100.0;
+ gdouble opacity = gtk_adjustment_get_value (adjustment) / 100.0;
if (gimp_layer_get_opacity (layer) != opacity)
{
@@ -1078,7 +1078,8 @@
gimp_layer_tree_view_lock_alpha_button_toggled);
}
- if (gimp_layer_get_opacity (layer) * 100.0 != view->opacity_adjustment->value)
+ if (gimp_layer_get_opacity (layer) * 100.0 !=
+ gtk_adjustment_get_value (view->opacity_adjustment))
{
BLOCK (view->opacity_adjustment,
gimp_layer_tree_view_opacity_scale_changed);
Modified: trunk/libgimpwidgets/gimpcolorscales.c
==============================================================================
--- trunk/libgimpwidgets/gimpcolorscales.c (original)
+++ trunk/libgimpwidgets/gimpcolorscales.c Fri Aug 29 15:54:10 2008
@@ -345,6 +345,7 @@
GimpColorScales *scales)
{
GimpColorSelector *selector = GIMP_COLOR_SELECTOR (scales);
+ gdouble value = gtk_adjustment_get_value (adjustment);
gint i;
for (i = 0; i < 7; i++)
@@ -354,32 +355,31 @@
switch (i)
{
case GIMP_COLOR_SELECTOR_HUE:
- selector->hsv.h = GTK_ADJUSTMENT (adjustment)->value / 360.0;
+ selector->hsv.h = value / 360.0;
break;
case GIMP_COLOR_SELECTOR_SATURATION:
- selector->hsv.s = GTK_ADJUSTMENT (adjustment)->value / 100.0;
+ selector->hsv.s = value / 100.0;
break;
case GIMP_COLOR_SELECTOR_VALUE:
- selector->hsv.v = GTK_ADJUSTMENT (adjustment)->value / 100.0;
+ selector->hsv.v = value / 100.0;
break;
case GIMP_COLOR_SELECTOR_RED:
- selector->rgb.r = GTK_ADJUSTMENT (adjustment)->value / 255.0;
+ selector->rgb.r = value / 255.0;
break;
case GIMP_COLOR_SELECTOR_GREEN:
- selector->rgb.g = GTK_ADJUSTMENT (adjustment)->value / 255.0;
+ selector->rgb.g = value / 255.0;
break;
case GIMP_COLOR_SELECTOR_BLUE:
- selector->rgb.b = GTK_ADJUSTMENT (adjustment)->value / 255.0;
+ selector->rgb.b = value / 255.0;
break;
case GIMP_COLOR_SELECTOR_ALPHA:
- selector->hsv.a = selector->rgb.a =
- GTK_ADJUSTMENT (adjustment)->value / 100.0;
+ selector->hsv.a = selector->rgb.a = value / 100.0;
break;
}
Modified: trunk/libgimpwidgets/gimppropwidgets.c
==============================================================================
--- trunk/libgimpwidgets/gimppropwidgets.c (original)
+++ trunk/libgimpwidgets/gimppropwidgets.c Fri Aug 29 15:54:10 2008
@@ -1291,56 +1291,55 @@
GObject *config)
{
GParamSpec *param_spec;
+ gdouble value;
param_spec = get_param_spec (G_OBJECT (adjustment));
if (! param_spec)
return;
+ value = gtk_adjustment_get_value (adjustment);
+
if (G_IS_PARAM_SPEC_INT (param_spec))
{
g_object_set (config,
- param_spec->name, (gint) adjustment->value,
+ param_spec->name, (gint) value,
NULL);
}
else if (G_IS_PARAM_SPEC_UINT (param_spec))
{
g_object_set (config,
- param_spec->name, (guint) adjustment->value,
+ param_spec->name, (guint) value,
NULL);
}
else if (G_IS_PARAM_SPEC_LONG (param_spec))
{
g_object_set (config,
- param_spec->name, (glong) adjustment->value,
+ param_spec->name, (glong) value,
NULL);
}
else if (G_IS_PARAM_SPEC_ULONG (param_spec))
{
g_object_set (config,
- param_spec->name, (gulong) adjustment->value,
+ param_spec->name, (gulong) value,
NULL);
}
else if (G_IS_PARAM_SPEC_INT64 (param_spec))
{
g_object_set (config,
- param_spec->name, (gint64) adjustment->value,
+ param_spec->name, (gint64) value,
NULL);
}
else if (G_IS_PARAM_SPEC_UINT64 (param_spec))
{
g_object_set (config,
- param_spec->name, (guint64) adjustment->value,
+ param_spec->name, (guint64) value,
NULL);
}
else if (G_IS_PARAM_SPEC_DOUBLE (param_spec))
{
- gdouble value;
-
if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (adjustment),
"opacity-scale")))
- value = adjustment->value / 100.0;
- else
- value = adjustment->value;
+ value /= 100.0;
g_object_set (config, param_spec->name, value, NULL);
}
@@ -1420,7 +1419,7 @@
return;
}
- if (adjustment->value != value)
+ if (gtk_adjustment_get_value (adjustment) != value)
{
g_signal_handlers_block_by_func (adjustment,
gimp_prop_adjustment_callback,
@@ -3528,14 +3527,15 @@
GParamSpec *param_spec,
GtkWidget *image)
{
- gchar *stock_id;
+ gchar *stock_id;
+ GtkIconSize icon_size;
g_object_get (config,
param_spec->name, &stock_id,
NULL);
- gtk_image_set_from_stock (GTK_IMAGE (image), stock_id,
- GTK_IMAGE (image)->icon_size);
+ gtk_image_get_stock (GTK_IMAGE (image), NULL, &icon_size);
+ gtk_image_set_from_stock (GTK_IMAGE (image), stock_id, icon_size);
if (stock_id)
g_free (stock_id);
Modified: trunk/libgimpwidgets/gimpscaleentry.c
==============================================================================
--- trunk/libgimpwidgets/gimpscaleentry.c (original)
+++ trunk/libgimpwidgets/gimpscaleentry.c Fri Aug 29 15:54:10 2008
@@ -66,7 +66,7 @@
gimp_scale_entry_unconstrained_adjustment_callback,
adjustment);
- gtk_adjustment_set_value (other_adj, adjustment->value);
+ gtk_adjustment_set_value (other_adj, gtk_adjustment_get_value (adjustment));
g_signal_handlers_unblock_by_func (other_adj,
gimp_scale_entry_unconstrained_adjustment_callback,
@@ -104,7 +104,7 @@
gimp_scale_entry_log_adjustment_callback,
adjustment);
- value = exp (adjustment->value);
+ value = exp (gtk_adjustment_get_value (adjustment));
if (other_adj->lower <= 0.0)
value += other_adj->lower - 0.1;
Modified: trunk/libgimpwidgets/gimpwidgets.c
==============================================================================
--- trunk/libgimpwidgets/gimpwidgets.c (original)
+++ trunk/libgimpwidgets/gimpwidgets.c Fri Aug 29 15:54:10 2008
@@ -975,7 +975,7 @@
{
gint *val = (gint *) data;
- *val = RINT (adjustment->value);
+ *val = RINT (gtk_adjustment_get_value (adjustment));
}
/**
@@ -993,7 +993,7 @@
{
guint *val = (guint *) data;
- *val = (guint) (adjustment->value + 0.5);
+ *val = (guint) (gtk_adjustment_get_value (adjustment) + 0.5);
}
/**
@@ -1007,7 +1007,8 @@
gpointer data)
{
gfloat *val = (gfloat *) data;
- *val = adjustment->value;
+
+ *val = gtk_adjustment_get_value (adjustment);
}
@@ -1023,7 +1024,7 @@
{
gdouble *val = (gdouble *) data;
- *val = adjustment->value;
+ *val = gtk_adjustment_get_value (adjustment);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]