X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Frender.cpp;h=4b2f2b22f66f34425cbbe8205a8d4d9fbfd5e8e8;hb=4ec81d053bf1d0cbcd9f0bf048914ec8eca08f4c;hp=bc1c9cf7dc54e49b1f25f60bd0bfa6221c094ac3;hpb=74ffe9f0272371ded05a45f1e16ff7acd7a10093;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/render.cpp b/synfig-studio/trunk/src/gtkmm/render.cpp index bc1c9cf..4b2f2b2 100644 --- a/synfig-studio/trunk/src/gtkmm/render.cpp +++ b/synfig-studio/trunk/src/gtkmm/render.cpp @@ -1,8 +1,8 @@ /* === S Y N F I G ========================================================= */ -/*! \file render.cpp +/*! \file gtkmm/render.cpp ** \brief Template File ** -** $Id: render.cpp,v 1.2 2005/01/10 08:13:44 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley @@ -66,9 +66,9 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleget_canvas()->rend_desc()); - + canvas_interface->signal_rend_desc_changed().connect(sigc::mem_fun(*this,&RenderSettings::on_rend_desc_changed)); - + menu_target=manage(new class Gtk::Menu()); menu_target->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Auto"), @@ -77,7 +77,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleitems().push_back(Gtk::Menu_Helpers::MenuElem(iter->first, @@ -98,7 +98,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleshow(); choose_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_choose_pressed)); - + Gtk::Frame *target_frame=manage(new Gtk::Frame(_("Target"))); target_frame->set_shadow_type(Gtk::SHADOW_NONE); ((Gtk::Label *) target_frame->get_label_widget())->set_markup(_("Target")); @@ -106,7 +106,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleset_padding(6, 0, 24, 0); target_frame->add(*targetPadding); - + Gtk::Table *target_table = manage(new Gtk::Table(2, 3, false)); target_table->set_row_spacings(6); target_table->set_col_spacings(12); @@ -117,13 +117,13 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleset_mnemonic_widget(entry_filename); target_table->attach(*filenameLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); target_table->attach(entry_filename, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - target_table->attach(*choose_button, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - + target_table->attach(*choose_button, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + Gtk::Label *targetLabel = manage(new Gtk::Label(_("_Target"), true)); targetLabel->set_alignment(0, 0.5); targetLabel->set_mnemonic_widget(optionmenu_target); - target_table->attach(*targetLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - target_table->attach(optionmenu_target, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + target_table->attach(*targetLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + target_table->attach(optionmenu_target, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); toggle_single_frame.signal_toggled().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_single_frame_toggle)); @@ -135,7 +135,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleset_padding(6, 0, 24, 0); settings_frame->add(*settingsPadding); - + Gtk::Table *settings_table=manage(new Gtk::Table(2,2,false)); settings_table->set_row_spacings(6); settings_table->set_col_spacings(12); @@ -144,21 +144,21 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handleset_alignment(0, 0.5); qualityLabel->set_mnemonic_widget(entry_quality); - settings_table->attach(*qualityLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - settings_table->attach(entry_quality, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + settings_table->attach(*qualityLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + settings_table->attach(entry_quality, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); Gtk::Label *antiAliasLabel = manage(new Gtk::Label(_("_Anti-Aliasing"), true)); antiAliasLabel->set_alignment(0, 0.5); antiAliasLabel->set_mnemonic_widget(entry_antialias); - settings_table->attach(*antiAliasLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - settings_table->attach(entry_antialias, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - + settings_table->attach(*antiAliasLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + settings_table->attach(entry_antialias, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + toggle_single_frame.set_alignment(0, 0.5); - settings_table->attach(toggle_single_frame, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + settings_table->attach(toggle_single_frame, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); dialogBox->pack_start(widget_rend_desc); - - + + Gtk::Button *render_button(manage(new class Gtk::Button(Gtk::StockID("Render")))); render_button->show(); add_action_widget(*render_button,1); @@ -170,24 +170,24 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handlesignal_clicked().connect(sigc::mem_fun(*this, &studio::RenderSettings::on_cancel_pressed)); //set_default_response(1); - + set_title(_("Render Settings")+String(" - ")+canvas_interface_->get_canvas()->get_name()); toggle_single_frame.set_active(true); widget_rend_desc.disable_time_section(); - + try { - entry_filename.set_text(Glib::build_filename(Glib::get_home_dir(),Glib::ustring("Desktop")+ETL_DIRECTORY_SEPERATOR+Glib::ustring("output.png"))); + entry_filename.set_text(Glib::build_filename(Glib::get_home_dir(),Glib::ustring("Desktop")+ETL_DIRECTORY_SEPARATOR+Glib::ustring("output.png"))); } catch(...) { synfig::warning("Averted crash!"); entry_filename.set_text("output.png"); } - + get_vbox()->show_all(); } @@ -219,7 +219,7 @@ void RenderSettings::on_render_pressed() { String filename=entry_filename.get_text(); - + if(filename.empty()) { canvas_interface_->get_ui_interface()->error(_("You must supply a filename!")); @@ -241,7 +241,7 @@ RenderSettings::on_render_pressed() catch(std::runtime_error x) { canvas_interface_->get_ui_interface()->error(_("Unable to determine proper target from filename.")); - return; + return; } } @@ -259,11 +259,11 @@ RenderSettings::on_render_pressed() } hide(); - + target->set_canvas(canvas_interface_->get_canvas()); RendDesc rend_desc(widget_rend_desc.get_rend_desc()); rend_desc.set_antialias((int)adjustment_antialias.get_value()); - + // If we are to only render the current frame if(toggle_single_frame.get_active()) rend_desc.set_time(canvas_interface_->get_time()); @@ -292,21 +292,21 @@ RenderSettings::on_render_pressed() canvas_interface_->get_ui_interface()->amount_complete(0,10000); return; } - + // Success! - canvas_interface_->get_ui_interface()->task(filename+_(" rendered sucessfuly")); + canvas_interface_->get_ui_interface()->task(filename+_(" rendered successfully")); canvas_interface_->get_ui_interface()->amount_complete(0,10000); */ - return; + return; } void RenderSettings::on_finished() { - canvas_interface_->get_ui_interface()->task(_("File rendered sucessfuly")); + canvas_interface_->get_ui_interface()->task(_("File rendered successfully")); canvas_interface_->get_ui_interface()->amount_complete(0,10000); } - + void RenderSettings::on_cancel_pressed() {