Commit 84a2c173 authored by Claes Sjofors's avatar Claes Sjofors

Xtt command 'create item' with null destination creates item on toplevel

parent 3022b502
......@@ -136,3 +136,4 @@
090601 cs ge New action: SetValue to set a specified value into an attribute.
090625 cs xtt Bugfix in eventlist, adding event in a full list could cause segfault.
090625 cs xtt Blocklist window title was wrong.
090811 cs xtt Command 'create item' with null destination creaets item on toplevel.
\ No newline at end of file
......@@ -3833,6 +3833,7 @@ static int xnav_create_func( void *client_data,
{
char text_str[80];
char destination_str[80];
char *destination_p = destination_str;
char command_str[80];
char pixmap_str[80];
menu_ePixmap pixmap;
......@@ -3859,6 +3860,8 @@ static int xnav_create_func( void *client_data,
xnav->message('E',"Enter destination");
return XNAV__HOLDCOMMAND;
}
if ( strcmp( destination_str, "") == 0)
destination_p = 0;
if ( ODD( dcli_get_qualifier( "/COMMAND", command_str, sizeof(command_str))))
item_type = xnav_eItemType_Command;
if ( ODD( dcli_get_qualifier( "/MENU", 0, 0)))
......@@ -3892,7 +3895,7 @@ static int xnav_create_func( void *client_data,
pixmap = menu_ePixmap_Map;
sts = xnav->menu_tree_insert( text_str, item_type, command_str, pixmap,
destination_str, dest_code, &menu_item);
destination_p, dest_code, &menu_item);
if ( EVEN(sts))
xnav->message('E',"Destination not found");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment