~marco-gulino/pandorica/trunk

« back to all changes in this revision

Viewing changes to src/mediacollectionbrowser.cpp

  • Committer: Marco Gulino
  • Date: 2015-05-10 13:21:44 UTC
  • Revision ID: marco@gulinux.net-20150510132144-ism09meyhttnt1th
minor bugfixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
704
704
  WLineEdit *editLabel=  new WLineEdit{label ? WString::fromUTF8(label->value()) : ""};
705
705
  layout->addWidget(editLabel);
706
706
  WPushButton *okButton;
707
 
  editLabel->keyWentUp().connect([=](WKeyEvent){ okButton->setEnabled(! editLabel->text().empty()); });
708
707
  dialog->footer()->addWidget(WW<WPushButton>(WString::tr("button.cancel")).onClick([=](WMouseEvent){ dialog->reject(); }));
709
708
  dialog->footer()->addWidget(WW<WPushButton>(WString::tr("button.clear")).css("btn-danger").onClick([=](WMouseEvent){
710
709
    Dbo::Transaction t(*session);
716
715
    CollectionItemProperty::label(path, editLabel->text().toUTF8(), t);
717
716
    dialog->accept();
718
717
  }).setEnabled(!editLabel->text().empty()));
 
718
  editLabel->keyWentUp().connect([=](WKeyEvent){ okButton->setEnabled(! editLabel->text().empty()); });
719
719
  dialog->show();
720
720
  dialog->finished().connect([=](int r, _n5){ refresh();  delete dialog; });
721
721
}