summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-05-26 11:50:51 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-05-26 11:50:51 +0000
commita521c603149371f97507fde537510f33de48ab13 (patch)
treef794dd21c33735cf803f84a2dc2436e99f2e893d /src
parentSome GDK deprecation fixes for Input Devices dialog (diff)
downloadinkscape-a521c603149371f97507fde537510f33de48ab13.tar.gz
inkscape-a521c603149371f97507fde537510f33de48ab13.zip
Stop using deprecated private members of GdkDevice.
Unfortunately, the axis range is inaccessible in new versions of Gdk so we cannot set the range indicators in the input-devices dialog. There may be another way of doing this, using underlying system API. (bzr r11420)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/input.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp
index 3f8008282..a35690f59 100644
--- a/src/ui/dialog/input.cpp
+++ b/src/ui/dialog/input.cpp
@@ -1404,10 +1404,16 @@ void InputDialogImpl::updateTestAxes( Glib::ustring const& key, GdkDevice* dev )
testAxes[i].set(getPix(PIX_AXIS_OFF));
axesValues[i].set_sensitive(true);
if ( dev && (i < static_cast<gint>(G_N_ELEMENTS(axesValues)) ) ) {
- if ( (dev->axes[i].max - dev->axes[i].min) > epsilon ) {
+
+ // FIXME: Device axis ranges are inaccessible in GTK+ 3 and
+ // are deprecated in GTK+ 2. Progress-bar ranges are disabled
+ // until we find an alternative solution
+
+ // if ( (dev->axes[i].max - dev->axes[i].min) > epsilon ) {
axesValues[i].set_sensitive(true);
- axesValues[i].set_fraction( (axesMap[key][i].second- dev->axes[i].min) / (dev->axes[i].max - dev->axes[i].min) );
- }
+ // axesValues[i].set_fraction( (axesMap[key][i].second- dev->axes[i].min) / (dev->axes[i].max - dev->axes[i].min) );
+ // }
+
gchar* str = g_strdup_printf("%f", axesMap[key][i].second);
axesValues[i].set_text(str);
g_free(str);
@@ -1417,10 +1423,16 @@ void InputDialogImpl::updateTestAxes( Glib::ustring const& key, GdkDevice* dev )
testAxes[i].set(getPix(PIX_AXIS_ON));
axesValues[i].set_sensitive(true);
if ( dev && (i < static_cast<gint>(G_N_ELEMENTS(axesValues)) ) ) {
- if ( (dev->axes[i].max - dev->axes[i].min) > epsilon ) {
+
+ // FIXME: Device axis ranges are inaccessible in GTK+ 3 and
+ // are deprecated in GTK+ 2. Progress-bar ranges are disabled
+ // until we find an alternative solution
+
+ // if ( (dev->axes[i].max - dev->axes[i].min) > epsilon ) {
axesValues[i].set_sensitive(true);
- axesValues[i].set_fraction( (axesMap[key][i].second- dev->axes[i].min) / (dev->axes[i].max - dev->axes[i].min) );
- }
+ // axesValues[i].set_fraction( (axesMap[key][i].second- dev->axes[i].min) / (dev->axes[i].max - dev->axes[i].min) );
+ // }
+
gchar* str = g_strdup_printf("%f", axesMap[key][i].second);
axesValues[i].set_text(str);
g_free(str);