summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/bwidget/mainframe.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/bwidget/mainframe.rb')
-rw-r--r--ext/tk/lib/tkextlib/bwidget/mainframe.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/tk/lib/tkextlib/bwidget/mainframe.rb b/ext/tk/lib/tkextlib/bwidget/mainframe.rb
index de66eaf81e..92253bd8d3 100644
--- a/ext/tk/lib/tkextlib/bwidget/mainframe.rb
+++ b/ext/tk/lib/tkextlib/bwidget/mainframe.rb
@@ -18,7 +18,7 @@ end
class Tk::BWidget::MainFrame
TkCommandNames = ['MainFrame'.freeze].freeze
WidgetClassName = 'MainFrame'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
def __strval_optkeys
super() << 'progressfg'
@@ -111,6 +111,10 @@ class Tk::BWidget::MainFrame
win
end
+ def get_menustate(tag)
+ tk_send('getmenustate', tag) # return state name string
+ end
+
def set_menustate(tag, state)
tk_send('setmenustate', tag, state)
self