aboutsummaryrefslogtreecommitdiffstats
path: root/src/hci/commands/dynui_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hci/commands/dynui_cmd.c')
-rw-r--r--src/hci/commands/dynui_cmd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hci/commands/dynui_cmd.c b/src/hci/commands/dynui_cmd.c
index dbaa669ef..557c5db5d 100644
--- a/src/hci/commands/dynui_cmd.c
+++ b/src/hci/commands/dynui_cmd.c
@@ -148,6 +148,7 @@ static int item_exec ( int argc, char **argv ) {
struct item_options opts;
struct dynamic_ui *dynui;
struct dynamic_item *item;
+ unsigned int flags = 0;
char *name = NULL;
char *text = NULL;
int rc;
@@ -174,8 +175,10 @@ static int item_exec ( int argc, char **argv ) {
goto err_parse_dynui;
/* Add dynamic user interface item */
- item = add_dynui_item ( dynui, name, ( text ? text : "" ),
- opts.key, opts.is_default );
+ if ( opts.is_default )
+ flags |= DYNUI_DEFAULT;
+ item = add_dynui_item ( dynui, name, ( text ? text : "" ), flags,
+ opts.key );
if ( ! item ) {
rc = -ENOMEM;
goto err_add_dynui_item;