[chirp_devel] [PATCH 3 of 3] [ft8x7] React correctly on deletion of special memories

Dan Smith
Thu Apr 19 08:18:09 PDT 2012


> # HG changeset patch
> # User Marco Filippi <iz3gme.marco at gmail.com>
> # Date 1334846665 -7200
> # Node ID 3caf35f8a005be15e9dfc339a9613579e15f02e2
> # Parent  f7f98e5d8d1bd29bb0fcf42b8ed959a4ccab8b43
> [ft8x7] React correctly on deletion of special memories

This and the patch 2/3 needs a bug number :)

>      def get_memory(self, number):
>          if isinstance(number, str):
>              return self._get_special(number)
> +        elif number < 0:
> +            # I can't stop delete operation from loosing extd_number but I know how to get it back

Is this comment misplaced?

>      def _set_special(self, mem):
> -        cur_mem = self._get_special(mem.extd_number)
> +        if mem.empty:
> +            # can't delete special memories!
> +            return

Can you throw an exception here like you do when the user tries to
delete memory #1? I need to make the UI show that error to the user, and
once I do, it would be good to have this one behave the same. Looks like
this needs to be done for the other similar places as well.

>      def get_memory(self, number):
>          if number in self.SPECIAL_60M.keys():
>              return self._get_special_60M(number)
> +        elif number < 0 and self.SPECIAL_MEMORIES_REV[number] in self.SPECIAL_60M.keys():
> +            # I can't stop delete operation from loosing extd_number but I know how to get it back

Is this one misplaced also?

Thanks for getting this resolved so quickly!

-- 
Dan Smith
www.danplanet.com
KK7DS

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20120419/1e11db51/attachment-0001.bin 


More information about the chirp_devel mailing list