Code

Applied patch to disable the pressure sensitivity for those people that have
authorkidproto <kidproto@users.sourceforge.net>
Mon, 6 Nov 2006 02:55:32 +0000 (02:55 +0000)
committerkidproto <kidproto@users.sourceforge.net>
Mon, 6 Nov 2006 02:55:32 +0000 (02:55 +0000)
problems and added new author to our authors file:

https://sourceforge.net/tracker/index.php?func=detail&aid=1511066&group_id=93438&atid=604308

Please test o this feature for those who have tablets, pressure sensitivity, etc...it is a workaround for gtk+ problems with some tablets, etc...

AUTHORS
src/display/sp-canvas.cpp
src/preferences-skeleton.h
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h

diff --git a/AUTHORS b/AUTHORS
index c4358ef873cb7a880ec6f7b00d243aba2dff2eba..05b03b344501129396e628b2e961ae86e33a0f61 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -90,3 +90,4 @@ Andre Twupack
 Tim Mooney
 Boldewyn
 Marcus Brubaker
+James Kilfiger
index f258d5370525d3c377a0b042c521d17cb3fc67fe..71e4d955df8f5fdd3175a65ee1d8731692251b53 100644 (file)
@@ -33,6 +33,7 @@
 #include <libnr/nr-matrix-fns.h>
 #include <libnr/nr-matrix-ops.h>
 #include <libnr/nr-convex-hull.h>
+#include "prefs-utils.h"
 
 enum {
        RENDERMODE_NORMAL,
@@ -1086,7 +1087,9 @@ sp_canvas_realize (GtkWidget *widget)
 
     widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
     gdk_window_set_user_data (widget->window, widget);
-    gtk_widget_set_events(widget, attributes.event_mask);
+
+    if ( prefs_get_int_attribute ("options.useextinput", "value", 1) )
+        gtk_widget_set_events(widget, attributes.event_mask);
 
     GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
 
index ee1fd14ca153e9d4a1c90ba846ba75d29414740f..49d8731e19f1b8cc62d1229cd1f4eeb26be6578d 100644 (file)
@@ -163,6 +163,7 @@ static char const preferences_skeleton[] =
 "  </group>\n"
 "\n"
 "  <group id=\"options\">\n"
+"    <group id=\"useextinput\" value=\"1\" />"
 "    <group id=\"nudgedistance\" value=\"2\"/>\n"
 "    <group id=\"rotationsnapsperpi\" value=\"12\"/>\n"
 "    <group id=\"cursortolerance\" value=\"8.0\"/>\n"
index 86a0c4b720b48a9f175804638f35915c1be8017b..f320860cb4de186db1a6a5a5d71f55ba4d69e2e8 100644 (file)
@@ -570,6 +570,9 @@ void InkscapePreferences::initPageMisc()
     _misc_mask_remove.init ( _("Remove clipping path or mask after applying"), "options.maskobject", "remove", true);
     _page_misc.add_line(true, "", _misc_mask_remove, "", 
                         _("After applying, remove the object used as the clipping path or mask from the drawing"));
+    _misc_use_ext_input.init( _("Use a pressure sensitive tablet or other device (requires restart)"), "options.useextinput", "value", true);
+    _page_misc.add_line(true, "",_misc_use_ext_input, "",
+                        _("Use the capablities of a tablet or other pressure sensitive device. Disable this only if you have problems with the tablet."));
 
     this->AddPage(_page_misc, _("Misc"), PREFS_PAGE_MISC);
 }
index e275d3d9c1183e8ee7ef331a157cbc8defd0b2fe..4188268ec9241dc16fd5b7d48b7dc9cefe1d8b48 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \brief Inkscape Preferences dialog
+ * brief Inkscape Preferences dialog
  *
  * Authors:
  *   Carl Hetherington
@@ -139,6 +139,7 @@ protected:
     PrefCombo       _misc_overs_bitmap;
     PrefCheckButton _misc_mask_on_top;
     PrefCheckButton _misc_mask_remove;
+    PrefCheckButton _misc_use_ext_input;
 
     int _max_dialog_width;
     int _max_dialog_height;