[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

compizconfig-python: Changes to 'upstream-unstable'



 VERSION              |    2 
 configure.ac         |    2 
 src/compizconfig.pyx | 1860 +++++++++++++++++++++++++++------------------------
 3 files changed, 989 insertions(+), 875 deletions(-)

New commits:
commit d541e240dbcbf6569c1f0e81d961e8725c4a101e
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Fri Apr 4 00:17:31 2008 +0200

    * Bump version to 0.7.4

diff --git a/VERSION b/VERSION
index a48124b..8eafcce 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.7.3
+VERSION=0.7.4

commit c37352e871339035dc93f5148a8ef72936ad7dbf
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Thu Mar 6 22:46:40 2008 +0100

    * Bump version to 0.7.3

diff --git a/VERSION b/VERSION
index 70d11ae..a48124b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.7.2
+VERSION=0.7.3

commit c1758728fa66715c643f9d2be4d056d08bc030b1
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Thu Mar 6 22:46:39 2008 +0100

    * Bump version to 0.7.2

diff --git a/VERSION b/VERSION
index 58d3865..70d11ae 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.6.99
+VERSION=0.7.2

commit 4e1474e555a4546658d95c8ef2b1832de0cbd959
Author: Danny Baumann <dannybaumann@web.de>
Date:   Thu Feb 14 09:13:13 2008 +0100

    (Optionally) save settings after import, which is no longer done by the lib.

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index a07dd9a..3a7a3fa 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -1002,10 +1002,13 @@ cdef class Context:
         ccsSetProfile (self.ccsContext, "")
         ccsReadSettings (self.ccsContext)
 
-    def Import (self, path):
-        return bool (ccsImportFromFile (self.ccsContext, path, True))
+    def Import (self, path, autoSave = True):
+        ret = bool (ccsImportFromFile (self.ccsContext, path, True))
+        if autoSave:
+            ccsWriteSettings (self.ccsContext)
+        return ret
 
-    def Export (self, path, skipDefaults=False):
+    def Export (self, path, skipDefaults = False):
         return bool (ccsExportToFile (self.ccsContext, path, skipDefaults))
 
     property Plugins:

commit 1a14f399c781db4fd1209d8e8c98c57f70b670b3
Author: Patrick Niklaus <marex@opencompositing.org>
Date:   Tue Nov 6 19:02:49 2007 +0100

    CCS library API changed

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index a4a4160..a07dd9a 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -309,7 +309,7 @@ ProcessEventsNoGlibMainLoopMask = (1 << 0)
 cdef extern void ccsProcessEvents (CCSContext * context, unsigned int flags)
 
 '''Import/export'''
-cdef extern Bool ccsExportToFile (CCSContext * context, char * fileName)
+cdef extern Bool ccsExportToFile (CCSContext * context, char * fileName, Bool skipDefaults)
 cdef extern Bool ccsImportFromFile (CCSContext * context,
                                     char *       fileName,
                                     Bool         overwrite)
@@ -1005,8 +1005,8 @@ cdef class Context:
     def Import (self, path):
         return bool (ccsImportFromFile (self.ccsContext, path, True))
 
-    def Export (self, path):
-        return bool (ccsExportToFile (self.ccsContext, path))
+    def Export (self, path, skipDefaults=False):
+        return bool (ccsExportToFile (self.ccsContext, path, skipDefaults))
 
     property Plugins:
         def __get__ (self):

commit 2e2c926308fca320607cfa7ab1af6d3cedc029ba
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sun Oct 21 13:17:11 2007 +0200

    * Bump require

diff --git a/configure.ac b/configure.ac
index 89f7126..27fd982 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ AC_PROG_LIBTOOL
 AC_HEADER_STDC
 
 CCS_REQUIRES="\
-libcompizconfig >= 0.6.0 \
+libcompizconfig >= 0.6.99 \
 glib-2.0 >= 2.6 "
 
 PKG_CHECK_MODULES(CCS,$CCS_REQUIRES)

commit 1a3b7a8a0687ed8fc373aab43dc2301e1768ac1e
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sun Oct 21 12:40:23 2007 +0200

    * Include VERSION in distfile

diff --git a/Makefile.am b/Makefile.am
index 8c50656..b5275f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,8 @@
 SUBDIRS = src
 
 EXTRA_DIST = \
-	compizconfig-python.pc.in
+	compizconfig-python.pc.in \
+	VERSION
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = compizconfig-python.pc

commit 1fd193a18812b7b837984dca0daef1b28e54a34d
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Mon Oct 15 19:34:31 2007 +0200

    * Fix & update configure.ac

diff --git a/configure.ac b/configure.ac
index b0d33bd..89f7126 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.57)
-AC_INIT([compizconfig-python],0.5.2, [livinglatexkali@gmail.com])
+AC_INIT([compizconfig-python],esyscmd(. ./VERSION;echo -n $VERSION), [livinglatexkali@gmail.com])
 
 AM_INIT_AUTOMAKE([1.9 dist-bzip2])
 AC_CONFIG_HEADER([config.h])
@@ -12,7 +12,7 @@ AC_PROG_LIBTOOL
 AC_HEADER_STDC
 
 CCS_REQUIRES="\
-libcompizconfig >= 0.5.2 \
+libcompizconfig >= 0.6.0 \
 glib-2.0 >= 2.6 "
 
 PKG_CHECK_MODULES(CCS,$CCS_REQUIRES)

commit 3c43482410df4b141020d7918bfea0b93a21c109
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sun Oct 21 12:52:56 2007 +0200

    * Bump version to 0.6.99

diff --git a/VERSION b/VERSION
index 2313ac4..58d3865 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION=0.5.2
+VERSION=0.6.99

commit ba0d25bef5b0be00146ed4e3019f85b527cbfc68
Author: Danny Baumann <dannybaumann@web.de>
Date:   Mon Sep 3 12:16:16 2007 +0200

    Minor beautification.

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index 524a3e2..a4a4160 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -451,9 +451,9 @@ cdef CCSSettingValue * EncodeValue (object       data,
         bv.value.asColor.color.blue = data[2]
         bv.value.asColor.color.alpha = data[3]
     elif t == TypeKey:
-        ccsStringToKeyBinding (data,&bv.value.asKey)
+        ccsStringToKeyBinding (data, &bv.value.asKey)
     elif t == TypeButton:
-        ccsStringToButtonBinding (data,&bv.value.asButton)
+        ccsStringToButtonBinding (data, &bv.value.asButton)
     elif t == TypeEdge:
         bv.value.asEdge = ccsStringToEdges (data)
     elif t == TypeBell:
@@ -636,9 +636,9 @@ cdef class SSGroup:
     cdef object display
     cdef object screens
 
-    def __new__(self, disp, scrn):
+    def __new__ (self, disp, screen):
         self.display = disp
-        self.screens = scrn
+        self.screens = screen
 
     property Display:
         def __get__ (self):
@@ -690,7 +690,7 @@ cdef class Plugin:
                 scr = []
                 for n in range (0, self.context.NScreens):
                     scr.append ({})
-                self.groups[gr.name][sgr.name] = SSGroup ({},scr)
+                self.groups[gr.name][sgr.name] = SSGroup ({}, scr)
                 sglist = sglist.next
             glist = glist.next
         setlist = ccsGetPluginSettings (self.ccsPlugin)
@@ -769,13 +769,13 @@ cdef class Plugin:
 
     property Initialized:
         def __get__ (self):
-            return bool(self.loaded)
+            return bool (self.loaded)
 
     property Enabled:
         def __get__ (self):
             return bool (ccsPluginIsActive (self.context.ccsContext,
                                             self.ccsPlugin.name))
-        def __set__ (self,val):
+        def __set__ (self, val):
             if val:
                 if len (self.EnableConflicts):
                     return
@@ -810,7 +810,7 @@ cdef class Plugin:
                 ret.append ((ConflictTypeString[pc.type], pc.value, rpl))
                 pls = pls.next
             if pl != NULL:
-                ccsPluginConflictListFree(pl, True)
+                ccsPluginConflictListFree (pl, True)
             return ret
 
     property DisableConflicts:
@@ -876,9 +876,9 @@ cdef class Backend:
         self.integrationSupport = bool (info[4])
     
     def __dealloc__ (self):
-        free(self.name)
-        free(self.shortDesc)
-        free(self.longDesc)
+        free (self.name)
+        free (self.shortDesc)
+        free (self.longDesc)
 
     property Name:
         def __get__ (self):
@@ -1019,7 +1019,7 @@ cdef class Context:
     property CurrentProfile:
         def __get__ (self):
             return self.currentProfile
-        def __set__ (self,profile):
+        def __set__ (self, profile):
             self.currentProfile = profile
             ccsSetProfile (self.ccsContext, profile.Name)
             ccsReadSettings (self.ccsContext)
@@ -1031,7 +1031,7 @@ cdef class Context:
     property CurrentBackend:
         def __get__ (self):
             return self.currentBackend
-        def __set__ (self,backend):
+        def __set__ (self, backend):
             self.currentBackend = backend
             ccsSetBackend (self.ccsContext, backend.Name)
             ccsReadSettings (self.ccsContext)

commit 7c3514a34962df84ce326dc8d379ca9c87574f8a
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sun Sep 2 23:52:50 2007 +0200

    * Cleanup

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index f8702ca..524a3e2 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -958,8 +958,6 @@ cdef class Context:
 
     # Returns the settings that should be updated
     def ProcessEvents (self, flags = 0):
-        cdef CCSSettingList * sl
-        cdef CCSSetting * ccsSetting
         ccsProcessEvents (self.ccsContext, flags)
         if len (self.ChangedSettings):
             self.Read ()

commit 4c7e4ce90f7ba191ea381ee0c4df51c58b5eb55e
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sun Sep 2 23:48:04 2007 +0200

    * ChangedSettings is never None, but the list can be empty

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index b245c2d..f8702ca 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -961,7 +961,7 @@ cdef class Context:
         cdef CCSSettingList * sl
         cdef CCSSetting * ccsSetting
         ccsProcessEvents (self.ccsContext, flags)
-        if self.ChangedSettings != None:
+        if len (self.ChangedSettings):
             self.Read ()
             return True
         return False

commit d9f9237dd54f21d025acc5ee2e8a3edfb69eef46
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Sun Sep 2 14:30:10 2007 +0200

    * Coding style

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index cc25bbc..b245c2d 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -531,7 +531,7 @@ cdef object DecodeValue (CCSSettingValue * value):
         l = value.value.asList
         while l != NULL:
             lret.append (DecodeValue (<CCSSettingValue *> l.data))
-            l=l.next
+            l = l.next
         return lret
     return "Unhandled"
 

commit 8bd0b17dc5baf77ee5c7746f221f285b4a001648
Author: Dennis Kasprzyk <onestone@opencompositing.org>
Date:   Thu Aug 30 01:45:37 2007 +0200

    Fix profile resetting.

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index 4371ebb..cc25bbc 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -1000,7 +1000,9 @@ cdef class Context:
         self.currentBackend = self.backends[ccsGetBackend (self.ccsContext)]
     
     def ResetProfile (self):
+        self.currentProfile = Profile (self, "")
         ccsSetProfile (self.ccsContext, "")
+        ccsReadSettings (self.ccsContext)
 
     def Import (self, path):
         return bool (ccsImportFromFile (self.ccsContext, path, True))

commit 1cadd5fa16e586bb1f3b63603471d8ac607a6eaa
Author: Patrick Niklaus <marex@opencompositing.org>
Date:   Fri Aug 24 20:33:09 2007 +0200

    Added initialized property to plugin class for idle settings paring

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index d95e25c..ead084a 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -764,6 +764,10 @@ cdef class Plugin:
             features = StringListToList (self.ccsPlugin.providesFeature)
             return features
 
+    property Initialized:
+        def __get__ (self):
+            return bool(self.loaded)
+
     property Enabled:
         def __get__ (self):
             return bool (ccsPluginIsActive (self.context.ccsContext,

commit 1114fe30b21c601459d8d0e668ca07a1a596e930
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Thu Aug 23 21:29:48 2007 +0200

    * Finish reindenting and cleanup

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index d95e25c..4e1f5bf 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -48,32 +48,32 @@ cdef enum CCSPluginConflictType:
     ConflictPluginError
 
 SettingTypeString = [
-    'Bool',
-    'Int',
-    'Float',
-    'String',
-    'Color',
-    'Match',
-    'List',
-    'Key',
-    'Button',
-    'Edge',
-    'Bell',
-    'Invalid'
+    "Bool",
+    "Int",
+    "Float",
+    "String",
+    "Color",
+    "Match",
+    "List",
+    "Key",
+    "Button",
+    "Edge",
+    "Bell",
+    "Invalid"
 ]
 
 ConflictTypeString = [
-    'RequiresPlugin', #A
-    'RequiresFeature', #A
-    'ConflictFeature', #A
-    'ConflictPlugin', #A
-    'FeatureNeeded', #D
-    'PluginNeeded', #D
-    'PluginError'
+    "RequiresPlugin", #A
+    "RequiresFeature", #A
+    "ConflictFeature", #A
+    "ConflictPlugin", #A
+    "FeatureNeeded", #D
+    "PluginNeeded", #D
+    "PluginError"
 ]
 
 cdef struct CCSList:
-    void * data
+    void *    data
     CCSList * next
 
 ctypedef CCSList CCSSettingList
@@ -90,17 +90,17 @@ cdef struct CCSBackendInfo:
     char *    name
     char *    shortDesc
     char *    longDesc
-    Bool integrationSupport
-    Bool profileSupport
+    Bool      integrationSupport
+    Bool      profileSupport
 
 cdef struct CCSSettingKeyValue:
-    int keysym
+    int          keysym
     unsigned int keyModMask
 
 cdef struct CCSSettingButtonValue:
-    int button
+    int          button
     unsigned int buttonModMask
-    int edgeMask
+    int          edgeMask
 
 cdef struct CCSSettingColorValueColor:
     unsigned short red
@@ -110,28 +110,28 @@ cdef struct CCSSettingColorValueColor:
 
 cdef union CCSSettingColorValue:
     CCSSettingColorValueColor color
-    unsigned short array[4]
+    unsigned short            array[4]
 
 cdef union CCSSettingValueUnion:
-    Bool asBool
-    int asInt
-    float asFloat
-    char * asString
-    char * asMatch
-    CCSSettingColorValue asColor
+    Bool                  asBool
+    int                   asInt
+    float                 asFloat
+    char *                asString
+    char *                asMatch
+    CCSSettingColorValue  asColor
     CCSSettingValueList * asList
     CCSSettingKeyValue    asKey
     CCSSettingButtonValue asButton
     unsigned int          asEdge
-    Bool              asBell
+    Bool                  asBell
 
 cdef struct CCSIntDesc:
-    int  value
-    char *name
+    int    value
+    char * name
 
 cdef struct CCSSettingIntInfo:
-    int min
-    int max
+    int              min
+    int              max
     CCSIntDescList * desc
 
 cdef struct CCSSettingFloatInfo:
@@ -141,34 +141,34 @@ cdef struct CCSSettingFloatInfo:
 
 cdef struct CCSSettingListInfo:
     CCSSettingType listType
-    void * listInfo                #actually CCSSettingInfo *, works around pyrex
+    void *         listInfo # actually CCSSettingInfo *, works around pyrex
 
 cdef union CCSSettingInfo:
-    CCSSettingIntInfo forInt
+    CCSSettingIntInfo   forInt
     CCSSettingFloatInfo forFloat
-    CCSSettingListInfo forList
+    CCSSettingListInfo  forList
 
 cdef struct CCSSettingValue:
     CCSSettingValueUnion value
-    void * parent
-    Bool isListChild
+    void *               parent
+    Bool                 isListChild
 
 cdef struct CCSGroup:
-    char * name
+    char *            name
     CCSSubGroupList * subGroups
 
 cdef struct CCSSubGroup:
-    char * name
+    char *           name
     CCSSettingList * settings
 
 cdef struct CCSPluginCategory:
-    char * name
-    char * shortDesc
-    char * longDesc
+    char *          name
+    char *          shortDesc
+    char *          longDesc
     CCSStringList * plugins
 
 cdef struct CCSContext:
-    CCSPluginList * plugins
+    CCSPluginList *     plugins
     CCSPluginCategory * categories
 
     void * priv
@@ -177,7 +177,7 @@ cdef struct CCSContext:
     CCSSettingList * changedSettings
 
     unsigned int * screens
-    unsigned int numScreens
+    unsigned int   numScreens
 
 cdef struct CCSPlugin
 
@@ -188,20 +188,20 @@ cdef struct CCSSetting:
 
     CCSSettingType type
 
-    Bool isScreen
+    Bool         isScreen
     unsigned int screenNum
 
     CCSSettingInfo info
-    char * group
-    char * subGroup
-    char * hints
+    char *         group
+    char *         subGroup
+    char *         hints
 
-    CCSSettingValue defaultValue
+    CCSSettingValue   defaultValue
     CCSSettingValue * value
-    Bool isDefault
+    Bool              isDefault
 
     CCSPlugin * parent
-    void * priv
+    void *      priv
 
 cdef struct CCSPlugin:
     char * name
@@ -218,30 +218,30 @@ cdef struct CCSPlugin:
     CCSStringList * providesFeature
     CCSStringList * requiresFeature
 
-    void * priv
+    void *       priv
     CCSContext * context
-    void * ccsPrivate
+    void *       ccsPrivate
 
 cdef struct CCSPluginConflict:
-    char * value
+    char *                value
     CCSPluginConflictType type
-    CCSPluginList * plugins
+    CCSPluginList *       plugins
 
 '''Context functions'''
 cdef extern void ccsSetBasicMetadata (Bool value)
 cdef extern CCSContext * ccsContextNew (unsigned int * screens,
-                        unsigned int numScreens)
+                                        unsigned int numScreens)
 cdef extern CCSContext * ccsEmptyContextNew (unsigned int * screens,
-                         unsigned int numScreens)
+                                             unsigned int   numScreens)
 cdef extern void ccsContextDestroy (CCSContext * context)
 
 '''Plugin functions'''
 cdef extern Bool ccsLoadPlugin (CCSContext * context, char * name)
 cdef extern CCSPlugin * ccsFindPlugin (CCSContext * context, char * name)
 cdef extern CCSSetting * ccsFindSetting (CCSPlugin * plugin,
-                     char * name,
-                     Bool isScreen,
-                     int screenNum)
+                                         char *      name,
+                                         Bool        isScreen,
+                                         int         screenNum)
 cdef extern CCSSettingList * ccsGetPluginSettings (CCSPlugin * plugin)
 cdef extern CCSGroupList * ccsGetPluginGroups (CCSPlugin * plugin)
 
