[ekiga/ds-gtk-application] ActorMenu: Set/reset ContactAction data when appropriate.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gtk-application] ActorMenu: Set/reset ContactAction data when appropriate.
- Date: Sat, 22 Mar 2014 10:36:32 +0000 (UTC)
commit 0a9fe3137465cad1251c1921eeddb474f51f810d
Author: Damien Sandras <dsandras beip be>
Date: Sat Mar 22 11:32:58 2014 +0100
ActorMenu: Set/reset ContactAction data when appropriate.
lib/engine/gui/gtk-core/actor-menu.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/gui/gtk-core/actor-menu.cpp b/lib/engine/gui/gtk-core/actor-menu.cpp
index b30de9c..c4ef5c6 100644
--- a/lib/engine/gui/gtk-core/actor-menu.cpp
+++ b/lib/engine/gui/gtk-core/actor-menu.cpp
@@ -232,10 +232,14 @@ Ekiga::ContactActorMenu::add_action (Ekiga::Action *_action)
Ekiga::ContactAction *a = dynamic_cast<Ekiga::ContactAction *> (_action);
if (!a || !a->can_run_with_data (contact, uri)) {
+ a->set_data (); // Make sure action data is reset
+
g_action_map_remove_action (G_ACTION_MAP (g_application_get_default ()),
a->get_name ().c_str ());
}
else if (a && a->can_run_with_data (contact, uri)) {
+ a->set_data (contact, uri); // Make sure action data is set
+
action = g_simple_action_new (a->get_name ().c_str (), NULL);
g_object_set_data (G_OBJECT (action), "action", a);
g_action_map_add_action (G_ACTION_MAP (g_application_get_default ()),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]