using std::list;
using std::string;
+using std::cout;
using boost::shared_ptr;
FontsDialog::FontsDialog (wxWindow* parent, shared_ptr<SubtitleContent> content)
ip.SetWidth (100);
_fonts->InsertColumn (0, ip);
}
-
+
{
wxListItem ip;
ip.SetId (1);
if (!content) {
return;
}
-
+
_fonts->DeleteAllItems ();
list<shared_ptr<Font> > fonts = content->fonts ();
size_t n = 0;
wxListItem item;
item.SetId (n);
_fonts->InsertItem (item);
- _fonts->SetItem (n, 0, std_to_wx ((*i)->id));
- if ((*i)->file) {
- _fonts->SetItem (n, 1, (*i)->file.get().leaf().string ());
+ _fonts->SetItem (n, 0, std_to_wx ((*i)->id ()));
+ if ((*i)->file ()) {
+ _fonts->SetItem (n, 1, (*i)->file().get().leaf().string ());
}
++n;
}
if (item == -1) {
return;
}
-
+
/* The wxFD_CHANGE_DIR here prevents a `could not set working directory' error 123 on Windows when using
non-Latin filenames or paths.
*/
list<shared_ptr<Font> > fonts = content->fonts ();
for (list<shared_ptr<Font> >::iterator i = fonts.begin(); i != fonts.end(); ++i) {
- if ((*i)->id == id) {
- (*i)->file = wx_to_std (d->GetPath ());
+ if ((*i)->id() == id) {
+ (*i)->set_file (wx_to_std (d->GetPath ()));
}
}