Cicada Menu Enhancement completed

6 views
Skip to first unread message

SteveM

unread,
Oct 4, 2011, 3:04:05 PM10/4/11
to Cicada
Well I haven't built my first Cicada app yet (working on it) but I
have made a couple of changes to Cicada based on what I've read might
be useful...

1. MENU - using the up and down keys now just moves the highlight
within the menu rather than keep on repositioning the selected item
towards the middle.
2. MENU - using Key Up on the first app goes circular and selects the
last app scrolling the menu so that the last app is positioned on the
last visible line provided there are sufficient apps to do so. (E.g.
if there are only 2 apps then it would be placed on line 2).
3. MENU - using Key Down on the last app goes circular and selects the
first app placing it on the top of the menu
4. MENU - keying off the top or off the bottom brings the newly
selected app to the centre and fills either side (adjusting if there
are insufficient apps to fill updwards)

Items 1 and 2 are fully tested.

Items 3 and 4 are visually inspected because I don't have enough apps
to overflow the screen.

If you're interested in the mods, I'd be most pleased to hand them
back, but I'm also a Github newbie (quite happy with SVN, TFS, CVS and
SourceSafe) so you'll need to advise how to do it :)

Joe Hughes

unread,
Oct 4, 2011, 5:48:27 PM10/4/11
to Cicada
Steve, thanks for helping out! I'd definitely like to try out and
likely integrate your changes. Ideally, you could put your changes
into a fork of the main Cicada project, then send a pull request as
described here:
http://help.github.com/send-pull-requests/

I'm haven't done much collaborative development on GitHub yet, but at
least they do seem to have some useful guides. I'm happy to take some
time to try to sort out the collaboration model with you here or on
the #metawatch IRC,

Cheers,
Joe

SteveM

unread,
Oct 6, 2011, 1:49:36 PM10/6/11
to Cicada
Hi Joe,

I will try following that link and share what I've done; but first...

I did a further change that wasn't successful but maybe you could tell
me whether it's possible to make it successful?

If it can work then we should include that too, otherwise I should
back out that change.

Here's the detail...

I added code to check whether the de-selected item and the newly
selected item are both on the same screen and the screen has not
scrolled. In which case it doesn't paint the whole screen but repaints
just the de-selected item and the newly selected item in the
appropriate colours.

Somehow I figured that would only update those parts of the display
leaving the rest untouched and that therefore the change of menu
option would be really quick.

What happened is that those two options came out fine and all the rest
disappeared into blank space.

Was I imagining that I read somewhere that the underlying services
only paint the pixels that have changed?

Kind Regards
Steve

Joe Hughes

unread,
Oct 6, 2011, 7:34:05 PM10/6/11
to Cicada
Hey Steve,

At this point, Cicada automatically avoids sending unchanged lines to
the watch, so you don't need to do anything else in a Cicada-
compatible app to benefit from this. It just compares the new
generated pixel buffer with the last one it sent.

On the app side, the canvas that gets passed in to the onDraw() method
is cleared every time before you get it, so that's why you're getting
the unexpected behavior you're seeing.

I'm looking forward to integrating your original change to get rid of
the "scrolling" effect on App List. This by itself should improve the
responsiveness, as Cicada will only be sending the display rows that
make up the newly selected and unselected app names.

Cheers,
Joe

SteveM

unread,
Oct 7, 2011, 4:00:00 AM10/7/11
to Cicada
Hi Joe,

Sorry to be a newbie pain but I'm going to need more help in order to
upload my changes...

The links to which you pointed earlier tell how to fork an existing
repository into your own github repo (which becomes the "origin"
apparently) and to refer back to the original (the "remote") and then
how to request a pull.

However, when I followed the original instructions to obtain the
Cicada code base it would appear that I have a repo on my development
PC but Github shows that I have zero repositories in my Github
account. That means I cannot follow the instructions as written.

Not knowing much about how Git and Github work I don't want to
accidentally overwrite anything by attempting to upload my local repo,
neither do I wish to accidentally overwrite my local repo and lose the
work I've done.

I could research how to upload my repo to a new Github repo in my
account and issue a pull request from there, but I don't know whether
Git would then succeed in maintaining the relationship between the
repos - i.e. whether they have to fork from a common origin or whether
Git will be happy that they have the same names but varying content
and file dates.

Are you able to provide any pointers to put me straight on this?

If not, we can both back up our repositories and I can try it anyway
and see what happens?

I'll wait to hear back from you. Meanwhile, I have a backup of my repo
so I'll try the first stage of uploading it into my Git account and
then wait for further advice.

Kind Regards
Steve
> > > > SourceSafe) so you'll need to advise how to do it :)- Hide quoted text -
>
> - Show quoted text -

SteveM

unread,
Oct 7, 2011, 4:31:46 AM10/7/11
to Cicada
OK. I've figured out how to do it, so pull request waiting for you :)

On Oct 7, 12:34 am, Joe Hughes <joe.hughes.c...@gmail.com> wrote:

Joe Hughes

unread,
Oct 7, 2011, 8:15:06 AM10/7/11
to Cicada
Thanks, Steve! I've taken a look at the change branch and added some
comments:
https://github.com/cicada-dev/cicada/pull/1

Cheers,
Joe
Reply all
Reply to author
Forward
0 new messages