def create_menu_item(ia, parent_menu, menu_text, image=None, tooltip=None, shortcut=(), triggered=None, is_checked=None):
 if (shortcut is not None):
  if (len(shortcut) == 0):
   shortcut = ()
  else:
   shortcut = _(shortcut)
 ac = ia.create_action(spec=(menu_text, None, tooltip, shortcut), attr=menu_text)
 if image:
  ac.setIcon(get_icon(image))
 if (triggered is not None):
  ac.triggered.connect(triggered)
 if (is_checked is not None):
  ac.setCheckable(True)
  if is_checked:
   ac.setChecked(True)
 parent_menu.addAction(ac)
 return ac

def create_menu_item ( ia , parent_menu , menu_text , image = None , tooltip = None , shortcut = ( ) , triggered = None , is_checked = None ) : if ( shortcut is not None ) : if ( len ( shortcut ) == 0 ) : shortcut = ( ) else : shortcut = _ ( shortcut ) ac = ia . create_action ( spec = ( menu_text , None , tooltip , shortcut ) , attr = menu_text ) if image : ac . setIcon ( get_icon ( image ) ) if ( triggered is not None ) : ac . triggered . connect ( triggered ) if ( is_checked is not None ) : ac . setCheckable ( True ) if is_checked : ac . setChecked ( True ) parent_menu . addAction ( ac ) return ac
create a menu action with the specified criteria and action note that if no shortcut is specified .