Merge lp:~compiz-team/compiz-compizconfig-python/compiz-compizconfig-python.settings_upgrades into lp:compiz-compizconfig-python

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 164
Proposed branch: lp:~compiz-team/compiz-compizconfig-python/compiz-compizconfig-python.settings_upgrades
Merge into: lp:compiz-compizconfig-python
Diff against target: 165 lines (+41/-16)
1 file modified
src/compizconfig.pyx (+41/-16)
To merge this branch: bzr merge lp:~compiz-team/compiz-compizconfig-python/compiz-compizconfig-python.settings_upgrades
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Compiz Maintainers Pending
Review via email: mp+68993@code.launchpad.net

Description of the change

API Update

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

+1 looks fine

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compizconfig.pyx'
2--- src/compizconfig.pyx 2011-02-12 15:13:08 +0000
3+++ src/compizconfig.pyx 2011-07-24 13:06:12 +0000
4@@ -94,11 +94,12 @@
5 ctypedef CCSList CCSStrExtensionList
6
7 cdef struct CCSBackendInfo:
8- char * name
9- char * shortDesc
10- char * longDesc
11- Bool integrationSupport
12- Bool profileSupport
13+ char * name
14+ char * shortDesc
15+ char * longDesc
16+ Bool integrationSupport
17+ Bool profileSupport
18+ unsigned int refCount
19
20 cdef struct CCSSettingKeyValue:
21 int keysym
22@@ -133,12 +134,14 @@
23 Bool asBell
24
25 cdef struct CCSIntDesc:
26- int value
27- char * name
28+ int value
29+ char * name
30+ unsigned int refCount
31
32 cdef struct CCSStrRestriction:
33- char * value
34- char * name
35+ char * value
36+ char * name
37+ unsigned int refCount
38
39 cdef struct CCSSettingIntInfo:
40 int min
41@@ -173,14 +176,17 @@
42 CCSSettingValueUnion value
43 void * parent
44 Bool isListChild
45+ unsigned int refCount
46
47 cdef struct CCSGroup:
48 char * name
49 CCSSubGroupList * subGroups
50+ unsigned int refCount
51
52 cdef struct CCSSubGroup:
53 char * name
54 CCSSettingList * settings
55+ unsigned int refCount
56
57 cdef struct CCSPluginCategory:
58 char * name
59@@ -218,11 +224,13 @@
60
61 CCSPlugin * parent
62 void * priv
63+ unsigned int refCount
64
65 cdef struct CCSStrExtension:
66 char * basePlugin
67 CCSSettingList * baseSettings
68 CCSStrRestrictionList * restriction
69+ unsigned int refCount
70
71 cdef struct CCSPlugin:
72 char * name
73@@ -242,11 +250,17 @@
74 void * priv
75 CCSContext * context
76 void * ccsPrivate
77+ unsigned int refCount
78
79 cdef struct CCSPluginConflict:
80 char * value
81 CCSPluginConflictType type
82 CCSPluginList * plugins
83+ unsigned int refCount
84+
85+cdef struct CCSString:
86+ char * value
87+ unsigned int refCount
88
89 '''Context functions'''
90 cdef extern void ccsSetBasicMetadata (Bool value)
91@@ -288,7 +302,8 @@
92
93 '''General settings handling'''
94 cdef extern Bool ccsSetValue (CCSSetting * setting,
95- CCSSettingValue * value)
96+ CCSSettingValue * value,
97+ Bool processChanged)
98 cdef extern void ccsFreeSettingValue (CCSSettingValue * value)
99 cdef extern CCSSettingValueList * ccsSettingValueListAppend (
100 CCSSettingValueList * l,
101@@ -319,7 +334,7 @@
102 cdef extern void ccsReadSettings (CCSContext * c)
103 cdef extern void ccsWriteSettings (CCSContext * c)
104 cdef extern void ccsWriteChangedSettings (CCSContext * c)
105-cdef extern void ccsResetToDefault (CCSSetting * s)
106+cdef extern void ccsResetToDefault (CCSSetting * s, Bool processChanged)
107
108 '''Event loop'''
109 ProcessEventsNoGlibMainLoopMask = (1 << 0)
110@@ -364,14 +379,21 @@
111 cdef CCSStringList * listStart
112 cdef CCSStringList * stringList
113 cdef CCSStringList * prev
114+ cdef CCSString * stringStart = <CCSString *> malloc (sizeof (CCSString))
115+
116+ stringStart.value = strdup (list[0])
117 listStart = <CCSStringList *> malloc (sizeof (CCSStringList))
118- listStart.data = <char *> strdup (list[0])
119+ listStart.data = <CCSString *> stringStart
120 listStart.next = NULL
121 prev = listStart
122
123 for l in list[1:]:
124+ stringStart = <CCSString *> malloc (sizeof (CCSString))
125+
126+ stringStart.value = <char *> strdup (l)
127+
128 stringList = <CCSStringList *> malloc (sizeof (CCSStringList))
129- stringList.data = <char *> strdup (l)
130+ stringList.data = stringStart
131 stringList.next = NULL
132 prev.next = stringList
133 prev = stringList
134@@ -379,9 +401,12 @@
135 return listStart
136
137 cdef object StringListToList (CCSList * stringList):
138+ cdef CCSString * string
139 list = []
140 while stringList:
141- item = <char *> stringList.data
142+ string = <CCSString *> stringList.data;
143+
144+ item = <char *> string.value
145 list.append (item)
146 stringList = stringList.next
147 return list
148@@ -603,7 +628,7 @@
149 self.info = info
150
151 def Reset (self):
152- ccsResetToDefault (self.ccsSetting)
153+ ccsResetToDefault (self.ccsSetting, 1)
154
155 property Plugin:
156 def __get__ (self):
157@@ -660,7 +685,7 @@
158 def __set__ (self, value):
159 cdef CCSSettingValue * sv
160 sv = EncodeValue (value, self.ccsSetting, 0)
161- ccsSetValue (self.ccsSetting, sv)
162+ ccsSetValue (self.ccsSetting, sv, 1)
163 ccsFreeSettingValue (sv)
164
165 property Integrated:

Subscribers

People subscribed via source and target branches

to all changes: