[ekiga/ds-fix-boost-leaks] GActor: Allow adding actions with the same name.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-fix-boost-leaks] GActor: Allow adding actions with the same name.
- Date: Thu, 15 Oct 2015 16:56:37 +0000 (UTC)
commit 3f1bd1599003e92a09683f3af2f57de967ff03f3
Author: Damien Sandras <dsandras seconix com>
Date: Thu Oct 15 18:55:58 2015 +0200
GActor: Allow adding actions with the same name.
lib/engine/gui/gtk-core/gactor-menu.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/engine/gui/gtk-core/gactor-menu.cpp b/lib/engine/gui/gtk-core/gactor-menu.cpp
index c8ee59e..b38c510 100644
--- a/lib/engine/gui/gtk-core/gactor-menu.cpp
+++ b/lib/engine/gui/gtk-core/gactor-menu.cpp
@@ -40,6 +40,7 @@
#include "action.h"
#include "gactor-menu.h"
+#include <iostream>
static void
action_activated (GSimpleAction *a,
@@ -178,9 +179,8 @@ Ekiga::GActorMenu::add_gio_action (Ekiga::ActionPtr a)
if (!a->is_enabled ())
return;
- if (g_action_map_lookup_action (G_ACTION_MAP (g_application_get_default ()),
- a->get_name ().c_str ()))
- return;
+ g_action_map_remove_action (G_ACTION_MAP (g_application_get_default ()),
+ a->get_name ().c_str ());
action = g_simple_action_new (a->get_name ().c_str (), NULL);
g_object_set_data_full (G_OBJECT (action), "action",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]