Commit 4fe0d94c authored by John (J5) Palmieri's avatar John (J5) Palmieri

make the overrides file git friendly by appending to __all__ after each override

* modifying the __all__ line for each override would confuse git as
  each override needs to get seperate approval before comitting.  Because of
  this commits would not always go in in the same order as they are created.
  Also different people working on the same file would start from different
  commit states.  This caused conflicts when patches were merged.
* instead of modifying a single hard coded list we now append to the list
  after each override.  This creates distinct blocks of changed text
  which will not conflict
parent 49321b93
......@@ -23,9 +23,10 @@ from ..importer import modules
GIMarshallingTests = modules['GIMarshallingTests']
__all__ = []
OVERRIDES_CONSTANT = 7
__all__.append('OVERRIDES_CONSTANT')
class OverridesStruct(GIMarshallingTests.OverridesStruct):
......@@ -40,7 +41,7 @@ class OverridesStruct(GIMarshallingTests.OverridesStruct):
return GIMarshallingTests.OverridesStruct.method(self) / 7
OverridesStruct = override(OverridesStruct)
__all__.append('OverridesStruct')
class OverridesObject(GIMarshallingTests.OverridesObject):
......@@ -63,7 +64,4 @@ class OverridesObject(GIMarshallingTests.OverridesObject):
return GIMarshallingTests.OverridesObject.method(self) / 7
OverridesObject = override(OverridesObject)
__all__ = ['OVERRIDES_CONSTANT', 'OverridesStruct', 'OverridesObject']
__all__.append('OverridesObject')
......@@ -24,6 +24,7 @@ from ..importer import modules
Gdk = modules['Gdk']
__all__ = []
class Rectangle(Gdk.Rectangle):
......@@ -42,7 +43,7 @@ class Rectangle(Gdk.Rectangle):
self.x, self.y, self.width, self.height)
Rectangle = override(Rectangle)
__all__.append('Rectangle')
class Color(Gdk.Color):
......@@ -59,15 +60,14 @@ class Color(Gdk.Color):
return '<Gdk.Color(red=%d, green=%d, blue=%d)>' % (self.red, self.green, self.blue)
Color = override(Color)
__all__.append('Color')
class Drawable(Gdk.Drawable):
def cairo_create(self):
return Gdk.cairo_create(self)
Drawable = override(Drawable)
__all__ = ['Rectangle', 'Color', 'Drawable']
__all__.append('Drawable')
import sys
......
......@@ -26,6 +26,7 @@ from ..types import override
from ..importer import modules
Gtk = modules['Gtk']
__all__ = []
class ActionGroup(Gtk.ActionGroup):
def add_actions(self, entries):
......@@ -179,6 +180,7 @@ class ActionGroup(Gtk.ActionGroup):
first_action.connect('changed', on_change)
ActionGroup = override(ActionGroup)
__all__.append('ActionGroup')
class UIManager(Gtk.UIManager):
def add_ui_from_string(self, buffer):
......@@ -190,6 +192,7 @@ class UIManager(Gtk.UIManager):
return Gtk.UIManager.add_ui_from_string(self, buffer, length)
UIManager = override(UIManager)
__all__.append('UIManager')
class Builder(Gtk.Builder):
......@@ -239,6 +242,7 @@ class Builder(Gtk.Builder):
return Gtk.Builder.add_objects_from_string(self, buffer, length, object_ids)
Builder = override(Builder)
__all__.append('Builder')
class Dialog(Gtk.Dialog):
......@@ -283,8 +287,7 @@ class Dialog(Gtk.Dialog):
raise TypeError('Must pass an even number of arguments')
Dialog = override(Dialog)
__all__ = ['ActionGroup', 'Builder', 'Dialog', 'UIManager']
__all__.append('Dialog')
import sys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment