forked from len0rd/rockbox
use set_option instead of menu api for some settings of plugins to make it clear it's a setting.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22189 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
357f1f454c
commit
dbce22dc68
2 changed files with 18 additions and 28 deletions
|
@ -879,7 +879,7 @@ retry:
|
||||||
}
|
}
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
avail -= len;
|
avail -= len;
|
||||||
tracks--;
|
tracks--;
|
||||||
tracks->sort = ((disc_num - 1) << 24) + (track_num << 14) + track_count;
|
tracks->sort = ((disc_num - 1) << 24) + (track_num << 14) + track_count;
|
||||||
|
@ -2052,21 +2052,6 @@ int create_empty_slide(bool force)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Shows the album name setting menu
|
|
||||||
*/
|
|
||||||
int album_name_menu(void)
|
|
||||||
{
|
|
||||||
int selection = show_album_name;
|
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(album_name_menu,"Show album title",NULL,
|
|
||||||
"Hide album title", "Show at the bottom", "Show at the top");
|
|
||||||
rb->do_menu(&album_name_menu, &selection, NULL, false);
|
|
||||||
|
|
||||||
show_album_name = selection;
|
|
||||||
return GO_TO_PREVIOUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Shows the settings menu
|
Shows the settings menu
|
||||||
*/
|
*/
|
||||||
|
@ -2079,6 +2064,12 @@ int settings_menu(void)
|
||||||
"Spacing", "Centre margin", "Number of slides", "Zoom",
|
"Spacing", "Centre margin", "Number of slides", "Zoom",
|
||||||
"Show album title", "Resize Covers", "Rebuild cache");
|
"Show album title", "Resize Covers", "Rebuild cache");
|
||||||
|
|
||||||
|
static const struct opt_items album_name_options[] = {
|
||||||
|
{ "Hide album title", -1 },
|
||||||
|
{ "Show at the bottom", -1 },
|
||||||
|
{ "Show at the top", -1 }
|
||||||
|
};
|
||||||
|
|
||||||
do {
|
do {
|
||||||
selection=rb->do_menu(&settings_menu,&selection, NULL, false);
|
selection=rb->do_menu(&settings_menu,&selection, NULL, false);
|
||||||
switch(selection) {
|
switch(selection) {
|
||||||
|
@ -2117,7 +2108,8 @@ int settings_menu(void)
|
||||||
reset_slides();
|
reset_slides();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
album_name_menu();
|
rb->set_option("Show album title", &show_album_name,
|
||||||
|
INT, album_name_options, 3, NULL);
|
||||||
reset_track_list();
|
reset_track_list();
|
||||||
recalc_offsets();
|
recalc_offsets();
|
||||||
reset_slides();
|
reset_slides();
|
||||||
|
@ -2729,8 +2721,6 @@ int main(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************** Plugin entry point ****************************/
|
/*************************** Plugin entry point ****************************/
|
||||||
|
|
|
@ -551,12 +551,6 @@ MENUITEM_STRINGLIST(main_menu, "RockPaint", NULL,
|
||||||
"Brush Size", "Brush Speed",
|
"Brush Size", "Brush Speed",
|
||||||
"Choose Color", "Grid Size",
|
"Choose Color", "Grid Size",
|
||||||
"Playback Control", "Exit");
|
"Playback Control", "Exit");
|
||||||
MENUITEM_STRINGLIST(size_menu, "Choose Size", NULL,
|
|
||||||
"1x", "2x","4x", "8x");
|
|
||||||
MENUITEM_STRINGLIST(speed_menu, "Choose Speed", NULL,
|
|
||||||
"1x", "2x","4x");
|
|
||||||
MENUITEM_STRINGLIST(gridsize_menu, "Grid Size", NULL,
|
|
||||||
"No grid", "5px", "10px", "20px");
|
|
||||||
MENUITEM_STRINGLIST(select_menu, "Select...", NULL,
|
MENUITEM_STRINGLIST(select_menu, "Select...", NULL,
|
||||||
"Cut", "Copy",
|
"Cut", "Copy",
|
||||||
"Invert", "Horizontal Flip", "Vertical Flip",
|
"Invert", "Horizontal Flip", "Vertical Flip",
|
||||||
|
@ -567,6 +561,12 @@ MENUITEM_STRINGLIST(text_menu, "Text", NULL,
|
||||||
"Preview", "Apply", "Cancel");
|
"Preview", "Apply", "Cancel");
|
||||||
static const int times_list[] = { 1, 2, 4, 8 };
|
static const int times_list[] = { 1, 2, 4, 8 };
|
||||||
static const int gridsize_list[] = { 0, 5, 10, 20 };
|
static const int gridsize_list[] = { 0, 5, 10, 20 };
|
||||||
|
static const struct opt_items times_options[] = {
|
||||||
|
{ "1x", -1 }, { "2x", -1 }, { "4x", -1 }, { "8x", -1 }
|
||||||
|
};
|
||||||
|
static const struct opt_items gridsize_options[] = {
|
||||||
|
{ "No grid", -1 }, { "5px", -1 }, { "10px", -1 }, { "20px", -1 }
|
||||||
|
};
|
||||||
|
|
||||||
static int draw_window( int height, int width,
|
static int draw_window( int height, int width,
|
||||||
int *top, int *left,
|
int *top, int *left,
|
||||||
|
@ -2502,7 +2502,7 @@ static void goto_menu(void)
|
||||||
case MAIN_MENU_BRUSH_SIZE:
|
case MAIN_MENU_BRUSH_SIZE:
|
||||||
for(multi = 0; multi<4; multi++)
|
for(multi = 0; multi<4; multi++)
|
||||||
if(bsize == times_list[multi]) break;
|
if(bsize == times_list[multi]) break;
|
||||||
rb->do_menu( &size_menu, &multi, NULL, false );
|
rb->set_option( "Brush Size", &multi, INT, times_options, 4, NULL );
|
||||||
if( multi >= 0 )
|
if( multi >= 0 )
|
||||||
bsize = times_list[multi];
|
bsize = times_list[multi];
|
||||||
break;
|
break;
|
||||||
|
@ -2510,7 +2510,7 @@ static void goto_menu(void)
|
||||||
case MAIN_MENU_BRUSH_SPEED:
|
case MAIN_MENU_BRUSH_SPEED:
|
||||||
for(multi = 0; multi<3; multi++)
|
for(multi = 0; multi<3; multi++)
|
||||||
if(bspeed == times_list[multi]) break;
|
if(bspeed == times_list[multi]) break;
|
||||||
rb->do_menu( &speed_menu, &multi, NULL, false );
|
rb->set_option( "Brush Speed", &multi, INT, times_options, 3, NULL );
|
||||||
if( multi >= 0 )
|
if( multi >= 0 )
|
||||||
bspeed = times_list[multi];
|
bspeed = times_list[multi];
|
||||||
break;
|
break;
|
||||||
|
@ -2522,7 +2522,7 @@ static void goto_menu(void)
|
||||||
case MAIN_MENU_GRID_SIZE:
|
case MAIN_MENU_GRID_SIZE:
|
||||||
for(multi = 0; multi<4; multi++)
|
for(multi = 0; multi<4; multi++)
|
||||||
if(gridsize == gridsize_list[multi]) break;
|
if(gridsize == gridsize_list[multi]) break;
|
||||||
rb->do_menu( &gridsize_menu, &multi, NULL, false );
|
rb->set_option( "Grid Size", &multi, INT, gridsize_options, 4, NULL );
|
||||||
if( multi >= 0 )
|
if( multi >= 0 )
|
||||||
gridsize = gridsize_list[multi];
|
gridsize = gridsize_list[multi];
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue