Changeset 5b80b87 for stubgen.pl


Ignore:
Timestamp:
Jun 1, 2010, 8:28:15 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
b2ea16b
Parents:
e20dd769
Message:
Avoid flagrant violations of layering and just g_object_notify in the setters.

g_object_set_property calls g_object_freeze_notify and
g_object_thaw_notify, so it should Just Work.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • stubgen.pl

    re20dd769 r5b80b87  
    1818        print <<EOT;
    1919void owl_global_set_${altvarname}_on(owl_global *g) {
    20   g_object_set(G_OBJECT(g->gn), "$detailname", TRUE, NULL);
     20  owl_variable_set_bool_on(&g->vars, "$altvarname");
     21  g_object_notify(G_OBJECT(g->gn), "$detailname");
    2122}
    2223void owl_global_set_${altvarname}_off(owl_global *g) {
    23   g_object_set(G_OBJECT(g->gn), "$detailname", FALSE, NULL);
     24  owl_variable_set_bool_off(&g->vars, "$altvarname");
     25  g_object_notify(G_OBJECT(g->gn), "$detailname");
    2426}
    2527int owl_global_is_$altvarname(const owl_global *g) {
     
    3032        print <<EOT;
    3133void owl_global_set_${altvarname}(owl_global *g, const char *text) {
    32   g_object_set(G_OBJECT(g->gn), "$detailname", text, NULL);
     34  owl_variable_set_string(&g->vars, "$altvarname", text);
     35  g_object_notify(G_OBJECT(g->gn), "$detailname");
    3336}
    3437const char *owl_global_get_$altvarname(const owl_global *g) {
     
    3942        print <<EOT;
    4043void owl_global_set_${altvarname}(owl_global *g, int n) {
    41   g_object_set(G_OBJECT(g->gn), "$detailname", n, NULL);
     44  owl_variable_set_int(&g->vars, "$altvarname", n);
     45  g_object_notify(G_OBJECT(g->gn), "$detailname");
    4246}
    4347int owl_global_get_$altvarname(const owl_global *g) {
Note: See TracChangeset for help on using the changeset viewer.