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
=== modified file 'src/compizconfig.pyx'
--- src/compizconfig.pyx 2011-02-12 15:13:08 +0000
+++ src/compizconfig.pyx 2011-07-24 13:06:12 +0000
@@ -94,11 +94,12 @@
94ctypedef CCSList CCSStrExtensionList94ctypedef CCSList CCSStrExtensionList
9595
96cdef struct CCSBackendInfo:96cdef struct CCSBackendInfo:
97 char * name97 char * name
98 char * shortDesc98 char * shortDesc
99 char * longDesc99 char * longDesc
100 Bool integrationSupport100 Bool integrationSupport
101 Bool profileSupport101 Bool profileSupport
102 unsigned int refCount
102103
103cdef struct CCSSettingKeyValue:104cdef struct CCSSettingKeyValue:
104 int keysym105 int keysym
@@ -133,12 +134,14 @@
133 Bool asBell134 Bool asBell
134135
135cdef struct CCSIntDesc:136cdef struct CCSIntDesc:
136 int value137 int value
137 char * name138 char * name
139 unsigned int refCount
138140
139cdef struct CCSStrRestriction:141cdef struct CCSStrRestriction:
140 char * value142 char * value
141 char * name143 char * name
144 unsigned int refCount
142145
143cdef struct CCSSettingIntInfo:146cdef struct CCSSettingIntInfo:
144 int min147 int min
@@ -173,14 +176,17 @@
173 CCSSettingValueUnion value176 CCSSettingValueUnion value
174 void * parent177 void * parent
175 Bool isListChild178 Bool isListChild
179 unsigned int refCount
176180
177cdef struct CCSGroup:181cdef struct CCSGroup:
178 char * name182 char * name
179 CCSSubGroupList * subGroups183 CCSSubGroupList * subGroups
184 unsigned int refCount
180185
181cdef struct CCSSubGroup:186cdef struct CCSSubGroup:
182 char * name187 char * name
183 CCSSettingList * settings188 CCSSettingList * settings
189 unsigned int refCount
184190
185cdef struct CCSPluginCategory:191cdef struct CCSPluginCategory:
186 char * name192 char * name
@@ -218,11 +224,13 @@
218224
219 CCSPlugin * parent225 CCSPlugin * parent
220 void * priv226 void * priv
227 unsigned int refCount
221228
222cdef struct CCSStrExtension:229cdef struct CCSStrExtension:
223 char * basePlugin230 char * basePlugin
224 CCSSettingList * baseSettings231 CCSSettingList * baseSettings
225 CCSStrRestrictionList * restriction232 CCSStrRestrictionList * restriction
233 unsigned int refCount
226234
227cdef struct CCSPlugin:235cdef struct CCSPlugin:
228 char * name236 char * name
@@ -242,11 +250,17 @@
242 void * priv250 void * priv
243 CCSContext * context251 CCSContext * context
244 void * ccsPrivate252 void * ccsPrivate
253 unsigned int refCount
245254
246cdef struct CCSPluginConflict:255cdef struct CCSPluginConflict:
247 char * value256 char * value
248 CCSPluginConflictType type257 CCSPluginConflictType type
249 CCSPluginList * plugins258 CCSPluginList * plugins
259 unsigned int refCount
260
261cdef struct CCSString:
262 char * value
263 unsigned int refCount
250264
251'''Context functions'''265'''Context functions'''
252cdef extern void ccsSetBasicMetadata (Bool value)266cdef extern void ccsSetBasicMetadata (Bool value)
@@ -288,7 +302,8 @@
288302
289'''General settings handling'''303'''General settings handling'''
290cdef extern Bool ccsSetValue (CCSSetting * setting,304cdef extern Bool ccsSetValue (CCSSetting * setting,
291 CCSSettingValue * value)305 CCSSettingValue * value,
306 Bool processChanged)
292cdef extern void ccsFreeSettingValue (CCSSettingValue * value)307cdef extern void ccsFreeSettingValue (CCSSettingValue * value)
293cdef extern CCSSettingValueList * ccsSettingValueListAppend (308cdef extern CCSSettingValueList * ccsSettingValueListAppend (
294 CCSSettingValueList * l,309 CCSSettingValueList * l,
@@ -319,7 +334,7 @@
319cdef extern void ccsReadSettings (CCSContext * c)334cdef extern void ccsReadSettings (CCSContext * c)
320cdef extern void ccsWriteSettings (CCSContext * c)335cdef extern void ccsWriteSettings (CCSContext * c)
321cdef extern void ccsWriteChangedSettings (CCSContext * c)336cdef extern void ccsWriteChangedSettings (CCSContext * c)
322cdef extern void ccsResetToDefault (CCSSetting * s)337cdef extern void ccsResetToDefault (CCSSetting * s, Bool processChanged)
323338
324'''Event loop'''339'''Event loop'''
325ProcessEventsNoGlibMainLoopMask = (1 << 0)340ProcessEventsNoGlibMainLoopMask = (1 << 0)
@@ -364,14 +379,21 @@
364 cdef CCSStringList * listStart379 cdef CCSStringList * listStart
365 cdef CCSStringList * stringList380 cdef CCSStringList * stringList
366 cdef CCSStringList * prev381 cdef CCSStringList * prev
382 cdef CCSString * stringStart = <CCSString *> malloc (sizeof (CCSString))
383
384 stringStart.value = strdup (list[0])
367 listStart = <CCSStringList *> malloc (sizeof (CCSStringList))385 listStart = <CCSStringList *> malloc (sizeof (CCSStringList))
368 listStart.data = <char *> strdup (list[0])386 listStart.data = <CCSString *> stringStart
369 listStart.next = NULL387 listStart.next = NULL
370 prev = listStart388 prev = listStart
371 389
372 for l in list[1:]:390 for l in list[1:]:
391 stringStart = <CCSString *> malloc (sizeof (CCSString))
392
393 stringStart.value = <char *> strdup (l)
394
373 stringList = <CCSStringList *> malloc (sizeof (CCSStringList))395 stringList = <CCSStringList *> malloc (sizeof (CCSStringList))
374 stringList.data = <char *> strdup (l)396 stringList.data = stringStart
375 stringList.next = NULL397 stringList.next = NULL
376 prev.next = stringList398 prev.next = stringList
377 prev = stringList399 prev = stringList
@@ -379,9 +401,12 @@
379 return listStart401 return listStart
380 402
381cdef object StringListToList (CCSList * stringList):403cdef object StringListToList (CCSList * stringList):
404 cdef CCSString * string
382 list = []405 list = []
383 while stringList:406 while stringList:
384 item = <char *> stringList.data407 string = <CCSString *> stringList.data;
408
409 item = <char *> string.value
385 list.append (item)410 list.append (item)
386 stringList = stringList.next411 stringList = stringList.next
387 return list412 return list
@@ -603,7 +628,7 @@
603 self.info = info628 self.info = info
604 629
605 def Reset (self):630 def Reset (self):
606 ccsResetToDefault (self.ccsSetting)631 ccsResetToDefault (self.ccsSetting, 1)
607632
608 property Plugin:633 property Plugin:
609 def __get__ (self):634 def __get__ (self):
@@ -660,7 +685,7 @@
660 def __set__ (self, value):685 def __set__ (self, value):
661 cdef CCSSettingValue * sv686 cdef CCSSettingValue * sv
662 sv = EncodeValue (value, self.ccsSetting, 0)687 sv = EncodeValue (value, self.ccsSetting, 0)
663 ccsSetValue (self.ccsSetting, sv)688 ccsSetValue (self.ccsSetting, sv, 1)
664 ccsFreeSettingValue (sv)689 ccsFreeSettingValue (sv)
665690
666 property Integrated:691 property Integrated:

Subscribers

People subscribed via source and target branches

to all changes: