summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-29 15:10:07 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-29 15:10:07 +0000
commit2a31407513192a84167c217e7ba92d896eb8013b (patch)
treec9d686f2296941fa070849009070df3ce5f0e869 /apps
parentd5af4b0f48acb9c9b68e9df22871379fb5c4554f (diff)
Ondio FM: * Bugfix: Cancelling 'Auto Scan Presets' left the radio screen. * Put radio mode switch in radio menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8107 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/deutsch.lang30
-rw-r--r--apps/lang/english.lang13
-rw-r--r--apps/recorder/radio.c51
3 files changed, 66 insertions, 28 deletions
diff --git a/apps/lang/deutsch.lang b/apps/lang/deutsch.lang
index c00575f650..b91fbe140c 100644
--- a/apps/lang/deutsch.lang
+++ b/apps/lang/deutsch.lang
@@ -3164,7 +3164,7 @@ id: LANG_CROSSFADE_DURATION
desc: DEPRECATED
eng: ""
voice: ""
-new:
+new:
id: LANG_MIX
desc: in playback settings, crossfade option
@@ -3362,19 +3362,19 @@ id: LANG_RECORDING_MONITOR
desc: DEPRECATED
eng: ""
voice: ""
-new:
+new:
id: LANG_RADIO_SCAN_MODE
-desc: in radio screen
-eng: "Scan Mode"
+desc: in radio screen / menu
+eng: "Scan"
voice: ""
-new: "Abstimmmodus"
+new: "Abstimmen"
id: LANG_RADIO_PRESET_MODE
-desc: in radio screen
-eng: "Preset Mode"
+desc: in radio screen / menu
+eng: "Preset"
voice: ""
-new: "Sendermodus"
+new: "Sender"
id: LANG_FM_FREEZE
desc: splash screen during freeze in radio mode
@@ -3385,8 +3385,8 @@ new: "Anzeige eingefroren!"
id: LANG_CROSSFEED_ENABLE
desc: DEPRECATED
eng: ""
-voice:
-new:
+voice:
+new:
id: LANG_CROSSFEED
desc: in the sound settings menu
@@ -3402,7 +3402,7 @@ new: "Automatische Sendersuche"
id: LANG_FM_SCANNING
desc: during auto scan
-eng: "Scanning %d.%dMHz"
+eng: "Scanning %d.%01dMHz"
voice: ""
new: "Suche %d,%01dMHz"
@@ -3434,7 +3434,7 @@ id: VOICE_EXT_RWPS
desc: spoken only, for file extension
eng: ""
voice: "RWPS"
-new:
+new:
id: LANG_REMOTE_WHILE_PLAYING
desc: in settings_menu()
@@ -3453,3 +3453,9 @@ desc: in remote lcd settings menu
eng: "Reduce ticking"
voice: "Ticken verringern"
new: "Ticken verringern"
+
+id: LANG_FM_TUNE_MODE
+desc: in radio screen / menu
+eng: "Mode:"
+voice: ""
+new: "Modus:"
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 0ec34b9cba..40b84bbeab 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -3372,14 +3372,14 @@ voice: ""
new:
id: LANG_RADIO_SCAN_MODE
-desc: in radio screen
-eng: "Scan Mode"
+desc: in radio screen / menu
+eng: "Scan"
voice: ""
new:
id: LANG_RADIO_PRESET_MODE
-desc: in radio screen
-eng: "Preset Mode"
+desc: in radio screen / menu
+eng: "Preset"
voice: ""
new:
@@ -3461,3 +3461,8 @@ eng: "Reduce ticking"
voice: "Reduce ticking"
new:
+id: LANG_FM_TUNE_MODE
+desc: in radio screen / menu
+eng: "Mode:"
+voice: ""
+new:
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 2be0e26067..2ed2a68ef8 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -77,6 +77,7 @@
#define FM_EXIT (BUTTON_ON | BUTTON_REL)
#define FM_PRESET_ADD BUTTON_F1
#define FM_PRESET_ACTION BUTTON_F3
+
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
/* pause/play - short PLAY */
#define FM_PLAY_PRE BUTTON_ON
@@ -105,10 +106,12 @@
/* stop and exit radio - STOP */
#define FM_STOP BUTTON_OFF
#define FM_RC_STOP BUTTON_RC_STOP
+
#elif CONFIG_KEYPAD == ONDIO_PAD /* restricted keypad */
#define FM_MENU (BUTTON_MENU | BUTTON_REPEAT)
#define FM_RECORD_DBLPRE BUTTON_MENU
#define FM_RECORD (BUTTON_MENU | BUTTON_REL)
+#define FM_STOP_PRE BUTTON_OFF
#define FM_STOP (BUTTON_OFF | BUTTON_REL)
#define FM_EXIT (BUTTON_OFF | BUTTON_REPEAT)
#endif
@@ -377,10 +380,8 @@ bool radio_screen(void)
}
curr_preset = find_preset(curr_freq);
-#ifdef FM_MODE
if(curr_preset != -1)
radio_mode = RADIO_PRESET_MODE;
-#endif
#ifdef HAS_BUTTONBAR
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU), str(LANG_FM_BUTTONBAR_PRESETS),
@@ -431,6 +432,10 @@ bool radio_screen(void)
case FM_RC_STOP:
#endif
case FM_STOP:
+#ifdef FM_STOP_PRE
+ if (lastbutton != FM_STOP_PRE)
+ break;
+#endif
#ifndef SIMULATOR
if(audio_status() == AUDIO_STATUS_RECORD)
{
@@ -761,7 +766,7 @@ bool radio_screen(void)
if(update_screen || seconds > last_seconds)
{
last_seconds = seconds;
-
+
FOR_NB_SCREENS(i)
screens[i].setfont(FONT_UI);
@@ -786,12 +791,11 @@ bool radio_screen(void)
FOR_NB_SCREENS(i)
screens[i].puts_scroll(0, top_of_screen + 2, buf);
-#ifdef FM_MODE
- snprintf(buf, 128, radio_mode?str(LANG_RADIO_PRESET_MODE):
- str(LANG_RADIO_SCAN_MODE));
+ snprintf(buf, 128, "%s %s", str(LANG_FM_TUNE_MODE),
+ radio_mode ? str(LANG_RADIO_PRESET_MODE) :
+ str(LANG_RADIO_SCAN_MODE));
FOR_NB_SCREENS(i)
screens[i].puts_scroll(0, top_of_screen + 3, buf);
-#endif
if(audio_status() == AUDIO_STATUS_RECORD)
{
@@ -1185,7 +1189,8 @@ char monomode_menu_string[32];
static void create_monomode_menu(void)
{
- snprintf(monomode_menu_string, 32, "%s: %s", str(LANG_FM_MONO_MODE),
+ snprintf(monomode_menu_string, sizeof monomode_menu_string,
+ "%s: %s", str(LANG_FM_MONO_MODE),
global_settings.fm_force_mono?
str(LANG_SET_BOOL_YES):str(LANG_SET_BOOL_NO));
}
@@ -1199,6 +1204,25 @@ static bool toggle_mono_mode(void)
return false;
}
+#ifndef FM_MODE
+char radiomode_menu_string[32];
+
+static void create_radiomode_menu(void)
+{
+ snprintf(radiomode_menu_string, 32, "%s %s", str(LANG_FM_TUNE_MODE),
+ radio_mode ? str(LANG_RADIO_PRESET_MODE) :
+ str(LANG_RADIO_SCAN_MODE));
+}
+
+static bool toggle_radio_mode(void)
+{
+ radio_mode = (radio_mode == RADIO_SCAN_MODE) ?
+ RADIO_PRESET_MODE : RADIO_SCAN_MODE;
+ create_radiomode_menu();
+ return false;
+}
+#endif
+
static bool scan_presets(void)
{
bool tuned = false;
@@ -1249,9 +1273,7 @@ static bool scan_presets(void)
curr_freq = presets[0].frequency;
radio_set(RADIO_FREQUENCY, curr_freq);
remember_frequency();
-#ifdef FM_MODE
radio_mode = RADIO_PRESET_MODE;
-#endif
}
}
return true;
@@ -1300,15 +1322,20 @@ bool radio_menu(void)
{ ID2P(LANG_FM_ADD_PRESET) , radio_add_preset },
#endif
{ monomode_menu_string , toggle_mono_mode },
+#ifndef FM_MODE
+ { radiomode_menu_string , toggle_radio_mode },
+#endif
{ ID2P(LANG_SOUND_SETTINGS) , sound_menu },
#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
{ ID2P(LANG_RECORDING_SETTINGS) , fm_recording_settings},
#endif
- { ID2P(LANG_FM_SCAN_PRESETS) , scan_presets},
+ { ID2P(LANG_FM_SCAN_PRESETS) , scan_presets },
};
create_monomode_menu();
-
+#ifndef FM_MODE
+ create_radiomode_menu();
+#endif
m = menu_init(items, sizeof(items) / sizeof(*items),
radio_menu_cb, NULL, NULL, NULL);
result = menu_run(m);