#include "app.h"
#include "about.h"
+#include "splash.h"
#include "instance.h"
#include "canvasview.h"
#include "dialog_setup.h"
etl::handle<Instance> App::selected_instance;
etl::handle<CanvasView> App::selected_canvas_view;
+studio::About *studio::App::about=NULL;
+
studio::Toolbox *studio::App::toolbox=NULL;
studio::AutoRecover *studio::App::auto_recover=NULL;
menus_action_group->add( Gtk::Action::create("menu-layer", _("_Layer")) );
menus_action_group->add( Gtk::Action::create("menu-duck-mask", _("Show/Hide Ducks")) );
menus_action_group->add( Gtk::Action::create("menu-preview-quality", _("Preview Quality")) );
+ menus_action_group->add( Gtk::Action::create("menu-lowres-pixel", _("Low-Res Pixel Size")) );
menus_action_group->add( Gtk::Action::create("menu-layer-new", _("New Layer")) );
menus_action_group->add( Gtk::Action::create("menu-keyframe", _("Keyframe")) );
menus_action_group->add( Gtk::Action::create("menu-group", _("Group")) );
DEFINE_ACTION("quality-08", _("Use Quality Level 8"));
DEFINE_ACTION("quality-09", _("Use Quality Level 9"));
DEFINE_ACTION("quality-10", _("Use Quality Level 10"));
+ for(list<int>::iterator iter = CanvasView::get_pixel_sizes().begin(); iter != CanvasView::get_pixel_sizes().end(); iter++)
+ DEFINE_ACTION(strprintf("lowres-pixel-%d", *iter), strprintf(_("Set Low-Res pixel size to %d"), *iter));
DEFINE_ACTION("play", _("Play"));
// DEFINE_ACTION("pause", _("Pause"));
DEFINE_ACTION("stop", _("Stop"));
DEFINE_ACTION("toggle-grid-snap", _("Toggle Grid Snap"));
DEFINE_ACTION("toggle-guide-show", _("Toggle Guide Show"));
DEFINE_ACTION("toggle-low-res", _("Toggle Low-Res"));
+ DEFINE_ACTION("decrease-low-res-pixel-size", _("Decrease Low-Res Pixel Size"));
+ DEFINE_ACTION("increase-low-res-pixel-size", _("Increase Low-Res Pixel Size"));
DEFINE_ACTION("toggle-onion-skin", _("Toggle Onion Skin"));
DEFINE_ACTION("canvas-zoom-in", Gtk::StockID("gtk-zoom-in"));
DEFINE_ACTION("canvas-zoom-out", Gtk::StockID("gtk-zoom-out"));
" <menuitem action='quality-09' />"
" <menuitem action='quality-10' />"
" </menu>"
+" <menu action='menu-lowres-pixel'>"
+" <menuitem action='decrease-low-res-pixel-size'/>"
+" <menuitem action='increase-low-res-pixel-size'/>"
+" <separator name='pixel-size-separator'/>"
+;
+
+ for(list<int>::iterator iter = CanvasView::get_pixel_sizes().begin(); iter != CanvasView::get_pixel_sizes().end(); iter++)
+ ui_info += strprintf(" <menuitem action='lowres-pixel-%d' />", *iter);
+
+ ui_info +=
+" </menu>"
" <separator name='bleh08'/>"
" <menuitem action='play'/>"
//" <menuitem action='pause'/>"
ACCEL("<Actions>//time-zoom-in","+");
ACCEL("<Actions>//time-zoom-out","_");
*/
+ ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK,"<Actions>//decrease-low-res-pixel-size"));
+ ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK,"<Actions>//increase-low-res-pixel-size"));
+
ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK,"<Actions>//amount-dec"));
ACCEL2(Gtk::AccelKey(')',Gdk::MOD1_MASK|Gdk::CONTROL_MASK,"<Actions>//amount-inc"));
}
Glib::set_application_name(_("Synfig Studio"));
- About about_window;
- about_window.set_can_self_destruct(false);
- about_window.show();
+ Splash splash_screen;
+ splash_screen.set_can_self_destruct(false);
+ splash_screen.show();
shutdown_in_progress=false;
- SuperCallback synfig_init_cb(about_window.get_callback(),0,9000,10000);
- SuperCallback studio_init_cb(about_window.get_callback(),9000,10000,10000);
+ SuperCallback synfig_init_cb(splash_screen.get_callback(),0,9000,10000);
+ SuperCallback studio_init_cb(splash_screen.get_callback(),9000,10000,10000);
// Initialize the Synfig library
try { synfigapp_main=etl::smart_ptr<synfigapp::Main>(new synfigapp::Main(etl::dirname((*argv)[0]),&synfig_init_cb)); }
studio_init_cb.task(_("Init Toolbox..."));
toolbox=new studio::Toolbox();
+ studio_init_cb.task(_("Init About Dialog..."));
+ about=new studio::About();
+
studio_init_cb.task(_("Init Tool Options..."));
dialog_tool_options=new studio::Dialog_ToolOptions();
dock_manager->register_dockable(*dialog_tool_options);
device_tracker=new studio::DeviceTracker();
studio_init_cb.task(_("Init Tools..."));
+
+ /* row 1 */
state_manager->add_state(&state_normal);
state_manager->add_state(&state_smooth_move);
state_manager->add_state(&state_scale);
state_manager->add_state(&state_rotate);
+ studio_init_cb.task(_("Init ModMirror...")); module_list_.push_back(new ModMirror()); module_list_.back()->start();
+ /* row 2 */
state_manager->add_state(&state_bline);
-
-
state_manager->add_state(&state_circle);
state_manager->add_state(&state_rectangle);
-
state_manager->add_state(&state_gradient);
- state_manager->add_state(&state_eyedrop);
- state_manager->add_state(&state_fill);
-
- state_manager->add_state(&state_zoom);
-
- // Enabled - it's useful to be able to work with polygons without tangent ducks getting in the way.
- // I know we can switch tangent ducks off, but why not allow this kind of layer as well?
- if(!getenv("SYNFIG_DISABLE_POLYGON")) state_manager->add_state(&state_polygon);
+ if(!getenv("SYNFIG_DISABLE_POLYGON")) state_manager->add_state(&state_polygon); // Enabled - for working without ducks
- // Enabled for now. Let's see whether they're good enough yet.
- if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw);
+ /* row 3 */
+ if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw); // Enabled for now. Let's see whether they're good enough yet.
if(!getenv("SYNFIG_DISABLE_SKETCH" )) state_manager->add_state(&state_sketch);
+ state_manager->add_state(&state_fill);
+ state_manager->add_state(&state_eyedrop);
+ state_manager->add_state(&state_zoom);
// Disabled by default - it doesn't work properly?
if(getenv("SYNFIG_ENABLE_WIDTH" )) state_manager->add_state(&state_width);
studio_init_cb.task(_("Init ModPalette..."));
module_list_.push_back(new ModPalette()); module_list_.back()->start();
- studio_init_cb.task(_("Init ModMirror..."));
- module_list_.push_back(new ModMirror()); module_list_.back()->start();
-
-
studio_init_cb.task(_("Init Setup Dialog..."));
dialog_setup=new studio::Dialog_Setup();
if(auto_recover->recovery_needed())
{
- about_window.hide();
+ splash_screen.hide();
if(
get_ui_interface()->yes_no(
_("Auto Recovery"),
"idea to review them and save them now.")
);
}
- about_window.show();
+ splash_screen.show();
}
// Look for any files given on the command line,
if((*argv)[*argc] && (*argv)[*argc][0]!='-')
{
studio_init_cb.task(_("Loading files..."));
- about_window.hide();
+ splash_screen.hide();
open((*argv)[*argc]);
opened_any = true;
- about_window.show();
+ splash_screen.show();
}
// if no file was specified to be opened, create a new document to help new users get started more easily
delete auto_recover;
+ delete about;
+
toolbox->hide();
// studio::App::iteration(false);
void
App::dialog_about()
{
- (new class About())->show();
+ if(about)
+ about->show();
}
void