diff options
Diffstat (limited to 'src/gui_gtk.cc')
| -rw-r--r-- | src/gui_gtk.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui_gtk.cc b/src/gui_gtk.cc index 574cf84..e80a249 100644 --- a/src/gui_gtk.cc +++ b/src/gui_gtk.cc @@ -2042,7 +2042,7 @@ std::string GtkGuiMenu::add_action(std::string const& id) { if (parent_) return parent_->add_action(id); std::string name = escape(id); auto action = g_simple_action_new(name.c_str(), nullptr); - action_.emplace(id, action); + action_[id].reset(action); g_signal_connect(action, "activate", G_CALLBACK(menu_item_activate), this); if (map_) g_action_map_add_action(map_, G_ACTION(action)); return "app." + name; @@ -2066,7 +2066,7 @@ public: auto handle = new Fd(channel, callback); handle->watch_ = g_io_add_watch(channel, events2cond(events), &GtkLooper::event, handle); - fds_.emplace(fd, handle); + fds_[fd].reset(handle); } void modify(int fd, uint8_t events) override { |
