NAME
App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive -- menu item insensitive when submenu empty
SYNOPSIS
use App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive;
my $item = Gtk2::MenuItem->new;
App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive->setup ($item);
DESCRIPTION
App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive
sets up a Gtk2::MenuItem
so that it's insensitive if its submenu is empty, or all the items are hidden, or there's no submenu set at all.
Sensitivity updates with items added or removed from the submenu, or made hidden or visible. In Gtk 2.12 and the sensitivity is updated for a new submenu, ie. set_submenu
, but in prior versions there's no signal when that happens and you must call setup
below again.
FUNCTIONS
App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive->setup ($item)
-
Setup
$item
to be insensitive if its submenu is empty.