@@ -264,20 +264,20 @@ cdef extern from 'string.h':
 cdef extern unsigned int ccsStringToModifiers (char *binding)
 cdef extern unsigned int ccsStringToEdges (char *edge)
 cdef extern unsigned int ccsModStringToEdges (char *edge)
-cdef extern Bool ccsStringToKeyBinding (char         *binding,
-                    CCSSettingKeyValue *key)
-cdef extern Bool ccsStringToButtonBinding (char            *binding,
-                       CCSSettingButtonValue *button)
+cdef extern Bool ccsStringToKeyBinding (char *               binding,
+                                        CCSSettingKeyValue * key)
+cdef extern Bool ccsStringToButtonBinding (char *                  binding,
+                                           CCSSettingButtonValue * button)
 
 '''General settings handling'''
 cdef extern Bool ccsSetValue (CCSSetting * setting,
                   CCSSettingValue * value)
 cdef extern void ccsFreeSettingValue (CCSSettingValue * value)
 cdef extern CCSSettingValueList * ccsSettingValueListAppend (
-                    CCSSettingValueList * l,
-                    CCSSettingValue * v)
-cdef extern CCSSettingList *ccsSettingListFree (CCSSettingList *list,
-                        Bool freeObj)
+                                        CCSSettingValueList * l,
+                                        CCSSettingValue *     v)
+cdef extern CCSSettingList *ccsSettingListFree (CCSSettingList * list,
+                                                Bool             freeObj)
 
 '''Profiles'''
 cdef extern CCSStringList * ccsGetExistingProfiles (CCSContext * context)
