[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: g_rc.c



  User: ahvezda 
  Date: 06/07/23 17:49:02

  Modified:    .        g_rc.c x_event.c
  Log:
  Applied mouse pan patch by Peter Clifton (Bug#1527361)
  
  
  
  
  Revision  Changes    Path
  1.37      +2 -1      eda/geda/gaf/gschem/src/g_rc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_rc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_rc.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -b -r1.36 -r1.37
  --- g_rc.c	15 Jul 2006 18:51:40 -0000	1.36
  +++ g_rc.c	23 Jul 2006 21:49:02 -0000	1.37
  @@ -1035,11 +1035,12 @@
       {STROKE, "stroke"},
       {REPEAT, "repeat"},
       {ACTION, "action"},
  +    {MID_MOUSEPAN_ENABLED, "mousepan"},
     };
   
     RETURN_G_RC_MODE("middle-button",
   		   default_middle_button,
  -		   3);
  +		   4);
   }
   
   /*! \todo Finish function documentation!!!
  
  
  
  1.35      +21 -1     eda/geda/gaf/gschem/src/x_event.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_event.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_event.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -b -r1.34 -r1.35
  --- x_event.c	14 Jul 2006 02:23:55 -0000	1.34
  +++ x_event.c	23 Jul 2006 21:49:02 -0000	1.35
  @@ -567,6 +567,14 @@
         break;
   
   #endif
  +      case(MID_MOUSEPAN_ENABLED):
  +      w_current->event_state = MOUSEPAN; /* start */
  +      w_current->inside_action = 1;
  +      w_current->doing_pan = TRUE;
  +      start_pan_x = (int) event->x;
  +      start_pan_y = (int) event->y;
  +      throttle=0;
  +      break;      
       }
   
     } else if (event->button == 3) {
  @@ -895,6 +903,18 @@
         }
         break;
   #endif
  +      
  +      case(MID_MOUSEPAN_ENABLED):
  +      w_current->doing_pan=FALSE;
  +      o_redraw_all_fast(w_current);
  +      o_undo_savestate(w_current, UNDO_VIEWPORT_ONLY);
  +      /* this needs to be REDONE */
  +      /* if you mouse pan, you will be thrown out of the current mode. */
  +      /* not good */
  +      w_current->inside_action = 0;
  +      i_set_state(w_current, SELECT);
  +      i_update_toolbar(w_current);
  +      break;
       }
   
     } else if (event->button == 3) {
  @@ -971,7 +991,7 @@
       coord_display_update(w_current, mouse_x, mouse_y);
     }
   
  -  if (w_current->third_button == MOUSEPAN_ENABLED) {
  +  if (w_current->third_button == MOUSEPAN_ENABLED || w_current->middle_button == MID_MOUSEPAN_ENABLED) {
       if((w_current->event_state == MOUSEPAN) &&
          w_current->inside_action) {
            pdiff_x = mouse_x - start_pan_x;
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs