Пример #1
0
void MSWidget::sensitive(MSBoolean sensitive_) 
{ 
  if (sensitive()!=sensitive_)
   {
     _sensitive=sensitive_; 
     updateSensitivity();
   }
}
Пример #2
0
void OverlayDialog::toggleUseImage()
{
    registry::setValue(RKEY_OVERLAY_VISIBLE, _useImageBtn->get_active());
	updateSensitivity();

	// Refresh
	GlobalSceneGraph().sceneChanged();
}
Пример #3
0
void MSTextRect::sensitive(MSBoolean sensitive_)
{
   if (sensitive()!=sensitive_)
   {
      _sensitive=sensitive_;
      if (sensitive()) textMSGC().fillStyle(FillSolid);
      else textMSGC().fillStyle(FillStippled);
      updateSensitivity();
   }
}
Пример #4
0
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 ();
}
Пример #5
0
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();
}
Пример #6
0
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;
	}
}
Пример #7
0
// Get the dialog state from the registry
void OverlayDialog::initialiseWidgets()
{
	// Image filename
    _fileChooserBtn->set_filename(GlobalRegistry().get(RKEY_OVERLAY_IMAGE));
    updateSensitivity();
}
Пример #8
0
void DocumentProperties::onExtraFieldEdited (const Glib::ustring& path, const Glib::ustring& text)
{
	updateSensitivity ();
}
Пример #9
0
/* [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 ();
}
Пример #10
0
void DocumentProperties::onDeleteExtraField ()
{
	// Oh dear, this may crash if this button was sensitive at the wrong time
	extrafieldsstore_->erase (extrafieldssel_->get_selected ());
	updateSensitivity();
}
Пример #11
0
void DkCamControls::updateExposureModeDependentUiValues() {
	updateAperture();
	updateSensitivity();
	updateShutterSpeed();
}