Re: Get current action in ActionGroup
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: v tolstov selfip ru
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Get current action in ActionGroup
- Date: Fri, 29 Feb 2008 10:37:17 +0300
В Птн, 29/02/2008 в 01:56 +0300, Vasiliy G Tolstov пишет:
> Hello!
>
> I'm having some code like this
>
> m_refActionGroup->add(Gtk::Action::create("Users",Gtk::StockID
> ("users_stock")),sigc::mem_fun(*this, &Window::on_action_users));
> m_refActionGroup->add(Gtk::Action::create("Groups",Gtk::StockID
> ("users_stock")),sigc::mem_fun(*this, &Window::on_action_groups));
>
> m_refActionGroup->add( Gtk::Action::create("Create",
> Gtk::Stock::NEW),
> sigc::mem_fun(*this, &Window::on_action_create) );
> m_refActionGroup->add( Gtk::Action::create("Modify",
> Gtk::Stock::EDIT),
> sigc::mem_fun(*this, &Window::on_action_change) );
> m_refActionGroup->add( Gtk::Action::create("Delete",
> Gtk::Stock::DELETE),
> sigc::mem_fun(*this, &Window::on_action_delete) );
>
> This actions are the same for users and groups. How can i get which
> actiongroup selected by user to provide various dialogs to create user
> or group.. ? Is that possible ?
>
What do you mean "this actions are the same for users and groups"?
As I can see you are using different callbacks for those actions:
Window::on_action_users()
Window::on_action_groups()
So, those methods could provide you different behaviour.
-andrew
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]