Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugardummy.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugardummy.py')
-rw-r--r--sugardummy.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/sugardummy.py b/sugardummy.py
index 5ebea5e..58f8151 100644
--- a/sugardummy.py
+++ b/sugardummy.py
@@ -12,6 +12,7 @@ class activity:
def __init__(self, handle):
self.window = gtk.Window()
+ self.window.set_size_request(1200, 900)
self.window.set_title("Roots")
self.window.connect("destroy", self.on_close)
self.metadata = {}
@@ -33,6 +34,7 @@ class activity:
def set_toolbox(self, toolbox):
self._toolbox = toolbox
+ self._toolbox.set_size_request(1200, 120)
def read_file(self, file_path):
pass
@@ -92,4 +94,39 @@ class ToolButton:
def connect(self, event, callback):
self.methods[event] = callback
+
+# Dummy class for presence
+class PresenceService:
+ "Class used to generate unique identifier"
+
+ class __impl:
+ "Singleton class"
+ def __init__(self):
+ self.props = Props()
+
+ def get_instance(self):
+ return self
+
+ def get_owner(self):
+ return self
+
+ __instance=None
+
+ def __init__(self):
+ "Constructor, create Singleton if don't exist"
+ if PresenceService.__instance is None:
+ PresenceService.__instance = PresenceService.__impl()
+
+ self.__dict__['_PresenceService__instance'] = PresenceService.__instance
+
+ def __getattr__(self, attr):
+ "Pass attr retrieving to Singleton"
+ return getattr(self.__instance, attr)
+
+# Dummy class for presence props
+class Props:
+
+ def __init__(self):
+ self.nick = "XO name"
+presenceservice = PresenceService()