How to make application menu items sensitive/insensitive?
- From: Gerardo Ballabio <gerardo ballabio gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: How to make application menu items sensitive/insensitive?
- Date: Sun, 13 Sep 2015 18:07:36 +0200
Hello,
Now I'm trying to proceed further. I need to turn on and off specific menu items. For example say I have two items "New Game" and "Stop Game" (see attached example). When you are already playing "New Item" should be insensitive and "Stop Game" should be sensitive. When you aren't playing it should be the opposite.
In gtkmm 2, each menu item was connected to a Gtk::Action, and that class has a set_sensitive() method. But in gtkmm 3, at least in the examples that I was shown, actions are added via Gtk::ApplicationWindow::add_action() or Gtk::Application::add_action() (both inherited from Gio::ActionMap), those actions are Gio::SimpleAction, and that class doesn't seem to have a set_sensitive() equivalent.
Can you please help me?
Thanks in advance
Gerardo
Attachment:
menu.cc
Description: Binary data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]