Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  a problem with creating shortcuts
« previous next »
  • Print
Pages: [1]

Author Topic: a problem with creating shortcuts  (Read 3680 times)

Offline jiriholz

  • Member
  • *
  • Posts: 12
a problem with creating shortcuts
« on: February 28, 2012, 01:50:15 PM »
Hello,
I triet to create shortcut to talk the time.
Rockbox says empty
I created file shortcuts.txt with ansi code as follows

[shortcut]
type: time
data: talk
name: time
talkclip: time.talk
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: a problem with creating shortcuts
« Reply #1 on: February 28, 2012, 06:46:23 PM »
hmm, not sure. That looks correct.
shortcuts.txt is only loaded the first time you enter the menu. Does rebooting help? (also the talkclip needs the full filepath)
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline jiriholz

  • Member
  • *
  • Posts: 12
Re: a problem with creating shortcuts
« Reply #2 on: February 29, 2012, 03:12:37 AM »
I tried it without a talkclip and it doesnot work. Restarting player doesnot help.
Logged

Offline Burrhus

  • Member
  • *
  • Posts: 12
Re: a problem with creating shortcuts
« Reply #3 on: March 09, 2012, 02:56:23 PM »
Something a bit strange, but...

I had difficult times making shortcuts.txt, inorder to set up a timer. My shortcuts wouldn't even appear in the RockBox shortcuts menu, just like you !!!

Finally I made it. The trick for me is to find a way to make a text files, with lines ending by <LF> (or chr$10, for Line Feed), instead of <CR>+<LF> (the <CR> standing for chr$13, or Carriage Return).

I mean : if in windows you open your textfile with notepad++, making all the characters visible, your textfile might show as :
[shortcut]<CR><LF>
type: time<CR><LF>
data: talk<CR><LF>
name: time<CR><LF>
talkclip: time.talk<CR><LF>


Instead, inorder to have something working, you should have something like :
[shortcut]<LF>
type: time<LF>
data: talk<LF>
name: time<LF>
talkclip: time.talk<LF>


How did I made it, in windows environment ?
1. Adding a few shortcuts lines in the shortcuts.txt, using the rockboxk interface, with <LF> only. How ? Within the RockBox environment on my Sansa Clip+, while navigating in the folders, while having highlighted a track, holding the central key to make appear the context menu, then select 'Add to shortcuts'. Repeating a few times inorder to generate a file containing as many shortcuts as needed, maybe more.

2.Using Notepad++ as text editor, I open the shortcuts.txt file, and I make all the characters in the text file visible, so I can see the <LF>. Then I change the content in the text, carefully avoiding to manipulate the <LF> items. Then I delete the unneeded part of the file.

3. Saving the file to the .rockbox directory.

It did it with your shortcut, adding it to my shortcuts menu, the shortcut now appears. It doesn't do anything, but I think this is another business :  I am now going to activate the speech on my Sansa Clip+, and retry... ;-P

Regards,
Burrhus.
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: a problem with creating shortcuts
« Reply #4 on: March 09, 2012, 04:13:36 PM »
We should probably fix the code that reads the shortcut files to be more flexible about line endings, then. Could you report a bug for this?
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: a problem with creating shortcuts
« Reply #5 on: March 10, 2012, 09:33:10 AM »
well shortcuts doesnt d anything special, it just uses readline() and settings_parseline(), so not sure why crlf is causing problems.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline jiriholz

  • Member
  • *
  • Posts: 12
Re: a problem with creating shortcuts
« Reply #6 on: March 13, 2012, 10:59:59 AM »
I have created shortcuts with lf line ending successfully I would like to set a language from shortcuts. the shortcut appears, but no effect. I wrote this [shortcut]
type:setting
data:lang
/.rockbox/langs/Czech.lng
name:Czech
talkclip:/.rockbox/ozvuceni/Czech.talk

Quote from: JdGordon on March 10, 2012, 09:33:10 AM
well shortcuts doesnt d anything special, it just uses readline() and settings_parseline(), so not sure why crlf is causing problems.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: a problem with creating shortcuts
« Reply #7 on: March 13, 2012, 06:15:30 PM »
type:file
data:/.rockbox/langs/Czech.lng
name:Czech
talkclip:/.rockbox/ozvuceni/Czech.talk
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline ThisIsMikeHere

  • Member
  • *
  • Posts: 1
Re: a problem with creating shortcuts
« Reply #8 on: May 25, 2012, 10:49:49 AM »
I just had the same problem with rockbox v3.11.2, on sansa clip+. As mentioned a reboot is required to read a changed file.

A file shortcuts.txt using LF (0x0A) works - UNIX format.
A file shortcuts.txt using CRLF (0x0D, 0x0A) fails - PC format.

I use textpad and there they use the terms UNIX/PC for the two filetypes.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: a problem with creating shortcuts
« Reply #9 on: July 05, 2012, 09:03:21 AM »
Fixed... finally! try the next dev build
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  a problem with creating shortcuts
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.14 seconds with 22 queries.