rework 8b80fe0
, use std::string, not char*
This commit is contained in:
parent
79142a262e
commit
696b89b71a
@ -3480,7 +3480,7 @@ The following file was deleted from %2,\n\
|
||||
releasing %3 %4bytes of disk space", "\
|
||||
The following %1 files were deleted from %2,\n\
|
||||
releasing %3 %4bytes of disk space", removed),
|
||||
removed, Glib::Markup::escape_text (dead_directory).c_str(), space_adjusted, bprefix, PROGRAM_NAME));
|
||||
removed, Gtkmm2ext::markup_escape_text (dead_directory), space_adjusted, bprefix, PROGRAM_NAME));
|
||||
} else {
|
||||
txt.set_markup (string_compose (P_("\
|
||||
The following file was not in use and \n\
|
||||
@ -3493,7 +3493,7 @@ have been moved to: %2\n\n\
|
||||
After a restart of %5\n\n\
|
||||
<span face=\"mono\">Session -> Clean-up -> Flush Wastebasket</span>\n\n\
|
||||
will release an additional %3 %4bytes of disk space.\n", removed),
|
||||
removed, Glib::Markup::escape_text (dead_directory).c_str(), space_adjusted, bprefix, PROGRAM_NAME));
|
||||
removed, Gtkmm2ext::markup_escape_text (dead_directory), space_adjusted, bprefix, PROGRAM_NAME));
|
||||
}
|
||||
|
||||
dhbox.pack_start (*dimage, true, false, 5);
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include "gtkmm2ext/choice.h"
|
||||
#include "gtkmm2ext/treeutils.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "editor.h"
|
||||
@ -390,14 +391,14 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
|
||||
row[_columns.property_toggles_visible] = false;
|
||||
|
||||
if (missing_source) {
|
||||
row[_columns.path] = _("(MISSING) ") + std::string(Glib::Markup::escape_text (region->source()->name()));
|
||||
row[_columns.path] = _("(MISSING) ") + Gtkmm2ext::markup_escape_text (region->source()->name());
|
||||
|
||||
} else {
|
||||
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource>(region->source());
|
||||
if (fs) {
|
||||
row[_columns.path] = Glib::Markup::escape_text (fs->path()).c_str();
|
||||
row[_columns.path] = Gtkmm2ext::markup_escape_text (fs->path());
|
||||
} else {
|
||||
row[_columns.path] = Glib::Markup::escape_text (region->source()->name()).c_str();
|
||||
row[_columns.path] = Gtkmm2ext::markup_escape_text (region->source()->name());
|
||||
}
|
||||
}
|
||||
|
||||
@ -949,9 +950,9 @@ void
|
||||
EditorRegions::populate_row_name (boost::shared_ptr<Region> region, TreeModel::Row const &row)
|
||||
{
|
||||
if (region->n_channels() > 1) {
|
||||
row[_columns.name] = string_compose("%1 [%2]", Glib::Markup::escape_text (region->name()).c_str(), region->n_channels());
|
||||
row[_columns.name] = string_compose("%1 [%2]", Gtkmm2ext::markup_escape_text (region->name()), region->n_channels());
|
||||
} else {
|
||||
row[_columns.name] = Glib::Markup::escape_text (region->name()).c_str();
|
||||
row[_columns.name] = Gtkmm2ext::markup_escape_text (region->name());
|
||||
}
|
||||
}
|
||||
|
||||
@ -959,9 +960,9 @@ void
|
||||
EditorRegions::populate_row_source (boost::shared_ptr<Region> region, TreeModel::Row const &row)
|
||||
{
|
||||
if (boost::dynamic_pointer_cast<SilentFileSource>(region->source())) {
|
||||
row[_columns.path] = _("MISSING ") + std::string(Glib::Markup::escape_text (region->source()->name()));
|
||||
row[_columns.path] = _("MISSING ") + Gtkmm2ext::markup_escape_text (region->source()->name());
|
||||
} else {
|
||||
row[_columns.path] = Glib::Markup::escape_text (region->source()->name()).c_str();
|
||||
row[_columns.path] = Gtkmm2ext::markup_escape_text (region->source()->name());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <glibmm/main.h>
|
||||
#include <gtkmm/stock.h>
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "ardour/import_status.h"
|
||||
#include "interthread_progress_window.h"
|
||||
#include "i18n.h"
|
||||
@ -87,8 +88,7 @@ bool
|
||||
ImportProgressWindow::update ()
|
||||
{
|
||||
_cancel_button.set_sensitive (!_import_status->freeze);
|
||||
std::string op = Glib::Markup::escape_text(_import_status->doing_what);
|
||||
_label.set_markup ("<i>" + op + "</i>");
|
||||
_label.set_markup ("<i>" + Gtkmm2ext::markup_escape_text (_import_status->doing_what) + "</i>");
|
||||
|
||||
/* use overall progress for the bar, rather than that for individual files */
|
||||
_bar.set_fraction ((_import_status->current - 1 + _import_status->progress) / _import_status->total);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "pbd/search_path.h"
|
||||
|
||||
#include "ardour/session.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "missing_file_dialog.h"
|
||||
#include "i18n.h"
|
||||
@ -68,7 +69,7 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT
|
||||
|
||||
msg.set_justify (JUSTIFY_LEFT);
|
||||
msg.set_markup (string_compose (_("%1 cannot find the %2 file\n\n<i>%3</i>\n\nin any of these folders:\n\n\
|
||||
<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path).c_str(), Glib::Markup::escape_text (oss.str().c_str())));
|
||||
<tt>%4</tt>\n\n"), PROGRAM_NAME, typestr, Gtkmm2ext::markup_escape_text (path), Gtkmm2ext::markup_escape_text (oss.str())));
|
||||
|
||||
HBox* hbox = manage (new HBox);
|
||||
hbox->pack_start (msg, false, true);
|
||||
|
@ -1207,10 +1207,10 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
|
||||
|
||||
if (for_input) {
|
||||
io_count = route->n_inputs().n_total();
|
||||
tooltip << string_compose (_("<b>INPUT</b> to %1"), Glib::Markup::escape_text(route->name()).c_str());
|
||||
tooltip << string_compose (_("<b>INPUT</b> to %1"), Gtkmm2ext::markup_escape_text (route->name()));
|
||||
} else {
|
||||
io_count = route->n_outputs().n_total();
|
||||
tooltip << string_compose (_("<b>OUTPUT</b> from %1"), Glib::Markup::escape_text(route->name()).c_str());
|
||||
tooltip << string_compose (_("<b>OUTPUT</b> from %1"), Gtkmm2ext::markup_escape_text (route->name()));
|
||||
}
|
||||
|
||||
|
||||
@ -1244,12 +1244,12 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
|
||||
}
|
||||
|
||||
if (io_connection_count == 0) {
|
||||
tooltip << endl << Glib::Markup::escape_text(port->name().substr(port->name().find("/") + 1)).c_str()
|
||||
tooltip << endl << Gtkmm2ext::markup_escape_text (port->name().substr(port->name().find("/") + 1))
|
||||
<< " -> "
|
||||
<< Glib::Markup::escape_text( pn.empty() ? connection_name : pn ).c_str();
|
||||
<< Gtkmm2ext::markup_escape_text ( pn.empty() ? connection_name : pn );
|
||||
} else {
|
||||
tooltip << ", "
|
||||
<< Glib::Markup::escape_text( pn.empty() ? connection_name : pn ).c_str();
|
||||
<< Gtkmm2ext::markup_escape_text ( pn.empty() ? connection_name : pn );
|
||||
}
|
||||
|
||||
if (connection_name.find("ardour:") == 0) {
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "gtkmm2ext/tearoff.h"
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/motionfeedback.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include <gtkmm/menu.h>
|
||||
#include <gtkmm/menuitem.h>
|
||||
@ -1352,7 +1353,7 @@ MonitorSection::update_output_display ()
|
||||
char * tooltip_cstr;
|
||||
|
||||
io_count = _route->n_outputs().n_total();
|
||||
tooltip << string_compose (_("<b>OUTPUT</b> from %1"), Glib::Markup::escape_text(_route->name().c_str()));
|
||||
tooltip << string_compose (_("<b>OUTPUT</b> from %1"), Gtkmm2ext::markup_escape_text (_route->name()));
|
||||
|
||||
|
||||
for (io_index = 0; io_index < io_count; ++io_index) {
|
||||
@ -1378,12 +1379,12 @@ MonitorSection::update_output_display ()
|
||||
}
|
||||
|
||||
if (io_connection_count == 0) {
|
||||
tooltip << endl << Glib::Markup::escape_text(port->name().substr(port->name().find("/") + 1)).c_str()
|
||||
tooltip << endl << Gtkmm2ext::markup_escape_text (port->name().substr(port->name().find("/") + 1))
|
||||
<< " -> "
|
||||
<< Glib::Markup::escape_text( pn.empty() ? connection_name : pn ).c_str();
|
||||
<< Gtkmm2ext::markup_escape_text ( pn.empty() ? connection_name : pn );
|
||||
} else {
|
||||
tooltip << ", "
|
||||
<< Glib::Markup::escape_text( pn.empty() ? connection_name : pn ).c_str();
|
||||
<< Gtkmm2ext::markup_escape_text ( pn.empty() ? connection_name : pn );
|
||||
}
|
||||
|
||||
if (connection_name.find("ardour:") == 0) {
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/route.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "port_matrix.h"
|
||||
#include "port_matrix_body.h"
|
||||
#include "port_matrix_component.h"
|
||||
@ -1041,7 +1042,7 @@ PortMatrix::update_tab_highlighting ()
|
||||
label->set_text ((*j)->name);
|
||||
} else if (c.length() && c[0] != '<' && has_connection) {
|
||||
/* this label is not marked up with <b> but should be */
|
||||
label->set_markup (string_compose ("<b>%1</b>", Glib::Markup::escape_text ((*j)->name).c_str()));
|
||||
label->set_markup (string_compose ("<b>%1</b>", Gtkmm2ext::markup_escape_text ((*j)->name)));
|
||||
}
|
||||
|
||||
++p;
|
||||
|
@ -606,7 +606,7 @@ ProcessorEntry::Control::set_tooltip ()
|
||||
snprintf (tmp, sizeof(tmp), "%s: %.2f", _name.c_str(), c->internal_to_user (c->get_value ()));
|
||||
}
|
||||
|
||||
string sm = Glib::Markup::escape_text (tmp);
|
||||
string sm = Gtkmm2ext::markup_escape_text (tmp);
|
||||
_slider_persistant_tooltip.set_tip (sm);
|
||||
ARDOUR_UI_UTILS::set_tooltip (_button, sm);
|
||||
}
|
||||
|
@ -1790,8 +1790,8 @@ RouteTimeAxisView::update_playlist_tip ()
|
||||
set_tooltip (
|
||||
playlist_button,
|
||||
string_compose(_("Take: %1.%2"),
|
||||
Glib::Markup::escape_text(rg->name()).c_str(),
|
||||
Glib::Markup::escape_text(take_name).c_str())
|
||||
Gtkmm2ext::markup_escape_text (rg->name()),
|
||||
Gtkmm2ext::markup_escape_text (take_name))
|
||||
);
|
||||
|
||||
return;
|
||||
@ -1799,7 +1799,7 @@ RouteTimeAxisView::update_playlist_tip ()
|
||||
}
|
||||
|
||||
/* set the playlist button tooltip to the playlist name */
|
||||
set_tooltip (playlist_button, _("Playlist") + std::string(": ") + Glib::Markup::escape_text(track()->playlist()->name()).c_str());
|
||||
set_tooltip (playlist_button, _("Playlist") + std::string(": ") + Gtkmm2ext::markup_escape_text (track()->playlist()->name()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1961,7 +1961,7 @@ RouteUI::open_remote_control_id_dialog ()
|
||||
if (_route->is_master() || _route->is_monitor()) {
|
||||
l->set_markup (string_compose (_("The remote control ID of %1 is: %2\n\n\n"
|
||||
"The remote control ID of %3 cannot be changed."),
|
||||
Glib::Markup::escape_text (_route->name()),
|
||||
Gtkmm2ext::markup_escape_text (_route->name()),
|
||||
_route->remote_control_id(),
|
||||
(_route->is_master() ? _("the master bus") : _("the monitor bus"))));
|
||||
} else {
|
||||
@ -1972,7 +1972,7 @@ RouteUI::open_remote_control_id_dialog ()
|
||||
_route->remote_control_id(),
|
||||
"<span size=\"small\" style=\"italic\">",
|
||||
"</span>",
|
||||
Glib::Markup::escape_text (_route->name()),
|
||||
Gtkmm2ext::markup_escape_text (_route->name()),
|
||||
PROGRAM_NAME));
|
||||
}
|
||||
dialog.get_vbox()->pack_start (*l);
|
||||
|
@ -39,6 +39,8 @@
|
||||
#include "pbd/stl_delete.h"
|
||||
#include "pbd/openuri.h"
|
||||
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/recent_sessions.h"
|
||||
@ -700,7 +702,7 @@ SessionDialog::redisplay_recent_sessions ()
|
||||
g_stat (s.c_str(), &gsb);
|
||||
|
||||
row[recent_session_columns.fullpath] = dirname; /* just the dir, but this works too */
|
||||
row[recent_session_columns.tip] = Glib::Markup::escape_text (dirname).c_str();
|
||||
row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname);
|
||||
row[recent_session_columns.time_modified] = gsb.st_mtime;
|
||||
|
||||
if (Session::get_info_from_path (s, sr, sf) == 0) {
|
||||
@ -739,7 +741,7 @@ SessionDialog::redisplay_recent_sessions ()
|
||||
|
||||
child_row[recent_session_columns.visible_name] = *i2;
|
||||
child_row[recent_session_columns.fullpath] = s;
|
||||
child_row[recent_session_columns.tip] = Glib::Markup::escape_text (dirname).c_str();
|
||||
child_row[recent_session_columns.tip] = Gtkmm2ext::markup_escape_text (dirname);
|
||||
g_stat (s.c_str(), &gsb);
|
||||
child_row[recent_session_columns.time_modified] = gsb.st_mtime;
|
||||
|
||||
|
@ -336,7 +336,7 @@ SoundFileBox::setup_labels (const string& filename)
|
||||
return false;
|
||||
}
|
||||
|
||||
preview_label.set_markup (string_compose ("<b>%1</b>", Glib::Markup::escape_text (Glib::path_get_basename (filename)).c_str()));
|
||||
preview_label.set_markup (string_compose ("<b>%1</b>", Glib::Markup::escape_text (Glib::path_get_basename (filename))));
|
||||
std::string n = sf_info.format_name;
|
||||
if (n.substr (0, 8) == X_("Format: ")) {
|
||||
n = n.substr (8);
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "ardour/ardour.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
|
||||
#include "gtkmm2ext/utils.h"
|
||||
|
||||
#ifdef check
|
||||
#undef check
|
||||
#endif
|
||||
@ -223,7 +225,7 @@ void
|
||||
Splash::message (const string& msg)
|
||||
{
|
||||
string str ("<b>");
|
||||
str += Glib::Markup::escape_text (msg).c_str();
|
||||
str += Gtkmm2ext::markup_escape_text (msg);
|
||||
str += "</b>";
|
||||
|
||||
show ();
|
||||
|
Loading…
Reference in New Issue
Block a user