summaryrefslogtreecommitdiffstats
path: root/src/CanvasModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CanvasModule.cpp')
-rw-r--r--src/CanvasModule.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/CanvasModule.cpp b/src/CanvasModule.cpp
index d9e3c9c..4015819 100644
--- a/src/CanvasModule.cpp
+++ b/src/CanvasModule.cpp
@@ -1,33 +1,23 @@
-/* This file is part of Patchage.
- * Copyright 2010-2021 David Robillard <d@drobilla.net>
- *
- * Patchage is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
- *
- * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Patchage. If not, see <http://www.gnu.org/licenses/>.
- */
+// Copyright 2010-2021 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: GPL-3.0-or-later
#include "CanvasModule.hpp"
#include "Action.hpp"
+#include "ActionSink.hpp"
#include "Canvas.hpp"
#include "CanvasPort.hpp"
+#include "ClientID.hpp"
#include "PortID.hpp"
#include "SignalDirection.hpp"
+#include "i18n.hpp"
#include "warnings.hpp"
PATCHAGE_DISABLE_GANV_WARNINGS
+#include "ganv/Module.hpp"
#include "ganv/Port.hpp"
PATCHAGE_RESTORE_WARNINGS
-#include <glibmm/helperlist.h>
#include <gtkmm/menu.h>
#include <gtkmm/menu_elems.h>
#include <gtkmm/menuitem.h>
@@ -94,21 +84,21 @@ CanvasModule::update_menu()
bool
CanvasModule::show_menu(GdkEventButton* ev)
{
- _menu = std::unique_ptr<Gtk::Menu>{new Gtk::Menu()};
+ _menu = std::make_unique<Gtk::Menu>();
Gtk::Menu::MenuList& items = _menu->items();
if (_type == SignalDirection::duplex) {
items.push_back(Gtk::Menu_Helpers::MenuElem(
- "_Split", sigc::mem_fun(this, &CanvasModule::on_split)));
+ T("_Split"), sigc::mem_fun(this, &CanvasModule::on_split)));
update_menu();
} else {
items.push_back(Gtk::Menu_Helpers::MenuElem(
- "_Join", sigc::mem_fun(this, &CanvasModule::on_join)));
+ T("_Join"), sigc::mem_fun(this, &CanvasModule::on_join)));
}
items.push_back(Gtk::Menu_Helpers::MenuElem(
- "_Disconnect", sigc::mem_fun(this, &CanvasModule::on_disconnect)));
+ T("_Disconnect"), sigc::mem_fun(this, &CanvasModule::on_disconnect)));
_menu->popup(ev->button, ev->time);
return true;