@@ -311,19 +311,19 @@ cdef extern void ccsProcessEvents (CCSContext * context, unsigned int flags)
 '''Import/export'''
 cdef extern Bool ccsExportToFile (CCSContext * context, char * fileName)
 cdef extern Bool ccsImportFromFile (CCSContext * context,
-                    char * fileName,
-                    Bool overwrite)
+                                    char *       fileName,
+                                    Bool         overwrite)
 
 '''Misc. Plugin/Setting utils'''
 cdef extern Bool ccsSettingIsReadOnly (CCSSetting * setting)
 cdef extern Bool ccsSettingIsIntegrated (CCSSetting * setting)
 
 cdef extern void ccsPluginConflictListFree (CCSPluginConflictList * l,
-                        Bool FreOBJ)
+                                            Bool                    freeObj)
 cdef extern CCSPluginConflictList * ccsCanEnablePlugin (CCSContext * c,
-                            CCSPlugin * p)
+                                                        CCSPlugin *  p)
 cdef extern CCSPluginConflictList * ccsCanDisablePlugin (CCSContext * c,
-                             CCSPlugin * p)
+                                                         CCSPlugin *  p)
 
 cdef extern Bool ccsPluginSetActive (CCSPlugin * p, Bool v)
 cdef extern Bool ccsPluginIsActive (CCSContext * c, char * n)
