Changeset 608681f


Ignore:
Timestamp:
Jun 3, 2010, 1:33:19 AM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
c1fd7e2
Parents:
9bd51b8
Message:
Add curmsg property and finish curmsg-vert-offset
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r99ce51c r608681f  
    219219void owl_global_set_curmsg(owl_global *g, int i) {
    220220  g->curmsg=i;
     221  g_object_notify(G_OBJECT(g->gn), "curmsg");
    221222  /* we will reset the vertical offset from here */
    222223  /* we might want to move this out to the functions later */
  • globalnotifiergen.pl

    rf06baef r608681f  
    3939  /* normal properties */
    4040  PROP_RIGHTSHIFT,
     41  PROP_CURMSG,
    4142  PROP_CURMSG_VERT_OFFSET,
    4243  /* generated from variable listings */
     
    7273    case PROP_RIGHTSHIFT:
    7374      owl_global_set_rightshift(notifier->g, g_value_get_int(value));
     75      break;
     76    case PROP_CURMSG:
     77      owl_global_set_curmsg(notifier->g, g_value_get_int(value));
    7478      break;
    7579    case PROP_CURMSG_VERT_OFFSET:
     
    117121    case PROP_RIGHTSHIFT:
    118122      g_value_set_int(value, owl_global_get_rightshift(notifier->g));
     123      break;
     124    case PROP_CURMSG:
     125      g_value_set_int(value, owl_global_get_curmsg(notifier->g));
    119126      break;
    120127    case PROP_CURMSG_VERT_OFFSET:
     
    186193                          |G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB);
    187194  g_object_class_install_property(gobject_class, PROP_RIGHTSHIFT, pspec);
     195 
     196  pspec = g_param_spec_int("curmsg",
     197                           "curmsg",
     198                           "The current message",
     199                           0,
     200                           INT_MAX,
     201                           0,
     202                           G_PARAM_READABLE|G_PARAM_WRITABLE
     203                          |G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB);
     204  g_object_class_install_property(gobject_class, PROP_CURMSG, pspec);
     205 
     206  pspec = g_param_spec_int("curmsg-vert-offset",
     207                           "curmsg_vert_offset",
     208                           "How offset the current message is",
     209                           0,
     210                           INT_MAX,
     211                           0,
     212                           G_PARAM_READABLE|G_PARAM_WRITABLE
     213                          |G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB);
     214  g_object_class_install_property(gobject_class, PROP_CURMSG_VERT_OFFSET, pspec);
    188215
    189216EOT
Note: See TracChangeset for help on using the changeset viewer.