Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-12-07 17:40:37 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-12-07 17:40:37 (GMT)
commit2ec1c9462dd41c1aefa0a66b84fbf04725100488 (patch)
tree176c5ea323de3bc315b4aa84d2d4c9cbbc587e1a
parentf39f6f9d154d6b12bdb48f1297f5c31e62a166bc (diff)
Add link to Colors gallery.
-rwxr-xr-xcolors.py30
-rw-r--r--icons/web.svg13
2 files changed, 43 insertions, 0 deletions
diff --git a/colors.py b/colors.py
index 2a9cc56..d0da1da 100755
--- a/colors.py
+++ b/colors.py
@@ -632,6 +632,17 @@ class Colors(activity.Activity, ExportedGObject):
btn.connect('clicked', self.on_sample)
samplebox.insert(btn, -1)
self.samplebtns.append(btn)
+
+ self.webbtn = toolbutton.ToolButton('web')
+ self.webbtn.set_tooltip(_("Colors! Gallery"))
+ self.webbtn.connect('clicked', self.on_web)
+
+ self.samplesep = gtk.SeparatorToolItem()
+ self.samplesep.set_draw(False)
+ self.samplesep.set_expand(True)
+
+ samplebox.insert(self.samplesep, -1)
+ samplebox.insert(self.webbtn, -1)
toolbar = activity.ActivityToolbox(self)
toolbar.add_toolbar(_("Paint"),paintbox)
@@ -1977,6 +1988,25 @@ class Colors(activity.Activity, ExportedGObject):
pass
#-----------------------------------------------------------------------------------------------------------------
+ # Open Web page to find more paintings.
+
+ def on_web(self, event):
+ # Create the new journal entry
+ fileObject = datastore.create()
+ fileObject.metadata['title'] = _('Colors! Gallery')
+ fileObject.metadata['mime_type'] = 'text/uri-list'
+ fileObject.metadata['icon-color'] = self.metadata['icon-color']
+ fileObject.file_path = os.path.join(self.get_activity_root(), 'instance', '%i' % time.time())
+ fd = open(fileObject.file_path, 'w')
+ try:
+ fd.write("http://colors.collectingsmiles.com/")
+ finally:
+ fd.close()
+ datastore.write(fileObject, transfer_ownership=True)
+ fileObject.destroy()
+ del fileObject
+
+ #-----------------------------------------------------------------------------------------------------------------
# PNG Export to Journal
def on_export_png(self, event):
diff --git a/icons/web.svg b/icons/web.svg
new file mode 100644
index 0000000..913e9f6
--- /dev/null
+++ b/icons/web.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
+<svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="activity-browse">
+ <circle cx="27.375" cy="27.5" display="inline" fill="#ffffff" r="19.903" stroke="#808080" stroke-width="3.5"/>
+ <g display="inline">
+ <path d="M27.376,7.598c0,0-11.205,8.394-11.205,19.976 c0,11.583,11.205,19.829,11.205,19.829" fill="#ffffff" stroke="#808080" stroke-width="3.5"/>
+ <path d="M27.376,7.598c0,0,11.066,9.141,11.066,19.976 c0,10.839-11.066,19.829-11.066,19.829" fill="#ffffff" stroke="#808080" stroke-width="3.5"/>
+ <line fill="#ffffff" stroke="#808080" stroke-width="3.5" x1="27.376" x2="27.376" y1="7.598" y2="47.402"/>
+ <line fill="#ffffff" stroke="#808080" stroke-width="3.5" x1="27.376" x2="27.376" y1="7.598" y2="47.402"/>
+ <line fill="#ffffff" stroke="#808080" stroke-width="3.5" x1="27.376" x2="27.376" y1="7.598" y2="47.402"/>
+ <line fill="#ffffff" stroke="#808080" stroke-width="3.5" x1="7.472" x2="47.278" y1="27.5" y2="27.5"/>
+ </g>
+</g></svg>
+