View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#112
Originally Posted by Johnathan View Post
I have what I believe to be a fix to the "ghost lines" problem, but I can't seem to get the project to compile (the compiler complaining about python this and that... I have no idea how to fix that. I'm using the Maemo Dev VMWare image which is supposedly configured correctly but seems that isn't so). Anyway, if anyone else is able to compile the project and can test my changes, please let me know. I changed the function 'gtk_my_draw_widget_button_updown' in gtkmydrawwidget.c as follows, in order to enforce zero-pressure events when the pen is pressed to or lifted from the tablet:

Code:
static gint
gtk_my_draw_widget_button_updown (GtkWidget *widget, GdkEventButton *event)
{
  GtkMyDrawWidget * mdw;
  g_return_val_if_fail (widget != NULL, FALSE);
  g_return_val_if_fail (GTK_IS_MY_DRAW_WIDGET (widget), FALSE);
  mdw = GTK_MY_DRAW_WIDGET (widget);

  double pressure;
  if (!gdk_event_get_axis ((GdkEvent *)event, GDK_AXIS_PRESSURE, &pressure)) {
    pressure = (event->state & GDK_BUTTON1_MASK) ? 0.5 : 0;
  }

  if (event->state & GDK_BUTTON1_MASK)
    gtk_my_draw_widget_process_motion_or_button (widget, event->time, event->x, event->y, 0);

  gtk_my_draw_widget_process_motion_or_button (widget, event->time, event->x, event->y, pressure);

  if ((event->state & GDK_BUTTON1_MASK) == 0)
    gtk_my_draw_widget_process_motion_or_button (widget, event->time, event->x, event->y, 0);

  return TRUE;
}
Add :
#Maemo extras
deb http://repository.maemo.org/extras/ diablo free non-free
deb-src http://repository.maemo.org/extras/ diablo free
deb http://repository.maemo.org/extras-devel/ diablo free non-free
deb-src http://repository.maemo.org/extras-devel/ diablo free
to DIABLO_ARMEL's /etc/apt/sources.list and run apt-get update and then do apt-get build-dep mypaint. After that, you can export PYTHON=/usr/bin/python2.5 and it should compile.