From c4c6c6b986b3fb736d718f591e0fae86c0920438 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 8 Sep 2009 14:46:16 -0500 Subject: [PATCH] ui.gadgets.buttons: don't show message if no shortcut assigned --- basis/ui/gadgets/buttons/buttons.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/ui/gadgets/buttons/buttons.factor b/basis/ui/gadgets/buttons/buttons.factor index 352190c95f..494dc20c05 100644 --- a/basis/ui/gadgets/buttons/buttons.factor +++ b/basis/ui/gadgets/buttons/buttons.factor @@ -229,8 +229,8 @@ PRIVATE> : command-button-quot ( target command -- quot ) '[ _ _ invoke-command ] ; -: gesture>tooltip ( gesture -- str ) - [ gesture>string "Shortcut: " prepend ] [ "Shortcut Unassigned" ] if* ; +: gesture>tooltip ( gesture -- str/f ) + dup [ gesture>string "Shortcut: " prepend ] when ; : ( target gesture command -- button ) swapd [ command-name swap ] keep command-button-quot