@@ -399,10 +399,11 @@ cdef object SettingListToList (Context context, CCSList * settingList):
     while settingList:
         ccsSetting = <CCSSetting *> settingList.data
         setting = None
+        plugin = context.Plugins[ccsSetting.parent.name]
         if ccsSetting.isScreen:
-            setting = context.Plugins[ccsSetting.parent.name].Screens[ccsSetting.screenNum][ccsSetting.name]
+            setting = plugin.Screens[ccsSetting.screenNum][ccsSetting.name]
         else:
-            setting = context.Plugins[ccsSetting.parent.name].Display[ccsSetting.name]
+            setting = plugin.Display[ccsSetting.name]
         list.append (setting)
         settingList = settingList.next
     
@@ -417,9 +418,9 @@ cdef object IntDescListToDict (CCSIntDescList * intDescList):
         intDescList = intDescList.next
     return dict
 
-cdef CCSSettingValue * EncodeValue (object data,
+cdef CCSSettingValue * EncodeValue (object       data,
                                     CCSSetting * setting,
-                                    Bool isListChild):
+                                    Bool         isListChild):
     cdef CCSSettingValue * bv
     cdef CCSSettingType t
     cdef CCSList * l
@@ -479,60 +480,60 @@ cdef object DecodeValue (CCSSettingValue * value):
     t = GetType (value)
     if t == TypeString:
         return value.value.asString
-    if t == TypeMatch:
+    elif t == TypeMatch:
         return value.value.asMatch
-    if t == TypeBool:
+    elif t == TypeBool:
         if value.value.asBool:
             return True
         return False
-    if t == TypeInt:
+    elif t == TypeInt:
         return value.value.asInt
-    if t == TypeFloat:
+    elif t == TypeFloat:
         return value.value.asFloat
-    if t == TypeColor:
+    elif t == TypeColor:
         return [value.value.asColor.color.red,
                 value.value.asColor.color.green,
                 value.value.asColor.color.blue,
                 value.value.asColor.color.alpha]
-    if t == TypeKey:
+    elif t == TypeKey:
         s = ccsKeyBindingToString (&value.value.asKey)
         if s != NULL:
             ks = s
             free (s)
         else:
-            ks = 'None'
+            ks = "None"
         return ks
-    if t == TypeButton:
+    elif t == TypeButton:
         s = ccsButtonBindingToString (&value.value.asButton)
         if s != NULL:
             bs = s
             free (s)
         else:
-            bs = 'None'
-        if bs == 'Button0':
-            bs = 'None'
+            bs = "None"
+        if bs == "Button0":
+            bs = "None"
         return bs
-    if t == TypeEdge:
+    elif t == TypeEdge:
         s = ccsEdgesToString (value.value.asEdge)
         if s != NULL:
             es = s
             free (s)
         else:
