#include <string>
#include <climits>
-
#include "pbd/failed_constructor.h"
#include "pbd/stl_delete.h"
#include "pbd/xml++.h"
/* XXX property name needs capitalizing */
- if ((*i)->name() == regions.property_name()) {
+ if ((*i)->name() == capitalize (regions.property_name())) {
RegionListProperty* rlp = new RegionListProperty (*const_cast<Playlist*> (this));
#include <stdint.h>
#include <stdlib.h>
#include <cstdio>
+#include <ctype.h>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
namespace PBD {
+string
+capitalize (const string& str)
+{
+ string ret = str;
+ if (!str.empty()) {
+ /* XXX not unicode safe */
+ ret[0] = toupper (str[0]);
+ }
+ return ret;
+}
+
string
short_version (string orig, string::size_type target_length)
{
void url_decode (std::string&);
void url_decode (Glib::ustring&);
+std::string capitalize (const std::string&);
+
// std::string length2string (const int32_t frames, const float sample_rate);
std::string length2string (const int64_t frames, const double sample_rate);
#include <boost/function.hpp>
+#include "pbd/convert.h"
#include "pbd/id.h"
#include "pbd/property_basics.h"
void add_history_state (XMLNode* history_node) const {
- /* XXX need to capitalize property name */
- XMLNode* child = new XMLNode (property_name());
+ XMLNode* child = new XMLNode (PBD::capitalize (property_name()));
history_node->add_child_nocopy (*child);
/* record the change described in our change member */