diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/salvtables.hxx | 1 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 10 |
3 files changed, 15 insertions, 0 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 0a6cbad7038e..b68a2fdeba96 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -143,6 +143,7 @@ public: SalInstanceMenu(PopupMenu* pMenu, bool bTakeOwnership); virtual OString popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect) override; virtual void set_sensitive(const OString& rIdent, bool bSensitive) override; + virtual bool get_sensitive(const OString& rIdent) const override; virtual void set_active(const OString& rIdent, bool bActive) override; virtual bool get_active(const OString& rIdent) const override; virtual void set_label(const OString& rIdent, const OUString& rLabel) override; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 167ff5766084..0524244ed6d2 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -737,6 +737,10 @@ void SalInstanceMenu::set_sensitive(const OString& rIdent, bool bSensitive) { m_xMenu->EnableItem(rIdent, bSensitive); } +bool SalInstanceMenu::get_sensitive(const OString& rIdent) const +{ + return m_xMenu->IsItemEnabled(m_xMenu->GetItemId(rIdent)); +} void SalInstanceMenu::set_active(const OString& rIdent, bool bActive) { m_xMenu->CheckItem(rIdent, bActive); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 602246395aaa..829a3a4ca58f 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3593,6 +3593,11 @@ public: gtk_widget_set_sensitive(GTK_WIDGET(m_aMap[rIdent]), bSensitive); } + bool get_item_sensitive(const OString& rIdent) const + { + return gtk_widget_get_sensitive(GTK_WIDGET(m_aMap.find(rIdent)->second)); + } + void set_item_active(const OString& rIdent, bool bActive) { disable_item_notify_events(); @@ -8199,6 +8204,11 @@ public: set_item_sensitive(rIdent, bSensitive); } + virtual bool get_sensitive(const OString& rIdent) const override + { + return get_item_sensitive(rIdent); + } + virtual void set_active(const OString& rIdent, bool bActive) override { set_item_active(rIdent, bActive); |