-            es = 'None'
+            es = "None"
         return es
-    if t == TypeBell:
+    elif t == TypeBell:
         bb = False
         if value.value.asBell:
             bb = True
         return bb
-    if t == TypeList:
+    elif t == TypeList:
         lret = []
         l = value.value.asList
         while l != NULL:
             lret.append (DecodeValue (<CCSSettingValue *> l.data))
             l=l.next
         return lret
-    return 'Unhandled'
+    return "Unhandled"
 
 cdef class Setting:
     cdef CCSSetting * ccsSetting
@@ -602,7 +603,7 @@ cdef class Setting:
             if self.ccsSetting.hints == '':
                 return []
             else:
-                return str (self.ccsSetting.hints).split (';')[:-1]
+                return str (self.ccsSetting.hints).split (";")[:-1]
 
     property IsDefault:
         def __get__ (self):
@@ -697,22 +698,24 @@ cdef class Plugin:
         rank = 0
         while setlist != NULL:
             sett = <CCSSetting *> setlist.data
+
+            subgroup = self.groups[sett.group][sett.subGroup]
+
             if sett.isScreen:
-                self.screens[sett.screenNum][sett.name] = Setting (self,
-                                                                   sett.name,
-                                                                   True,
-                                                                   sett.screenNum)
-                self.groups[sett.group][sett.subGroup].Screens[sett.screenNum][
-                        sett.name]= self.screens[sett.screenNum][sett.name]
+                setting = Setting (self, sett.name, True, sett.screenNum)
+                self.screens[sett.screenNum][sett.name] = setting
+                subgroup.Screens[sett.screenNum][sett.name] = setting
             else:
-                self.display[sett.name] = Setting (self, sett.name, False)
-                self.groups[sett.group][sett.subGroup].Display[sett.name] = \
-                                                        self.display[sett.name]
+                setting = Setting (self, sett.name, False)
+                self.display[sett.name] = setting
+                subgroup.Display[sett.name] = setting
+
             if not self.ranking.has_key (sett.name):
                 self.ranking[sett.name] = rank
                 rank = rank + 1
             
             setlist = setlist.next
+
         self.loaded = True
 
     property Context:
@@ -817,8 +820,8 @@ cdef class Plugin:
                 return []
 
             ret = []
-            pl = ccsCanDisablePlugin(self.context.ccsContext,
-                                     self.ccsPlugin)
+            pl = ccsCanDisablePlugin (self.context.ccsContext,
+                                      self.ccsPlugin)
             pls = pl
             while pls != NULL:
                 pc = <CCSPluginConflict *> pls.data
@@ -919,9 +922,11 @@ cdef class Context:
             self.ccsContext = ccsContextNew (screensBuf, nScreens)
         else:
             self.ccsContext = ccsEmptyContextNew (screensBuf, nScreens)
