From 3690ed424760ca6ec230887465f1f2541c5c863a Mon Sep 17 00:00:00 2001 From: SoaS user Date: Tue, 02 Mar 2010 17:35:42 +0000 Subject: auto default font sizing for XO's and versions of SoaS through 0.88 --- diff --git a/activity/activity.info b/activity/activity.info index d39ca23..9808ca6 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -5,7 +5,7 @@ name = OurMusic bundle_id = org.laptop.OurMusic icon = activity-ourmusic -activity_version = 2 +activity_version = 3 host_version = 1 diff --git a/csndsugui.py b/csndsugui.py index d97e279..5f7574e 100644 --- a/csndsugui.py +++ b/csndsugui.py @@ -60,10 +60,13 @@ class BasicGUI: if os.path.exists("/etc/olpc-release") or os.path.exists("/etc/power/olpc-pm"): mult = width * .00082 elif os.path.exists("/etc/fedora-release"): - if open("/etc/fedora-release").read().find("Strawberry") != -1: + release = open("/etc/fedora-release").read() + if release.find("SoaS release 1 ") != -1: mult = width * .00132 - elif open("/etc/fedora-release").read().find("Blueberry") != -1: + elif release.find("SoaS release 2 ") != -1: mult = width * .00085 + elif release.find("SoaS release 3 ") != -1: + mult = width * .00119 font.set_size(int(font_size * mult)) widget.modify_font(font) diff --git a/ourmusic.py b/ourmusic.py index 13d3e64..2cecb41 100644 --- a/ourmusic.py +++ b/ourmusic.py @@ -11,11 +11,8 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# version 2 12/18/09 Additions: -# optional scrollbars -# auto default font sizing for XO and all versions of SoaS -# ready for basic font size adjustment by user or deployment -# works with SoaS Strawberry (Sugar 0.84) after installing csound-python +# version 3 2/26/10 Additions: +# auto default font sizing for XO's and versions of SoaS through 0.88 # # Notes: # @@ -292,3 +289,4 @@ Q-I tones (8) on/off\n[A-; harmonics (10)]\n[Z-/ pan position]\n\ self.but = self.w.cbbutton(self.b3, self.playcsd, "START !") self.but.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0x7700, 0)) self.but.modify_bg(gtk.STATE_PRELIGHT, gtk.gdk.Color(0, 0x7700, 0)) + -- cgit v0.9.1