void MSWidget::sensitive(MSBoolean sensitive_) { if (sensitive()!=sensitive_) { _sensitive=sensitive_; updateSensitivity(); } }
void OverlayDialog::toggleUseImage() { registry::setValue(RKEY_OVERLAY_VISIBLE, _useImageBtn->get_active()); updateSensitivity(); // Refresh GlobalSceneGraph().sceneChanged(); }
void MSTextRect::sensitive(MSBoolean sensitive_) { if (sensitive()!=sensitive_) { _sensitive=sensitive_; if (sensitive()) textMSGC().fillStyle(FillSolid); else textMSGC().fillStyle(FillStippled); updateSensitivity(); } }
void DocumentProperties::update (Document &doc) { DEBUG ("Setting uri '%1'", doc.getFileName()); filechooser_->set_local_only (false); filechooser_->set_uri (doc.getFileName()); keyentry_->set_text (doc.getKey()); iconImage_->set (doc.getThumbnail()); setupFields (doc.getBibData().getType()); bool const ignore = ignoreTypeChanged_; ignoreTypeChanged_ = true; if (typeManager_.getTypes().find(doc.getBibData().getType()) != typeManager_.getTypes().end()) { DocumentType type = typeManager_.getTypes()[doc.getBibData().getType()]; Gtk::ListStore::iterator it = typecombostore_->children().begin (); Gtk::ListStore::iterator const end = typecombostore_->children().end (); for (; it != end; ++it) { if ((*it)[typebibtexnamecol_] == type.bibtexName_) { typeCombo_->set_active(it); break; } } } else { Gtk::TreeModel::Row row = *(typecombostore_->append()); row[typelabelcol_] = doc.getBibData().getType(); row[typebibtexnamecol_] = doc.getBibData().getType(); } ignoreTypeChanged_ = ignore; extrafieldsstore_->clear (); std::map<Glib::ustring, Glib::ustring> fields = doc.getFields(); std::map<Glib::ustring, Glib::ustring>::iterator field = fields.begin (); std::map<Glib::ustring, Glib::ustring>::iterator const endField = fields.end (); for (; field != endField; ++field) { Glib::ustring const key = (*field).first; Glib::ustring const value = (*field).second; if (fieldEntries_.find(key) != fieldEntries_.end()) { fieldEntries_[key]->set_text (value); } else { Gtk::ListStore::iterator row = extrafieldsstore_->append (); (*row)[extrakeycol_] = key; (*row)[extravalcol_] = value; } } updateSensitivity (); }
void DocumentProperties::onEditExtraField () { Gtk::TreeSelection::ListHandle_Path paths = extrafieldssel_->get_selected_rows (); if (paths.empty ()) { DEBUG ("Warning: DocumentProperties::onEditExtraField: none selected"); return; } else if (paths.size () > 1) { DEBUG ("Warning: DocumentProperties::onEditExtraField: too many selected"); return; } Gtk::TreePath path = (*paths.begin ()); extrafieldsview_->set_cursor (path, *extrafieldsview_->get_column (1), true); updateSensitivity(); }
void DkCamControls::capabilityValueChanged(uint32_t capId) { switch (capId) { case kNkMAIDCapability_Sensitivity: updateSensitivity(); break; case kNkMAIDCapability_Aperture: updateAperture(); break; case kNkMAIDCapability_ShutterSpeed: updateShutterSpeed(); break; case kNkMAIDCapability_ExposureMode: updateExposureMode(); updateExposureModeDependentUiValues(); break; case kNkMAIDCapability_IsoControl: updateAutoIsoLabel(); break; } }
// Get the dialog state from the registry void OverlayDialog::initialiseWidgets() { // Image filename _fileChooserBtn->set_filename(GlobalRegistry().get(RKEY_OVERLAY_IMAGE)); updateSensitivity(); }
void DocumentProperties::onExtraFieldEdited (const Glib::ustring& path, const Glib::ustring& text) { updateSensitivity (); }
/* [bert] Provided a trivial implementation for this function. * TODO: Possibly parse the text to see if it is a well-formed DOI? */ void DocumentProperties::onDoiEntryChanged() { updateSensitivity (); }
void DocumentProperties::onDeleteExtraField () { // Oh dear, this may crash if this button was sensitive at the wrong time extrafieldsstore_->erase (extrafieldssel_->get_selected ()); updateSensitivity(); }
void DkCamControls::updateExposureModeDependentUiValues() { updateAperture(); updateSensitivity(); updateShutterSpeed(); }