summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-05-30 21:18:38 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-05-30 21:22:01 -0400
commiteaeaac598d5c06a138a5e8ea012f7a959461e473 (patch)
treeda5f7bb0f3c7aefef6e7726bdda9a9aedf8f68a8
parentd22dbe74cb2c4c93a3c0b79a29c087bc39714c14 (diff)
downloadrockbox-eaeaac598d5c06a138a5e8ea012f7a959461e473.tar.gz
rockbox-eaeaac598d5c06a138a5e8ea012f7a959461e473.zip
FS#13431: Provide a way to view the rockbox license in the menus
This adds a "Legal Notices" entry under the System menu that will launch the text viewer plugin to display: 1) COPYING.txt (containing the GPLv2 overall license for Rockbox) 2) LICENSES.txt (containing all other relevant licenses and notices) Change-Id: Id41ae491b6f9a6ec5663090246d0f6b661cddea5
-rw-r--r--apps/lang/english-us.lang14
-rw-r--r--apps/lang/english.lang14
-rw-r--r--apps/menus/main_menu.c14
3 files changed, 41 insertions, 1 deletions
diff --git a/apps/lang/english-us.lang b/apps/lang/english-us.lang
index 586dc80914..680b3e0883 100644
--- a/apps/lang/english-us.lang
+++ b/apps/lang/english-us.lang
@@ -16298,3 +16298,17 @@
16298 *: "Always 1" 16298 *: "Always 1"
16299 </voice> 16299 </voice>
16300</phrase> 16300</phrase>
16301<phrase>
16302 id: LANG_LEGAL_NOTICES
16303 desc: in system menu
16304 user: core
16305 <source>
16306 *: "Legal Notices"
16307 </source>
16308 <dest>
16309 *: "Legal Notices"
16310 </dest>
16311 <voice>
16312 *: "Legal Notices"
16313 </voice>
16314</phrase>
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index fdedf01866..a93cff90ec 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -16374,3 +16374,17 @@
16374 *: "Always 1" 16374 *: "Always 1"
16375 </voice> 16375 </voice>
16376</phrase> 16376</phrase>
16377<phrase>
16378 id: LANG_LEGAL_NOTICES
16379 desc: in system menu
16380 user: core
16381 <source>
16382 *: "Legal Notices"
16383 </source>
16384 <dest>
16385 *: "Legal Notices"
16386 </dest>
16387 <voice>
16388 *: "Legal Notices"
16389 </voice>
16390</phrase>
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 73c9f7be33..a483a72eb0 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -121,6 +121,15 @@ static int show_credits(void)
121 return 0; 121 return 0;
122} 122}
123 123
124static int show_legal(void)
125{
126 if (plugin_load(VIEWERS_DIR "/text_viewer.rock", "/.rockbox/docs/COPYING.txt") != PLUGIN_OK)
127 show_info();
128 if (plugin_load(VIEWERS_DIR "/text_viewer.rock", "/.rockbox/docs/LICENSES.txt") != PLUGIN_OK)
129 show_info();
130 return 0;
131}
132
124#define SIZE_FMT "%s %s" 133#define SIZE_FMT "%s %s"
125struct info_data 134struct info_data
126 135
@@ -469,9 +478,12 @@ MENUITEM_FUNCTION(show_runtime_item, 0, ID2P(LANG_RUNNING_TIME),
469MENUITEM_FUNCTION(debug_menu_item, 0, ID2P(LANG_DEBUG), 478MENUITEM_FUNCTION(debug_menu_item, 0, ID2P(LANG_DEBUG),
470 debug_menu, NULL, Icon_NOICON); 479 debug_menu, NULL, Icon_NOICON);
471 480
481MENUITEM_FUNCTION(show_legal_item, 0, ID2P(LANG_LEGAL_NOTICES),
482 show_legal, NULL, Icon_NOICON);
483
472MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu, 484MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu,
473 &show_info_item, &show_credits_item, 485 &show_info_item, &show_credits_item,
474 &show_runtime_item, &debug_menu_item); 486 &show_runtime_item, &show_legal_item, &debug_menu_item);
475/* INFO MENU */ 487/* INFO MENU */
476/***********************************/ 488/***********************************/
477 489