Skip to content

Instantly share code, notes, and snippets.

View roman-neuhauser's full-sized avatar

Roman Neuhauser roman-neuhauser

View GitHub Profile
@roman-neuhauser
roman-neuhauser / a.cpp
Last active August 29, 2015 14:02 — forked from jan-matejka/a.cpp
inline
Text Volume::labelTextFmt( bool doing, has_label ) const {
if (doing && !has_label) return _("Clearing label on %1$s")
if (doing && has_label) return _("Setting label on %1$s to %2$s")
if (!has_label) return _("Clear label on %1$s")
else return _("Set label on %1$s to %2$s")
}
Text Volume::labelText( bool doing ) const {
return sformat(labelTextFmt(doing, !label.empty()), dev.c_str(), label.c_str());