#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;
DEFINE_ACTION("quality-08", _("Use Quality Level 8"));
DEFINE_ACTION("quality-09", _("Use Quality Level 9"));
DEFINE_ACTION("quality-10", _("Use Quality Level 10"));
- DEFINE_ACTION("lowres-pixel-2", _("Set Low-Res pixel size to 2"));
- DEFINE_ACTION("lowres-pixel-3", _("Set Low-Res pixel size to 3"));
- DEFINE_ACTION("lowres-pixel-4", _("Set Low-Res pixel size to 4"));
- DEFINE_ACTION("lowres-pixel-5", _("Set Low-Res pixel size to 5"));
- DEFINE_ACTION("lowres-pixel-6", _("Set Low-Res pixel size to 6"));
- DEFINE_ACTION("lowres-pixel-8", _("Set Low-Res pixel size to 8"));
- DEFINE_ACTION("lowres-pixel-10", _("Set Low-Res pixel size to 10"));
- DEFINE_ACTION("lowres-pixel-12", _("Set Low-Res pixel size to 12"));
- DEFINE_ACTION("lowres-pixel-15", _("Set Low-Res pixel size to 15"));
- DEFINE_ACTION("lowres-pixel-20", _("Set Low-Res pixel size to 20"));
- DEFINE_ACTION("lowres-pixel-24", _("Set Low-Res pixel size to 24"));
- DEFINE_ACTION("lowres-pixel-30", _("Set Low-Res pixel size to 30"));
- DEFINE_ACTION("lowres-pixel-40", _("Set Low-Res pixel size to 40"));
- DEFINE_ACTION("lowres-pixel-60", _("Set Low-Res pixel size to 60"));
- DEFINE_ACTION("lowres-pixel-120", _("Set Low-Res pixel size to 120"));
+ 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-10' />"
" </menu>"
" <menu action='menu-lowres-pixel'>"
-" <menuitem action='lowres-pixel-2' />"
-" <menuitem action='lowres-pixel-3' />"
-" <menuitem action='lowres-pixel-4' />"
-" <menuitem action='lowres-pixel-5' />"
-" <menuitem action='lowres-pixel-6' />"
-" <menuitem action='lowres-pixel-8' />"
-" <menuitem action='lowres-pixel-10' />"
-" <menuitem action='lowres-pixel-12' />"
-" <menuitem action='lowres-pixel-15' />"
-" <menuitem action='lowres-pixel-20' />"
-" <menuitem action='lowres-pixel-24' />"
-" <menuitem action='lowres-pixel-30' />"
-" <menuitem action='lowres-pixel-40' />"
-" <menuitem action='lowres-pixel-60' />"
-" <menuitem action='lowres-pixel-120' />"
+" <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'/>"
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);
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