Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/fw/apps/system/quick_launch_nothing.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* SPDX-FileCopyrightText: 2026 Core Devices LLC */
/* SPDX-License-Identifier: Apache-2.0 */

//! The "Nothing" Quick Launch action. Binding a button to it makes the button
//! inert: the shell recognizes the app id and never launches anything.

#include "quick_launch_nothing.h"

#include "pbl/services/i18n/i18n.h"

static void prv_main(void) {
// Never runs; the shell drops the launch before it gets here.
}

const PebbleProcessMd *quick_launch_nothing_get_app_info(void) {
static const PebbleProcessMdSystem s_app_info = {
.common = {
.main_func = &prv_main,
.uuid = QUICK_LAUNCH_NOTHING_UUID,
.visibility = ProcessVisibilityQuickLaunch,
},
/// Quick Launch action that makes the button do nothing at all.
.name = i18n_noop("Nothing"),
};
return &s_app_info.common;
}
11 changes: 11 additions & 0 deletions src/fw/apps/system/quick_launch_nothing.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-FileCopyrightText: 2026 Core Devices LLC */
/* SPDX-License-Identifier: Apache-2.0 */

#pragma once

#include "process_management/app_manager.h"

#define QUICK_LAUNCH_NOTHING_UUID {0xde, 0x6d, 0xa1, 0x7f, 0x1a, 0x10, 0x47, 0x25, \
0xad, 0xbb, 0x1e, 0xfc, 0x22, 0xe4, 0x3f, 0x04}

const PebbleProcessMd *quick_launch_nothing_get_app_info(void);
4 changes: 2 additions & 2 deletions src/fw/apps/system/settings/quick_launch.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ static const char *s_row_titles[NUM_ROWS] = {
static void prv_get_subtitle_string(AppInstallId app_id, QuickLaunchData *data,
char *buffer, uint8_t buf_len) {
if (app_id == INSTALL_ID_INVALID) {
/// Shown in Quick Launch Settings when the button is disabled.
i18n_get_with_buffer("Disabled", buffer, buf_len);
/// Shown in Quick Launch Settings when no action or app is bound to the button.
i18n_get_with_buffer("Unassigned", buffer, buf_len);
return;
} else {
AppInstallEntry entry;
Expand Down
3 changes: 2 additions & 1 deletion src/fw/apps/system/settings/quick_launch_app_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static void prv_menu_draw_row(OptionMenu *option_menu, GContext* ctx, const Laye
QuickLaunchAppMenuData *data = context;
const char *text = NULL;
if (row == 0) {
text = i18n_get("Disable", data);
/// Shown in Quick Launch Settings when no action or app is bound to the button.
text = i18n_get("Unassigned", data);
} else {
AppMenuNode *node = app_menu_data_source_get_node_at_index(&data->data_source,
row - NUM_CUSTOM_CELLS);
Expand Down
5 changes: 5 additions & 0 deletions src/fw/shell/normal/system_app_registry_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@
"id": -100,
"enum": "NOTIFICATIONS_CLEAR_HISTORY",
"md_fn": "notifications_clear_history_app_get_info"
},
{
"id": -101,
"enum": "QUICK_LAUNCH_NOTHING",
"md_fn": "quick_launch_nothing_get_app_info"
}
],
"resource_apps": [
Expand Down
4 changes: 4 additions & 0 deletions src/fw/shell/normal/watchface.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ static void prv_launch_timeline_app(AppInstallId app_id, ButtonId button,
static void prv_launch_quick_launch_app(AppInstallId app_id, ButtonId button,
AppLaunchReason timeline_reason,
AppQuickLaunchAction action) {
if (app_id == APP_ID_QUICK_LAUNCH_NOTHING) {
return;
}

const bool is_timeline = (app_id == APP_ID_TIMELINE) ||
(app_id == APP_ID_TIMELINE_PAST) ||
(app_id == APP_ID_TIMELINE_FULL);
Expand Down
Loading