From b5a0eebacc8be3de27975822a3d44e568e4861c9 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 11 Jul 2012 22:13:36 +0000 Subject: force palette loading order to default ordering --- (limited to 'plugins') diff --git a/plugins/accelerometer/accelerometer.py b/plugins/accelerometer/accelerometer.py index 0bdd6a0..26aefd4 100644 --- a/plugins/accelerometer/accelerometer.py +++ b/plugins/accelerometer/accelerometer.py @@ -46,7 +46,8 @@ class Accelerometer(Plugin): # set up accelerometer specific blocks palette = make_palette('sensor', colors=["#FF6060", "#A06060"], - help_string=_('Palette of sensor blocks')) + help_string=_('Palette of sensor blocks'), + position=6) primitive_dictionary['xyz'] = self.prim_xyz if self._status: diff --git a/plugins/audio_sensors/audio_sensors.py b/plugins/audio_sensors/audio_sensors.py index 0ec383c..7cc42ba 100644 --- a/plugins/audio_sensors/audio_sensors.py +++ b/plugins/audio_sensors/audio_sensors.py @@ -72,7 +72,8 @@ class Audio_sensors(Plugin): palette = make_palette('sensor', colors=["#FF6060", "#A06060"], - help_string=_('Palette of sensor blocks')) + help_string=_('Palette of sensor blocks'), + position=6) primitive_dictionary['sound'] = self.prim_sound primitive_dictionary['volume'] = self.prim_volume diff --git a/plugins/camera_sensor/camera_sensor.py b/plugins/camera_sensor/camera_sensor.py index e32fe54..ebbd5e8 100644 --- a/plugins/camera_sensor/camera_sensor.py +++ b/plugins/camera_sensor/camera_sensor.py @@ -54,10 +54,12 @@ class Camera_sensor(Plugin): sensors_palette = make_palette('sensor', colors=["#FF6060", "#A06060"], help_string=_( - 'Palette of sensor blocks')) + 'Palette of sensor blocks'), + position=6) media_palette = make_palette('media', colors=["#A0FF00", "#80A000"], - help_string=_('Palette of media objects')) + help_string=_('Palette of media objects'), + position=7) # set up camera-specific blocks primitive_dictionary['read_camera'] = self.prim_read_camera diff --git a/plugins/light_sensor/light_sensor.py b/plugins/light_sensor/light_sensor.py index 8384474..bd5655e 100644 --- a/plugins/light_sensor/light_sensor.py +++ b/plugins/light_sensor/light_sensor.py @@ -46,7 +46,8 @@ class Light_sensor(Plugin): # set up light-sensor specific blocks palette = make_palette('sensor', colors=["#FF6060", "#A06060"], - help_string=_('Palette of sensor blocks')) + help_string=_('Palette of sensor blocks'), + position=6) primitive_dictionary['lightsensor'] = self.prim_lightsensor if self._status: diff --git a/plugins/rfid/rfid.py b/plugins/rfid/rfid.py index e607eba..de96a1f 100644 --- a/plugins/rfid/rfid.py +++ b/plugins/rfid/rfid.py @@ -83,7 +83,8 @@ class Rfid(Plugin): primitive_dictionary['rfid'] = self.prim_read_rfid palette = make_palette('sensor', colors=["#FF6060", "#A06060"], - help_string=_('Palette of sensor blocks')) + help_string=_('Palette of sensor blocks'), + position=6) if self._status: palette.add_block('rfid', diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py index 7fdacf9..be25fdc 100644 --- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py +++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py @@ -79,10 +79,10 @@ class Turtle_blocks_extras(Plugin): # set up Turtle Block palettes self._flow_palette() - self._media_palette() - self._sensor_palette() + self._media_palette() + self._extras_palette() self._portfolio_palette() @@ -114,6 +114,15 @@ boolean operators from Numbers palette')) help_string=_('do-until-True operator that uses \ boolean operators from Numbers palette')) + primitive_dictionary['clamp'] = self._prim_clamp + palette.add_block('sandwichclamp', + style='clamp-style-collapsible', + label=' ', + special_name=_('top'), + prim_name='clamp', + help_string=_('top of a collapsible stack')) + self.tw.lc.def_prim('clamp', 1, primitive_dictionary['clamp'], True) + def _media_palette(self): palette = make_palette('media', @@ -671,15 +680,6 @@ module found in the Journal')) label=_('turtle shell'), help_string=_("put a custom 'shell' on the turtle")) - primitive_dictionary['clamp'] = self._prim_clamp - palette.add_block('sandwichclamp', - style='clamp-style-collapsible', - label=' ', - special_name=_('top'), - prim_name='clamp', - help_string=_('top of a collapsible stack')) - self.tw.lc.def_prim('clamp', 1, primitive_dictionary['clamp'], True) - palette.add_block('sandwichclampcollapsed', hidden=True, style='clamp-style-collapsed', -- cgit v0.9.1