+
+ /* SetSizeHints() seems to get it slightly wrong (see #884),
+ so hack in a bit more height.
+ */
+ wxSize const s = GetMinSize ();
+ SetMinSize (wxSize (s.GetWidth(), s.GetHeight() + 32));
+}
+
+void
+ContentPropertiesDialog::maybe_add_group (map<UserProperty::Category, list<UserProperty> > const & groups, UserProperty::Category category)
+{
+ map<UserProperty::Category, list<UserProperty> >::const_iterator i = groups.find (category);
+ if (i == groups.end()) {
+ return;
+ }
+
+ wxString category_name;
+ switch (i->first) {
+ case UserProperty::GENERAL:
+ category_name = _("General");
+ break;
+ case UserProperty::VIDEO:
+ category_name = _("Video");
+ break;
+ case UserProperty::AUDIO:
+ category_name = _("Audio");
+ break;
+ case UserProperty::LENGTH:
+ category_name = _("Length");
+ break;
+ }
+
+ wxStaticText* m = new wxStaticText (this, wxID_ANY, category_name);
+ wxFont font (*wxNORMAL_FONT);
+ font.SetWeight (wxFONTWEIGHT_BOLD);
+ m->SetFont (font);
+
+ add_spacer ();
+ add_spacer ();
+ add (m, false);
+ add_spacer ();
+
+ BOOST_FOREACH (UserProperty j, i->second) {
+ add (std_to_wx (j.key), true);
+ add (new wxStaticText (this, wxID_ANY, std_to_wx (j.value + " " + j.unit)));
+ }