+        free (screensBuf)
+
         for plugin in plugins:
             self.LoadPlugin (plugin)
-        free (screensBuf)
+
         ccsReadSettings (self.ccsContext)
         pll = self.ccsContext.plugins
         self.categories = {}
@@ -977,17 +982,18 @@ cdef class Context:
             self.profiles[profileName] = Profile (self, profileName)
             profileList = profileList.next
 
-        self.backends={}
+        self.backends = {}
         cdef CCSBackendInfoList * backendList
         cdef CCSBackendInfo * backendInfo
-        backendList=ccsGetExistingBackends ()
+        backendList = ccsGetExistingBackends ()
         while backendList != NULL:
             backendInfo = <CCSBackendInfo *> backendList.data
-            info = (backendInfo.name, backendInfo.shortDesc, backendInfo.longDesc, \
-                    backendInfo.profileSupport, backendInfo.integrationSupport)
+            info = (backendInfo.name, backendInfo.shortDesc,
+                    backendInfo.longDesc, backendInfo.profileSupport,
+                    backendInfo.integrationSupport)
             self.backends[backendInfo.name] = Backend (self, info)
-            backendList=backendList.next
-        self.currentBackend=self.backends[ccsGetBackend (self.ccsContext)]
+            backendList = backendList.next
+        self.currentBackend = self.backends[ccsGetBackend (self.ccsContext)]
     
     def ResetProfile (self):
         ccsSetProfile (self.ccsContext, "")
@@ -1036,7 +1042,8 @@ cdef class Context:
         def __set__ (self, value):
             cdef CCSSettingList * settingList
             if self.ccsContext.changedSettings != NULL:
-                self.ccsContext.changedSettings = ccsSettingListFree (self.ccsContext.changedSettings, False)
+                self.ccsContext.changedSettings = \
+                    ccsSettingListFree (self.ccsContext.changedSettings, False)
             if value != None and len (value) != 0:
                 settingList = ListToSettingList (value)
                 self.ccsContext.changedSettings = settingList

commit 7e924fcba1954c4cfb6ac0d11e8de84bd55d2dbd
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Wed Aug 22 20:07:24 2007 +0200

    * Fix coding style

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index dcd7a81..d95e25c 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -518,7 +518,7 @@ cdef object DecodeValue (CCSSettingValue * value):
             es = s
             free (s)
         else:
-            es='None'
+            es = 'None'
         return es
     if t == TypeBell:
         bb = False

commit cd2549a6521a317e1dbce773ed1abdd8b7dcc4e5
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Wed Aug 22 00:59:01 2007 +0200

    * Minor coding style cleanup & authors update

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index 06c47b8..dcd7a81 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -1,19 +1,24 @@
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
-# Authors: Quinn Storm (quinn@beryl-project.org)
-# Copyright (C) 2007 Quinn Storm
+'''
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+Authors:
+    Quinn Storm (quinn@beryl-project.org)
+    Patrick Niklaus (marex@opencompositing.org)
+    Guillaume Seguin (guillaume@segu.in)
+Copyright (C) 2007 Quinn Storm
+'''
 
 ctypedef unsigned int Bool
 

commit d7557ea91db5f0f887e22704878fbc6de21b97a9
Author: Guillaume Seguin <guillaume@segu.in>
Date:   Wed Aug 22 00:51:15 2007 +0200

    * Major reindent & coding style cleanup

diff --git a/src/compizconfig.pyx b/src/compizconfig.pyx
index 87b3fbb..06c47b8 100644
--- a/src/compizconfig.pyx
+++ b/src/compizconfig.pyx
@@ -18,56 +18,59 @@
 ctypedef unsigned int Bool
 
 cdef enum CCSSettingType:
-	TypeBool
-	TypeInt
-	TypeFloat
-	TypeString
-	TypeColor
-	TypeMatch
-	TypeList
-	TypeKey
-	TypeButton
-	TypeEdge
-	TypeBell
-	TypeNum


Reply to: