[App] Build title using StringBuffer.

This commit is contained in:
gibbed
2021-05-01 17:15:41 -05:00
committed by Rick Gibbed
parent 38c3db1afb
commit 0419a9f13d
6 changed files with 28 additions and 17 deletions

View File

@@ -99,11 +99,12 @@ void GTKWindow::OnClose() {
super::OnClose();
}
bool GTKWindow::set_title(const std::string& title) {
bool GTKWindow::set_title(const std::string_view title) {
if (!super::set_title(title)) {
return false;
}
gtk_window_set_title(GTK_WINDOW(window_), (gchar*)title.c_str());
std::string titlez(title);
gtk_window_set_title(GTK_WINDOW(window_), (gchar*)titlez.c_str());
return true;
}