void
FontSubstitution::show(Glib::ustring out, GSList *l)
{
   Gtk::MessageDialog warning(_("\nSome fonts are not available and have been substituted."),
                       false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true);
   warning.set_resizable(true);
   warning.set_title(_("Font substitution"));

   GtkWidget *dlg = GTK_WIDGET(warning.gobj());
   sp_transientize(dlg);

   Gtk::TextView * textview = new Gtk::TextView();
   textview->set_editable(false);
   textview->set_wrap_mode(Gtk::WRAP_WORD);
   textview->show();
   textview->get_buffer()->set_text(_(out.c_str()));

   Gtk::ScrolledWindow * scrollwindow = new Gtk::ScrolledWindow();
   scrollwindow->add(*textview);
   scrollwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
   scrollwindow->set_shadow_type(Gtk::SHADOW_IN);
   scrollwindow->set_size_request(0, 100);
   scrollwindow->show();

   Gtk::CheckButton *cbSelect = new Gtk::CheckButton();
   cbSelect->set_label(_("Select all the affected items"));
   cbSelect->set_active(true);
   cbSelect->show();

   Gtk::CheckButton *cbWarning = new Gtk::CheckButton();
   cbWarning->set_label(_("Don't show this warning again"));
   cbWarning->show();

#if GTK_CHECK_VERSION(3,0,0)
   Gtk::Box * box = warning.get_content_area();
#else
   Gtk::Box * box = warning.get_vbox();
#endif
   box->set_spacing(2);
   box->pack_start(*scrollwindow, true, true, 4);
   box->pack_start(*cbSelect, false, false, 0);
   box->pack_start(*cbWarning, false, false, 0);

   warning.run();

   if (cbWarning->get_active()) {
       Inkscape::Preferences *prefs = Inkscape::Preferences::get();
       prefs->setInt("/options/font/substitutedlg", 0);
   }

   if (cbSelect->get_active()) {

       SPDesktop *desktop = SP_ACTIVE_DESKTOP;
       Inkscape::Selection *selection = sp_desktop_selection (desktop);
       selection->clear();
       selection->setList(l);
   }

}
예제 #2
0
void Example_AffineAnimator::on_animate_arc_toggled()
{
  if ( m_animate_arc.get_active() )
    m_AffineAnimator->add( m_Arc );
  else
    m_AffineAnimator->remove( m_Arc );
}
예제 #3
0
void Example_Flasher::on_flash_arc_toggled()
{
  if ( m_flash_arc.get_active() )
    m_Flasher->add( m_Arc );
  else
    m_Flasher->remove( m_Arc );
}
예제 #4
0
void Example_Flasher::on_flash_bezierline_toggled()
{
  if ( m_flash_bezierline.get_active() )
    m_Flasher->add( m_BezierLine );
  else
    m_Flasher->remove( m_BezierLine );
}
예제 #5
0
void Example_AffineAnimator::on_animate_bezierline_toggled()
{
  if ( m_animate_bezierline.get_active() )
    m_AffineAnimator->add( m_BezierLine );
  else
    m_AffineAnimator->remove( m_BezierLine );
}
예제 #6
0
void Example_Flasher::on_flash_group_toggled()
{
  if ( m_flash_group.get_active() )
    m_Flasher->add( m_Group );
  else
    m_Flasher->remove( m_Group );
}
예제 #7
0
void Example_AffineAnimator::on_animate_group_toggled()
{
  if ( m_animate_group.get_active() )
    m_AffineAnimator->add( m_Group );
  else
    m_AffineAnimator->remove( m_Group );
}
예제 #8
0
 void aspect_toggled()
 {
   Gtk::CheckButton *check;
   _xml->get_widget("aspect_check", check);
   
   _be.set_keep_aspect_ratio(check->get_active());
 }
