[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 23:29:21

  Modified:    .        g_rc.c g_register.c i_vars.c x_event.c
  Log:
  Applied (Patch# 1527363): Set mousepan "gain" to unity by Peter Clifton with
  
  modifications by Ales to allow unity to be configured via rc file.
  
  
  
  
  Revision  Changes    Path
  1.38      +24 -0     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.37
  retrieving revision 1.38
  diff -u -b -r1.37 -r1.38
  --- g_rc.c	23 Jul 2006 21:49:02 -0000	1.37
  +++ g_rc.c	24 Jul 2006 03:29:21 -0000	1.38
  @@ -1663,3 +1663,27 @@
   		   default_drag_can_move,
   		   2);
   }
  +
  +/*! \todo Finish function documentation!!!
  + *  \brief
  + *  \par Function Description
  + *
  + */
  +SCM g_rc_mousepan_gain(SCM gain)
  +{
  +  int val;
  +
  +  SCM_ASSERT (SCM_INUMP (gain), gain, SCM_ARG1, "mousepan-gain");
  +  
  +  val = SCM_INUM (gain);
  +
  +  if (val <= 0) {
  +    fprintf(stderr, _("Invalid gain [%d] passed to mousepan-gain\n"),
  +            val);
  +    val = 5; /* absolute default */
  +  }
  +
  +  default_mousepan_gain = val;
  +
  +  return SCM_BOOL_T;
  +}
  
  
  
  1.42      +1 -0      eda/geda/gaf/gschem/src/g_register.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_register.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_register.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -b -r1.41 -r1.42
  --- g_register.c	14 Jul 2006 02:23:54 -0000	1.41
  +++ g_register.c	24 Jul 2006 03:29:21 -0000	1.42
  @@ -146,6 +146,7 @@
     { "grid-fixed-threshold",   	 1, 0, 0, g_rc_grid_fixed_threshold },
     { "output-vector-threshold",   1, 0, 0, g_rc_output_vector_threshold },
     { "add-attribute-offset",      1, 0, 0, g_rc_add_attribute_offset },
  +  { "mousepan-gain",             1, 0, 0, g_rc_mousepan_gain },
   
     /* backup functions */
     { "auto-save-interval",        1, 0, 0, g_rc_auto_save_interval },
  
  
  
  1.32      +3 -0      eda/geda/gaf/gschem/src/i_vars.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_vars.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_vars.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -b -r1.31 -r1.32
  --- i_vars.c	14 Jul 2006 02:23:54 -0000	1.31
  +++ i_vars.c	24 Jul 2006 03:29:21 -0000	1.32
  @@ -125,6 +125,7 @@
   int   default_text_display_zoomfactor = 30;
   
   int default_text_feedback = ONLY_WHEN_READABLE;
  +int default_mousepan_gain = 5;
   
   /*! \todo Finish function documentation!!!
    *  \brief
  @@ -239,6 +240,8 @@
   
     w_current->drag_can_move = default_drag_can_move;
   
  +  w_current->mousepan_gain = default_mousepan_gain;
  +
     w_current->auto_save_interval = default_auto_save_interval;
     if (w_current->auto_save_interval != 0) {
       w_current->auto_save_timeout = g_timeout_add(w_current->auto_save_interval*1000,
  
  
  
  1.36      +2 -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.35
  retrieving revision 1.36
  diff -u -b -r1.35 -r1.36
  --- x_event.c	23 Jul 2006 21:49:02 -0000	1.35
  +++ x_event.c	24 Jul 2006 03:29:21 -0000	1.36
  @@ -1003,7 +1003,8 @@
   #endif
   
            if (!(throttle % 5)) {
  -           a_pan_mouse(w_current, pdiff_x*5, pdiff_y*5);
  +           a_pan_mouse(w_current, pdiff_x*w_current->mousepan_gain, 
  +                       pdiff_y*w_current->mousepan_gain);
   
              start_pan_x = (int) event->x;
              start_pan_y = (int) event->y;
  
  
  


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