Skip to content

Commit 26a0084

Browse files
committed
Launcher: All launcher-related options to the "Launcher options" submenu
1 parent 3d3cbb0 commit 26a0084

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

launcher/main/main.c

+23-23
Original file line numberDiff line numberDiff line change
@@ -142,24 +142,6 @@ static rg_gui_event_t startup_app_cb(rg_gui_option_t *option, rg_gui_event_t eve
142142
return RG_DIALOG_VOID;
143143
}
144144

145-
static rg_gui_event_t launcher_options_cb(rg_gui_option_t *option, rg_gui_event_t event)
146-
{
147-
if (event == RG_DIALOG_ENTER)
148-
{
149-
const rg_gui_option_t options[] = {
150-
{0, "Color theme ", "...", 1, &color_theme_cb},
151-
{0, "Preview ", "...", 1, &show_preview_cb},
152-
{0, "Scroll mode ", "...", 1, &scroll_mode_cb},
153-
{0, "Start screen", "...", 1, &start_screen_cb},
154-
{0, "Hide tabs ", "...", 1, &toggle_tabs_cb},
155-
RG_DIALOG_END,
156-
};
157-
gui_redraw(); // clear main menu
158-
rg_gui_dialog("Launcher Options", options, 0);
159-
}
160-
return RG_DIALOG_VOID;
161-
}
162-
163145
#ifdef RG_ENABLE_NETWORKING
164146
static rg_gui_event_t updater_cb(rg_gui_option_t *option, rg_gui_event_t event)
165147
{
@@ -192,6 +174,28 @@ static rg_gui_event_t webui_switch_cb(rg_gui_option_t *option, rg_gui_event_t ev
192174
}
193175
#endif
194176

177+
static rg_gui_event_t launcher_options_cb(rg_gui_option_t *option, rg_gui_event_t event)
178+
{
179+
if (event == RG_DIALOG_ENTER)
180+
{
181+
const rg_gui_option_t options[] = {
182+
{0, "Color theme ", "-", RG_DIALOG_FLAG_NORMAL, &color_theme_cb},
183+
{0, "Preview ", "-", RG_DIALOG_FLAG_NORMAL, &show_preview_cb},
184+
{0, "Scroll mode ", "-", RG_DIALOG_FLAG_NORMAL, &scroll_mode_cb},
185+
{0, "Start screen", "-", RG_DIALOG_FLAG_NORMAL, &start_screen_cb},
186+
{0, "Hide tabs ", "-", RG_DIALOG_FLAG_NORMAL, &toggle_tabs_cb},
187+
#ifdef RG_ENABLE_NETWORKING
188+
{0, "File server ", "-", RG_DIALOG_FLAG_NORMAL, &webui_switch_cb},
189+
#endif
190+
{0, "Startup app ", "-", RG_DIALOG_FLAG_NORMAL, &startup_app_cb},
191+
RG_DIALOG_END,
192+
};
193+
gui_redraw(); // clear main menu
194+
rg_gui_dialog("Launcher Options", options, 0);
195+
}
196+
return RG_DIALOG_VOID;
197+
}
198+
195199
static rg_gui_event_t prebuild_cache_cb(rg_gui_option_t *option, rg_gui_event_t event)
196200
{
197201
if (event == RG_DIALOG_ENTER)
@@ -432,11 +436,7 @@ void app_main(void)
432436
.event = &event_handler,
433437
};
434438
const rg_gui_option_t options[] = {
435-
#ifdef RG_ENABLE_NETWORKING
436-
{0, "File server" , "-", RG_DIALOG_FLAG_NORMAL, &webui_switch_cb},
437-
#endif
438-
{0, "Startup app ", "...", 1, &startup_app_cb},
439-
{0, "Launcher options", NULL, 1, &launcher_options_cb},
439+
{0, "Launcher options", NULL, RG_DIALOG_FLAG_NORMAL, &launcher_options_cb},
440440
RG_DIALOG_END,
441441
};
442442

0 commit comments

Comments
 (0)