void GscPreferencesWindow::export_config()
{
	// we don't clear config here, it might contain non-dialog options too.

	Gtk::CheckButton* check = 0;
	Gtk::Entry* entry = 0;


	// ------- General tab

	if ((check = this->lookup_widget<Gtk::CheckButton*>("scan_on_startup_check")))
		prefs_config_set("gui/scan_on_startup", bool(check->get_active()));

	if ((check = this->lookup_widget<Gtk::CheckButton*>("show_smart_capable_only_check")))
		prefs_config_set("gui/show_smart_capable_only", bool(check->get_active()));

	if ((check = this->lookup_widget<Gtk::CheckButton*>("search_in_smartmontools_first_check")))
		prefs_config_set("system/win32_search_smartctl_in_smartmontools", bool(check->get_active()));

	if ((entry = this->lookup_widget<Gtk::Entry*>("smartctl_binary_entry")))
		prefs_config_set("system/smartctl_binary", std::string(entry->get_text()));

	if ((entry = this->lookup_widget<Gtk::Entry*>("smartctl_options_entry")))
		prefs_config_set("system/smartctl_options", std::string(entry->get_text()));


	// ------- Drives tab

	if ((entry = this->lookup_widget<Gtk::Entry*>("device_blacklist_patterns_entry")))
		prefs_config_set("system/device_blacklist_patterns", std::string(entry->get_text()));

	device_option_map_t devmap = device_options_treeview->get_device_map();
	std::string devmap_str = app_serialize_device_option_map(devmap);
	prefs_config_set("system/smartctl_device_options", devmap_str);

}
예제 #10
0
파일: jackfft.C 프로젝트: cppsp/workspace
void apply_pitchshift1(FFTFilter<jack_default_audio_sample_t>** filt2)
{
	double asdf = 1.;
	Gtk::CheckButton* cb;
	Gtk::Entry* e;
	b->get_widget("c_pitchshift", cb);
	if(cb->get_active())
	{
		b->get_widget("t_pitch", e);
		asdf = strtod(e->get_text().c_str(), NULL);
		asdf=pow(2,asdf/12.d);
		//b->get_widget("t_pitch2", e);
		//asdf /= strtod(e->get_text().c_str(), NULL);
	}
#ifdef JACKFFT_USE_SOUNDTOUCH
	if(asdf==1.) {
		apply_soundTouch=false;
	} else {
		for(int i=0;i<CHANNELS;i++) {
			soundTouch[i].setPitch(asdf);
		}
		wmb();
		apply_soundTouch=true;
	}
#else
	if(filt2 != NULL)
	{
		for(size_t i = 0; i < inputs.size(); i++)
		{
			if(filt2[i] == NULL)continue;
			filt2[i]->freq_scale = asdf;
		}
		return;
	}
	for(size_t i = 0; i < inputs.size(); i++)
		((FFTFilter<jack_default_audio_sample_t>*)filt[i])->freq_scale = asdf;
#endif
}
예제 #11
0
	bool get_invert()const { return checkbutton_invert.get_active(); }
예제 #12
0
	bool get_layer_plant_flag()const { return checkbutton_layer_plant.get_active(); }
예제 #13
0
	bool get_layer_curve_gradient_flag()const { return checkbutton_layer_curve_gradient.get_active(); }
예제 #14
0
bool getCheckButtonState(string b) {
    Gtk::CheckButton* tbut;
    VRGuiBuilder()->get_widget(b, tbut);
    return tbut->get_active();
}
예제 #15
0
	bool get_scale_flag()const { return checkbutton_scale.get_active(); }
예제 #16
0
	bool get_invert()const { return invert_checkbutton.get_active(); }
예제 #17
0
파일: settings.cpp 프로젝트: Tyndi/3dprint
void Settings::get_from_gui (Builder &builder, int i)
{
  const char *glade_name = settings[i].glade_name;

  if (glade_name == NULL)
        return; /* Not an automatically connected setting */

  switch (settings[i].type) {
  case T_BOOL: {
    Gtk::CheckButton *check = NULL;
    builder->get_widget (glade_name, check);
    if (!check)
      std::cerr << "Missing boolean config item " << glade_name << "\n";
    else
      *PTR_BOOL(this, i) = check->get_active();
    break;
  }
  case T_INT:
  case T_FLOAT: {
    Gtk::Widget *w = NULL;
    builder->get_widget (glade_name, w);
    if (!w) {
      std::cerr << "Missing GUI element " << glade_name << "\n";
      break;
    }

    Gtk::SpinButton *spin = dynamic_cast<Gtk::SpinButton *>(w);
    if (spin) {
      if (settings[i].type == T_INT)
          *PTR_INT(this, i) = spin->get_value();
      else
          *PTR_FLOAT(this, i) = spin->get_value();
      break;
    }

    Gtk::Range *range = dynamic_cast<Gtk::Range *>(w);
    if (range) {
      if (settings[i].type == T_INT)
          *PTR_INT(this, i) = range->get_value();
      else
          *PTR_FLOAT(this, i) = range->get_value();
    }
    break;
  }
  case T_STRING: {
    Gtk::Entry *e = NULL;
    builder->get_widget (glade_name, e);
    if (!e) {
      std::cerr << "Missing user interface item " << glade_name << "\n";
      break;
    }
    *PTR_STRING(this, i) = std::string(e->get_text());
    break;
  }
  case T_COLOUR_MEMBER:
    // Ignore, colour members are special
    break;
  default:
    std::cerr << "corrupt setting type\n";
    break;
  }

  if (settings[i].triggers_redraw)
    m_signal_visual_settings_changed.emit();
}
예제 #18
0
	bool get_aspect_lock_flag()const { return checkbutton_aspect_lock.get_active(); }
예제 #19
0
		void do_toggle() {
			if (resize->get_active())
				inner->show();
			else
				inner->hide();
		}
예제 #20
0
	bool get_layer_region_flag()const { return checkbutton_layer_region.get_active(); }
예제 #21
0
	bool get_layer_link_origins_flag()const { return layer_link_origins_checkbutton.get_active(); }
예제 #22
0
	bool get_layer_advanced_outline_flag()const { return checkbutton_layer_advanced_outline.get_active(); }
예제 #23
0
	bool get_paragraph_flag()const { return paragraph_checkbutton.get_active(); }
예제 #24
0
	bool get_relative() const { return check_relative.get_active(); }