~compiz-team/compiz-libcompizconfig/0.9.5

« back to all changes in this revision

Viewing changes to src/compiz.cpp

  • Committer: Sam Spilsbury
  • Date: 2011-07-29 15:10:33 UTC
  • mfrom: (412.1.3)
  • Revision ID: git-v1:21d23fe4074b65ff356bf24c51925ab48a70535c
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
    restriction = (CCSStrRestriction *) calloc (1, sizeof (CCSStrRestriction));
105
105
    if (restriction)
106
106
    {
 
107
        restriction->refCount = 1;
107
108
        restriction->name = strdup (name);
108
109
        restriction->value = strdup (value);
109
110
        forString->restriction =
122
123
    restriction = (CCSStrRestriction *) calloc (1, sizeof (CCSStrRestriction));
123
124
    if (restriction)
124
125
    {
 
126
        restriction->refCount = 1;
125
127
        restriction->name = strdup (name);
126
128
        restriction->value = strdup (value);
127
129
        extension->restriction =
316
318
            if (!val)
317
319
                continue;
318
320
 
 
321
            val->refCount = 1;
319
322
            val->parent = v->parent;
320
323
            val->isListChild = TRUE;
321
324
 
396
399
                intDesc = (CCSIntDesc *) calloc (1, sizeof (CCSIntDesc));
397
400
                if (intDesc)
398
401
                {
 
402
                    intDesc->refCount = 1;
399
403
                    intDesc->name = strdup (intDescMetadata.name ().c_str ());
400
404
                    intDesc->value = val;
401
405
                    i->forInt.desc =
527
531
    setting->parent = plugin;
528
532
    setting->isDefault = TRUE;
529
533
    setting->name = strdup (name);
 
534
    setting->refCount = 1;
530
535
 
531
536
    if (!basicMetadata)
532
537
    {
712
717
        const char *value = (*it).c_str ();
713
718
 
714
719
        if (strlen (value))
715
 
            *list = ccsStringListAppend (*list, strdup (value));
 
720
        {
 
721
            CCSString *str = (CCSString *) calloc (1, sizeof (CCSString));
 
722
            
 
723
            str->value = strdup (value);
 
724
            str->refCount = 1;
 
725
 
 
726
            *list = ccsStringListAppend (*list, str);
 
727
        }
716
728
    }
717
729
}
718
730
 
727
739
    if (!extension)
728
740
        return;
729
741
 
 
742
    extension->refCount = 1;
730
743
    extension->restriction = NULL;
731
744
 
732
745
    extension->basePlugin = strdup (extensionPB.base_plugin ().c_str ());
813
826
    if (!plugin)
814
827
        return;
815
828
 
 
829
    plugin->refCount = 1;
 
830
 
816
831
    pPrivate = (CCSPluginPrivate *) calloc (1, sizeof (CCSPluginPrivate));
817
832
    if (!pPrivate)
818
833
    {
877
892
    if (!plugin)
878
893
        return;
879
894
 
 
895
    plugin->refCount = 1;
 
896
 
880
897
    pPrivate = (CCSPluginPrivate *) calloc (1, sizeof (CCSPluginPrivate));
881
898
    if (!pPrivate)
882
899
    {
1486
1503
            if (!val)
1487
1504
                continue;
1488
1505
 
 
1506
            val->refCount = 1;
1489
1507
            val->parent = v->parent;
1490
1508
            val->isListChild = TRUE;
1491
1509
 
1590
1608
                            intDesc = (CCSIntDesc *) calloc (1, sizeof (CCSIntDesc));
1591
1609
                            if (intDesc)
1592
1610
                            {
 
1611
                                intDesc->refCount = 1;
1593
1612
                                intDesc->name = strdup (name);
1594
1613
                                intDesc->value = val;
1595
1614
                                i->forInt.desc =
1946
1965
    setting->parent = plugin;
1947
1966
    setting->isDefault = TRUE;
1948
1967
    setting->name = strdup (name);
 
1968
    setting->refCount = 1;
1949
1969
 
1950
1970
    if (!basicMetadata)
1951
1971
    {
2236
2256
 
2237
2257
            if (value && strlen (value))
2238
2258
            {
2239
 
                *list = ccsStringListAppend (*list, value);
 
2259
                CCSString *str = (CCSString *) calloc (1, sizeof (CCSString));
 
2260
                
 
2261
                str->value = value;
 
2262
                str->refCount = 1;
 
2263
 
 
2264
                *list = ccsStringListAppend (*list, str);
2240
2265
#ifdef USE_PROTOBUF
2241
2266
                if (stringListPBv)
2242
2267
                    ((StringList *) stringListPBv)->Add ()->assign (value);
2266
2291
    if (!extension)
2267
2292
        return;
2268
2293
 
 
2294
    extension->refCount = 1;
2269
2295
    extension->restriction = NULL;
2270
2296
 
2271
2297
    extension->basePlugin = getStringFromXPath (node->doc, node, "@base_plugin");
2447
2473
    if (!plugin)
2448
2474
        return FALSE;
2449
2475
 
 
2476
    plugin->refCount = 1;
 
2477
 
2450
2478
    pPrivate = (CCSPluginPrivate *) calloc (1, sizeof (CCSPluginPrivate));
2451
2479
    if (!pPrivate)
2452
2480
    {
2510
2538
    if (!plugin)
2511
2539
        return FALSE;
2512
2540
 
 
2541
    plugin->refCount = 1;
 
2542
 
2513
2543
    pPrivate = (CCSPluginPrivate *) calloc (1, sizeof (CCSPluginPrivate));
2514
2544
    if (!pPrivate)
2515
2545
    {
2853
2883
    if (!plugin)
2854
2884
        return;
2855
2885
 
 
2886
    plugin->refCount = 1;
 
2887
 
2856
2888
    pPrivate = (CCSPluginPrivate *) calloc (1, sizeof (CCSPluginPrivate));
2857
2889
    if (!pPrivate)
2858
2890
    {