Ticket #12424: 0012-MythUI-Empty-menu-getter.patch

File 0012-MythUI-Empty-menu-getter.patch, 727 bytes (added by Roger Siddons <dizygotheca@…>, 5 years ago)
  • mythtv/libs/libmythui/mythdialogbox.h

    From 17fe19c1e5236731604a43ae04f4a06d48f3ec78 Mon Sep 17 00:00:00 2001
    From: Roger Siddons <dizygotheca@ntlworld.com>
    Date: Thu, 1 Oct 2015 20:51:11 +0100
    Subject: [PATCH 12/15] MythUI: Empty menu getter
    
    Menu construction is sometimes convoluted.
    Add support to prevent empty menus being displayed.
    
    diff --git a/mythtv/libs/libmythui/mythdialogbox.h b/mythtv/libs/libmythui/mythdialogbox.h
    index 48ccaac..dc3d895 100644
    a b class MUI_PUBLIC MythMenu 
    8888
    8989    void SetParent(MythMenu *parent) { m_parentMenu = parent; }
    9090
     91    bool IsEmpty()  { return m_menuItems.isEmpty(); }
     92
    9193  private:
    9294    void Init(void);
    9395