Removed trailing whitespace.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 12 Mar 2007 22:47:51 +0000 (22:47 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 12 Mar 2007 22:47:51 +0000 (22:47 +0000)
git-svn-id: http://svn.voria.com/code@305 1f10aa63-cdf2-0310-b900-c93c546f37ac

331 files changed:
synfig-studio/trunk/src/gtkmm/about.cpp
synfig-studio/trunk/src/gtkmm/about.h
synfig-studio/trunk/src/gtkmm/adjust_window.cpp
synfig-studio/trunk/src/gtkmm/adjust_window.h
synfig-studio/trunk/src/gtkmm/app.cpp
synfig-studio/trunk/src/gtkmm/app.h
synfig-studio/trunk/src/gtkmm/asyncrenderer.cpp
synfig-studio/trunk/src/gtkmm/asyncrenderer.h
synfig-studio/trunk/src/gtkmm/audiocontainer.cpp
synfig-studio/trunk/src/gtkmm/audiocontainer.h
synfig-studio/trunk/src/gtkmm/autorecover.cpp
synfig-studio/trunk/src/gtkmm/autorecover.h
synfig-studio/trunk/src/gtkmm/canvasoptions.cpp
synfig-studio/trunk/src/gtkmm/canvasoptions.h
synfig-studio/trunk/src/gtkmm/canvasproperties.cpp
synfig-studio/trunk/src/gtkmm/canvasproperties.h
synfig-studio/trunk/src/gtkmm/canvastreestore.cpp
synfig-studio/trunk/src/gtkmm/canvastreestore.h
synfig-studio/trunk/src/gtkmm/canvasview.cpp
synfig-studio/trunk/src/gtkmm/canvasview.h
synfig-studio/trunk/src/gtkmm/cellrenderer_gradient.h
synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp
synfig-studio/trunk/src/gtkmm/cellrenderer_time.h
synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp
synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h
synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
synfig-studio/trunk/src/gtkmm/cellrenderer_value.h
synfig-studio/trunk/src/gtkmm/childrentree.cpp
synfig-studio/trunk/src/gtkmm/childrentree.h
synfig-studio/trunk/src/gtkmm/childrentreestore.cpp
synfig-studio/trunk/src/gtkmm/childrentreestore.h
synfig-studio/trunk/src/gtkmm/compview.cpp
synfig-studio/trunk/src/gtkmm/compview.h
synfig-studio/trunk/src/gtkmm/devicetracker.cpp
synfig-studio/trunk/src/gtkmm/dialog_color.cpp
synfig-studio/trunk/src/gtkmm/dialog_color.h
synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp
synfig-studio/trunk/src/gtkmm/dialog_gradient.h
synfig-studio/trunk/src/gtkmm/dialog_keyframe.cpp
synfig-studio/trunk/src/gtkmm/dialog_keyframe.h
synfig-studio/trunk/src/gtkmm/dialog_preview.cpp
synfig-studio/trunk/src/gtkmm/dialog_preview.h
synfig-studio/trunk/src/gtkmm/dialog_setup.cpp
synfig-studio/trunk/src/gtkmm/dialog_setup.h
synfig-studio/trunk/src/gtkmm/dialog_soundselect.cpp
synfig-studio/trunk/src/gtkmm/dialog_soundselect.h
synfig-studio/trunk/src/gtkmm/dialog_tooloptions.cpp
synfig-studio/trunk/src/gtkmm/dialog_tooloptions.h
synfig-studio/trunk/src/gtkmm/dialog_waypoint.cpp
synfig-studio/trunk/src/gtkmm/dialog_waypoint.h
synfig-studio/trunk/src/gtkmm/dialogsettings.cpp
synfig-studio/trunk/src/gtkmm/dock_canvases.cpp
synfig-studio/trunk/src/gtkmm/dock_canvases.h
synfig-studio/trunk/src/gtkmm/dock_canvasspecific.cpp
synfig-studio/trunk/src/gtkmm/dock_canvasspecific.h
synfig-studio/trunk/src/gtkmm/dock_children.cpp
synfig-studio/trunk/src/gtkmm/dock_children.h
synfig-studio/trunk/src/gtkmm/dock_curves.cpp
synfig-studio/trunk/src/gtkmm/dock_curves.h
synfig-studio/trunk/src/gtkmm/dock_history.cpp
synfig-studio/trunk/src/gtkmm/dock_history.h
synfig-studio/trunk/src/gtkmm/dock_info.cpp
synfig-studio/trunk/src/gtkmm/dock_info.h
synfig-studio/trunk/src/gtkmm/dock_keyframes.cpp
synfig-studio/trunk/src/gtkmm/dock_keyframes.h
synfig-studio/trunk/src/gtkmm/dock_layergroups.cpp
synfig-studio/trunk/src/gtkmm/dock_layergroups.h
synfig-studio/trunk/src/gtkmm/dock_layers.cpp
synfig-studio/trunk/src/gtkmm/dock_layers.h
synfig-studio/trunk/src/gtkmm/dock_metadata.cpp
synfig-studio/trunk/src/gtkmm/dock_metadata.h
synfig-studio/trunk/src/gtkmm/dock_navigator.cpp
synfig-studio/trunk/src/gtkmm/dock_navigator.h
synfig-studio/trunk/src/gtkmm/dock_params.cpp
synfig-studio/trunk/src/gtkmm/dock_params.h
synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp
synfig-studio/trunk/src/gtkmm/dockable.cpp
synfig-studio/trunk/src/gtkmm/dockable.h
synfig-studio/trunk/src/gtkmm/dockbook.cpp
synfig-studio/trunk/src/gtkmm/dockbook.h
synfig-studio/trunk/src/gtkmm/dockdialog.cpp
synfig-studio/trunk/src/gtkmm/dockdialog.h
synfig-studio/trunk/src/gtkmm/dockmanager.cpp
synfig-studio/trunk/src/gtkmm/dockmanager.h
synfig-studio/trunk/src/gtkmm/duck.cpp
synfig-studio/trunk/src/gtkmm/duck.h
synfig-studio/trunk/src/gtkmm/duckmatic.cpp
synfig-studio/trunk/src/gtkmm/duckmatic.h
synfig-studio/trunk/src/gtkmm/ducktransform_rotate.h
synfig-studio/trunk/src/gtkmm/ducktransform_translate.h
synfig-studio/trunk/src/gtkmm/event_layerclick.h
synfig-studio/trunk/src/gtkmm/event_mouse.h
synfig-studio/trunk/src/gtkmm/eventkey.h
synfig-studio/trunk/src/gtkmm/groupactionmanager.cpp
synfig-studio/trunk/src/gtkmm/groupactionmanager.h
synfig-studio/trunk/src/gtkmm/historytreestore.cpp
synfig-studio/trunk/src/gtkmm/historytreestore.h
synfig-studio/trunk/src/gtkmm/iconcontroler.cpp
synfig-studio/trunk/src/gtkmm/instance.cpp
synfig-studio/trunk/src/gtkmm/instance.h
synfig-studio/trunk/src/gtkmm/ipc.cpp
synfig-studio/trunk/src/gtkmm/ipc.h
synfig-studio/trunk/src/gtkmm/keyframeactionmanager.cpp
synfig-studio/trunk/src/gtkmm/keyframeactionmanager.h
synfig-studio/trunk/src/gtkmm/keyframetree.cpp
synfig-studio/trunk/src/gtkmm/keyframetree.h
synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp
synfig-studio/trunk/src/gtkmm/keyframetreestore.h
synfig-studio/trunk/src/gtkmm/keymapsettings.cpp
synfig-studio/trunk/src/gtkmm/keymapsettings.h
synfig-studio/trunk/src/gtkmm/layeractionmanager.cpp
synfig-studio/trunk/src/gtkmm/layeractionmanager.h
synfig-studio/trunk/src/gtkmm/layergrouptree.cpp
synfig-studio/trunk/src/gtkmm/layergrouptree.h
synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp
synfig-studio/trunk/src/gtkmm/layergrouptreestore.h
synfig-studio/trunk/src/gtkmm/layerparamtreestore.cpp
synfig-studio/trunk/src/gtkmm/layerparamtreestore.h
synfig-studio/trunk/src/gtkmm/layertree.cpp
synfig-studio/trunk/src/gtkmm/layertree.h
synfig-studio/trunk/src/gtkmm/layertreestore.cpp
synfig-studio/trunk/src/gtkmm/layertreestore.h
synfig-studio/trunk/src/gtkmm/main.cpp
synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp
synfig-studio/trunk/src/gtkmm/metadatatreestore.h
synfig-studio/trunk/src/gtkmm/mod_mirror/mod_mirror.h
synfig-studio/trunk/src/gtkmm/mod_mirror/state_mirror.cpp
synfig-studio/trunk/src/gtkmm/mod_palette/dock_palbrowse.cpp
synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.cpp
synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.h
synfig-studio/trunk/src/gtkmm/mod_palette/mod_palette.cpp
synfig-studio/trunk/src/gtkmm/mod_palette/mod_palette.h
synfig-studio/trunk/src/gtkmm/module.cpp
synfig-studio/trunk/src/gtkmm/module.h
synfig-studio/trunk/src/gtkmm/onemoment.cpp
synfig-studio/trunk/src/gtkmm/onemoment.h
synfig-studio/trunk/src/gtkmm/preview.cpp
synfig-studio/trunk/src/gtkmm/preview.h
synfig-studio/trunk/src/gtkmm/renddesc.h
synfig-studio/trunk/src/gtkmm/render.cpp
synfig-studio/trunk/src/gtkmm/render.h
synfig-studio/trunk/src/gtkmm/renderer_bbox.cpp
synfig-studio/trunk/src/gtkmm/renderer_bbox.h
synfig-studio/trunk/src/gtkmm/renderer_canvas.cpp
synfig-studio/trunk/src/gtkmm/renderer_canvas.h
synfig-studio/trunk/src/gtkmm/renderer_dragbox.cpp
synfig-studio/trunk/src/gtkmm/renderer_dragbox.h
synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp
synfig-studio/trunk/src/gtkmm/renderer_ducks.h
synfig-studio/trunk/src/gtkmm/renderer_grid.cpp
synfig-studio/trunk/src/gtkmm/renderer_grid.h
synfig-studio/trunk/src/gtkmm/renderer_guides.cpp
synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp
synfig-studio/trunk/src/gtkmm/renderer_timecode.h
synfig-studio/trunk/src/gtkmm/smach.h
synfig-studio/trunk/src/gtkmm/state_bline.cpp
synfig-studio/trunk/src/gtkmm/state_bline.h
synfig-studio/trunk/src/gtkmm/state_circle.cpp
synfig-studio/trunk/src/gtkmm/state_circle.h
synfig-studio/trunk/src/gtkmm/state_draw.cpp
synfig-studio/trunk/src/gtkmm/state_draw.h
synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp
synfig-studio/trunk/src/gtkmm/state_eyedrop.h
synfig-studio/trunk/src/gtkmm/state_fill.cpp
synfig-studio/trunk/src/gtkmm/state_fill.h
synfig-studio/trunk/src/gtkmm/state_gradient.cpp
synfig-studio/trunk/src/gtkmm/state_normal.cpp
synfig-studio/trunk/src/gtkmm/state_normal.h
synfig-studio/trunk/src/gtkmm/state_polygon.cpp
synfig-studio/trunk/src/gtkmm/state_rectangle.cpp
synfig-studio/trunk/src/gtkmm/state_rectangle.h
synfig-studio/trunk/src/gtkmm/state_rotate.cpp
synfig-studio/trunk/src/gtkmm/state_scale.cpp
synfig-studio/trunk/src/gtkmm/state_sketch.cpp
synfig-studio/trunk/src/gtkmm/state_sketch.h
synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp
synfig-studio/trunk/src/gtkmm/state_stroke.cpp
synfig-studio/trunk/src/gtkmm/state_stroke.h
synfig-studio/trunk/src/gtkmm/state_width.cpp
synfig-studio/trunk/src/gtkmm/state_width.h
synfig-studio/trunk/src/gtkmm/state_zoom.cpp
synfig-studio/trunk/src/gtkmm/statemanager.cpp
synfig-studio/trunk/src/gtkmm/statemanager.h
synfig-studio/trunk/src/gtkmm/toolbox.cpp
synfig-studio/trunk/src/gtkmm/toolbox.h
synfig-studio/trunk/src/gtkmm/valuelink.cpp
synfig-studio/trunk/src/gtkmm/valuelink.h
synfig-studio/trunk/src/gtkmm/widget_canvaschooser.cpp
synfig-studio/trunk/src/gtkmm/widget_canvaschooser.h
synfig-studio/trunk/src/gtkmm/widget_color.cpp
synfig-studio/trunk/src/gtkmm/widget_color.h
synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp
synfig-studio/trunk/src/gtkmm/widget_coloredit.h
synfig-studio/trunk/src/gtkmm/widget_compselect.cpp
synfig-studio/trunk/src/gtkmm/widget_compselect.h
synfig-studio/trunk/src/gtkmm/widget_curves.cpp
synfig-studio/trunk/src/gtkmm/widget_curves.h
synfig-studio/trunk/src/gtkmm/widget_defaults.cpp
synfig-studio/trunk/src/gtkmm/widget_defaults.h
synfig-studio/trunk/src/gtkmm/widget_distance.h
synfig-studio/trunk/src/gtkmm/widget_enum.cpp
synfig-studio/trunk/src/gtkmm/widget_enum.h
synfig-studio/trunk/src/gtkmm/widget_filename.h
synfig-studio/trunk/src/gtkmm/widget_gradient.cpp
synfig-studio/trunk/src/gtkmm/widget_gradient.h
synfig-studio/trunk/src/gtkmm/widget_sound.cpp
synfig-studio/trunk/src/gtkmm/widget_sound.h
synfig-studio/trunk/src/gtkmm/widget_time.cpp
synfig-studio/trunk/src/gtkmm/widget_time.h
synfig-studio/trunk/src/gtkmm/widget_timeslider.cpp
synfig-studio/trunk/src/gtkmm/widget_timeslider.h
synfig-studio/trunk/src/gtkmm/widget_value.cpp
synfig-studio/trunk/src/gtkmm/widget_value.h
synfig-studio/trunk/src/gtkmm/widget_vector.cpp
synfig-studio/trunk/src/gtkmm/widget_vector.h
synfig-studio/trunk/src/gtkmm/widget_waypoint.cpp
synfig-studio/trunk/src/gtkmm/widget_waypointmodel.cpp
synfig-studio/trunk/src/gtkmm/widget_waypointmodel.h
synfig-studio/trunk/src/gtkmm/workarea.cpp
synfig-studio/trunk/src/gtkmm/workarea.h
synfig-studio/trunk/src/gtkmm/workarearenderer.cpp
synfig-studio/trunk/src/gtkmm/workarearenderer.h
synfig-studio/trunk/src/gtkmm/zoomdial.h
synfig-studio/trunk/src/synfigapp/action.cpp
synfig-studio/trunk/src/synfigapp/action.h
synfig-studio/trunk/src/synfigapp/action_param.cpp
synfig-studio/trunk/src/synfigapp/action_param.h
synfig-studio/trunk/src/synfigapp/action_system.cpp
synfig-studio/trunk/src/synfigapp/action_system.h
synfig-studio/trunk/src/synfigapp/actions/activepointadd.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointremove.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointset.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointset.h
synfig-studio/trunk/src/synfigapp/actions/activepointsetoff.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointseton.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointsimpleadd.cpp
synfig-studio/trunk/src/synfigapp/actions/activepointsimpleadd.h
synfig-studio/trunk/src/synfigapp/actions/blinepointtangentmerge.cpp
synfig-studio/trunk/src/synfigapp/actions/blinepointtangentsplit.cpp
synfig-studio/trunk/src/synfigapp/actions/canvasadd.cpp
synfig-studio/trunk/src/synfigapp/actions/canvasremove.cpp
synfig-studio/trunk/src/synfigapp/actions/canvasrenddescset.cpp
synfig-studio/trunk/src/synfigapp/actions/colorset.cpp
synfig-studio/trunk/src/synfigapp/actions/editmodeset.cpp
synfig-studio/trunk/src/synfigapp/actions/gradientset.cpp
synfig-studio/trunk/src/synfigapp/actions/groupaddlayers.cpp
synfig-studio/trunk/src/synfigapp/actions/groupaddlayers.h
synfig-studio/trunk/src/synfigapp/actions/groupremove.cpp
synfig-studio/trunk/src/synfigapp/actions/groupremove.h
synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp
synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.h
synfig-studio/trunk/src/synfigapp/actions/grouprename.cpp
synfig-studio/trunk/src/synfigapp/actions/grouprename.h
synfig-studio/trunk/src/synfigapp/actions/keyframeadd.cpp
synfig-studio/trunk/src/synfigapp/actions/keyframeduplicate.cpp
synfig-studio/trunk/src/synfigapp/actions/keyframeremove.cpp
synfig-studio/trunk/src/synfigapp/actions/keyframeset.cpp
synfig-studio/trunk/src/synfigapp/actions/keyframeset.h
synfig-studio/trunk/src/synfigapp/actions/keyframesetdelta.cpp
synfig-studio/trunk/src/synfigapp/actions/keyframesetdelta.h
synfig-studio/trunk/src/synfigapp/actions/keyframewaypointset.cpp
synfig-studio/trunk/src/synfigapp/actions/layeractivate.cpp
synfig-studio/trunk/src/synfigapp/actions/layeradd.cpp
synfig-studio/trunk/src/synfigapp/actions/layerduplicate.cpp
synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp
synfig-studio/trunk/src/synfigapp/actions/layerlower.cpp
synfig-studio/trunk/src/synfigapp/actions/layermove.cpp
synfig-studio/trunk/src/synfigapp/actions/layerparamconnect.cpp
synfig-studio/trunk/src/synfigapp/actions/layerparamdisconnect.cpp
synfig-studio/trunk/src/synfigapp/actions/layerparamset.cpp
synfig-studio/trunk/src/synfigapp/actions/layerraise.cpp
synfig-studio/trunk/src/synfigapp/actions/layerremove.cpp
synfig-studio/trunk/src/synfigapp/actions/layerremove.h
synfig-studio/trunk/src/synfigapp/actions/layersetdesc.cpp
synfig-studio/trunk/src/synfigapp/actions/timepointscopy.cpp
synfig-studio/trunk/src/synfigapp/actions/timepointscopy.h
synfig-studio/trunk/src/synfigapp/actions/timepointsdelete.cpp
synfig-studio/trunk/src/synfigapp/actions/timepointsdelete.h
synfig-studio/trunk/src/synfigapp/actions/timepointsmove.cpp
synfig-studio/trunk/src/synfigapp/actions/timepointsmove.h
synfig-studio/trunk/src/synfigapp/actions/valuedescconnect.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedescexport.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp
synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodeadd.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodeconstset.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistinsert.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistloop.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistremove.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistunloop.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodelinkconnect.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodelinkdisconnect.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenoderemove.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenoderename.cpp
synfig-studio/trunk/src/synfigapp/actions/valuenodereplace.cpp
synfig-studio/trunk/src/synfigapp/actions/waypointadd.cpp
synfig-studio/trunk/src/synfigapp/actions/waypointadd.h
synfig-studio/trunk/src/synfigapp/actions/waypointremove.cpp
synfig-studio/trunk/src/synfigapp/actions/waypointset.cpp
synfig-studio/trunk/src/synfigapp/actions/waypointset.h
synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp
synfig-studio/trunk/src/synfigapp/actions/waypointsimpleadd.cpp
synfig-studio/trunk/src/synfigapp/actions/waypointsimpleadd.h
synfig-studio/trunk/src/synfigapp/blineconvert.cpp
synfig-studio/trunk/src/synfigapp/blineconvert.h
synfig-studio/trunk/src/synfigapp/canvasinterface.cpp
synfig-studio/trunk/src/synfigapp/canvasinterface.h
synfig-studio/trunk/src/synfigapp/cvs.cpp
synfig-studio/trunk/src/synfigapp/cvs.h
synfig-studio/trunk/src/synfigapp/editmode.h
synfig-studio/trunk/src/synfigapp/inputdevice.cpp
synfig-studio/trunk/src/synfigapp/inputdevice.h
synfig-studio/trunk/src/synfigapp/instance.cpp
synfig-studio/trunk/src/synfigapp/instance.h
synfig-studio/trunk/src/synfigapp/main.cpp
synfig-studio/trunk/src/synfigapp/main.h
synfig-studio/trunk/src/synfigapp/selectionmanager.h
synfig-studio/trunk/src/synfigapp/settings.cpp
synfig-studio/trunk/src/synfigapp/settings.h
synfig-studio/trunk/src/synfigapp/timegather.cpp
synfig-studio/trunk/src/synfigapp/timegather.h
synfig-studio/trunk/src/synfigapp/uimanager.cpp
synfig-studio/trunk/src/synfigapp/uimanager.h
synfig-studio/trunk/src/synfigapp/value_desc.h
synfig-studio/trunk/src/template.h

index eba53e6..7534469 100644 (file)
@@ -84,11 +84,11 @@ extern      const guint gtk_interface_age;
 class studio::AboutProgress : public synfig::ProgressCallback
 {
        About &about;
-       
+
 public:
 
        AboutProgress(About &about):about(about) { }
-       
+
        virtual bool task(const std::string &task)
        {
                if(about.tasklabel)
@@ -170,19 +170,19 @@ About::About():
        if(synfig_root) {
                imagepath=synfig_root;
                imagepath+=ETL_DIRECTORY_SEPERATOR;
-               
+
                imagepath+="share/pixmaps";
        }
        imagepath+=ETL_DIRECTORY_SEPERATOR;
-       
-       
+
+
        // Create the Logo
        Gtk::Image *Logo = manage(new class Gtk::Image());
        Logo->set(imagepath+"about_dialog."IMAGE_EXT);
        Logo->set_size_request(image_w,image_h);
        Logo->set_alignment(0.5,0.5);
        Logo->set_padding(0,0);
-       
+
        // Create the Copyright Label
        Gtk::Label *CopyrightLabel = manage(new class Gtk::Label(SYNFIG_COPYRIGHT));
        CopyrightLabel->set_size_request(image_w,24);
@@ -199,7 +199,7 @@ About::About():
        VersionLabel->set_padding(0,0);
        VersionLabel->set_justify(Gtk::JUSTIFY_CENTER);
        VersionLabel->set_line_wrap(false);
-       
+
        // Set the version label to contain the correct information
        string ver;
        ver+="Version "VERSION" ("__DATE__" "__TIME__")\n";
@@ -220,7 +220,7 @@ About::About():
        Gtk::Image *image2 = manage(new class Gtk::Image(Gtk::StockID("gtk-close"), Gtk::IconSize(4)));
        image2->set_alignment(0.5,0.5);
        image2->set_padding(0,0);
-       
+
        // Create the close button, and attach the image to it
        CloseButton = manage(new class Gtk::Button());
        CloseButton->set_size_request(24,24);
@@ -237,7 +237,7 @@ About::About():
        tasklabel = manage(new class Gtk::Label());
        tasklabel->set_size_request(image_w,24);
        tasklabel->set_use_underline(false);
-       
+
        // Create the Gtk::Fixed container and put all of the widgets into it
        Gtk::Fixed *fixed1 = manage(new class Gtk::Fixed());
        fixed1->put(*Logo, 0, 0);
@@ -287,7 +287,7 @@ About::set_can_self_destruct(bool x)
        if(x==true)
                CloseButton->show();
        else
-               CloseButton->hide();            
+               CloseButton->hide();
 }
 
 synfig::ProgressCallback *
index a644bca..434e2a8 100644 (file)
@@ -44,13 +44,13 @@ namespace synfig { class ProgressCallback; };
 namespace studio {
 
 class AboutProgress;
-       
+
 class About : public Gtk::Window
 {
        friend class AboutProgress;
-       
+
        AboutProgress *cb;
-       
+
        Gtk::Tooltips _tooltips;
 
        Gtk::Label *tasklabel;
@@ -60,10 +60,10 @@ class About : public Gtk::Window
        void close();
 
        bool can_self_destruct;
-       
+
 public:
-       
-       synfig::ProgressCallback *get_callback();       
+
+       synfig::ProgressCallback *get_callback();
 
        void set_can_self_destruct(bool x);
 
index ca0219f..833aa14 100644 (file)
@@ -81,14 +81,14 @@ const Gtk::Adjustment *Adjust_Window::get_child_adjustment() const
 void Adjust_Window::set_child_adjustment(Gtk::Adjustment *child)
 {
        childchanged.disconnect();
-       
+
        adj_child = child;
-       
+
        synfig::info("Adjust: connecting to child signals");
        if(child)
        {
                childchanged = child->signal_changed().connect(sigc::mem_fun(*this,&Adjust_Window::update_fromchild));
-               
+
                update_child();
        }
 }
@@ -120,23 +120,23 @@ void Adjust_Window::update_child()
        if(adj_child)
        {
                bool childchanged = false;
-               
+
                double v = get_value();
                double ve = v + get_page_size();
-               
+
                //reset child's values if they need to be...
                if(abs(v - adj_child->get_lower()) > EPSILON)
                {
                        adj_child->set_lower(v);
                        childchanged = true;
                }
-               
+
                if(abs(ve - adj_child->get_upper()) > EPSILON)
                {
                        adj_child->set_upper(ve);
-                       childchanged = true;                                                                    
+                       childchanged = true;
                }
-               
+
                if(childchanged)
                {
                        adj_child->changed();
@@ -147,17 +147,17 @@ void Adjust_Window::update_child()
 void Adjust_Window::update_fromchild()
 {
        if(adj_child)
-       {               
+       {
                double b = adj_child->get_lower();
                double dist = adj_child->get_upper() - b;
-               
+
                //reset our values if they need to be...
                if(abs(get_value() - b) > EPSILON)
                {
                        set_value(b);
                        value_changed();
                }
-               
+
                if(abs(get_page_size() - dist) > EPSILON)
                {
                        set_page_size(dist);
index 2385dd4..3ebd64f 100644 (file)
@@ -38,20 +38,20 @@ namespace studio {
 
 /* Sets up an adjustment that controls/communicates with another adjustment
        (could be expanded to multiple children)
-       
+
        The current value and pagesize define the lower and upper bounds of the
        child adjustment.
-       
+
        NEED TO REPLACE FUNCTIONALITY IN:
        refresh_rend_desc
        refresh_time_window
        on_time_changed - possibly....
-       
+
        time_zoom_in - possibly...
        time_zoom_out - possibly...
-       
+
        play - possibly...
-       
+
        THINGS TO CHECK:
        disp_audio's use of time_adjustment
        children_tree's use of time_adjustment
@@ -60,18 +60,18 @@ namespace studio {
 class Adjust_Window : public Gtk::Adjustment
 {
        Gtk::Adjustment *adj_child;
-       
+
        sigc::connection childchanged; //we only care about the non-value parts of the child
-       
+
        virtual void on_changed(); //value+pagesize corresponds to child upper
        virtual void on_value_changed(); //value corresponds to child lower
 
 protected: //update interface
        virtual void update_child();
        virtual void update_fromchild();
-       
+
 public: //structors
-       Adjust_Window(double value, double lower, double upper, 
+       Adjust_Window(double value, double lower, double upper,
                                        double step_increment=1, double page_increment=10, double page_size=0,
                                        Gtk::Adjustment *adj = 0);
 
@@ -86,7 +86,7 @@ public: //Sub value interface
        double get_sub_lower() const;
        double get_sub_upper() const;
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 3fe18a7..205a0bd 100644 (file)
@@ -277,11 +277,11 @@ public:
                );
                Gtk::Label label(message);
                label.show();
-               
+
                dialog.get_vbox()->pack_start(label);
                dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES);
                dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO);
-               
+
                dialog.set_default_response(dflt);
                dialog.show();
                return (Response)dialog.run();
@@ -295,12 +295,12 @@ public:
                );
                Gtk::Label label(message);
                label.show();
-               
+
                dialog.get_vbox()->pack_start(label);
                dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES);
                dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO);
                dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL);
-               
+
                dialog.set_default_response(dflt);
                dialog.show();
                return (Response)dialog.run();
@@ -314,11 +314,11 @@ public:
                );
                Gtk::Label label(message);
                label.show();
-               
+
                dialog.get_vbox()->pack_start(label);
                dialog.add_button(Gtk::StockID("gtk-ok"),RESPONSE_OK);
                dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL);
-               
+
                dialog.set_default_response(dflt);
                dialog.show();
                return (Response)dialog.run();
@@ -334,7 +334,7 @@ public:
 
        virtual bool
        error(const std::string &err)
-       {               
+       {
                Gtk::MessageDialog dialog(err, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true);
                dialog.show();
                dialog.run();
@@ -391,11 +391,11 @@ int v_unwind_key(V_KeyUnwound* unwound, const char* key)
        int i;
        unwound->element.serial=0;
        unwound->element.checksum=0;
-       
+
        for(i=0;i<16;i++)
        {
                U8 data;
-               
+
                switch(key[i])
                {
                        case '0': data=0; break;
@@ -428,13 +428,13 @@ int v_key_check(const char* key, U32* serial, U32 appid)
        V_KeyUnwound unwound_key;
        U32 appid_mask_a=hash_U32(appid);
        U32 appid_mask_b=hash_U32(appid_mask_a);
-       
+
        if(!v_unwind_key(&unwound_key, key))
        {
                // Invalid characters in key
                return 0;
        }
-       
+
 
        // Undo obfuscation pass
        {
@@ -446,12 +446,12 @@ int v_key_check(const char* key, U32* serial, U32 appid)
                        unwound_key.raw[endian_fix(i)]^=(next>>24);
                }
        }
-       
+
        unwound_key.element.serial^=appid_mask_a;
        unwound_key.element.checksum^=appid_mask_b;
 
        *serial=unwound_key.element.serial;
-       
+
        return unwound_key.element.checksum==hash_U32(unwound_key.element.serial);
 }
 
@@ -466,8 +466,8 @@ int check_license(String basedir)
        license_file="/usr/local/etc/.synfiglicense";
 #else
        license_file=basedir+"\\etc\\.synfiglicense";
-#endif         
-       
+#endif
+
        try {
                key=Glib::file_get_contents(license_file);
        } catch (Glib::FileError) { }
@@ -477,7 +477,7 @@ int check_license(String basedir)
                while(!v_key_check(key.c_str(),&serial,0xdeadbeef))
                {
                        key.clear();
-                       
+
                        if(!App::dialog_entry(
                                _("Synfig Studio Authentication"),
                                _("Please enter your license key below. You will not\nbe able to use this software without a valid license key."),
@@ -485,7 +485,7 @@ int check_license(String basedir)
                        ))
                                throw String("No License");
                }
-               
+
                FILE* file=fopen(license_file.c_str(),"w");
                if(file)
                {
@@ -499,7 +499,7 @@ int check_license(String basedir)
        return serial;
 #else
        return 1;
-#endif 
+#endif
 }
 
 /*
@@ -532,7 +532,7 @@ studio::add_action_group_to_top(Glib::RefPtr<studio::UIManager> ui_manager, Glib
        DEBUGPOINT();
        std::list<Glib::RefPtr<Gtk::ActionGroup> > prev_groups(ui_manager->get_action_groups());
        std::list<Glib::RefPtr<Gtk::ActionGroup> >::reverse_iterator iter;
-       
+
        DEBUGPOINT();
        for(iter=prev_groups.rbegin();iter!=prev_groups.rend();++iter)
        {
@@ -545,7 +545,7 @@ studio::add_action_group_to_top(Glib::RefPtr<studio::UIManager> ui_manager, Glib
        }
        DEBUGPOINT();
        ui_manager->insert_action_group(group,0);
-       
+
        DEBUGPOINT();
        for(;!prev_groups.empty();prev_groups.pop_front())
        {
@@ -595,16 +595,16 @@ public:
                        value=strprintf("%i",App::auto_recover->get_timeout());
                        return true;
                }
-               
+
                return synfigapp::Settings::get_value(key,value);
        }
-       
+
        virtual bool set_value(const synfig::String& key,const synfig::String& value)
        {
                if(key=="gamma")
                {
                        float r,g,b,blk;
-                       
+
                        strscanf(value,"%f %f %f %f",
                                &r,
                                &g,
@@ -613,7 +613,7 @@ public:
                        );
 
                        App::gamma.set_all(r,g,b,blk);
-                       
+
                        return true;
                }
                if(key=="time_format")
@@ -645,10 +645,10 @@ public:
                        App::distance_system=Distance::ident_system(value);;
                        return true;
                }
-               
+
                return synfigapp::Settings::set_value(key,value);
        }
-       
+
        virtual KeyList get_key_list()const
        {
                KeyList ret(synfigapp::Settings::get_key_list());
@@ -672,7 +672,7 @@ init_ui_manager()
        Glib::RefPtr<Gtk::ActionGroup> toolbox_action_group = Gtk::ActionGroup::create("toolbox");
 
        Glib::RefPtr<Gtk::ActionGroup> actions_action_group = Gtk::ActionGroup::create();
-       
+
        menus_action_group->add( Gtk::Action::create("menu-file", "_File") );
        menus_action_group->add( Gtk::Action::create("menu-edit", "_Edit") );
        menus_action_group->add( Gtk::Action::create("menu-view", "_View") );
@@ -696,7 +696,7 @@ init_ui_manager()
                        iter->second.local_name,iter->second.local_name
                ));
        }
-       
+
 #define DEFINE_ACTION(x,stock) { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); }
 #define DEFINE_ACTION2(x,stock,label) { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock,label,label) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); }
 #define DEFINE_ACTION_SIG(group,x,stock,sig) { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ group->add(action,sig); }
@@ -782,11 +782,11 @@ init_ui_manager()
 // Set up synfigapp actions
        /*{
                synfigapp::Action::Book::iterator iter;
-       
+
                for(iter=synfigapp::Action::book().begin();iter!=synfigapp::Action::book().end();++iter)
                {
                        Gtk::StockID stock_id;
-                       
+
                        if(!(iter->second.category&synfigapp::Action::CATEGORY_HIDDEN))
                        {
                                //Gtk::Image* image(manage(new Gtk::Image()));
@@ -800,7 +800,7 @@ init_ui_manager()
                                //else if(iter->second.task=="duplicate")       stock_id=Gtk::Stock::COPY;
                                else if(iter->second.task=="remove")    stock_id=Gtk::Stock::DELETE;
                                else                                                                    stock_id=Gtk::StockID("synfig-"+iter->second.task);
-       
+
                                actions_action_group->add(Gtk::Action::create(
                                        "action-"+iter->second.name,
                                        stock_id,
@@ -1032,7 +1032,7 @@ init_ui_manager()
        ACCEL("<Actions>//state-gradient","<Mod1>g");
        ACCEL("<Actions>//state-zoom","<Mod1>z");
        ACCEL("<Actions>//canvas-zoom-fit","<Control><Shift>z");
-       
+
 #undef ACCEL
 }
 
@@ -1047,11 +1047,11 @@ App::App(int *argc, char ***argv):
        IconControler(etl::dirname((*argv)[0]))
 {
        app_base_path_=etl::dirname(etl::dirname((*argv)[0]));
-       
+
        int serial_;
        serial_=check_license(app_base_path_);
-       
-       
+
+
        ui_interface_=new GlobalUIInterface();
 
        gdk_rgb_init();
@@ -1059,7 +1059,7 @@ App::App(int *argc, char ***argv):
        Glib::thread_init();
 
        distance_system=Distance::SYSTEM_UNITS;
-               
+
        if(mkdir(get_user_app_directory().c_str(),ACCESSPERMS)<0)
        {
                if(errno!=EEXIST)
@@ -1069,10 +1069,10 @@ App::App(int *argc, char ***argv):
        {
                synfig::info("Created directory \"%s\"",get_user_app_directory().c_str());
        }
-       
-       
+
+
        ipc=new IPC();
-       
+
        try
        {
                if(!SYNFIG_CHECK_VERSION())
@@ -1100,7 +1100,7 @@ App::App(int *argc, char ***argv):
                throw 39;
        }
        Glib::set_application_name(_("SYNFIG Studio"));
-       
+
        About about_window;
        about_window.set_can_self_destruct(false);
        about_window.show();
@@ -1108,7 +1108,7 @@ App::App(int *argc, char ***argv):
        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);
-       
+
        // Initialize the Synfig library
        try { synfigapp_main=etl::smart_ptr<synfigapp::Main>(new synfigapp::Main(etl::dirname((*argv)[0]),&synfig_init_cb)); }
        catch(...)
@@ -1119,13 +1119,13 @@ App::App(int *argc, char ***argv):
 
        // add the preferences to the settings
        synfigapp::Main::settings().add_domain(&_preferences,"pref");
-       
+
        try
        {
                studio_init_cb.task("Init UI Manager...");
                App::ui_manager_=studio::UIManager::create();
                init_ui_manager();
-               
+
                studio_init_cb.task("Init Dock Manager...");
                dock_manager=new studio::DockManager();
 
@@ -1166,11 +1166,11 @@ App::App(int *argc, char ***argv):
                studio_init_cb.task("Init Children...");
                dock_children=new studio::Dock_Children();
                dock_manager->register_dockable(*dock_children);
-               
+
                studio_init_cb.task("Init Info...");
                dock_info = new studio::Dock_Info();
                dock_manager->register_dockable(*dock_info);
-               
+
                studio_init_cb.task("Init Navigator...");
                dock_navigator = new studio::Dock_Navigator();
                dock_manager->register_dockable(*dock_navigator);
@@ -1186,8 +1186,8 @@ App::App(int *argc, char ***argv):
                studio_init_cb.task("Init Layer Groups...");
                dock_layer_groups = new studio::Dock_LayerGroups();
                dock_manager->register_dockable(*dock_layer_groups);
-               
-               
+
+
                studio_init_cb.task("Init Color Dialog...");
                dialog_color=new studio::Dialog_Color();
 
@@ -1204,21 +1204,21 @@ App::App(int *argc, char ***argv):
                state_manager->add_state(&state_rotate);
 
                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);
 
                // Disabled this tool because it should be
                // considered deprecated. Use the bline tool instead.
                if(getenv("SYNFIG_ENABLE_POLYGON")) state_manager->add_state(&state_polygon);
-       
+
                // These tools are disabled by default for now,
                // because they tend to confuse users.
                if(getenv("SYNFIG_ENABLE_DRAW"  )) state_manager->add_state(&state_draw);
@@ -1234,7 +1234,7 @@ App::App(int *argc, char ***argv):
 
                studio_init_cb.task("Init Setup Dialog...");
                dialog_setup=new studio::Dialog_Setup();
-               
+
                studio_init_cb.task("Init Input Dialog...");
                dialog_input=new Gtk::InputDialog();
                dialog_input->get_close_button()->signal_clicked().connect( sigc::mem_fun( *dialog_input, &Gtk::InputDialog::hide ) );
@@ -1246,9 +1246,9 @@ App::App(int *argc, char ***argv):
                studio_init_cb.task("Loading Settings...");
                load_settings();
                studio_init_cb.task("Checking auto-recover...");
-       
+
                studio_init_cb.amount_complete(9900,10000);
-       
+
                if(auto_recover->recovery_needed())
                {
                        about_window.hide();
@@ -1276,7 +1276,7 @@ App::App(int *argc, char ***argv):
                        }
                        about_window.show();
                }
-               
+
                // Look for any files given on the command line,
                // and load them if found.
                for(;*argc>=1;(*argc)--)
@@ -1287,10 +1287,10 @@ App::App(int *argc, char ***argv):
                                open((*argv)[*argc]);
                                about_window.show();
                        }
-               
+
                studio_init_cb.task("Done.");
                studio_init_cb.amount_complete(10000,10000);
-       
+
                toolbox->present();
        }
        catch(...)
@@ -1308,27 +1308,27 @@ App::~App()
        save_settings();
 
        synfigapp::Main::settings().remove_domain("pref");
-       
+
        selected_instance=0;
 
        // Unload all of the modules
        for(;!module_list_.empty();module_list_.pop_back());
-       
+
        delete state_manager;
 
        delete ipc;
-       
+
        delete auto_recover;
 
        toolbox->hide();
 
-//     studio::App::iteration(false); 
-       
+//     studio::App::iteration(false);
+
        delete toolbox;
-       
-//     studio::App::iteration(false); 
 
-//     studio::App::iteration(false); 
+//     studio::App::iteration(false);
+
+//     studio::App::iteration(false);
 
        delete dialog_setup;
 
@@ -1363,18 +1363,18 @@ App::add_recent_file(const std::string &file_name)
        std::string filename(file_name);
 
        assert(!filename.empty());
-       
+
        if(filename.empty())
                return;
-       
+
        // Toss out any "hidden" files
        if(basename(filename)[0]=='.')
                return;
-               
+
        // If we aren't an absolute path, turn outselves into one
        if(!is_absolute_path(filename))
                filename=absolute_path(filename);
-       
+
        list<string>::iterator iter;
        // Check to see if the file is already on the list.
        // If it is, then remove it from the list
@@ -1385,16 +1385,16 @@ App::add_recent_file(const std::string &file_name)
                        break;
                }
 
-       
+
        // Push the filename to the front of the list
        recent_files.push_front(filename);
-               
+
        // Clean out the files at the end of the list.
        while(recent_files.size()>(unsigned)get_max_recent_files())
                recent_files.pop_back();
-       
+
        signal_recent_files_changed_();
-       
+
        return;
 }
 
@@ -1429,22 +1429,22 @@ App::save_settings()
                        std::string filename=get_config_file("recentfiles");
 
                        std::ofstream file(filename.c_str());
-               
+
                        if(!file)
                        {
                                synfig::warning("Unable to save %s",filename.c_str());
                                break;
                        }
-               
+
                        list<string>::reverse_iterator iter;
-       
+
                        for(iter=recent_files.rbegin();iter!=recent_files.rend();iter++)
                                file<<*iter<<endl;
                }while(0);
 
                std::string filename=get_config_file("settings");
                synfigapp::Main::settings().save_to_file(filename);
-       setlocale(LC_NUMERIC,old_locale);       
+       setlocale(LC_NUMERIC,old_locale);
        }
        catch(...)
        {
@@ -1468,7 +1468,7 @@ App::load_settings()
                        std::string filename=get_config_file("recentfiles");
 
                        std::ifstream file(filename.c_str());
-       
+
                        while(file)
                        {
                                std::string recent_file;
@@ -1499,7 +1499,7 @@ App::load_settings()
                                synfigapp::Main::settings().set_value("window.toolbox.pos","4 4");
                        }
                }
-       setlocale(LC_NUMERIC,old_locale);       
+       setlocale(LC_NUMERIC,old_locale);
        }
        catch(...)
        {
@@ -1519,8 +1519,8 @@ void
 App::quit()
 {
        if(shutdown_in_progress)return;
-               
-       
+
+
        get_ui_interface()->task("Quit Request");
        if(Busy::count)
        {
@@ -1577,18 +1577,18 @@ App::quit()
                                        return;
                        }
                }
-*/             
-               
+*/
+
                // This next line causes things to crash for some reason
-               //(*iter)->close(); 
+               //(*iter)->close();
        }
-       
+
        shutdown_in_progress=true;
 
        instance_list.clear();
 
        while(studio::App::events_pending())studio::App::iteration(false);
-               
+
        Gtk::Main::quit();
        auto_recover->normal_shutdown();
 
@@ -1616,7 +1616,7 @@ static OPENFILENAME ofn={};
 #ifdef WIN32
 #include <gdk/gdkwin32.h>
 #endif
-       
+
 bool
 App::dialog_open_file(const std::string &title, std::string &filename)
 {
@@ -1626,7 +1626,7 @@ App::dialog_open_file(const std::string &title, std::string &filename)
        GdkWindow *gdkWinPtr=toolbox->get_window()->gobj();
        HINSTANCE hInstance=static_cast<HINSTANCE>(GetModuleHandle(NULL));
        HWND hWnd=static_cast<HWND>(GDK_WINDOW_HWND(gdkWinPtr));
-       
+
        ofn.lStructSize=sizeof(OPENFILENAME);
        ofn.hwndOwner = hWnd;
        ofn.hInstance = hInstance;
@@ -1646,27 +1646,27 @@ App::dialog_open_file(const std::string &title, std::string &filename)
 //     ofn.lCustData = 0l;
        ofn.lpfnHook=NULL;
 //     ofn.lpTemplateName=NULL;
-       
+
        CHAR szFilename[MAX_PATH];
        CHAR szTitle[500];
        strcpy(szFilename,filename.c_str());
        strcpy(szTitle,title.c_str());
-       
+
        ofn.lpstrFile=szFilename;
        ofn.lpstrFileTitle=szTitle;
-       
+
        if(GetOpenFileName(&ofn))
        {
                filename=szFilename;
                return true;
        }
        return false;
-       
+
 #else
        synfig::String prev_path;
        if(!_preferences.get_value("curr_path",prev_path))
                prev_path=".";
-       
+
     Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_OPEN);
     dialog->set_current_folder(prev_path);
     dialog->add_button(Gtk::StockID("gtk-ok"),GTK_RESPONSE_ACCEPT);
@@ -1681,18 +1681,18 @@ App::dialog_open_file(const std::string &title, std::string &filename)
     delete dialog;
     return false;
     /*
-    
+
        GtkWidget *ok;
        GtkWidget *cancel;
        int val=0;
-       
+
        GtkWidget *fileselection;
        fileselection = gtk_file_selection_new(title.c_str());
 
-       
+
        if(basename(filename)==filename)
        {
-               gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),(prev_path+ETL_DIRECTORY_SEPERATOR).c_str());         
+               gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),(prev_path+ETL_DIRECTORY_SEPERATOR).c_str());
        }
        else
                gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),dirname(filename).c_str());
@@ -1702,15 +1702,15 @@ App::dialog_open_file(const std::string &title, std::string &filename)
        ok=GTK_FILE_SELECTION(fileselection)->ok_button;
        cancel=GTK_FILE_SELECTION(fileselection)->cancel_button;
 
-       gtk_signal_connect(GTK_OBJECT(ok),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Ok),&val);              
-       gtk_signal_connect(GTK_OBJECT(cancel),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Cancel),&val);              
+       gtk_signal_connect(GTK_OBJECT(ok),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Ok),&val);
+       gtk_signal_connect(GTK_OBJECT(cancel),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Cancel),&val);
 
        gtk_widget_show(fileselection);
 
        while(!val)
-               iteration();            
-       
-       
+               iteration();
+
+
        if(val==1)
        {
                filename=gtk_file_selection_get_filename(GTK_FILE_SELECTION(fileselection));
@@ -1732,11 +1732,11 @@ App::dialog_save_file(const std::string &title, std::string &filename)
 {
 #ifdef USE_WIN32_FILE_DIALOGS
        static TCHAR szFilter[] = TEXT ("All Files (*.*)\0*.*\0\0") ;
-       
+
        GdkWindow *gdkWinPtr=toolbox->get_window()->gobj();
        HINSTANCE hInstance=static_cast<HINSTANCE>(GetModuleHandle(NULL));
        HWND hWnd=static_cast<HWND>(GDK_WINDOW_HWND(gdkWinPtr));
-       
+
        ofn.lStructSize=sizeof(OPENFILENAME);
        ofn.hwndOwner = hWnd;
        ofn.hInstance = hInstance;
@@ -1756,15 +1756,15 @@ App::dialog_save_file(const std::string &title, std::string &filename)
 //     ofn.lCustData = 0l;
        ofn.lpfnHook=NULL;
 //     ofn.lpTemplateName=NULL;
-       
+
        CHAR szFilename[MAX_PATH];
        CHAR szTitle[500];
        strcpy(szFilename,filename.c_str());
        strcpy(szTitle,title.c_str());
-       
+
        ofn.lpstrFile=szFilename;
        ofn.lpstrFileTitle=szTitle;
-       
+
        if(GetSaveFileName(&ofn))
        {
                filename=szFilename;
@@ -1775,7 +1775,7 @@ App::dialog_save_file(const std::string &title, std::string &filename)
        synfig::String prev_path;
        if(!_preferences.get_value("curr_path",prev_path))
                prev_path=".";
-       
+
     Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_SAVE);
     dialog->set_current_folder(prev_path);
     dialog->add_button(Gtk::StockID("gtk-ok"),GTK_RESPONSE_ACCEPT);
@@ -1798,11 +1798,11 @@ App::dialog_saveas_file(const std::string &title, std::string &filename)
 {
 #if USE_WIN32_FILE_DIALOGS
        static TCHAR szFilter[] = TEXT ("All Files (*.*)\0*.*\0\0") ;
-       
+
        GdkWindow *gdkWinPtr=toolbox->get_window()->gobj();
        HINSTANCE hInstance=static_cast<HINSTANCE>(GetModuleHandle(NULL));
        HWND hWnd=static_cast<HWND>(GDK_WINDOW_HWND(gdkWinPtr));
-       
+
        ofn.lStructSize=sizeof(OPENFILENAME);
        ofn.hwndOwner = hWnd;
        ofn.hInstance = hInstance;
@@ -1822,15 +1822,15 @@ App::dialog_saveas_file(const std::string &title, std::string &filename)
 //     ofn.lCustData = 0l;
        ofn.lpfnHook=NULL;
 //     ofn.lpTemplateName=NULL;
-       
+
        CHAR szFilename[MAX_PATH];
        CHAR szTitle[500];
        strcpy(szFilename,filename.c_str());
        strcpy(szTitle,title.c_str());
-       
+
        ofn.lpstrFile=szFilename;
        ofn.lpstrFileTitle=szTitle;
-       
+
        if(GetSaveFileName(&ofn))
        {
                filename=szFilename;
@@ -1841,7 +1841,7 @@ App::dialog_saveas_file(const std::string &title, std::string &filename)
        synfig::String prev_path;
        if(!_preferences.get_value("curr_path",prev_path))
                prev_path=".";
-       
+
     Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_SAVE);
     dialog->set_current_folder(prev_path);
     dialog->add_button(Gtk::StockID("gtk-ok"),GTK_RESPONSE_ACCEPT);
@@ -1887,7 +1887,7 @@ App::dialog_yes_no(const std::string &title, const std::string &message)
        );
        Gtk::Label label(message);
        label.show();
-       
+
        dialog.get_vbox()->pack_start(label);
        dialog.add_button(Gtk::StockID("gtk-yes"),1);
        dialog.add_button(Gtk::StockID("gtk-no"),0);
@@ -1919,7 +1919,7 @@ App::dialog_not_implemented()
 {
        Gtk::MessageDialog dialog("Feature not available", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true);
        dialog.set_secondary_text("Sorry, this feature has not yet been implemented.");
-       dialog.run(); 
+       dialog.run();
 }
 
 bool
@@ -1975,25 +1975,25 @@ App::open_as(std::string filename,std::string as)
        try
        {
                OneMoment one_moment;
-       
+
                etl::handle<synfig::Canvas> canvas(open_canvas_as(filename,as));
                if(canvas && get_instance(canvas))
                {
                        get_instance(canvas)->find_canvas_view(canvas)->present();
-                       throw (String)strprintf(_("\"%s\" appears to already be open!"),filename.c_str());              
+                       throw (String)strprintf(_("\"%s\" appears to already be open!"),filename.c_str());
                }
                if(!canvas)
                        throw (String)strprintf(_("Unable to open file \"%s\""),filename.c_str());
 
                add_recent_file(as);
-               
+
                handle<Instance> instance(Instance::create(canvas));
 
                if(!instance)
                        throw (String)strprintf(_("Unable to create instance for \"%s\""),filename.c_str());
-               
+
                one_moment.hide();
-               
+
                if(instance->is_updated() && App::dialog_yes_no(_("CVS Update"), _("There appears to be a newer version of this file available on the CVS repository.\nWould you like to update now? (It would probably be a good idea)")))
                        instance->dialog_cvs_update();
        }
@@ -2009,7 +2009,7 @@ App::open_as(std::string filename,std::string as)
        }
 
        _preferences.set_value("curr_path",dirname(as));
-       
+
        return true;
 }
 
@@ -2021,7 +2021,7 @@ App::new_instance()
        canvas->set_name(strprintf("Untitled%d",Instance::get_count()));
 
        String file_name(strprintf("untitled%d.sif",Instance::get_count()));
-       
+
        canvas->rend_desc().set_frame_rate(24.0);
        canvas->rend_desc().set_time_start(0.0);
        canvas->rend_desc().set_time_end(00.0);
@@ -2034,7 +2034,7 @@ App::new_instance()
        canvas->rend_desc().set_antialias(1);
        canvas->rend_desc().set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN);
        canvas->set_file_name(file_name);
-       
+
        Instance::create(canvas)->find_canvas_view(canvas)->canvas_properties.present();
 }
 
index 595a83f..6fe370b 100644 (file)
@@ -65,7 +65,7 @@ namespace synfigapp
 };
 
 class Preferences;
-       
+
 namespace studio {
 
 typedef Gtk::UIManager UIManager;
@@ -94,17 +94,17 @@ class Dock_Info;
 class Dock_Navigator;
 class Dock_LayerGroups;
 class IPC;
-       
+
 class Module;
 
 class StateManager;
 class IconControler;
-       
+
 class App : public Gtk::Main, private IconControler
 {
        friend class Preferences;
        friend class Dialog_Setup;
-               
+
        /*
  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
        */
@@ -149,7 +149,7 @@ private:
        static etl::handle<CanvasView> selected_canvas_view;
 
        static Glib::RefPtr<UIManager>  ui_manager_;
-       
+
 //     static std::list< etl::handle< Module > > module_list_;
 
        /*
@@ -179,7 +179,7 @@ public:
 
        static std::list<etl::handle<Instance> > instance_list;
 
-       static bool shutdown_in_progress;       
+       static bool shutdown_in_progress;
 
        static bool use_colorspace_gamma;
 
@@ -285,14 +285,14 @@ public:
        static void dialog_open();
 
        static void dialog_about();
-       
+
        static void quit();
-       
+
        static void show_setup();
 
        static void undo();
        static void redo();
-       
+
        static int get_max_recent_files();
        static void set_max_recent_files(int x);
 
@@ -301,7 +301,7 @@ public:
        static void set_time_format(synfig::Time::Format x);
 
        static bool shutdown_request(GdkEventAny*bleh=NULL);
-       
+
 //     static bool dialog_file(const std::string &title, std::string &filename);
 
        static bool dialog_open_file(const std::string &title, std::string &filename);
@@ -317,7 +317,7 @@ public:
        static bool dialog_yes_no(const std::string &title, const std::string &message);
 
        static int dialog_yes_no_cancel(const std::string &title, const std::string &message);
-       
+
        static void dialog_not_implemented();
 
        static synfig::String get_user_app_directory();
index b2de087..32a6309 100644 (file)
@@ -75,7 +75,7 @@ class AsyncTarget_Tile : public synfig::Target_Tile
 {
 public:
        etl::handle<synfig::Target_Tile> warm_target;
-       
+
        struct tile_t
        {
                Surface surface;
@@ -88,15 +88,15 @@ public:
        };
        std::list<tile_t> tile_queue;
        Glib::Mutex mutex;
-       
+
 #ifndef GLIB_DISPATCHER_BROKEN
        Glib::Dispatcher tile_ready_signal;
 #endif
        Glib::Cond cond_tile_queue_empty;
        bool alive_flag;
-       
+
        sigc::connection ready_connection;
-       
+
 public:
        AsyncTarget_Tile(etl::handle<synfig::Target_Tile> warm_target):
                warm_target(warm_target)
@@ -115,7 +115,7 @@ public:
                ready_connection=tile_ready_signal.connect(sigc::mem_fun(*this,&AsyncTarget_Tile::tile_ready));
 #endif
        }
-               
+
        ~AsyncTarget_Tile()
        {
                ready_connection.disconnect();
@@ -125,17 +125,17 @@ public:
                Glib::Mutex::Lock lock(mutex);
                alive_flag=false;
        }
-       
+
        virtual int total_tiles()const
        {
                return warm_target->total_tiles();
        }
-       
+
        virtual int next_tile(int& x, int& y)
        {
                if(!alive_flag)
                        return 0;
-               
+
                return warm_target->next_tile(x,y);
        }
 
@@ -145,14 +145,14 @@ public:
                        return 0;
                return warm_target->next_frame(time);
        }
-       
+
        virtual bool start_frame(synfig::ProgressCallback *cb=0)
        {
                if(!alive_flag)
                        return false;
                return warm_target->start_frame(cb);
        }
-       
+
        virtual bool add_tile(const synfig::Surface &surface, int gx, int gy)
        {
                assert(surface);
@@ -174,7 +174,7 @@ public:
                tile_ready_signal();
 #endif
                }
-               
+
                return alive_flag;
        }
 
@@ -190,9 +190,9 @@ public:
                while(!tile_queue.empty() && alive_flag)
                {
                        tile_t& tile(tile_queue.front());
-                       
+
                        alive_flag=warm_target->add_tile(tile.surface,tile.x,tile.y);
-                       
+
                        tile_queue.pop_front();
                }
                cond_tile_queue_empty.signal();
@@ -224,12 +224,12 @@ class AsyncTarget_Scanline : public synfig::Target_Scanline
 {
 public:
        etl::handle<synfig::Target_Scanline> warm_target;
-       
+
        int scanline_;
        Surface surface;
 
        Glib::Mutex mutex;
-       
+
 #ifndef GLIB_DISPATCHER_BROKEN
        Glib::Dispatcher frame_ready_signal;
 #endif
@@ -255,7 +255,7 @@ public:
 #endif
                surface.set_wh(warm_target->rend_desc().get_w(),warm_target->rend_desc().get_h());
        }
-       
+
        ~AsyncTarget_Scanline()
        {
                ready_connection.disconnect();
@@ -274,12 +274,12 @@ public:
                Glib::Mutex::Lock lock(mutex);
                alive_flag=false;
        }
-       
+
        virtual bool start_frame(synfig::ProgressCallback *cb=0)
-       {               
+       {
                return alive_flag;
        }
-       
+
        virtual void end_frame()
        {
                {
@@ -310,14 +310,14 @@ public:
                }
        }
 
-       
+
        virtual Color * start_scanline(int scanline)
        {
                Glib::Mutex::Lock lock(mutex);
 
                return surface[scanline];
        }
-       
+
        virtual bool end_scanline()
        {
                return alive_flag;
@@ -350,9 +350,9 @@ AsyncRenderer::AsyncRenderer(etl::handle<synfig::Target> target_,synfig::Progres
                etl::handle<AsyncTarget_Tile> wrap_target(
                        new AsyncTarget_Tile(etl::handle<synfig::Target_Tile>::cast_dynamic(target_))
                );
-               
+
                signal_stop_.connect(sigc::mem_fun(*wrap_target,&AsyncTarget_Tile::set_dead));
-               
+
                target=wrap_target;
        }
        else if(etl::handle<synfig::Target_Scanline>::cast_dynamic(target_))
@@ -362,9 +362,9 @@ AsyncRenderer::AsyncRenderer(etl::handle<synfig::Target> target_,synfig::Progres
                                etl::handle<synfig::Target_Scanline>::cast_dynamic(target_)
                        )
                );
-       
+
                signal_stop_.connect(sigc::mem_fun(*wrap_target,&AsyncTarget_Scanline::set_dead));
-               
+
                target=wrap_target;
        }
 }
@@ -381,23 +381,23 @@ AsyncRenderer::stop()
        {
                Glib::Mutex::Lock lock(mutex);
                done_connection.disconnect();
-       
+
                if(render_thread)
                {
                        signal_stop_();
-               
+
 #if REJOIN_ON_STOP
                        render_thread->join();
 #endif
-                       
+
                        // Make sure all the dispatch crap is cleared out
                        //Glib::MainContext::get_default()->iteration(false);
-                       
+
                        if(success)
                                signal_success_();
-                               
+
                        signal_finished_();
-       
+
                        target=0;
                        render_thread=0;
                }
@@ -435,7 +435,7 @@ AsyncRenderer::start_()
 #ifndef GLIB_DISPATCHER_BROKEN
                done_connection=signal_done_.connect(mem_fun(*this,&AsyncRenderer::stop));
 #endif
-               
+
                render_thread=Glib::Thread::create(
                        sigc::mem_fun(*this,&AsyncRenderer::render_target),
 #if REJOIN_ON_STOP
@@ -456,7 +456,7 @@ void
 AsyncRenderer::render_target()
 {
        etl::handle<Target> target(AsyncRenderer::target);
-       
+
        if(target && target->render())
        {
                success=true;
index 6e040aa..59f96a9 100644 (file)
@@ -54,16 +54,16 @@ class AsyncRenderer : public etl::shared_object, public sigc::trackable
        sigc::signal<void> signal_success_;
 
        std::list<sigc::connection> activity_connection_list;
-       
+
        //etl::handle<synfig::Target_Scanline> target_scanline;
        //etl::handle<synfig::Target_Tile> target_tile;
        etl::handle<synfig::Target> target;
 
        bool error;
        bool success;
-       
+
        synfig::ProgressCallback *cb;
-       
+
        sigc::signal<void> signal_stop_;
 
        Glib::Thread* render_thread;
@@ -100,7 +100,7 @@ private:
        */
 
 protected:
-       
+
 };
 
 }; // END of namespace studio
index a5a9c92..759adc6 100644 (file)
@@ -84,51 +84,51 @@ using studio::AudioContainer;
 bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector<char> &samples)
 {
 #ifdef WITH_FMOD
-       
+
        float sps = samplerate;
-       
+
        //trivial rejection...
        if(!sample || sps < 1)
        {
                synfig::warning("build_profile: Sample rate was too low or sample was invalid");
                return false;
        }
-       
+
        //lock for all samples and process them into a subset
        unsigned int mode = FSOUND_Sample_GetMode(sample);
-       
+
        //make sure that it's 8 bit... I hope this works...
-       
+
        //sample rate of the actual song...
        int allsamplerate = 0;
        FSOUND_Sample_GetDefaults(sample,&allsamplerate,0,0,0);
-       
+
        //get the size of the sample defaults from the mode
        int channels = 1;
        int channelsize = 1; //number of bytes
-       
+
        if(mode & FSOUND_16BITS) channelsize = 2; //this shouldn't happen
        if(mode & FSOUND_STEREO) channels = 2;
-                       
+
        //Get the sample information
        int samplesize = channels*channelsize; //the only two things that increase samplesize
        int numsamples = FSOUND_Sample_GetLength(sample); //number of samples in the sound
        int sizeall = samplesize*numsamples; //should be the size of the entire song...
-       
+
        if(sizeall <= 0)
        {
                synfig::warning("ProfileAudio: Sample buffer cannot be size smaller than 1 (%X)",FSOUND_GetError());
                return false;
        }
-       
+
        //be sure that the new sample rate is less than or equal to the original
        if(sps > allsamplerate) sps = allsamplerate;
-               
+
        float stride = allsamplerate/(float)sps;
-       
-       //down sampling to 8 bit min/max values 
+
+       //down sampling to 8 bit min/max values
        synfig::warning("About to downsample from %d Hz to %.1f Hz, sample stride: %f", allsamplerate, sps, stride);
-       
+
        char *sampledata=0,*useless = 0;
        unsigned int len1,len2;
        // vector<char> samples;
@@ -139,27 +139,27 @@ bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector<char>
                        return false;
                }
                synfig::warning("Locked: %X: %d bytes, %X: %d bytes",sampledata,len1,useless,len2);
-               
+
                if(channelsize == 1)
                {
                        //process the data
                        char *iter = sampledata;
                        char *end = iter + sizeall;
-                       
+
                        float curaccum = 0;
                        float numinc = sps/(float)allsamplerate;
-                       
+
                        /* Loop per sample DDA alg.
                        */
-                       
+
                        int i = 0;
-                       
+
                        //HACK - to prevent if statement inside inner loop
                        //synfig::warning("wo baby wo baby, inc: %d, stride: %f, size: %d", inc, stride, sizeall);
                        while(iter < end)
                        {
                                int maxs = 0, mins = 0;
-                               
+
                                for(;curaccum < 1; curaccum += numinc)
                                {
                                        for(i = 0; iter < end && i < channels; ++i, iter += channelsize)
@@ -171,7 +171,7 @@ bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector<char>
                                //insert onto new list
                                samples.push_back(maxs);
                                samples.push_back(mins);
-                                               
+
                                //and flush all the used samples for curaccum
                                curaccum -= 1;
                        }
@@ -180,21 +180,21 @@ bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector<char>
                        //process the data
                        char *iter = sampledata;
                        char *end = iter + sizeall;
-                       
+
                        float curaccum = 0;
                        float numinc = sps/(float)allsamplerate;
-                       
+
                        /* Loop per sample DDA alg.
                        */
-                       
+
                        int i = 0;
-                       
+
                        //HACK - to prevent if statement inside inner loop
                        //synfig::warning("wo baby wo baby, inc: %d, stride: %f, size: %d", inc, stride, sizeall);
                        while(iter < end)
                        {
                                int maxs = 0, mins = 0;
-                               
+
                                for(;curaccum < 1; curaccum += numinc)
                                {
                                        for(i = 0; iter < end && i < channels; ++i, iter += channelsize)
@@ -206,31 +206,31 @@ bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector<char>
                                //insert onto new list
                                samples.push_back(maxs / 256);
                                samples.push_back(mins / 256);
-                                               
+
                                //and flush all the used samples for curaccum
                                curaccum -= 1;
                        }
                }
        }
-       
+
        synfig::warning("Stats: %f seconds with %d bytes now %d bytes", (samples.size()/2)/sps, sizeall, samples.size());
        synfig::warning("               %f seconds before", numsamples/(float)allsamplerate);
-       
+
        //we're done yay!, unlock
        FSOUND_Sample_Unlock(sample,sampledata,useless,len1,len2);
        synfig::info("Unlocked");
-       
+
        //FSOUND_PlaySound(FSOUND_FREE,sound); //test
-       
+
        //we're done
        samplerate = sps*2; //it must be x2 because we are sampling max and min
-       
+
        return true;
-       
+
        #else
-       
+
        return false;
-       
+
        #endif
 }
 
@@ -238,7 +238,7 @@ bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector<char>
 //FMOD Systemwide Specific data mostly here...
 
 struct scrubinfo;
-       
+
 #ifdef WITH_FMOD
 static double  buffer_length_sec = 0;
 
@@ -256,112 +256,112 @@ static double   buffer_length_sec = 0;
 
 /* Things to check:
        If IsPlaying just governs the channel play/stop value or if it also concerns the pause state
-       
+
 */
 
 //so we can know where to create all this stuff
 struct scrubinfo
 {
        /*      Linearly fit the frequency to hit the desired zero point...
-       */      
+       */
        /*struct scrubelement
        {
                double  pos;
                double  dt;
                //the amount of time left til the cursor hits this one
-               //      it's incremental so that the cursor must pass previous 
+               //      it's incremental so that the cursor must pass previous
                //      ones before decrementing this value
-       };      
+       };
        */
-       
+
        //the time it should take to get to the next position...
-       
+
        //to prevent from writing to the same location at once... (pos, deltatime, delaystart)
        //Glib::Mutex   lock;
-       
+
        //the queue system would provide a more accurate representation...
        volatile double pos;
        volatile double deltatime;
-       
+
        volatile double delaystart; //the amount of time we need to go before we start interpolating...
-       
+
        volatile int    channel;
 
        /*std::list<scrubelement>       queue;
-       
+
        volatile int    channel;
-       
+
        //current position is FSOUND_GetCurrentPosition and current time is always 0...
-       
+
        void add(const scrubelement &elem)
        {
                lock.LockWrite();
-               
+
                queue.push_back(elem);
-               
+
                lock.UnlockWrite();
        }
-       
+
        //Function to safely get rid of all the old samples (dt < 0)
        void flush()
        {
                lock.LockWrite();
-               
+
                while(queue.size() && queue.front().dt < 0)
                {
                        queue.pop_front();
                }
-               
-               lock.UnlockWrite();             
+
+               lock.UnlockWrite();
        }*/
-       
+
        void Lock()
        {
                //lock.lock();
        }
-       
+
        void Unlock()
        {
                //lock.unlock();
        }
-       
+
        //All parameters and state should be set by the time we get here...
        void scrub_dsp_process()
        {
                const double epsilon = 1e-5;
-               
+
                //Trivial reject... we go nowhere if we aren't playing (hit boundary...)
                if(!FSOUND_IsPlaying(channel)) return;
-                       
+
                //Get rid of all the old samples
                //flush();
-               
+
                //Trivial reject #2 - We also go nowhere with no future samples (pause)
                /*if(queue.size() <= 0)
                {
                        FSOUND_SetPaused(channel,true);
                        return;
                }*/
-               
+
                double dt = buffer_length_sec;
-               
+
                //Lock ourselves so we don't die
                Lock();
-               
+
                //printf("DSP data: delay = %.3f s, pos = %d, dt = %.3f\n", delaystart, (int)pos, deltatime);
-               
+
                //Check delay
                if(delaystart > 0)
                {
                        delaystart -= dt;
-                       
+
                        if(delaystart < 0)
                        {
                                dt = -delaystart; //add time back...
                                delaystart = 0;
                        }
                }
-               
+
                //Trivial reject for if we're past current sample...
                if(delaystart > 0 || deltatime <= 0)
                {
@@ -369,65 +369,65 @@ struct scrubinfo
                        Unlock();
                        return;
                }
-                       
+
                //Calculate stretched frequency based on delayed future sample...
-               
+
                //NOTE: BY NOT TRACKING POSITION AS A FLOAT AND JUST USING THE SOUNDS VALUE
-               //              WE ARE LOSING A TINY AMOUNT OF PRECISION ACCURACY EVERY UPDATE 
+               //              WE ARE LOSING A TINY AMOUNT OF PRECISION ACCURACY EVERY UPDATE
                //              (THIS SHOULDN'T BE A PROBLEM)
-               const double p0 = FSOUND_GetCurrentPosition(channel);           
+               const double p0 = FSOUND_GetCurrentPosition(channel);
                double curdp = 0;
-               
+
                if(!FSOUND_GetPaused(channel))
                {
                        curdp = FSOUND_GetFrequency(channel) * deltatime;
                }
 
-               //need to rescale derivative...         
+               //need to rescale derivative...
 
                //Extrapolate from difference in position and deltatime vs dt...
                const double pa = p0 + curdp/2;
-               
+
                const double p1 = pos;
-               
+
                //const double pb = p0/3 + p1*2/3;
-               
+
                //will extrapolate if needed... (could be funky on a curve)
                double t = 0;
                if(deltatime > epsilon)
                {
                        t = dt / deltatime;
                }
-               
+
                //Decrement deltatime (we may have gone past but that's what happens when we don't get input...)
                deltatime -= dt;
-               
+
                //we don't need to look at the current variables anymore...
                Unlock();
-                               
+
                const double invt = 1-t;
                //double deltapos = (p1-p0)*t; //linear version
                double deltapos = invt*invt*p0 + 2*t*invt*pa + t*t*p1 - p0; //quadratic smoothing version
-               
+
                //Attempted cubic smoothing
                //const double invt2 = invt*invt;
                //const double t2 = t*t;
                //double deltapos = invt2*invt*p0 + 3*t*invt2*pa + 3*t2*invt*pb + t2*t*p1;
                //double deltapos = p0 + t*(3*(pa-p0) + t*(3*(p0+2*pa+pb) + t*((p1-3*pb+3*ba-p0)))); //unwound cubic
-                               
+
                //printf("\ttime = %.2f; p(%d,%d,%d) dp:%d - delta = %d\n",t,(int)p0,(int)p1,(int)p2,(int)curdp,(int)deltapos);
-               
+
                //Based on the delta info calculate the stretched frequency
                const int dest_samplesize = FSOUND_DSP_GetBufferLength();
-               
+
                //rounded to nearest frequency... (hopefully...)
                int freq = (int)(deltapos * FSOUND_GetOutputRate() / (double)dest_samplesize);
-               
+
                //NOTE: WE MIGHT WANT TO DO THIS TO BE MORE ACCURATE BUT YEAH... ISSUES WITH SMALL NUMBERS
                //double newdp = deltapos / t;
 
                //printf("\tfreq = %d Hz\n", freq);
-               
+
                // !If I failed... um assume we have to pause it... ?
                if(abs(freq) < 100)
                {
@@ -438,11 +438,11 @@ struct scrubinfo
                        FSOUND_SetPaused(channel,false);
                        if(!FSOUND_SetFrequency(channel,freq))
                        {
-                               //ERROR WILL ROBINSON!!!...                     
+                               //ERROR WILL ROBINSON!!!...
                                printf("Error in Freq... what do I do?\n");
                        }
                }
-       }       
+       }
 };
 
 struct scrubuserdata
@@ -452,24 +452,24 @@ struct scrubuserdata
        typedef scrubinfo**     value_type;
        typedef std::set< value_type > scrubslist;
        scrubslist              scrubs;
-       
+
        //so we can lock access to the list...
        ReadWriteLock   lock;
-       
+
        void AddScrub(scrubinfo **i)
        {
                lock.LockWrite();
                scrubs.insert(i);
                lock.UnLockWrite();
        }
-       
+
        void RemoveScrub(scrubinfo **i)
        {
                lock.LockWrite();
                scrubs.erase(i);
-               lock.UnLockWrite();             
+               lock.UnLockWrite();
        }*/
-       
+
        scrubinfo * volatile *  scrub;
 };
 
@@ -484,20 +484,20 @@ void * scrubdspwrap(void *originalbuffer, void *newbuffer, int length, void *use
        if(userdata)
        {
                scrubuserdata &sd = *(scrubuserdata*)userdata;
-               
+
                /* //For use with multiple scrubs...
                //Lock so no one can write to it while we're reading from it...
                sd.lock.LockRead();
-               
-               //make a copy of it...          
+
+               //make a copy of it...
                std::vector<scrubinfo**>        v(sd.scrubs.begin(),sd.scrubs.end());
-               
+
                //other things can do stuff with it again...
                sd.lock.UnLockRead();
-               
-               //loop through the list and process all the active scrub units          
+
+               //loop through the list and process all the active scrub units
                std::vector<scrubinfo**>::iterator      i = v.begin(),
-                                                                                       end = v.end();          
+                                                                                       end = v.end();
                for(;i != end; ++i)
                {
                        //check to make sure this object is active...
@@ -507,15 +507,15 @@ void * scrubdspwrap(void *originalbuffer, void *newbuffer, int length, void *use
                        }
                }
                */
-               
+
                if(sd.scrub && *sd.scrub)
                {
                        //dsp += " processing...";
-                       scrubinfo * info = (*sd.scrub);                 
+                       scrubinfo * info = (*sd.scrub);
                        info->scrub_dsp_process();
                }
        }
-       
+
        //synfig::info(dsp);
 
        return newbuffer;
@@ -527,63 +527,63 @@ class FMODInitializer
 {
        bool loaded;
        int     refcount;
-       
+
 public:
        FMODInitializer():loaded(false),refcount(0) {}
-       ~FMODInitializer() 
+       ~FMODInitializer()
        {
                clear();
        }
-       
+
        void addref()
        {
                if(!loaded)
                {
                        #ifdef WITH_FMOD
                        synfig::info("Initializing FMOD on demand...");
-                       
+
                        {
                                FSOUND_SetOutput(AUDIO_OUTPUT);
-                               
+
                                /*int numdrivers = FSOUND_GetNumDrivers();
                                synfig::info("Num FMOD drivers = %d",numdrivers);
                                synfig::info("Current Driver is #%d", FSOUND_GetDriver());
-                               
+
                                for(int i = 0; i < numdrivers; ++i)
                                {
                                        unsigned int caps = 0;
                                        FSOUND_GetDriverCaps(i,&caps);
-                                       
+
                                        synfig::info("   Caps for driver %d (%s) = %x",i,FSOUND_GetDriverName(i),caps);
                                }
-                               
+
                                FSOUND_SetDriver(0);*/
-                               
+
                                //Modify buffer size...
                                //FSOUND_SetBufferSize(100);
-                               
+
                                if(!FSOUND_Init(44100, 32, 0))
                                {
                                        synfig::warning("Unable to load FMOD");
                                }else
                                {
                                        loaded = true;
-                                       
+
                                        //Create the DSP for processing scrubbing...
                                        scrubdspunit = FSOUND_DSP_Create(&scrubdspwrap,default_scrub_priority,&g_scrubdata);
-                                       
+
                                        //Load the number of sec per buffer into the global variable...
                                        buffer_length_sec = FSOUND_DSP_GetBufferLength() / (double)FSOUND_GetOutputRate();
                                }
                        }
                        #endif
                }
-               
+
                //add to the refcount
                ++refcount;
                //synfig::info("Audio: increment fmod refcount %d", refcount);
        }
-       
+
        void decref()
        {
                if(refcount <= 0)
@@ -593,20 +593,20 @@ public:
                {
                        --refcount;
                        //synfig::info("Audio: decrement fmod refcount %d", refcount);
-                       
+
                        //NOTE: UNCOMMENT THIS IF YOU WANT FMOD TO UNLOAD ITSELF WHEN IT ISN'T NEEDED ANYMORE...
                        flush();
                }
        }
 
        bool is_loaded() const { return loaded; }
-       
+
        void clear()
        {
                refcount = 0;
                flush();
        }
-       
+
        void flush()
        {
                if(loaded && refcount <= 0)
@@ -614,7 +614,7 @@ public:
                        #ifdef WITH_FMOD
                        synfig::info("Unloading FMOD");
                        if(scrubdspunit) FSOUND_DSP_Free(scrubdspunit);
-                       FSOUND_Close();                 
+                       FSOUND_Close();
                        #endif
                        loaded = false;
                }
@@ -653,48 +653,48 @@ double studio::AudioProfile::get_offset() const
 //---------- AudioContainer definitions ---------------------
 
 struct studio::AudioContainer::AudioImp
-{      
+{
        //Sample load time information
        FSOUND_SAMPLE *         sample;
        int                                     channel;
        int                                     sfreq;
        int                                     length;
-       
+
        //Time information
        double                          offset; //time offset for playing...
-       
+
        //We don't need it now that we've adopted the play(t) time schedule...
-       //current time... and playing info.... 
+       //current time... and playing info....
        //float                         seekpost;
        //bool                          useseekval;
-       
+
        //Make sure to sever our delayed start if we are stopped prematurely
        sigc::connection        delaycon;
-       
+
        //Action information
        bool                            playing;
        double                          curscrubpos;
        etl::clock                      timer;  //for getting the time diff between scrub input points
-               
+
        //Scrubbing information...
        //the current position of the sound will be sufficient for normal stuff...
        #ifdef WITH_FMOD
        scrubinfo                       scrinfo;
        #endif
-       
+
        scrubinfo                       *scrptr;
-       
+
        bool is_scrubbing() const {return scrptr != 0;}
        void set_scrubbing(bool s)
        {
                #ifdef WITH_FMOD
                if(s)
                        scrptr = &scrinfo;
-               else 
+               else
                #endif
                scrptr = 0;
        }
-       
+
        //helper to make sure we are actually playing (and to get a new channel...)
        bool init_play()
        {
@@ -717,14 +717,14 @@ struct studio::AudioContainer::AudioImp
                        FSOUND_SetFrequency(channel,sfreq);
                }
                return true;
-               
+
                #else
-               
+
                return false;
-               
+
                #endif
        }
-       
+
 public: //structors
        AudioImp()
        :sample(0),
@@ -733,19 +733,19 @@ public: //structors
        length(0),
        offset(0),
        playing(false),
-       scrptr(0)       
+       scrptr(0)
        {
                //reuse the channel...
                #ifdef WITH_FMOD
                channel = FSOUND_FREE;
                #endif
        }
-       
+
        ~AudioImp()
        {
                clear();
        }
-       
+
 public: //helper/accessor funcs
        bool start_playing_now() //callback for timer...
        {
@@ -757,10 +757,10 @@ public: //helper/accessor funcs
                                FSOUND_SetPaused(channel,false);
                }
                #endif
-               
+
                return false; //so the timer doesn't repeat itself
-       }       
-       
+       }
+
        bool isRunning()
        {
                #ifdef WITH_FMOD
@@ -769,26 +769,26 @@ public: //helper/accessor funcs
                return false;
                #endif
        }
-       
+
        bool isPaused()
-       { 
+       {
 #ifdef WITH_FMOD
                return FSOUND_GetPaused(channel);
 #else
                return false;
 #endif
        }
-               
-       
+
+
 public: //forward interface
-       
+
        //Accessors for the offset - in seconds
        const double &get_offset() const {return offset;}
-       void set_offset(const double &d) 
+       void set_offset(const double &d)
        {
                offset = d;
        }
-       
+
        //Will override the parameter timevalue if the sound is running, and not if it's not...
        bool get_current_time(double &out)
        {
@@ -796,32 +796,32 @@ public: //forward interface
                {
                        #ifdef WITH_FMOD
                        unsigned int pos = FSOUND_GetCurrentPosition(channel);
-                       
+
                        //adjust back by 1 frame... HACK....
                        //pos -= FSOUND_DSP_GetBufferLength();
-                       
+
                        //set the position
                        out = pos/(double)sfreq + offset;
                        #endif
-                       
+
                        return true;
                }
                return false;
        }
-       
+
        //Big implementation functions...
        bool load(const std::string &filename, const std::string &filedirectory);
        void clear();
-       
+
        //playing functions
        void play(double t);
        void stop();
-       
+
        //scrubbing functions
        void start_scrubbing(double t);
        void scrub(double t);
        void stop_scrubbing();
-       
+
        double scrub_time()
        {
                return curscrubpos;
@@ -845,7 +845,7 @@ bool studio::AudioContainer::load(const string &filename,const string &filedirec
        {
                imp = new AudioImp;
        }
-       
+
        profilevalid = false;
        return imp->load(filename,filedirectory);
 }
@@ -853,30 +853,30 @@ bool studio::AudioContainer::load(const string &filename,const string &filedirec
 handle<studio::AudioProfile> studio::AudioContainer::get_profile(float samplerate)
 {
        #ifdef WITH_FMOD
-       
+
        //if we already have done our work, then we're good
        if(profilevalid && prof)
        {
                //synfig::info("Using already built profile");
                return prof;
        }
-       
+
        //synfig::info("Before profile");
        //make a new profile at current sample rate
-       
-       //NOTE: We might want to reuse the structure already there...   
+
+       //NOTE: We might want to reuse the structure already there...
        prof = new AudioProfile;
        prof->set_parent(this); //Our parent is THIS!!!
-       
+
        if(!prof)
        {
                synfig::warning("Couldn't allocate audioprofile...");
                return handle<studio::AudioProfile>();
        }
-       
+
        //setting the info for the sample rate
        //synfig::info("Setting info...");
-       
+
        synfig::info("Building Profile...");
        prof->samplerate = samplerate;
        if(build_profile(imp->sample,prof->samplerate,prof->samples))
@@ -888,25 +888,25 @@ handle<studio::AudioProfile> studio::AudioContainer::get_profile(float samplerat
        {
                return handle<studio::AudioProfile>();
        }
-       
+
        #else
-       
+
        return handle<studio::AudioProfile>();
-       
+
        #endif
 }
 
 void studio::AudioContainer::clear()
 {
-       if(imp) 
+       if(imp)
        {
                delete imp;
                imp = 0;
        }
-       
+
        profilevalid = false;
 }
-       
+
 void studio::AudioContainer::play(double t)
 {
        if(imp) imp->play(t);
@@ -938,14 +938,14 @@ double AudioContainer::get_offset() const
 
 bool AudioContainer::is_playing() const
 {
-       if(imp) 
+       if(imp)
                return imp->playing;
        return false;
 }
 
 bool AudioContainer::is_scrubbing() const
 {
-       if(imp) 
+       if(imp)
                return imp->is_scrubbing();
        return false;
 }
@@ -985,19 +985,19 @@ bool AudioContainer::isPaused() const
 
 //----------- Audio imp information -------------------
 
-bool studio::AudioContainer::AudioImp::load(const std::string &filename, 
+bool studio::AudioContainer::AudioImp::load(const std::string &filename,
                                                                                        const std::string &filedirectory)
 {
        clear();
 
        #ifdef WITH_FMOD
-       
+
        //And continue with the sound loading...
        string  file = filename;
-       
+
        //Trivial reject... (fixes stat call problem... where it just looks at directory and not file...)
        if(file.length() == 0) return false;
-       
+
        //we don't need the file directory?
        if(!is_absolute_path(file))
        {
@@ -1005,70 +1005,70 @@ bool studio::AudioContainer::AudioImp::load(const std::string &filename,
                synfig::warning("Not absolute hoooray");
        }
        synfig::info("Loading Audio file: %s", file.c_str());
-       
+
        //check to see if file exists
        {
                struct stat     s;
                if(stat(file.c_str(),&s) == -1 && errno == ENOENT)
                {
-                       synfig::info("There was no audio file...");                     
+                       synfig::info("There was no audio file...");
                        return false;
                }
        }
-       
+
        //load fmod if we can...
        //synfig::warning("I'm compiled with FMOD!");
        fmodinit.addref();
-       
+
        //load the stream
        int ch = FSOUND_FREE;
        FSOUND_SAMPLE *sm = FSOUND_Sample_Load(FSOUND_FREE,file.c_str(),FSOUND_LOOP_OFF|FSOUND_MPEGACCURATE,0,0);
-       
+
        if(!sm)
        {
                synfig::warning("Could not open the audio file as a sample: %s",file.c_str());
                goto error;
        }
-       
+
        //synfig::warning("Opened a file as a sample! :)");
-       
+
        /*{
                int bufferlen = FSOUND_DSP_GetBufferLength();
                synfig::info("Buffer length = %d samples, %.3lf s",bufferlen, bufferlen / (double)FSOUND_GetOutputRate());
        }*/
-       
+
        //set all the variables since everything has worked out...
        //get the length of the stream
        {
                length = FSOUND_Sample_GetLength(sm);
-               
+
                int volume = 0;
                FSOUND_Sample_GetDefaults(sm,&sfreq,&volume,0,0);
-               
-               //double len = length / (double)sfreq;          
+
+               //double len = length / (double)sfreq;
                //synfig::info("Sound info: %.2lf s long, %d Hz, %d Vol",(double)length,sfreq,volume);
        }
-       
+
        //synfig::warning("Got all info, and setting up everything, %.2f sec.", length);
        //synfig::warning("     BigSample: composed of %d samples", FSOUND_Sample_GetLength(sm));
        synfig::info("Successfully opened %s as a sample and initialized it.",file.c_str());
-       
+
        //set up the playable info
        sample = sm;
        channel = ch;
-       
+
        //the length and sfreq params have already been initialized
-       
+
        return true;
-       
+
 error:
        if(sm) FSOUND_Sample_Free(sm);
        file = "";
-       
+
        fmodinit.decref();
-       
+
        return false;
-       
+
        #else
        return false;
        #endif
@@ -1078,44 +1078,44 @@ void studio::AudioContainer::AudioImp::play(double t)
 {
        #ifdef WITH_FMOD
        if(!sample) return;
-       
+
        //stop scrubbing if we are...
        if(is_scrubbing()) stop_scrubbing();
-       
+
        //t -= offset;
        t -= get_offset();
        playing = true;
-       
+
        if(t < 0)
        {
                unsigned int timeout = (int)floor(-t * 1000 + 0.5);
                //synfig::info("Playing audio delayed by %d ms",timeout);
                //delay for t seconds...
                delaycon = Glib::signal_timeout().connect(
-                                               sigc::mem_fun(*this,&studio::AudioContainer::AudioImp::start_playing_now),timeout);             
-               
+                                               sigc::mem_fun(*this,&studio::AudioContainer::AudioImp::start_playing_now),timeout);
+
                init_play();
                FSOUND_SetFrequency(channel,sfreq);
                FSOUND_SetCurrentPosition(channel,0);
                return;
        }
-       
+
        unsigned int position = (int)floor(t*sfreq + 0.5);
-       
+
        if(position >= FSOUND_Sample_GetLength(sample))
        {
                synfig::warning("Can't play audio when past length...");
                return;
        }
-       
+
        init_play();
        FSOUND_SetFrequency(channel,sfreq);
        FSOUND_SetCurrentPosition(channel,position);
        FSOUND_SetPaused(channel,false);
-       
+
        //synfig::info("Playing audio with position %d samples",position);
-       
-       #endif          
+
+       #endif
 }
 
 void studio::AudioContainer::AudioImp::stop()
@@ -1124,11 +1124,11 @@ void studio::AudioContainer::AudioImp::stop()
 
        #ifdef WITH_FMOD
        if(fmodinit.is_loaded() && playing && isRunning())
-       {               
+       {
                FSOUND_SetPaused(channel,true);
        }
        #endif
-       
+
        playing = false;
 }
 
@@ -1136,10 +1136,10 @@ void studio::AudioContainer::AudioImp::clear()
 {
        #ifdef WITH_FMOD
        delaycon.disconnect();
-       
+
        stop();
        stop_scrubbing();
-                       
+
        if(sample)
        {
                if(FSOUND_IsPlaying(channel))
@@ -1150,62 +1150,62 @@ void studio::AudioContainer::AudioImp::clear()
                FSOUND_Sample_Free(sample);
                fmodinit.decref();
        }
-       
+
        playing = false;
-       
+
        #else
        channel = 0;
        #endif
-       
+
        sample = 0;
-       playing = false;        
+       playing = false;
 }
 
 void AudioContainer::AudioImp::start_scrubbing(double t)
 {
        //synfig::info("Start scrubbing: %lf", t);
        if(playing) stop();
-                       
+
        set_scrubbing(true);
-       
+
        #ifdef WITH_FMOD
        //make sure the other one is not scrubbing...
        if(g_scrubdata.scrub)
        {
                *g_scrubdata.scrub = 0; //nullify the pointer...
        }
-       
+
        //Set up the initial state for the delayed audio position
        scrinfo.delaystart = 0;
        scrinfo.pos = 0;
        scrinfo.deltatime = 0;
-       
+
        //set it to point to our pointer (dizzy...)
        g_scrubdata.scrub = &scrptr;
 
        //setup position info so we can know what to do on boundary conditions...
        curscrubpos = (t - get_offset()) * sfreq;
-       
+
        //So we can get an accurate difference...
        timer.reset();
-       
-       //reposition the sound if it won't be when scrubbed (if it's already in the range...)   
+
+       //reposition the sound if it won't be when scrubbed (if it's already in the range...)
        int curi = (int)curscrubpos;
        if(curi >= 0 && curi < length)
        {
                init_play();
                FSOUND_SetCurrentPosition(channel,curi);
-               
+
                //Set the values...
                scrinfo.pos = curscrubpos;
                scrinfo.delaystart = delay_factor*buffer_length_sec;
-                               
+
                //synfig::info("\tStarting at %d samps, with %d p %.3f delay",
                //                              FSOUND_GetCurrentPosition(channel), (int)scrinfo.pos, scrinfo.delaystart);
        }
-       
-       
-       
+
+
+
        //enable the dsp...
        //synfig::info("\tActivating DSP");
        FSOUND_DSP_SetActive(scrubdspunit,true);
@@ -1215,21 +1215,21 @@ void AudioContainer::AudioImp::start_scrubbing(double t)
 void AudioContainer::AudioImp::stop_scrubbing()
 {
        //synfig::info("Stop scrubbing");
-       
+
        if(is_scrubbing())
        {
                set_scrubbing(false);
-               
+
                #ifdef WITH_FMOD
                g_scrubdata.scrub = 0;
-       
+
                //stop the dsp...
                //synfig::info("\tDeactivating DSP");
                FSOUND_DSP_SetActive(scrubdspunit,false);
                if(FSOUND_IsPlaying(channel)) FSOUND_SetPaused(channel,true);
                #endif
        }
-       
+
        curscrubpos = 0;
 }
 
@@ -1238,9 +1238,9 @@ void AudioContainer::AudioImp::scrub(double t)
        #ifdef WITH_FMOD
        //synfig::info("Scrub to %lf",t);
        if(is_scrubbing())
-       {               
+       {
                //What should we do?
-               
+
                /* Different special cases
                        All outside, all inside,
                        coming in (left or right),
@@ -1248,10 +1248,10 @@ void AudioContainer::AudioImp::scrub(double t)
                */
                double oldpos = curscrubpos;
                double newpos = (t - get_offset()) * sfreq;
-               
+
                curscrubpos = newpos;
-               
-               //Ok the sound is running, now we need to tweek it              
+
+               //Ok the sound is running, now we need to tweek it
                if(newpos > oldpos)
                {
                        //Outside so completely stopped...
@@ -1268,19 +1268,19 @@ void AudioContainer::AudioImp::scrub(double t)
                                scrinfo.delaystart = 0;
                                scrinfo.deltatime = 0;
                                scrinfo.Unlock();
-                               
+
                                return;
                        }
-                       
+
                        //going in? - start the sound at the beginning...
                        /*else if(oldpos < 0)
                        {
                                //Set up the sound to be playing paused at the start...
                                init_play();
                                FSOUND_SetCurrentPosition(channel,0);
-                               
+
                                synfig::info("\tIn + %d", FSOUND_GetCurrentPosition(channel));
-                               
+
                                scrinfo.Lock();
                                scrinfo.pos = 0;
                                scrinfo.delaystart = delay_factor*buffer_length_sec;
@@ -1288,21 +1288,21 @@ void AudioContainer::AudioImp::scrub(double t)
                                scrinfo.Unlock();
                        }*/
                        //don't need to deal with leaving... automatically dealt with...
-                       
+
                        else //We're all inside...
                        {
                                //Set new position and decide what to do with time...
                                scrinfo.Lock();
                                scrinfo.pos = newpos;
-                       
-                               //should we restart the delay cycle... (is it done?)                            
+
+                               //should we restart the delay cycle... (is it done?)
                                if(!isRunning() || (scrinfo.delaystart <= 0 && scrinfo.deltatime <= 0 && isPaused()))
                                {
                                        //synfig::info("Starting + at %d",(int)newpos);
                                        scrinfo.deltatime = 0;
                                        scrinfo.delaystart = delay_factor*buffer_length_sec;
                                        scrinfo.Unlock();
-                                       
+
                                        //Set up the sound paused at the current position
                                        init_play();
                                        int setpos = min(max((int)newpos,0),length);
@@ -1310,17 +1310,17 @@ void AudioContainer::AudioImp::scrub(double t)
                                        timer.reset();
                                        return;
                                }
-                               
+
                                //No! just increment the time delta...
                                scrinfo.deltatime += timer.pop_time();
-                               
+
                                //Nope... continue and just increment the deltatime and reset position...
                                scrinfo.Unlock();
-                                                       
+
                                //set channel and unpause
                                FSOUND_SetPaused(channel,false);
                                scrinfo.channel = channel;
-                                                               
+
                        }
                }else if(newpos < oldpos)
                {
@@ -1332,22 +1332,22 @@ void AudioContainer::AudioImp::scrub(double t)
                                {
                                        FSOUND_SetPaused(channel,true);
                                }
-                               
+
                                //Zero out the data!
                                scrinfo.Lock();
                                scrinfo.delaystart = 0;
                                scrinfo.deltatime = 0;
                                scrinfo.Unlock();
                        }
-                       
+
                        //going in? - start going backwards at the end...
                        /*else if(oldpos >= length)
                        {
                                synfig::info("In -");
                                //Set up the sound to be playing paused at the start...
                                init_play();
-                               FSOUND_SetCurrentPosition(channel,length-1);                            
-                               
+                               FSOUND_SetCurrentPosition(channel,length-1);
+
                                scrinfo.Lock();
                                scrinfo.pos = length-1;
                                scrinfo.delaystart = delay_factor*buffer_length_sec;
@@ -1355,35 +1355,35 @@ void AudioContainer::AudioImp::scrub(double t)
                                scrinfo.Unlock();
                        }*/
                        //we don't have to worry about the leaving case...
-                       
+
                        else //We're all inside...
                        {
                                //Set new position and decide what to do with time...
                                scrinfo.Lock();
                                scrinfo.pos = newpos;
-                       
-                               //should we restart the delay cycle... (is it done?)                            
+
+                               //should we restart the delay cycle... (is it done?)
                                if(!isRunning() ||(scrinfo.delaystart <= 0 && scrinfo.deltatime <= 0 && isPaused()))
                                {
                                        //synfig::info("Starting - at %d",(int)newpos);
                                        scrinfo.deltatime = 0;
                                        scrinfo.delaystart = delay_factor*buffer_length_sec;
                                        scrinfo.Unlock();
-                                       
-                                       //reset timing so next update will be a valid diff... 
+
+                                       //reset timing so next update will be a valid diff...
                                        init_play();
                                        int setpos = min(max((int)newpos,0),length);
                                        FSOUND_SetCurrentPosition(channel,setpos);
                                        timer.reset();
                                        return;
                                }
-                               
+
                                //No! just increment the time delta...
                                scrinfo.deltatime += timer.pop_time();
-                               
+
                                //Nope... continue and just increment the deltatime and reset position...
                                scrinfo.Unlock();
-                                                       
+
                                //set channel and unpause
                                FSOUND_SetPaused(channel,false);
                                scrinfo.channel = channel;
index e9ff8d8..7a3a4cc 100644 (file)
@@ -50,7 +50,7 @@ class AudioProfile : public etl::shared_object
 {
 public:
        typedef std::vector<char>       SampleProfile;
-       
+
 private:
        SampleProfile   samples;
        double                  samplerate; //samples / second of the profile
@@ -62,23 +62,23 @@ public:     //samples interface
 
        SampleProfile::const_iterator   begin() const   {return samples.begin();}
        SampleProfile::const_iterator   end() const     {return samples.end();}
-       
+
        void clear();
        unsigned int size() const {return samples.size();}
-       
+
        char operator[](int i) const
        {
                if(i >= 0 && i < (int)samples.size()) return samples[i];
                else return 0;
        }
-       
+
 public: //
-       
+
        double get_samplerate() const {return samplerate;}
        void set_samplerate(double f) {samplerate = f;}
-       
+
        double get_offset() const;
-       
+
        etl::handle<AudioContainer>     get_parent() const;
        void set_parent(etl::handle<AudioContainer> i);
        friend class AudioContainer;
@@ -90,13 +90,13 @@ public: //
 class AudioContainer : public sigc::trackable, public etl::shared_object
 {
        etl::handle<AudioProfile>       prof;
-       
+
        struct  AudioImp;
        AudioImp *imp;
-       
-       bool    profilevalid; //this is only half useful 
+
+       bool    profilevalid; //this is only half useful
                //it makes it so we don't always have to realloc memory when the file switches...
-       
+
 public: //structors
 
        AudioContainer();
@@ -119,7 +119,7 @@ public: //operational interface
        void stop();
        //Note: this refers to the wrapper concept of the audio, the actual sound may or may not be playing...
        bool is_playing() const;
-       
+
        //scrubbing functions...
        void start_scrubbing(double t);
        void stop_scrubbing();
@@ -131,7 +131,7 @@ public: //operational interface
        bool isRunning() const;
        bool isPaused() const;
 };
-       
+
 } // END of namespace studio
 
 /* === E N D =============================================================== */
index d8b1ae6..1f1dea3 100644 (file)
@@ -87,7 +87,7 @@ AutoRecover::AutoRecover()
 {
        // Three Minutes
        set_timeout(3*60*1000);
-       
+
        if(mkdir(get_shadow_directory().c_str(),ACCESSPERMS)<0)
        {
                if(errno!=EEXIST)
@@ -133,11 +133,11 @@ AutoRecover::get_shadow_file_name(const synfig::String& filename)
        unsigned int hash2(0x83502529);
        char* str_hash1(reinterpret_cast<char*>(&hash1));
        char* str_hash2(reinterpret_cast<char*>(&hash2));
-       
+
        // First we need to hash up the directory
        {
                String pool(dirname(filename));
-               
+
                while(pool.size()>4)
                {
                        str_hash1[0]^=pool[1];str_hash1[1]^=pool[2];str_hash1[2]^=pool[3];str_hash1[3]^=pool[0];
@@ -156,9 +156,9 @@ AutoRecover::get_shadow_file_name(const synfig::String& filename)
                }
        }
        hash1^=hash2;
-       
+
        return Glib::build_filename(get_shadow_directory(),strprintf("%08X-%s",hash1,basename(filename).c_str()));
-       
+
 //     return dirname(filename) + ETL_DIRECTORY_SEPERATOR + ".shadow_" + basename(filename);
 }
 
@@ -190,7 +190,7 @@ AutoRecover::auto_backup()
 #ifdef HAVE_FORK
        pid=fork();
 #endif
-       
+
        if(pid<=0)
        {
 #ifdef HAVE_SETPRIORITY
@@ -198,16 +198,16 @@ AutoRecover::auto_backup()
                // cause the machine to slow down too much
                setpriority(PRIO_PROCESS,0,15);
 #endif
-               
+
                try
                {
                        std::list<etl::handle<Instance> >::iterator iter;
-       
+
                        std::string filename=App::get_config_file("autorecovery");
                        std::ofstream file(filename.c_str());
-                       
+
                        int savecount(0);
-                       
+
                        for(iter=App::instance_list.begin();iter!=App::instance_list.end();++iter)
                        {
                                // If this file hasn't even been changed
@@ -215,13 +215,13 @@ AutoRecover::auto_backup()
                                // backing it up.
                                if((*iter)->get_action_count()==0)
                                        continue;
-                                       
+
                                Canvas::Handle canvas((*iter)->get_canvas());
                                file<<canvas->get_file_name()<<endl;
                                save_canvas(get_shadow_file_name(canvas->get_file_name()),canvas);
                                savecount++;
                        }
-                       
+
                        if(savecount)
                                synfig::info("AutoRecover::auto_backup(): %d Files backed up.",savecount);
                }
@@ -230,7 +230,7 @@ AutoRecover::auto_backup()
                        synfig::error("AutoRecover::auto_backup(): UNKNOWN EXCEPTION THROWN.");
                        synfig::error("AutoRecover::auto_backup(): FILES NOT BACKED UP.");
                }
-               
+
 #ifdef HAVE_FORK
                if(pid==0)
                {
@@ -247,11 +247,11 @@ AutoRecover::auto_backup()
                ),
                60*1000
        );
-#endif 
-       
+#endif
+
        // Also go ahead and save the settings
        App::save_settings();
-       
+
        return true;
 }
 
@@ -270,7 +270,7 @@ AutoRecover::recovery_needed()const
                if(!filename.empty())
                        return true;
        }
-       
+
        return false;
 }
 
@@ -282,7 +282,7 @@ AutoRecover::recover()
        if(!file)
                return false;
        bool success=true;
-       
+
        while(file)
        {
                std::string filename;
@@ -295,7 +295,7 @@ AutoRecover::recover()
                {
                        // Correct the file name
                        App::instance_list.back()->set_file_name(filename);
-                       
+
                        // This file isn't saved! mark it as such
                        App::instance_list.back()->inc_action_count();
                }
index df401db..7a0bc2c 100644 (file)
@@ -56,14 +56,14 @@ public:
 
        void set_timeout(int milliseconds);
        int get_timeout()const { return timeout; }
-       
+
        static synfig::String get_shadow_directory();
-       
+
        bool recovery_needed()const;
        bool recover();
-       
+
        void normal_shutdown();
-       
+
        void clear_backup(synfig::Canvas::Handle canvas);
 }; // END of class AutoRecover
 
index c937586..c358d57 100644 (file)
@@ -66,7 +66,7 @@ CanvasOptions::CanvasOptions(loose_handle<studio::CanvasView> canvas_view):
 
        Gtk::Alignment *dialogPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
        dialogPadding->set_padding(12, 12, 12, 12);
-       
+
        Gtk::Notebook *notebook=manage(new class Gtk::Notebook());
        dialogPadding->add(*notebook);
 
@@ -79,7 +79,7 @@ CanvasOptions::CanvasOptions(loose_handle<studio::CanvasView> canvas_view):
 
        Gtk::VBox *gridBox = manage(new Gtk::VBox(false, 12));
        gridPadding->add(*gridBox);
-       
+
        Gtk::Table *gridTable = manage(new Gtk::Table(3, 2, false));
        gridTable->set_row_spacings(6);
        gridTable->set_col_spacings(12);
@@ -127,15 +127,15 @@ CanvasOptions::CanvasOptions(loose_handle<studio::CanvasView> canvas_view):
        cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasOptions::on_cancel_pressed));
 
        //set_default_response(1);
-       
-       
+
+
        get_vbox()->pack_start(*dialogPadding);
        get_vbox()->show_all();
-       
+
        signal_show().connect(sigc::mem_fun(*this, &studio::CanvasOptions::refresh));
 
        vector_grid_size.set_digits(5);
-       
+
        update_title();
 }
 
@@ -156,14 +156,14 @@ CanvasOptions::refresh()
                toggle_grid_show.set_active(true);
        else
                toggle_grid_show.set_active(false);
-               
+
        if(canvas_view_->work_area->get_grid_snap())
                toggle_grid_snap.set_active(true);
        else
                toggle_grid_snap.set_active(false);
-       
+
        vector_grid_size.set_value(canvas_view_->work_area->get_grid_size());
-       
+
        tooltips.set_tip(toggle_time_snap,_("Not yet implemented"));
        toggle_time_snap.set_sensitive(false);
 
@@ -187,7 +187,7 @@ CanvasOptions::on_apply_pressed()
                canvas_view_->work_area->enable_grid_snap();
        else
                canvas_view_->work_area->disable_grid_snap();
-               
+
        if(toggle_grid_show.get_active())
                canvas_view_->work_area->enable_grid();
        else
index 519dddb..07e5760 100644 (file)
@@ -45,7 +45,7 @@ namespace studio
 {
 
 class CanvasView;
-       
+
 class CanvasOptions  :  public Gtk::Dialog
 {
        Gtk::Tooltips tooltips;
@@ -58,7 +58,7 @@ class CanvasOptions  :  public Gtk::Dialog
        Widget_Vector vector_grid_size;
 
        Gtk::CheckButton toggle_time_snap;
-       
+
 public:
        CanvasOptions(etl::loose_handle<CanvasView> canvas_view);
        ~CanvasOptions();
index 331f8b2..8224771 100644 (file)
@@ -79,7 +79,7 @@ CanvasProperties::CanvasProperties(Gtk::Window& parent,handle<synfigapp::CanvasI
        Gtk::Alignment *infoPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
        infoPadding->set_padding(6, 0, 24, 0);
        info_frame->add(*infoPadding);
-       
+
        Gtk::Table *info_table=manage(new Gtk::Table(2,2,false));
        info_table->set_row_spacings(6);
        info_table->set_col_spacings(12);
@@ -92,7 +92,7 @@ CanvasProperties::CanvasProperties(Gtk::Window& parent,handle<synfigapp::CanvasI
                Gtk::Label *idLabel = manage(new Gtk::Label(_("_ID"), true));
                idLabel->set_alignment(0, 0.5);
                idLabel->set_mnemonic_widget(entry_id);
-               info_table->attach(*idLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);   
+               info_table->attach(*idLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
                info_table->attach(entry_id, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        }
        Gtk::Label *nameLabel = manage(new Gtk::Label(_("_Name"), true));
@@ -101,10 +101,10 @@ CanvasProperties::CanvasProperties(Gtk::Window& parent,handle<synfigapp::CanvasI
        Gtk::Label *descriptionLabel = manage(new Gtk::Label(_("_Description"), true));
        descriptionLabel->set_alignment(0, 0.5);
        descriptionLabel->set_mnemonic_widget(entry_description);
-       info_table->attach(*nameLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
-       info_table->attach(*descriptionLabel, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);  
-       info_table->attach(entry_name, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
-       info_table->attach(entry_description, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);  
+       info_table->attach(*nameLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       info_table->attach(*descriptionLabel, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       info_table->attach(entry_name, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       info_table->attach(entry_description, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
 
        dialogBox->pack_start(widget_rend_desc, false, false, 0);
 
@@ -126,7 +126,7 @@ CanvasProperties::CanvasProperties(Gtk::Window& parent,handle<synfigapp::CanvasI
        cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasProperties::on_cancel_pressed));
 
        //set_default_response(1);
-       
+
        get_vbox()->show_all();
        refresh();
 
@@ -138,13 +138,13 @@ CanvasProperties::create_meta_data_view()
 {
        MetaDataTreeStore::Model model;
        meta_data_tree_view=(manage(new class Gtk::TreeView()));
-               
+
        meta_data_tree_view->append_column(_("Key"),model.key);
        meta_data_tree_view->append_column_editable(_("Data"),model.data);
        meta_data_tree_view->set_model(MetaDataTreeStore::create(canvas_interface_));
        meta_data_tree_view->set_rules_hint();
        meta_data_tree_view->show();
-       
+
        Gtk::ScrolledWindow *scrolledwindow = manage(new class Gtk::ScrolledWindow());
        scrolledwindow->set_flags(Gtk::CAN_FOCUS);
        scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -152,11 +152,11 @@ CanvasProperties::create_meta_data_view()
        scrolledwindow->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
        scrolledwindow->show();
 
-       
-       
+
+
        Gtk::Table *table=manage(new Gtk::Table());
        table->attach(*scrolledwindow, 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        Gtk::Button* button_add(manage(new Gtk::Button(Gtk::StockID("gtk-add"))));
        button_add->show();
        button_add->signal_clicked().connect(sigc::mem_fun(*this,&CanvasProperties::on_button_meta_data_add));
@@ -164,9 +164,9 @@ CanvasProperties::create_meta_data_view()
 
        Gtk::Button* button_delete(manage(new Gtk::Button(Gtk::StockID("gtk-delete"))));
        button_delete->show();
-       button_delete->signal_clicked().connect(sigc::mem_fun(*this,&CanvasProperties::on_button_meta_data_delete));    
+       button_delete->signal_clicked().connect(sigc::mem_fun(*this,&CanvasProperties::on_button_meta_data_delete));
        table->attach(*button_delete, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
-       
+
        table->show();
        return *table;
 }
@@ -200,7 +200,7 @@ CanvasProperties::refresh()
        entry_id.set_text(canvas_interface_->get_canvas()->get_id());
        entry_name.set_text(canvas_interface_->get_canvas()->get_name());
        entry_description.set_text(canvas_interface_->get_canvas()->get_description());
-       
+
        dirty_rend_desc=false;
 
        update_title();
@@ -227,7 +227,7 @@ CanvasProperties::on_apply_pressed()
                canvas_interface_->set_name(entry_name.get_text());
        if(entry_description.get_text()!=canvas_interface_->get_canvas()->get_description())
                canvas_interface_->set_description(entry_description.get_text());
-       
+
        dirty_rend_desc=false;
 }
 
index 98034db..270f8f1 100644 (file)
@@ -47,7 +47,7 @@ namespace Gtk { class TreeView; };
 namespace synfigapp { class CanvasInterface; };
 
 namespace studio
-{      
+{
 class CanvasProperties  :  public Gtk::Dialog
 {
        Gtk::Tooltips tooltips;
@@ -59,11 +59,11 @@ class CanvasProperties  :  public Gtk::Dialog
        Gtk::Entry entry_description;
 
        bool dirty_rend_desc;
-       
+
        Gtk::TreeView* meta_data_tree_view;
        void on_button_meta_data_add();
        void on_button_meta_data_delete();
-       
+
 public:
        CanvasProperties(Gtk::Window& parent,etl::handle<synfigapp::CanvasInterface> canvas_interface);
        ~CanvasProperties();
index 3a4c994..a9092be 100644 (file)
@@ -99,7 +99,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                        synfig::error(__FILE__":%d: Unable to figure out value",__LINE__);
                        return;
                }
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -112,7 +112,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                g_value_init(x.gobj(),x.value_type());
 
                x.set(value_desc && value_desc.is_value_node());
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -125,7 +125,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                g_value_init(x.gobj(),x.value_type());
 
                x.set(value_desc.is_value_node() && value_desc.get_value_node()->rcount()>1);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -138,7 +138,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                g_value_init(x.gobj(),x.value_type());
 
                x.set(value_desc.is_value_node() && value_desc.get_value_node()->is_exported());
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -151,7 +151,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                g_value_init(x.gobj(),x.value_type());
 
                x.set(!value_desc && (Canvas::Handle)(*iter)[model.canvas]);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -168,8 +168,8 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                else if(!value_desc && Canvas::Handle((*iter)[model.canvas]))
                        x.set(Canvas::Handle((*iter)[model.canvas])->get_id());
                else
-                       return Gtk::TreeStore::get_value_vfunc(iter,column,value);      
-               
+                       return Gtk::TreeStore::get_value_vfunc(iter,column,value);
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -182,7 +182,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                g_value_init(x.gobj(),x.value_type());
 
                x.set(!value_desc.is_value_node() || synfigapp::is_editable(value_desc.get_value_node()));
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -211,7 +211,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                                x.set(value_desc.get_value_node()->get_local_name());
                        }
                }
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -233,9 +233,9 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                                        x.set(canvas->get_id());
                                else
                                if(!canvas->get_name().empty())
-                                       x.set(canvas->get_name());      
+                                       x.set(canvas->get_name());
                                else
-                                       x.set(_("[Unnamed]"));          
+                                       x.set(_("[Unnamed]"));
                                x.set(_("Canvas"));
                        }
                        return Gtk::TreeStore::get_value_vfunc(iter,column,value);
@@ -243,16 +243,16 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
                else
                {
                        ValueNode::Handle value_node=value_desc.get_value_node();
-                       
+
                        // Setup the row's label
                        if(value_node->get_id().empty())
-                               x.set(Glib::ustring((*iter)[model.name]));      
+                               x.set(Glib::ustring((*iter)[model.name]));
                        else if(Glib::ustring((*iter)[model.name]).empty())
                                x.set(value_node->get_id());
                        else
-                               x.set(Glib::ustring((*iter)[model.name])+" ("+value_node->get_id()+')');                        
+                               x.set(Glib::ustring((*iter)[model.name])+" ("+value_node->get_id()+')');
                }
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -265,7 +265,7 @@ CanvasTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colu
 
                Glib::Value<Glib::RefPtr<Gdk::Pixbuf> > x;
                g_value_init(x.gobj(),x.value_type());
-               
+
                x.set(get_tree_pixbuf(value_desc.get_value_type()));
 
                g_value_init(value.gobj(),x.value_type());
@@ -303,7 +303,7 @@ bool
 CanvasTreeStore::find_next_value_desc(const synfigapp::ValueDesc& value_desc, Gtk::TreeIter& iter)
 {
        if(!iter) return find_first_value_desc(value_desc,iter);
-               
+
        if(iter) do {
                if(!iter->children().empty())
                {
@@ -359,7 +359,7 @@ bool
 CanvasTreeStore::find_next_value_node(const ValueNode::Handle& value_node, Gtk::TreeIter& iter)
 {
        if(!iter) return find_first_value_node(value_node,iter);
-               
+
        if(iter) do {
                if(!iter->children().empty())
                {
@@ -392,7 +392,7 @@ CanvasTreeStore::set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc, bool
        try
        {
                //row[model.icon] = get_tree_pixbuf(value_desc.get_value_type());
-               
+
                if(value_desc.is_value_node())
                {
                        ValueNode::Handle value_node=value_desc.get_value_node();
@@ -404,16 +404,16 @@ CanvasTreeStore::set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc, bool
                        //row[model.is_value_node] = true;
                        //row[model.is_editable] = synfigapp::is_editable(value_node);
                        //row[model.id]=value_node->get_id();
-                       
+
                        // Set the canvas
                        if(value_desc.parent_is_canvas())
                                row[model.canvas]=value_desc.get_canvas();
                        else
                                row[model.canvas]=canvas_interface()->get_canvas();
-                               
+
                        LinkableValueNode::Handle linkable;
                        linkable=LinkableValueNode::Handle::cast_dynamic(value_node);
-       
+
                        if(linkable && do_children)
                        {
                                row[model.link_count] = linkable->link_count();
@@ -442,7 +442,7 @@ CanvasTreeStore::set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc, bool
                erase(row);
                return;
        }
-       
+
        // We should never get to this point
        assert(0);
 }
@@ -458,52 +458,52 @@ CanvasTreeStore::refresh_row(Gtk::TreeModel::Row &row, bool do_children)
                        (!bool(row[model.is_value_node]) && row[model.link_count]!=0))
                {
                        set_row(row,value_desc,do_children);
-                       return;                         
+                       return;
                }
-               
+
                if(row[model.is_value_node])
                {
                        ValueNode::Handle value_node(value_desc.get_value_node());
-       
+
                        if(ValueNode::Handle(row[model.value_node])!=value_node)
                        {
                                rebuild_row(row,do_children);
                                return;
                        }
-       
+
                        //row[model.id]=value_node->get_id();
-       
+
                        // Setup the row's label
                        /*
                        if(value_node->get_id().empty())
-                               row[model.label] = Glib::ustring(row[model.name]);                                      
+                               row[model.label] = Glib::ustring(row[model.name]);
                        else if(Glib::ustring(row[model.name]).empty())
                                row[model.label] = value_node->get_id();
                        else
-                               row[model.label] = Glib::ustring(row[model.name])+" ("+value_node->get_id()+')';                        
+                               row[model.label] = Glib::ustring(row[model.name])+" ("+value_node->get_id()+')';
                        */
-                       
+
                        LinkableValueNode::Handle linkable;
                        linkable=LinkableValueNode::Handle::cast_dynamic(value_node);
                        if(do_children && linkable && ((int)row[model.link_count] != linkable->link_count()))
                        {
        //                      Gtk::TreeModel::Children children = row.children();
        //                      while(!children.empty() && erase(children.begin()));
-                               
+
                                set_row(row,value_desc);
-                               return;                         
+                               return;
                        }
                }
                else
                {
-                       //row[model.label] = Glib::ustring(row[model.name]);                                    
+                       //row[model.label] = Glib::ustring(row[model.name]);
                        //row[model.is_value_node] = false;
                        //row[model.is_editable] = true;
                }
        }
        if(!do_children)
-               return; 
-       
+               return;
+
        Gtk::TreeModel::Children children = row.children();
        Gtk::TreeModel::Children::iterator iter;
 
@@ -526,14 +526,14 @@ CanvasTreeStore::rebuild_row(Gtk::TreeModel::Row &row, bool do_children)
                value_node=value_desc.get_value_node();
 
                assert(value_node);if(!value_node)return;
-               
+
                if(value_node && value_node!=(ValueNode::Handle)row[model.value_node])
                {
 //                     Gtk::TreeModel::Children children = row.children();
 //                     while(!children.empty() && erase(children.begin()));
-                               
+
                        set_row(row,value_desc,do_children);
-                       return;                         
+                       return;
                }
 
                LinkableValueNode::Handle linkable;
@@ -543,34 +543,34 @@ CanvasTreeStore::rebuild_row(Gtk::TreeModel::Row &row, bool do_children)
                {
 //                     Gtk::TreeModel::Children children = row.children();
 //                     while(!children.empty() && erase(children.begin()));
-                       
+
                        set_row(row,value_desc);
-                       return;                         
+                       return;
                }
-                       
+
                //if(!value_node)
                //      value_node=row[model.value_node];
-               
+
                row[model.id]=value_node->get_id();
 
                // Setup the row's label
                if(value_node->get_id().empty())
-                       row[model.label] = Glib::ustring(row[model.name]);                                      
+                       row[model.label] = Glib::ustring(row[model.name]);
                else if(Glib::ustring(row[model.name]).empty())
                        row[model.label] = value_node->get_id();
                else
-                       row[model.label] = Glib::ustring(row[model.name])+" ("+value_node->get_id()+')';                        
+                       row[model.label] = Glib::ustring(row[model.name])+" ("+value_node->get_id()+')';
        }
        else
        {
-               row[model.label] = Glib::ustring(row[model.name]);                                      
+               row[model.label] = Glib::ustring(row[model.name]);
                row[model.is_value_node] = false;
                row[model.is_editable] = true;
                Gtk::TreeModel::Children children = row.children();
                while(!children.empty() && erase(children.begin()));
        }
        if(!do_children)
-               return; 
+               return;
 
        Gtk::TreeModel::Children children = row.children();
        Gtk::TreeModel::Children::iterator iter;
@@ -586,9 +586,9 @@ CellRenderer_ValueBase*
 CanvasTreeStore::add_cell_renderer_value(Gtk::TreeView::Column* column)
 {
        const CanvasTreeStore::Model model;
-       
+
        CellRenderer_ValueBase* ret;
-       
+
        ret=Gtk::manage( new CellRenderer_ValueBase() );
 
        column->pack_start(*ret,true);
@@ -603,16 +603,16 @@ CellRenderer_TimeTrack*
 CanvasTreeStore::add_cell_renderer_value_node(Gtk::TreeView::Column* column)
 {
        const CanvasTreeStore::Model model;
-       
+
        CellRenderer_TimeTrack* ret;
-       
+
        ret = Gtk::manage( new CellRenderer_TimeTrack() );
-       
+
        column->pack_start(*ret,true);
        //column->add_attribute(ret->property_visible(), model.is_value_node);
        column->add_attribute(ret->property_value_desc(), model.value_desc);
        column->add_attribute(ret->property_canvas(), model.canvas);
-       
-       
+
+
        return ret;
 }
index 1f29fa3..1e082f9 100644 (file)
@@ -50,7 +50,7 @@ class CellRenderer_ValueBase;
                COLUMNID_VALUE,
                COLUMNID_TIME_TRACK,
                COLUMNID_TYPE,
-               
+
                COLUMNID_END                    //!< \internal
        };
 #define        COLUMNID_NAME COLUMNID_ID
@@ -85,9 +85,9 @@ public:
 
                Gtk::TreeModelColumn<bool> is_shared;
                Gtk::TreeModelColumn<bool> is_exported;
-       
+
                Gtk::TreeModelColumn<synfigapp::ValueDesc> value_desc;
-       
+
                Gtk::TreeModelColumn<Glib::ustring> tooltip;
 
                Model()
@@ -109,7 +109,7 @@ public:
                        add(value_desc);
                        add(link_count);
                        add(link_id);
-                       
+
                        add(tooltip);
                }
        };
@@ -119,7 +119,7 @@ public:
        */
 
 public:
-       
+
        const Model model;
 
        //std::multimap<etl::handle<ValueNode>, sigc::connection> connection_map;
@@ -152,7 +152,7 @@ private:
        */
 
 public:
-       
+
        CanvasTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
        ~CanvasTreeStore();
 
@@ -170,8 +170,8 @@ public:
 
        bool find_first_value_node(const synfig::ValueNode::Handle& value_node, Gtk::TreeIter& iter);
        bool find_next_value_node(const synfig::ValueNode::Handle& value_node, Gtk::TreeIter& iter);
-       
-       
+
+
        static CellRenderer_ValueBase* add_cell_renderer_value(Gtk::TreeView::Column* column);
 
        static CellRenderer_TimeTrack* add_cell_renderer_value_node(Gtk::TreeView::Column* column);
@@ -185,7 +185,7 @@ public:
        */
 
 public:
-       
+
 }; // END of class CanvasTreeStore
 
 }; // END of namespace studio
index 493935e..43d8de9 100644 (file)
@@ -45,9 +45,9 @@
 #include <gtk/gtkversion.h>
 
 #include <synfig/valuenode_reference.h>
-#include <synfig/valuenode_subtract.h>         
-#include <synfig/valuenode_linear.h>           
-#include <synfig/valuenode_timedswap.h>                
+#include <synfig/valuenode_subtract.h>
+#include <synfig/valuenode_linear.h>
+#include <synfig/valuenode_timedswap.h>
 #include <synfig/valuenode_scale.h>
 #include <synfig/valuenode_dynamiclist.h>
 #include <synfig/valuenode_twotone.h>
@@ -156,17 +156,17 @@ using namespace SigC;
 #define NOT_IMPLEMENTED_SLOT sigc::mem_fun(*reinterpret_cast<studio::CanvasViewUIInterface*>(get_ui_interface().get()),&studio::CanvasViewUIInterface::not_implemented)
 
 #define SLOT_EVENT(x)  sigc::hide_return(sigc::bind(sigc::mem_fun(*this,&studio::CanvasView::process_event_key),x))
-       
+
 /* === C L A S S E S ======================================================= */
 
-       
+
 class studio::UniversalScrubber
 {
        CanvasView *canvas_view;
 
        bool            scrubbing;
        etl::clock      scrub_timer;
-       
+
        sigc::connection end_scrub_connection;
 public:
        UniversalScrubber(CanvasView *canvas_view):
@@ -177,12 +177,12 @@ public:
                        sigc::mem_fun(*this,&studio::UniversalScrubber::on_time_changed)
                );
        }
-       
+
        ~UniversalScrubber()
        {
                end_scrub_connection.disconnect();
        }
-       
+
        void on_time_changed()
        {
                // Make sure we are changing the time quickly
@@ -192,14 +192,14 @@ public:
                        scrub_timer.reset();
                        return;
                }
-               
+
                // If we aren't scrubbing already, enable it
                if(!scrubbing)
                {
-                       scrubbing=true;                 
+                       scrubbing=true;
                        audio_container()->start_scrubbing(canvas_view->get_time());
                }
-               
+
                // Reset the scrubber ender
                end_scrub_connection.disconnect();
                end_scrub_connection=Glib::signal_timeout().connect(
@@ -215,14 +215,14 @@ public:
 
                scrub_timer.reset();
        }
-       
+
        void end_of_scrubbing()
-       {               
+       {
                scrubbing=false;
                audio_container()->stop_scrubbing();
                scrub_timer.reset();
        }
-       
+
        handle<AudioContainer> audio_container()
        {
                assert(canvas_view->audio);
@@ -230,7 +230,7 @@ public:
        }
 };
 
-       
+
 class studio::CanvasViewUIInterface : public synfigapp::UIInterface
 {
        CanvasView *view;
@@ -240,7 +240,7 @@ public:
        CanvasViewUIInterface(CanvasView *view):
                view(view)
        {
-       
+
                view->statusbar->push("Idle");
        }
 
@@ -262,11 +262,11 @@ public:
                );
                Gtk::Label label(message);
                label.show();
-               
+
                dialog.get_vbox()->pack_start(label);
                dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES);
                dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO);
-               
+
                dialog.set_default_response(dflt);
                dialog.show();
                return (Response)dialog.run();
@@ -283,12 +283,12 @@ public:
                );
                Gtk::Label label(message);
                label.show();
-               
+
                dialog.get_vbox()->pack_start(label);
                dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES);
                dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO);
                dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL);
-               
+
                dialog.set_default_response(dflt);
                dialog.show();
                return (Response)dialog.run();
@@ -305,11 +305,11 @@ public:
                );
                Gtk::Label label(message);
                label.show();
-               
+
                dialog.get_vbox()->pack_start(label);
                dialog.add_button(Gtk::StockID("gtk-ok"),RESPONSE_OK);
                dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL);
-               
+
                dialog.set_default_response(dflt);
                dialog.show();
                return (Response)dialog.run();
@@ -319,7 +319,7 @@ public:
        task(const std::string &task)
        {
                if(!view->is_playing_)
-               {       
+               {
                        view->statusbar->pop();
                        view->statusbar->push(task);
                }
@@ -332,7 +332,7 @@ public:
        error(const std::string &err)
        {
                view->statusbar->push("ERROR");
-               
+
                // If we are in the process of canceling,
                // then just go ahead and return false --
                // don't bother displaying a dialog
@@ -349,7 +349,7 @@ public:
        {
                view->statusbar->pop();
                view->statusbar->push(err);
-               
+
                //while(studio::App::events_pending())studio::App::iteration(false);
                if(view->cancel)return false;
                return true;
@@ -359,7 +359,7 @@ public:
        amount_complete(int current, int total)
        {
                if(!view->is_playing_)
-               {       
+               {
                        if(!view->working_depth)
                        {
                                if(current)
@@ -376,7 +376,7 @@ public:
                if(view->cancel){/*view->cancel=false;*/return false;}
                return true;
        }
-       
+
        void
        not_implemented()
        {
@@ -392,10 +392,10 @@ class studio::CanvasViewSelectionManager : public synfigapp::SelectionManager
 public:
 
        CanvasViewSelectionManager(CanvasView *view): view(view)
-{      
-       
+{
+
  }
-               
+
 
 private:
        void _set_selected_layer(const synfig::Layer::Handle &layer)
@@ -407,7 +407,7 @@ private:
                // It musta been for some reason, but I cannot recall.
                //if(App::Busy::count)
                //      return;
-               
+
                if(view->layer_tree->get_selection()->get_selected())
                {
                        const Gtk::TreeRow row = *(view->layer_tree->get_selection()->get_selected());
@@ -434,7 +434,7 @@ private:
 */
        }
 public:
-       
+
        //! Returns the number of layers selected.
        virtual int get_selected_layer_count()const
        {
@@ -445,25 +445,25 @@ public:
        virtual LayerList get_selected_layers()const
        {
 //             assert(view->layer_tree);
-               
+
                if(!view->layer_tree) { DEBUGPOINT(); synfig::error("canvas_view.layer_tree not defined!?"); return LayerList(); }
                return view->layer_tree->get_selected_layers();
        }
-       
+
        //! Returns the first layer selected or an empty handle if none are selected.
        virtual synfig::Layer::Handle get_selected_layer()const
        {
 //             assert(view->layer_tree);
-               
+
                if(!view->layer_tree) { DEBUGPOINT(); synfig::error("canvas_view.layer_tree not defined!?"); return 0; }
                return view->layer_tree->get_selected_layer();
        }
-       
+
        //! Sets which layers should be selected
        virtual void set_selected_layers(const LayerList &layer_list)
        {
 //             assert(view->layer_tree);
-               
+
                if(!view->layer_tree) { DEBUGPOINT(); synfig::error("canvas_view.layer_tree not defined!?"); return; }
                view->layer_tree->select_layers(layer_list);
                //view->get_smach().process_event(EVENT_REFRESH_DUCKS);
@@ -475,7 +475,7 @@ public:
        virtual void set_selected_layer(const synfig::Layer::Handle &layer)
        {
 //             assert(view->layer_tree);
-               
+
                if(!view->layer_tree) { DEBUGPOINT(); synfig::error("canvas_view.layer_tree not defined!?"); return; }
                view->layer_tree->select_layer(layer);
                //view->queue_rebuild_ducks();
@@ -495,7 +495,7 @@ public:
        {
                return get_selected_children().size();
        }
-       
+
        static inline void __child_grabber(const Gtk::TreeModel::iterator& iter, ChildrenList* ret)
        {
                const CanvasView::ChildrenTreeModel children_tree_model;
@@ -503,19 +503,19 @@ public:
                if(value_desc)
                        ret->push_back(value_desc);
        }
-       
+
        //! Returns a list of the currently selected value_nodes.
        virtual ChildrenList get_selected_children()const
        {
                if(!view->children_tree) return ChildrenList();
-                       
+
                Glib::RefPtr<Gtk::TreeSelection> selection=view->children_tree->get_selection();
 
                if(!selection)
                        return ChildrenList();
-       
+
                ChildrenList ret;
-               
+
                selection->selected_foreach_iter(
                        sigc::bind(
                                sigc::ptr_fun(
@@ -524,7 +524,7 @@ public:
                                &ret
                        )
                );
-               
+
                /*
                Gtk::TreeModel::Children::iterator iter(view->children_tree_store()->children().begin());
                iter++;
@@ -538,7 +538,7 @@ public:
                */
                return ret;
        }
-       
+
        //! Returns the first value_node selected or an empty handle if none are selected.
        virtual ChildrenList::value_type get_selected_child()const
        {
@@ -551,7 +551,7 @@ public:
 
                return children.front();
        }
-       
+
        //! Sets which value_nodes should be selected
        virtual void set_selected_children(const ChildrenList &children_list)
        {
@@ -569,14 +569,14 @@ public:
        {
                return;
        }
-       
-       
-       
+
+
+
        int get_selected_layer_parameter_count()const
        {
                return get_selected_layer_parameters().size();
        }
-       
+
        LayerParamList get_selected_layer_parameters()const
        {
                if(!view->layer_tree) return LayerParamList();
@@ -585,9 +585,9 @@ public:
 
                if(!selection)
                        return LayerParamList();
-       
+
                LayerParamList ret;
-       
+
                Gtk::TreeModel::Children children = const_cast<CanvasView*>(view)->layer_tree_store()->children();
                Gtk::TreeModel::Children::iterator iter;
                for(iter = children.begin(); iter != children.end(); ++iter)
@@ -603,23 +603,23 @@ public:
                }
                return ret;
        }
-       
+
        LayerParam get_selected_layer_parameter() const
        {
                if(!view->layer_tree) return LayerParam();
                return get_selected_layer_parameters().front();
        }
-       
+
        void set_selected_layer_parameters(const LayerParamList &layer_param_list)
        {
                return;
        }
-       
+
        void set_selected_layer_param(const LayerParam &layer_param)
        {
                return;
        }
-       
+
        void clear_selected_layer_parameters()
        {
                return;
@@ -663,16 +663,16 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
        time_adjustment_                (0,0,25,0,0,0),
        time_window_adjustment_ (0,0,25,0,0,0),
        statusbar                               (manage(new class Gtk::Statusbar())),
-       
+
        timeslider                              (new Widget_Timeslider),
-       
+
        ui_interface_                   (new CanvasViewUIInterface(this)),
        selection_manager_              (new CanvasViewSelectionManager(this)),
        is_playing_                             (false),
-       
+
        working_depth                   (0),
        cancel                                  (false),
-       
+
        canvas_properties               (*this,canvas_interface_),
        canvas_options                  (this),
        render_settings                 (*this,canvas_interface_),
@@ -684,21 +684,21 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
        layer_tree=0;
        children_tree=0;
        duck_refresh_flag=true;
-       
+
        smach_.set_default_state(&state_normal);
-       
+
        disp_audio = new Widget_Sound();
-       
+
        //synfig::info("Canvasview: Entered constructor");
        // Minor hack
        get_canvas()->set_time(0);
        //layer_tree_store_->rebuild();
-               
+
        // Set up the UI and Selection managers
        canvas_interface()->set_ui_interface(get_ui_interface());
        canvas_interface()->set_selection_manager(get_selection_manager());
        rebuild_ducks_queued=false;
-       
+
        //notebook=manage(new class Gtk::Notebook());
        //Gtk::VPaned *vpaned = manage(new class Gtk::VPaned());
        //vpaned->pack1(*create_work_area(), Gtk::EXPAND|Gtk::SHRINK);
@@ -707,25 +707,25 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
 
 
        //notebook->show();
-       
+
        //notebook->append_page(*create_layer_tree(),"Layers");
        //notebook->append_page(*create_children_tree(),"Children");
        //notebook->append_page(*create_keyframe_tree(),"Keyframes");
-       
+
        //synfig::info("Canvasview: Before big chunk of allocation and tabling stuff");
        //create all allocated stuff for this canvas
        audio = new AudioContainer();
-       
-       Gtk::Table *layout_table= manage(new class Gtk::Table(1, 3, false));    
+
+       Gtk::Table *layout_table= manage(new class Gtk::Table(1, 3, false));
        //layout_table->attach(*vpaned, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        layout_table->attach(*create_work_area(), 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       init_menus();   
+       init_menus();
        //layout_table->attach(*App::ui_manager()->get_widget("/menu-main"), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
-       
-       
+
+
        layout_table->attach(*create_time_bar(), 0, 1, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        layout_table->attach(*create_status_bar(), 0, 1, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
-       
+
        update_title();
 
        layout_table->show();
@@ -748,10 +748,10 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
        canvas_interface()->signal_rend_desc_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::refresh_rend_desc));
        waypoint_dialog.signal_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::on_waypoint_changed));
        waypoint_dialog.signal_delete().connect(sigc::mem_fun(*this,&studio::CanvasView::on_waypoint_delete));
-       
+
        //MODIFIED TIME ADJUSTMENT STUFF....
        time_window_adjustment().set_child_adjustment(&time_adjustment());
-       time_window_adjustment().signal_value_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::refresh_time_window)); 
+       time_window_adjustment().signal_value_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::refresh_time_window));
        time_adjustment().signal_value_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::time_was_changed));
 
 
@@ -776,20 +776,20 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
                        )
                )
        );
-       
+
 
        //MUCH TIME STUFF TAKES PLACE IN HERE
        refresh_rend_desc();
        refresh_time_window();
 
-       /*! \todo We shouldn't need to do this at construction -- 
+       /*! \todo We shouldn't need to do this at construction --
        **      This should be preformed at the first time the window
        **      becomes visible.
        */
        work_area->queue_render_preview();
-       
+
        // If the canvas is really big, zoom out so that we can fit it all in the window
-       /*! \todo In other words, this is a zoom-to-fit, and should be 
+       /*! \todo In other words, this is a zoom-to-fit, and should be
        ** in it's own function.
        */
        int w=get_canvas()->rend_desc().get_w()+70;
@@ -799,15 +799,15 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
                work_area->zoom_out();
                w=round_to_int(get_canvas()->rend_desc().get_w()*work_area->get_zoom()+70);
                h=round_to_int(get_canvas()->rend_desc().get_h()*work_area->get_zoom()+70);
-       } 
+       }
        if(w>700)w=700;
-       if(h>600)h=600; 
+       if(h>600)h=600;
        set_default_size(w,h);
        property_window_position().set_value(Gtk::WIN_POS_NONE);
-       
-       
-       
-       
+
+
+
+
        std::list<Gtk::TargetEntry> listTargets;
        listTargets.push_back( Gtk::TargetEntry("STRING") );
        listTargets.push_back( Gtk::TargetEntry("text/plain") );
@@ -830,38 +830,38 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
                time_window_adjustment().set_page_size(10.0);
        }
        */
-       
+
        //synfig::info("Canvasview: Before Sound Hookup");
        //load sound info from meta data
        {
                //synfig::warning("Should load Audio: %s with %s offset",apath.c_str(),aoffset.c_str());
-               
+
                on_audio_file_notify(); //redundant setting of the metadata, but oh well, it's no big deal :)
                on_audio_offset_notify();
-               
+
                //signal connection - since they are all associated with the canvas view
-               
+
                //hook in signals for sound options box
                sound_dialog->signal_file_changed().connect(sigc::mem_fun(*this,&CanvasView::on_audio_file_change));
                sound_dialog->signal_offset_changed().connect(sigc::mem_fun(*this,&CanvasView::on_audio_offset_change));
-               
-               //attach to the preview when it's visible               
+
+               //attach to the preview when it's visible
                //preview_dialog->get_widget().signal_play().connect(sigc::mem_fun(*this,&CanvasView::play_audio));
                //preview_dialog->get_widget().signal_stop().connect(sigc::mem_fun(*this,&CanvasView::stop_audio));
-               
+
                //hook to metadata signals
                get_canvas()->signal_meta_data_changed("audiofile").connect(sigc::mem_fun(*this,&CanvasView::on_audio_file_notify));
                get_canvas()->signal_meta_data_changed("audiooffset").connect(sigc::mem_fun(*this,&CanvasView::on_audio_offset_notify));
 
                //universal_scrubber=std::auto_ptr<UniversalScrubber>(new UniversalScrubber(this));
        }
-       
+
        //synfig::info("Canvasview: Before Final time set up");
        //MORE TIME STUFF
        time_window_adjustment().set_value(get_canvas()->rend_desc().get_time_start());
        time_window_adjustment().value_changed();
 
-       
+
        GRAB_HINT_DATA("canvas_view");
        /*
        {
@@ -870,12 +870,12 @@ CanvasView::CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigap
        set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
        }
        */
-       
-       refresh_rend_desc();    
+
+       refresh_rend_desc();
        hide_tables();
 
-       on_time_changed();      
-       //synfig::info("Canvasview: Constructor Done"); 
+       on_time_changed();
+       //synfig::info("Canvasview: Constructor Done");
 }
 
 CanvasView::~CanvasView()
@@ -899,12 +899,12 @@ CanvasView::~CanvasView()
                if(ext_widget_book_.begin()->second)
                        delete ext_widget_book_.begin()->second;
        }
-       
+
        //delete preview
        audio.reset();
-               
+
        hide();
-       
+
        synfig::info("CanvasView:~CanvasView(): Destructor Finished");
 }
 
@@ -923,8 +923,8 @@ CanvasView::create_time_bar()
        timeslider->set_time_adjustment(&time_adjustment());
        timeslider->set_bounds_adjustment(&time_window_adjustment());
        //layout_table->attach(*timeslider, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL);
-       
-       
+
+
        tooltips.set_tip(*time_window_scroll,_("Moves the time window"));
        tooltips.set_tip(*timeslider,_("Changes the current time"));
        time_window_scroll->show();
@@ -934,7 +934,7 @@ CanvasView::create_time_bar()
 
        //time_scroll->signal_value_changed().connect(sigc::mem_fun(*work_area, &studio::WorkArea::render_preview_hook));
        //time_scroll->set_update_policy(Gtk::UPDATE_DISCONTINUOUS);
-       
+
        NORMAL_BUTTON(animatebutton,"gtk-yes","Animate");
        animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed));
        animatebutton->show();
@@ -942,11 +942,11 @@ CanvasView::create_time_bar()
        NORMAL_BUTTON(keyframebutton,"synfig-keyframe_lock_all","All Keyframes Locked");
        keyframebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed));
        keyframebutton->show();
-       
+
        Gtk::Table *table= manage(new class Gtk::Table(2, 3, false));
 
        //setup the audio display
-       disp_audio->set_size_request(-1,32); //disp_audio.show(); 
+       disp_audio->set_size_request(-1,32); //disp_audio.show();
        disp_audio->set_time_adjustment(&time_adjustment());
        disp_audio->signal_start_scrubbing().connect(
                sigc::mem_fun(*audio,&AudioContainer::start_scrubbing)
@@ -957,7 +957,7 @@ CanvasView::create_time_bar()
        disp_audio->signal_stop_scrubbing().connect(
                sigc::mem_fun(*audio,&AudioContainer::stop_scrubbing)
        );
-       
+
        table->attach(*manage(disp_audio), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
        table->attach(*timeslider, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
        table->attach(*time_window_scroll, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
@@ -1030,7 +1030,7 @@ CanvasView::create_status_bar()
        refreshbutton->signal_clicked().connect(SLOT_EVENT(EVENT_REFRESH));
        stopbutton->signal_clicked().connect(SLOT_EVENT(EVENT_STOP));
 
-       
+
        statusbartable->show_all();
        return statusbartable;
 }
@@ -1058,7 +1058,7 @@ CanvasView::create_children_tree()
        if(children_tree)children_tree->signal_waypoint_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_waypoint_clicked));
        if(children_tree)children_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_REFRESH_DUCKS));
 
-       return children_tree;   
+       return children_tree;
 }
 
 Gtk::Widget*
@@ -1073,7 +1073,7 @@ CanvasView::create_keyframe_tree()
        //keyframe_tree->signal_edited().connect(sigc::hide_return(sigc::mem_fun(*canvas_interface(), &synfigapp::CanvasInterface::update_keyframe)));
 
        keyframe_tree->signal_event().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_tree_event));
-       
+
        Gtk::ScrolledWindow *scroll_layer_tree = manage(new class Gtk::ScrolledWindow());
        scroll_layer_tree->set_flags(Gtk::CAN_FOCUS);
        scroll_layer_tree->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -1081,10 +1081,10 @@ CanvasView::create_keyframe_tree()
        scroll_layer_tree->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
        //scroll_layer_tree->show();
 
-       
-       Gtk::Table *layout_table= manage(new Gtk::Table(1, 2, false));  
+
+       Gtk::Table *layout_table= manage(new Gtk::Table(1, 2, false));
        layout_table->attach(*scroll_layer_tree, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        Gtk::Image *icon;
        Gtk::IconSize iconsize(Gtk::IconSize::from_name("synfig-small_icon"));
 
@@ -1094,18 +1094,18 @@ CanvasView::create_keyframe_tree()
 
        Gtk::HBox *hbox(manage(new Gtk::HBox()));
        layout_table->attach(*hbox, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
-       
+
        hbox->pack_start(*button_add,Gtk::PACK_SHRINK);
        hbox->pack_start(*button_duplicate,Gtk::PACK_SHRINK);
        hbox->pack_start(*button_delete,Gtk::PACK_SHRINK);
-       
+
        /*
        button_raise->set_relief(Gtk::RELIEF_HALF);
        button_lower->set_relief(Gtk::RELIEF_HALF);
        button_duplicate->set_relief(Gtk::RELIEF_HALF);
        button_delete->set_relief(Gtk::RELIEF_HALF);
        */
-       
+
        button_add->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_add_pressed));
        button_duplicate->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_duplicate_pressed));
        button_delete->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_remove_pressed));
@@ -1113,11 +1113,11 @@ CanvasView::create_keyframe_tree()
        //layout_table->show_all();
 
        keyframe_tab_child=layout_table;
-       
-       
+
+
        layout_table->hide();
-       
-       return layout_table;    
+
+       return layout_table;
 }
 
 Gtk::Widget*
@@ -1140,7 +1140,7 @@ CanvasView::create_layer_tree()
        layer_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_REFRESH_DUCKS));
 
        layer_tree->hide();
-       return layer_tree;      
+       return layer_tree;
 }
 
 void
@@ -1160,7 +1160,7 @@ CanvasView::init_menus()
        layermenu.set_accel_path("<Canvas-view>/Layer");
 */
        //cache the position of desired widgets
-       
+
        /*Menus to worry about:
        - filemenu
        - editmenu
@@ -1171,7 +1171,7 @@ CanvasView::init_menus()
        - viewmenu
        */
        action_group = Gtk::ActionGroup::create();
-       
+
        //action_group->add( Gtk::Action::create("MenuFile", "_File") );
        action_group->add( Gtk::Action::create("save", Gtk::Stock::SAVE),
                hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::save))
@@ -1210,7 +1210,7 @@ CanvasView::init_menus()
                sigc::mem_fun0(canvas_options,&studio::CanvasOptions::present)
        );
        action_group->add( Gtk::Action::create("close", Gtk::StockID("gtk-close")),
-               sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close))      
+               sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close))
        );
 
        //action_group->add( Gtk::Action::create("undo", Gtk::StockID("gtk-undo")),
@@ -1232,7 +1232,7 @@ CanvasView::init_menus()
        action_group->add( Gtk::Action::create("stop", Gtk::StockID("gtk-stop")),
                SLOT_EVENT(EVENT_STOP)
        );
-       
+
        action_group->add( Gtk::Action::create("refresh", Gtk::StockID("gtk-refresh")),
                SLOT_EVENT(EVENT_REFRESH)
        );
@@ -1267,7 +1267,7 @@ CanvasView::init_menus()
        action_group->add( Gtk::Action::create("play", Gtk::StockID("synfig-play")),
                sigc::mem_fun(*this, &studio::CanvasView::play)
        );
-       
+
        action_group->add( Gtk::Action::create("dialog-flipbook", _("Flipbook Dialog")),
                sigc::mem_fun0(*preview_dialog, &studio::Dialog_Preview::present)
        );
@@ -1299,7 +1299,7 @@ CanvasView::init_menus()
 
        {
                Glib::RefPtr<Gtk::Action> action;
-               
+
                action=Gtk::Action::create("seek-next-frame", Gtk::Stock::GO_FORWARD,_("Next Frame"),_("Next Frame"));
                action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame),1));
                action=Gtk::Action::create("seek-prev-frame", Gtk::Stock::GO_BACK,_("Prev Frame"),_("Prev Frame"));
@@ -1326,16 +1326,16 @@ CanvasView::init_menus()
 
                action=Gtk::Action::create("canvas-zoom-in", Gtk::Stock::ZOOM_IN);
                action_group->add( action,sigc::mem_fun(*work_area, &studio::WorkArea::zoom_in));
-               
+
                action=Gtk::Action::create("canvas-zoom-out", Gtk::Stock::ZOOM_OUT);
                action_group->add( action, sigc::mem_fun(*work_area, &studio::WorkArea::zoom_out) );
-               
+
                action=Gtk::Action::create("time-zoom-in", Gtk::Stock::ZOOM_IN, _("Zoom In on Timeline"));
                action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_in) );
-               
+
                action=Gtk::Action::create("time-zoom-out", Gtk::Stock::ZOOM_OUT, _("Zoom Out on Timeline"));
                action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_out) );
-               
+
        }
 
 
@@ -1347,7 +1347,7 @@ CanvasView::init_menus()
                        sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), \
                        Duck::TYPE_##upper \
                ) \
-       ) 
+       )
        DUCK_MASK(position,POSITION);
        DUCK_MASK(tangent,TANGENT);
        DUCK_MASK(vertex,VERTEX);
@@ -1363,7 +1363,7 @@ CanvasView::init_menus()
        {
                Glib::RefPtr<Gtk::ActionGroup> accel_action_group(Gtk::ActionGroup::create("canvas_view"));
                Glib::RefPtr<Gtk::Action> action;
-               
+
                action=Gtk::Action::create("seek-next-frame", Gtk::StockID("gtk-forward"),_("Next Frame"),_("Next Frame"));
                accel_action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek),1));
 
@@ -1378,16 +1378,16 @@ CanvasView::init_menus()
 
                action=Gtk::Action::create("canvas-zoom-in", Gtk::StockID("gtk-zoom-in"));
                accel_action_group->add( action,sigc::mem_fun(*work_area, &studio::WorkArea::zoom_in));
-               
+
                action=Gtk::Action::create("canvas-zoom-out", Gtk::StockID("gtk-zoom-out"));
                accel_action_group->add( action, sigc::mem_fun(*work_area, &studio::WorkArea::zoom_out) );
-               
+
                action=Gtk::Action::create("time-zoom-in", Gtk::StockID("gtk-zoom-in"), _("Zoom In on Timeline"));
                accel_action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_in) );
-               
+
                action=Gtk::Action::create("time-zoom-out", Gtk::StockID("gtk-zoom-out"), _("Zoom Out on Timeline"));
                accel_action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_out) );
-               
+
                Glib::RefPtr<Gtk::UIManager> accel_ui_manager(Gtk::UIManager::create());
 
                Glib::ustring ui_info =
@@ -1406,7 +1406,7 @@ CanvasView::init_menus()
 
                accel_ui_manager->add_ui_from_string(ui_info);
                add_accel_group(accel_ui_manager->get_accel_group());
-       
+
                accel_ui_manager->insert_action_group(accel_action_group);
                set_ref_obj("accel_ui_manager",accel_ui_manager);
                set_ref_obj("accel_action_group",accel_action_group);
@@ -1415,10 +1415,10 @@ CanvasView::init_menus()
 
 
 
-#if 0  
-       
+#if 0
+
        //Test some key stuff
-       
+
        filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-save"),
                hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::save))));
        filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-save-as"),sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_save_as))));
@@ -1437,11 +1437,11 @@ CanvasView::init_menus()
        ));
        filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Preview"),Gtk::AccelKey("F11"),
                sigc::mem_fun(*this,&CanvasView::on_preview_option)
-       ));     
+       ));
        filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Sound File"),
                sigc::mem_fun(*this,&CanvasView::on_audio_option)
-       ));     
-       
+       ));
+
        filemenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem());
        filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Options"),Gtk::AccelKey("F12"),
                sigc::mem_fun(canvas_options,&studio::CanvasOptions::present)
@@ -1487,7 +1487,7 @@ CanvasView::init_menus()
                add_actions_to_menu(&canvasmenu, param_list,synfigapp::Action::CATEGORY_CANVAS);
        }
 
-       
+
        //canvasmenu.items().push_back(Gtk::Menu_Helpers::MenuElem("Keyframe Dialog",sigc::mem_fun(keyframe_dialog,&studio::Dialog_Keyframe::present)));
 
        // Duck Mask Menu
@@ -1557,7 +1557,7 @@ CanvasView::init_menus()
 
                viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Mask Ducks"),duckmaskmenu));
        }
-       
+
        // Preview Quality Menu
        if(1)
        {
@@ -1580,7 +1580,7 @@ CanvasView::init_menus()
                }
                viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Preview Quality"),qualitymenu));
        }
-       
+
        viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-play"),
                sigc::mem_fun(*this, &studio::CanvasView::play)));
        viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("Flipbook Dialog"),
@@ -1596,7 +1596,7 @@ CanvasView::init_menus()
                sigc::mem_fun(*work_area, &studio::WorkArea::toggle_guide_snap)));
        viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Toggle Low-Res"),Gtk::AccelKey('`',Gdk::CONTROL_MASK),
                sigc::mem_fun(*work_area, &studio::WorkArea::toggle_low_resolution_flag)));
-       
+
        viewmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem());
 
        viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-in"),Gtk::AccelKey('=',static_cast<Gdk::ModifierType>(0)),
@@ -1627,9 +1627,9 @@ CanvasView::init_menus()
        mainmenu.items().push_back(Gtk::Menu_Helpers::MenuElem("_Layer",layermenu));
 
        mainmenu.accelerate(*this);
-       
+
        {
-               
+
                trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem("New Waypoint",NOT_IMPLEMENTED_SLOT));
                trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem("Delete Waypoint",NOT_IMPLEMENTED_SLOT));
                trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem("Export",NOT_IMPLEMENTED_SLOT));
@@ -1657,7 +1657,7 @@ CanvasView::init_menus()
        canvasmenu.set_accel_path("<synfig>/Canvas");
        viewmenu.set_accel_path("<synfig>/View");
        duckmaskmenu.set_accel_path("<synfig>/DuckMask");
-#endif 
+#endif
 }
 
 void
@@ -1673,9 +1673,9 @@ CanvasView::show_keyframe_dialog()
        if(selection->get_selected())
        {
                Gtk::TreeRow row(*selection->get_selected());
-               
+
                Keyframe keyframe(row[keyframe_tree->model.keyframe]);
-               
+
                keyframe_dialog.set_keyframe(keyframe);
                keyframe_dialog.present();
        }
@@ -1685,11 +1685,11 @@ void
 CanvasView::add_layer(synfig::String x)
 {
        Canvas::Handle canvas;
-       
+
        synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
-       
+
        int target_depth(0);
-       
+
        if(layer_list.empty())
        {
                canvas=get_canvas();
@@ -1700,12 +1700,12 @@ CanvasView::add_layer(synfig::String x)
                target_depth=canvas->get_depth(*layer_list.begin());
        }
 
-       
+
        Layer::Handle layer(canvas_interface()->add_layer_to(x,canvas,target_depth));
        if(layer)
        {
                get_selection_manager()->clear_selected_layers();
-               get_selection_manager()->set_selected_layer(layer);             
+               get_selection_manager()->set_selected_layer(layer);
        }
 }
 
@@ -1715,16 +1715,16 @@ CanvasView::popup_layer_menu(synfig::Layer::Handle layer)
        //Gtk::Menu* menu(manage(new Gtk::Menu));
        Gtk::Menu* menu(&parammenu);
        menu->items().clear();
-       
+
        synfigapp::Action::ParamList param_list;
        param_list.add("time",canvas_interface()->get_time());
        param_list.add("canvas",Canvas::Handle(layer->get_canvas()));
        param_list.add("canvas_interface",canvas_interface());
        param_list.add("layer",layer);
-       
+
        //Gtk::Menu *newlayers(manage(new Gtk::Menu()));
        //build_new_layer_menu(*newlayers);
-       
+
        //parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New Layer"),*newlayers));
 
        if(layer->get_name()=="PasteCanvas")
@@ -1739,9 +1739,9 @@ CanvasView::popup_layer_menu(synfig::Layer::Handle layer)
                        )
                ));
        }
-       
+
        add_actions_to_menu(menu, param_list,synfigapp::Action::CATEGORY_LAYER);
-       
+
        menu->popup(3,gtk_get_current_event_time());
 }
 
@@ -1750,7 +1750,7 @@ CanvasView::register_layer_type(synfig::Layer::Book::value_type &lyr,std::map<sy
 {
 /*     if(lyr.second.category==_("Do Not Use"))
                return;
-       
+
        if(category_map->count(lyr.second.category)==0)
                (*category_map)[lyr.second.category]=manage(new Gtk::Menu());
 
@@ -1788,7 +1788,7 @@ CanvasView::build_new_layer_menu(Gtk::Menu &menu)
 
        std::map<synfig::String,Gtk::Menu*>::iterator iter;
        for(iter=category_map.begin();iter!=category_map.end();++iter)
-               menu.items().push_back(Gtk::Menu_Helpers::MenuElem(iter->first,*iter->second)); 
+               menu.items().push_back(Gtk::Menu_Helpers::MenuElem(iter->first,*iter->second));
 
        menu.show();
 */
@@ -1829,7 +1829,7 @@ CanvasView::refresh_rend_desc()
 {
        current_time_widget->set_fps(get_canvas()->rend_desc().get_frame_rate());
 
-       
+
        //????
        //synfig::info("Canvasview: Refreshing render desc info");
        if(!get_time().is_equal(time_adjustment().get_value()))
@@ -1852,7 +1852,7 @@ CanvasView::refresh_rend_desc()
 
        //set the FPS of the timeslider
        timeslider->set_global_fps(get_canvas()->rend_desc().get_frame_rate());
-       
+
        //set the beginning and ending time of the time slider
        Time begin_time=get_canvas()->rend_desc().get_time_start();
        Time end_time=get_canvas()->rend_desc().get_time_end();
@@ -1868,35 +1868,35 @@ CanvasView::refresh_rend_desc()
                time_window_adjustment().set_page_increment(length);
                time_window_adjustment().set_page_size(length);
        }
-       
+
        /*synfig::info("w: %p - [%.3f,%.3f] (%.3f,%.3f) child: %p\n",
                                &time_window_adjustment_, time_window_adjustment_.get_lower(),
                                time_window_adjustment_.get_upper(),time_window_adjustment_.get_value(),
                                time_window_adjustment_.get_page_size(),time_window_adjustment_.get_child_adjustment()
        );*/
-       
+
        time_window_adjustment().changed(); //only non-value stuff was changed
 
        // Setup the time adjustment
-       
+
        //NOTE THESE TWO SHOULD BE CHANGED BY THE changed() CALL ABOVE
        //time_adjustment().set_lower(time_window_adjustment().get_value());
        //time_adjustment().set_upper(time_window_adjustment().get_value()+time_window_adjustment().get_page_size());
-       
+
 //     time_adjustment().set_lower(get_canvas()->rend_desc().get_time_start());
 //     time_adjustment().set_upper(get_canvas()->rend_desc().get_time_end());
        time_adjustment().set_step_increment(synfig::Time(1.0/get_canvas()->rend_desc().get_frame_rate()));
        time_adjustment().set_page_increment(synfig::Time(1.0));
        time_adjustment().set_page_size(0);
-       
+
        time_adjustment().changed();
-       
+
        /*synfig::info("w: %p - [%.3f,%.3f] (%.3f,%.3f) child: %p\n",
                                &time_window_adjustment_, time_window_adjustment_.get_lower(),
                                time_window_adjustment_.get_upper(),time_window_adjustment_.get_value(),
                                time_window_adjustment_.get_page_size(),time_window_adjustment_.get_child_adjustment()
        );      */
-       
+
        if(begin_time==end_time)
        {
                hide_timebar();
@@ -1912,13 +1912,13 @@ CanvasView::refresh_rend_desc()
                time_adjustment().set_value(begin_time);
                time_adjustment().value_changed();
        }
-       
+
        if(time_adjustment().get_value() > end_time)
        {
                time_adjustment().set_value(end_time);
                time_adjustment().value_changed();
        }
-       
+
        /*synfig::info("Time stats: \n"
                                "w: %p - [%.3f,%.3f] (%.3f,%.3f) child: %p\n"
                                "t: %p - [%.3f,%.3f] %.3f",
@@ -2009,14 +2009,14 @@ CanvasView::on_focus_in_event(GdkEventFocus*x)
                get_smach().process_event(EVENT_REFRESH_TOOL_OPTIONS);
 
                studio::App::set_selected_canvas_view(this);
-       
+
                App::ui_manager()->insert_action_group(action_group);
        }
-       
+
        // HACK ... Questionable...?
        if(x)
                return Gtk::Window::on_focus_in_event(x);
-       
+
        return true;
 }
 
@@ -2054,10 +2054,10 @@ CanvasView::on_layer_toggle(synfig::Layer::Handle layer)
 {
        synfigapp::Action::Handle action(synfigapp::Action::create("layer_activate"));
        assert(action);
-       
+
        if(!action)
                return;
-       
+
        action->set_param("canvas",Canvas::Handle(layer->get_canvas()));
        if(!action->set_param("canvas_interface",canvas_interface()))
 //     if(!action->set_param("canvas_interface",get_instance()->find_canvas_interface(layer->get_canvas())))
@@ -2067,7 +2067,7 @@ CanvasView::on_layer_toggle(synfig::Layer::Handle layer)
        action->set_param("new_status",!layer->active());
 
        assert(action->is_ready());
-       
+
        canvas_interface()->get_instance()->perform_action(action);
 }
 
@@ -2077,7 +2077,7 @@ CanvasView::popup_param_menu(synfigapp::ValueDesc value_desc, float location)
 {
        parammenu.items().clear();
        get_instance()->make_param_menu(&parammenu,get_canvas(),value_desc,location);
-       
+
        parammenu.popup(3,gtk_get_current_event_time());
 }
 
@@ -2089,7 +2089,7 @@ CanvasView::add_actions_to_menu(Gtk::Menu *menu, const synfigapp::Action::ParamL
 
 bool
 CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnID column_id)
-{      
+{
        switch(button)
        {
        case 3:
@@ -2103,10 +2103,10 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
                                menu->get_submenu()->popup(button,gtk_get_current_event_time());
                        }
 
-                       
+
                        #if 0
                        bool multiple_selected=true;
-                       
+
                        if(layer_tree->get_selection()->count_selected_rows()<=1)
                                multiple_selected=false;
 
@@ -2118,15 +2118,15 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
                                layer_tree->get_selection()->select(row);
                                multiple_selected=false;
                        }
-                       
+
                        if(column_id==COLUMNID_TIME_TRACK)
                                return false;
-                       
+
                        //synfigapp::ValueDesc value_desc(row[layer_param_tree_model.value_desc]);
                        //ValueNode::Handle value_node(row[layer_param_tree_model.value_node]);
                        //ValueNode::Handle parent_value_node;
                        //ValueBase value=row[layer_param_tree_model.value];
-                       
+
                        //if(row.parent())
                        //{
                        //      parent_value_node=(*row.parent())[layer_tree_model.value_node];
@@ -2144,16 +2144,16 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
                                {
                                        synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
                                        synfigapp::SelectionManager::LayerList::iterator iter;
-                               
+
                                        for(iter=layer_list.begin();iter!=layer_list.end();++iter)
                                                param_list.add("layer",Layer::Handle(*iter));
                                }
-                               
+
                                parammenu.items().clear();
 
                                Gtk::Menu *newlayers(manage(new Gtk::Menu()));
                                build_new_layer_menu(*newlayers);
-                               
+
                                parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem("New Layer",*newlayers));
                                if(!multiple_selected && layer->get_name()=="PasteCanvas")
                                {
@@ -2167,14 +2167,14 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
                                                )
                                        ));
                                }
-                               
+
                                add_actions_to_menu(&parammenu, param_list,synfigapp::Action::CATEGORY_LAYER);
                                parammenu.popup(button,gtk_get_current_event_time());
                                return true;
                        }
 /*
                        else if(column_id==LayerTree::COLUMNID_TIME_TRACK && value_node && handle<synfig::ValueNode_Animated>::cast_dynamic(value_node))
-                       {                                       
+                       {
                                // Right-click on time track with animated
 //                             trackmenu.popup(0,0);
                                return true;
@@ -2207,10 +2207,10 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
 }
                return true;
                break;
-               
+
        default:
                return false;
-               break;          
+               break;
        }
 }
 
@@ -2218,7 +2218,7 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
 
 bool
 CanvasView::on_children_user_click(int button, Gtk::TreeRow row, ChildrenTree::ColumnID column_id)
-{      
+{
        switch(button)
        {
        case 3:
@@ -2235,10 +2235,10 @@ CanvasView::on_children_user_click(int button, Gtk::TreeRow row, ChildrenTree::C
                }
                return true;
                break;
-               
+
        default:
                return false;
-               break;          
+               break;
        }
 }
 
@@ -2250,7 +2250,7 @@ CanvasView::on_keyframe_tree_event(GdkEvent *event)
        case GDK_BUTTON_PRESS:
                switch(event->button.button)
                {
-                       case 3: 
+                       case 3:
                        {
                                //keyframemenu.popup(event->button.button,gtk_get_current_event_time());
                                return true;
@@ -2275,14 +2275,14 @@ CanvasView::refresh_time_window()
        //THESE SHOULD AUTOMATICALLY BE TAKEN CARE OF
        //time_adjustment().set_lower(time_window_adjustment().get_value());
        //time_adjustment().set_upper(time_window_adjustment().get_value()+time_window_adjustment().get_page_size());
-       
+
        time_adjustment().set_page_increment(1.0); // One second
        time_adjustment().set_page_size(0);
-       
+
        if(get_canvas())
                time_adjustment().set_step_increment(1.0/get_canvas()->rend_desc().get_frame_rate());
        time_adjustment().changed();
-       
+
        //NOTE THIS SHOULD HOOK INTO THE CORRECT SIGNALS...
        if(children_tree)
                children_tree->queue_draw();
@@ -2292,18 +2292,18 @@ void
 CanvasView::on_time_changed()
 {
        Time time(get_time());
-               
+
        current_time_widget->set_value(time);
        try {
                get_canvas()->keyframe_list().find(time);
                current_time_widget->modify_text(Gtk::STATE_NORMAL,Gdk::Color("#FF0000"));
        }catch(...){
-               current_time_widget->modify_text(Gtk::STATE_NORMAL,Gdk::Color("#000000"));              
+               current_time_widget->modify_text(Gtk::STATE_NORMAL,Gdk::Color("#000000"));
        }
-       
+
        if(get_time() != time_adjustment().get_value())
        {
-               
+
                //Recenters the window, causing it to jump (possibly undesirably... but whatever)
                if(time < time_window_adjustment().get_value() ||
                        time > time_window_adjustment().get_value()+time_window_adjustment().get_page_size())
@@ -2314,7 +2314,7 @@ CanvasView::on_time_changed()
                }
                time_adjustment().set_value(time);
                time_adjustment().value_changed();
-               
+
                // Shouldn't these trees just hook into
                // the time changed signal...?
                //YES THEY SHOULD...
@@ -2328,7 +2328,7 @@ CanvasView::time_zoom_in()
 {
        time_window_adjustment().set_page_size(time_window_adjustment().get_page_size()*0.75);
        time_window_adjustment().changed();
-       
+
        refresh_time_window();
 }
 
@@ -2337,7 +2337,7 @@ CanvasView::time_zoom_out()
 {
        time_window_adjustment().set_page_size(time_window_adjustment().get_page_size()/0.75);
        time_window_adjustment().changed();
-       
+
        refresh_time_window();
 }
 
@@ -2359,7 +2359,7 @@ void
 CanvasView::on_children_edited_value(const Glib::ustring&path_string,synfig::ValueBase value)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(children_tree->get_model()->get_iter(path));
 
        assert((bool)row[children_tree_model.is_value_node]);
@@ -2386,8 +2386,8 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode)
        {
                Gtk::Image *icon;
                icon=manage(new Gtk::Image(Gtk::StockID("gtk-no"),Gtk::ICON_SIZE_BUTTON));
-               animatebutton->remove();        
-               animatebutton->add(*icon);      
+               animatebutton->remove();
+               animatebutton->add(*icon);
                tooltips.set_tip(*animatebutton,_("In Animate Editing Mode"));
                icon->set_padding(0,0);
                icon->show();
@@ -2396,8 +2396,8 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode)
        {
                Gtk::Image *icon;
                icon=manage(new Gtk::Image(Gtk::StockID("gtk-yes"),Gtk::ICON_SIZE_BUTTON));
-               animatebutton->remove();        
-               animatebutton->add(*icon);      
+               animatebutton->remove();
+               animatebutton->add(*icon);
                tooltips.set_tip(*animatebutton,_("Not in Animate Editing Mode"));
                icon->set_padding(0,0);
                icon->show();
@@ -2407,8 +2407,8 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode)
        {
                Gtk::Image *icon;
                icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_all"),Gtk::ICON_SIZE_BUTTON));
-               keyframebutton->remove();       
-               keyframebutton->add(*icon);     
+               keyframebutton->remove();
+               keyframebutton->add(*icon);
                tooltips.set_tip(*keyframebutton,_("All Keyframes Locked"));
                icon->set_padding(0,0);
                icon->show();
@@ -2417,8 +2417,8 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode)
        {
                Gtk::Image *icon;
                icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_future"),Gtk::ICON_SIZE_BUTTON));
-               keyframebutton->remove();       
-               keyframebutton->add(*icon);     
+               keyframebutton->remove();
+               keyframebutton->add(*icon);
                tooltips.set_tip(*keyframebutton,_("Future Keyframes Locked"));
                icon->set_padding(0,0);
                icon->show();
@@ -2427,8 +2427,8 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode)
        {
                Gtk::Image *icon;
                icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_past"),Gtk::ICON_SIZE_BUTTON));
-               keyframebutton->remove();       
-               keyframebutton->add(*icon);     
+               keyframebutton->remove();
+               keyframebutton->add(*icon);
                tooltips.set_tip(*keyframebutton,_("Past Keyframes Locked"));
                icon->set_padding(0,0);
                icon->show();
@@ -2437,13 +2437,13 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode)
        {
                Gtk::Image *icon;
                icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_none"),Gtk::ICON_SIZE_BUTTON));
-               keyframebutton->remove();       
-               keyframebutton->add(*icon);     
+               keyframebutton->remove();
+               keyframebutton->add(*icon);
                tooltips.set_tip(*keyframebutton,_("No Keyframes Locked"));
                icon->set_padding(0,0);
                icon->show();
        }
-       
+
        work_area->queue_draw();
 }
 
@@ -2460,7 +2460,7 @@ void
 CanvasView::on_keyframe_button_pressed()
 {
        synfigapp::CanvasInterface::Mode mode(get_mode());
-       
+
        if((mode&synfigapp::MODE_ANIMATE_FUTURE) && (mode&synfigapp::MODE_ANIMATE_PAST))
        {
                set_mode(get_mode()-synfigapp::MODE_ANIMATE_FUTURE);
@@ -2528,8 +2528,8 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
 {
        int transforms(0);
        String layer_name;
-               
-#define QUEUE_REBUILD_DUCKS            sigc::mem_fun(*this,&CanvasView::queue_rebuild_ducks)   
+
+#define QUEUE_REBUILD_DUCKS            sigc::mem_fun(*this,&CanvasView::queue_rebuild_ducks)
 
        if(!canvas)
        {
@@ -2550,17 +2550,17 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
 
                        // This layer is currently selected.
                        duck_changed_connections.push_back(layer->signal_changed().connect(QUEUE_REBUILD_DUCKS));
-                       
+
                        // do the bounding box thing
                        bbox|=transform_stack.perform(layer->get_bounding_rect());
-                       
+
                        // Grab the layer's list pf parameters
                        Layer::ParamList paramlist(layer->get_param_list());
-               
+
                        // Grab the layer vocabulary
                        Layer::Vocab vocab=layer->get_param_vocab();
                        Layer::Vocab::iterator iter;
-                               
+
                        for(iter=vocab.begin();iter!=vocab.end();iter++)
                        {
                                if(!iter->get_hidden() && !iter->get_invisible_duck())
@@ -2582,15 +2582,15 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
                                                                *this,
                                                                &studio::CanvasView::selected_layer_color_set
                                                        )
-                                               );              
+                                               );
                                        }
                                        */
                                }
                        }
                }
-               
+
                layer_name=layer->get_name();
-               
+
                if(layer->active())
                {
                        Transform::Handle trans(layer->get_transform());
@@ -2626,7 +2626,7 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
                        }
 */
                }
-               
+
                // If this is a paste canvas layer, then we need to
                // descend into it
                if(layer_name=="PasteCanvas")
@@ -2634,16 +2634,16 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
                        Vector scale;
                        scale[0]=scale[1]=exp(layer->get_param("zoom").get(Real()));
                        Vector origin(layer->get_param("origin").get(Vector()));
-                       
+
                        Canvas::Handle child_canvas(layer->get_param("canvas").get(Canvas::Handle()));
-                       
+
                        if(!scale.is_equal_to(Vector(1,1)))
                                transform_stack.push(new Transform_Scale(scale,origin));
                        if(!scale.is_equal_to(Vector(0,0)))
                                transform_stack.push(new Transform_Translate(origin));
-                       
+
                        rebuild_ducks_layer_(transform_stack,child_canvas,selected_list);
-                       
+
                        if(!scale.is_equal_to(Vector(0,0)))
                                transform_stack.pop();
                        if(!scale.is_equal_to(Vector(1,1)))
@@ -2662,11 +2662,11 @@ CanvasView::queue_rebuild_ducks()
 #if 0
        if(rebuild_ducks_queued)
                return;
-#else  
+#else
        if(rebuild_ducks_queued)
                queue_rebuild_ducks_connection.disconnect();
 #endif
-       
+
        queue_rebuild_ducks_connection=Glib::signal_timeout().connect(
                sigc::bind_return(
                        sigc::mem_fun(*this,&CanvasView::rebuild_ducks),
@@ -2674,36 +2674,36 @@ CanvasView::queue_rebuild_ducks()
                ),
                50
        );
-       
+
        rebuild_ducks_queued=true;
 }
 
 void
 CanvasView::rebuild_ducks()
-{      
+{
        /*static int i=0;
        i++;
        if(i>30)
                synfig::info("%d",i/(i-i));
        */
-       
+
        rebuild_ducks_queued=false;
        //queue_rebuild_ducks_connection.disconnect();
-       
+
        if(work_area->is_dragging())
        {
                queue_rebuild_ducks();
                return;
        }
-       
+
        if(!duck_refresh_flag)
        {
                duck_refresh_needed=true;
                return;
        }
-       
+
        bbox=Rect::zero();
-       
+
        work_area->clear_ducks();
        work_area->set_time(get_time());
        get_canvas()->set_time(get_time());
@@ -2712,20 +2712,20 @@ CanvasView::rebuild_ducks()
        curr_transform_stack_set=false;
 
        for(;!duck_changed_connections.empty();duck_changed_connections.pop_back())duck_changed_connections.back().disconnect();
-       
+
        //get_canvas()->set_time(get_time());
        bool not_empty(false);
-       
-       // First do the layers...       
+
+       // First do the layers...
        do{
                synfigapp::SelectionManager::LayerList selected_list(get_selection_manager()->get_selected_layers());
                std::set<synfig::Layer::Handle> layer_set(selected_list.begin(),selected_list.end());
-               
+
                if(!layer_set.empty())
                        not_empty=true;
-               
+
                synfig::TransformStack transform_stack;
-               
+
                rebuild_ducks_layer_(transform_stack, get_canvas(), layer_set);
 
        }while(0);
@@ -2735,7 +2735,7 @@ CanvasView::rebuild_ducks()
                synfigapp::SelectionManager::ChildrenList selected_list(get_selection_manager()->get_selected_children());
                synfigapp::SelectionManager::ChildrenList::iterator iter;
                synfig::TransformStack transform_stack;
-       
+
                if(selected_list.empty())
                {
                        break;
@@ -2768,13 +2768,13 @@ void
 CanvasView::play()
 {
        assert(get_canvas());
-       
+
        // If we are already busy, don't play!
        if(working_depth)return;
-       
+
        // Set us up as working
        IsWorking is_working(*this);
-       
+
        etl::clock timer;
        Time
                time=work_area->get_time(),
@@ -2783,16 +2783,16 @@ CanvasView::play()
        // If we are already at the end of time, start over
        if(time==endtime)
                time=get_canvas()->rend_desc().get_time_start();
-       
-       is_playing_=true;               
+
+       is_playing_=true;
 
        work_area->clear_ducks();
-       
+
        for(timer.reset(); time + timer() < endtime;)
        {
                //Clamp the time window so we can see the time value as it races across the horizon
                bool timewindreset = false;
-               
+
                while( time + timer() > Time(time_window_adjustment().get_sub_upper()) )
                {
                        time_window_adjustment().set_value(
@@ -2802,7 +2802,7 @@ CanvasView::play()
                                );
                        timewindreset = true;
                }
-               
+
                while( time + timer() < Time(time_window_adjustment().get_sub_lower()) )
                {
                        time_window_adjustment().set_value(
@@ -2810,26 +2810,26 @@ CanvasView::play()
                                        time_window_adjustment().get_value()-time_window_adjustment().get_page_size()/2,
                                        time_window_adjustment().get_lower())
                        );
-                       
+
                        timewindreset = true;
                }
-               
+
                //we need to tell people that the value changed
                if(timewindreset) time_window_adjustment().value_changed();
-               
+
                //update actual time to next step
                time_adjustment().set_value(time+timer());
                time_adjustment().value_changed();
-               
+
                if(!work_area->sync_render_preview())
                        break;
-               
+
                studio::App::iteration(false);
-               
+
                if(get_cancel_status())
                        return;
        }
-       is_playing_=false;              
+       is_playing_=false;
 
        time_adjustment().set_value(endtime);
        time_adjustment().value_changed();
@@ -2844,7 +2844,7 @@ CanvasView::show_tables()
        {
                Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon");
                treetogglebutton->remove();
-               treetogglebutton->add(*manage(new Gtk::Image(Gtk::StockID("gtk-go-down"),iconsize)));   
+               treetogglebutton->add(*manage(new Gtk::Image(Gtk::StockID("gtk-go-down"),iconsize)));
                treetogglebutton->show_all();
                notebook->show();
        }
@@ -2860,7 +2860,7 @@ CanvasView::hide_tables()
        {
                Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon");
                treetogglebutton->remove();
-               treetogglebutton->add(*manage(new Gtk::Image(Gtk::StockID("gtk-go-up"),iconsize)));     
+               treetogglebutton->add(*manage(new Gtk::Image(Gtk::StockID("gtk-go-up"),iconsize)));
                treetogglebutton->show_all();
                notebook->hide();
        }
@@ -2912,7 +2912,7 @@ CanvasView::show_timebar()
 {
        timebar->show();
        current_time_widget->show();
-       
+
        //keyframe_tab_child->show();
        if(layer_tree)
                layer_tree->set_show_timetrack(true);
@@ -2976,7 +2976,7 @@ CanvasView::on_waypoint_clicked(synfigapp::ValueDesc value_desc,synfig::Waypoint
                                        &Gtk::Widget::show
                                )
                        ));
-                       
+
                        waypoint_menu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-duplicate"),
                                sigc::bind(
                                        sigc::bind(
@@ -3043,7 +3043,7 @@ CanvasView::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& con
        //synfig::info("Droped data of type \"%s\"",selection_data.get_data_type());
        //synfig::info("Droped data of target \"%s\"",gdk_atom_name(selection_data->target));
        //synfig::info("selection=\"%s\"",gdk_atom_name(selection_data->selection));
-       
+
        if ((selection_data_.get_length() >= 0) && (selection_data_.get_format() == 8))
        {
                if(synfig::String(selection_data_.get_data_type())=="STRING")do
@@ -3057,44 +3057,44 @@ CanvasView::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& con
                                break;
 
                        synfigapp::Action::Handle       action(synfigapp::Action::create("layer_add"));
-               
+
                        assert(action);
                        if(!action)
                                break;
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("new",layer);
 
                        if(!get_instance()->perform_action(action))
                                break;
-                       
+
                        // Ok, we have successfuly imported at least one item.
                        success=true;
                } while(0); // END of "STRING"
-               
+
                if(synfig::String(selection_data_.get_data_type())=="text/plain")
                {
                        synfig::String selection_data((gchar *)(selection_data_.get_data()));
-       
+
                        // For some reason, GTK hands us a list of URL's seperated
                        // by not only Carrage-Returns, but also Line-Feeds.
                        // Line-Feeds will mess us up. Remove all the line-feeds.
                        while(selection_data.find_first_of('\r')!=synfig::String::npos)
                                selection_data.erase(selection_data.begin()+selection_data.find_first_of('\r'));
-       
+
                        std::stringstream stream(selection_data);
-       
+
                        //synfigapp::PassiveGrouper group(canvas_interface()->get_instance(),_("Insert Image"));
                        while(stream)
                        {
                                synfig::String filename,URI;
                                getline(stream,filename);
-                               
+
                                // If we don't have a filename, move on.
                                if(filename.empty())
                                        continue;
-                               
+
                                // Make sure this URL is of the "file://" type.
                                URI=String(filename.begin(),filename.begin()+sizeof("file://")-1);
                                if(URI!="file://")
@@ -3102,13 +3102,13 @@ CanvasView::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& con
                                        synfig::warning("Unknown URI (%s) in \"%s\"",URI.c_str(),filename.c_str());
                                        continue;
                                }
-                               
+
                                // Strip the "file://" part from the filename
                                filename=synfig::String(filename.begin()+sizeof("file://")-1,filename.end());
 
                                String ext;
                                try{ext=(String(filename.begin()+filename.find_last_of('.')+1,filename.end()));}catch(...){continue;}
-       
+
                                // If this is a SIF file, then we need to do things slightly differently
                                if(ext=="sketch")
                                {
@@ -3144,8 +3144,8 @@ CanvasView::on_keyframe_add_pressed()
        {
                ui_interface_->error("I am unable to find the appropriate action");
                return;
-       }               
-       
+       }
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",canvas_interface());
        action->set_param("keyframe",Keyframe(get_time()));
@@ -3163,7 +3163,7 @@ CanvasView::on_keyframe_duplicate_pressed()
        {
                ui_interface_->error("I am unable to duplicate the keyframe");
                return;
-       }               
+       }
        keyframe=row[model.keyframe];
 
        synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_duplicate"));
@@ -3172,8 +3172,8 @@ CanvasView::on_keyframe_duplicate_pressed()
        {
                ui_interface_->error("I am unable to find the appropriate action");
                return;
-       }               
-       
+       }
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",canvas_interface());
        action->set_param("keyframe",keyframe);
@@ -3192,7 +3192,7 @@ CanvasView::on_keyframe_remove_pressed()
        {
                ui_interface_->error("I am unable to remove the keyframe");
                return;
-       }               
+       }
        keyframe=row[model.keyframe];
 
        synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_remove"));
@@ -3201,8 +3201,8 @@ CanvasView::on_keyframe_remove_pressed()
        {
                ui_interface_->error("I am unable to find the appropriate action");
                return;
-       }               
-       
+       }
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",canvas_interface());
        action->set_param("keyframe",keyframe);
@@ -3222,22 +3222,22 @@ CanvasView::toggle_duck_mask(Duckmatic::Type type)
                if(duck_mask_position)
                        duck_mask_position->set_active(!is_currently_on);
                break;
-       
+
        case Duck::TYPE_VERTEX:
                if(duck_mask_vertex)
                        duck_mask_vertex->set_active(!is_currently_on);
                break;
-       
+
        case Duck::TYPE_TANGENT:
                if(duck_mask_tangent)
                        duck_mask_tangent->set_active(!is_currently_on);
                break;
-       
+
        case Duck::TYPE_RADIUS:
                if(duck_mask_radius)
                        duck_mask_radius->set_active(!is_currently_on);
                break;
-       
+
        case Duck::TYPE_WIDTH:
                if(duck_mask_width)
                        duck_mask_width->set_active(!is_currently_on);
@@ -3257,7 +3257,7 @@ CanvasView::toggle_duck_mask(Duckmatic::Type type)
                work_area->set_type_mask(work_area->get_type_mask()-type);
        else
                work_area->set_type_mask(work_area->get_type_mask()|type);
-       
+
        work_area->queue_draw();
 }
 
@@ -3284,7 +3284,7 @@ CanvasView::on_input_device_changed(GdkDevice* device)
                get_smach().egress();
        }
        assert(device);
-       
+
        synfigapp::InputDevice::Handle input_device;
        input_device=synfigapp::Main::select_input_device(device->name);
        App::toolbox->change_state(input_device->get_state());
@@ -3295,9 +3295,9 @@ void
 CanvasView::on_preview_option()
 {
        Dialog_PreviewOptions *po = dynamic_cast<Dialog_PreviewOptions *>(get_ext_widget("prevoptions"));
-       
+
        Canvas::Handle  canv = get_canvas();
-       
+
        if(canv)
        {
                RendDesc &r = canv->rend_desc();
@@ -3316,7 +3316,7 @@ CanvasView::on_preview_option()
                                po->set_begin_override(false);
                                po->set_endtime(end);
                                po->set_end_override(false);
-                               
+
                                set_ext_widget("prevoptions",po);
                        }
                        /*po->set_zoom(work_area->get_zoom()/2);
@@ -3325,7 +3325,7 @@ CanvasView::on_preview_option()
                        po->set_begin_override(false);
                        po->set_endtime(end);
                        po->set_end_override(false);*/
-                       
+
                        po->set_global_fps(r.get_frame_rate());
                        po->signal_finish().connect(sigc::mem_fun(*this,&CanvasView::on_preview_create));
                        po->present();
@@ -3335,10 +3335,10 @@ CanvasView::on_preview_option()
 
 void
 CanvasView::on_preview_create(const PreviewInfo &info)
-{      
+{
        //set all the options
        etl::handle<Preview>    prev = new Preview;
-       
+
        prev->set_canvasview(this);
        prev->set_zoom(info.zoom);
        prev->set_fps(info.fps);
@@ -3350,10 +3350,10 @@ CanvasView::on_preview_create(const PreviewInfo &info)
 
        //render it out...
        prev->render();
-       
+
        Dialog_Preview *pd = preview_dialog.get();
        assert(pd);
-       
+
        pd->set_preview(prev.get());
        pd->present();
 }
@@ -3368,7 +3368,7 @@ CanvasView::on_audio_option()
 
 void
 CanvasView::on_audio_file_change(const std::string &f)
-{      
+{
        //save in meta data - always even when not valid...
        canvas_interface()->set_meta_data("audiofile",f);
 }
@@ -3384,7 +3384,7 @@ CanvasView::on_audio_file_notify()
 {
        std::string file(get_canvas()->get_meta_data("audiofile"));
        if(!file.c_str()) return;
-       
+
        if(!audio->load(file,dirname(get_canvas()->get_file_name())+string("/")))
        {
                if(file != "") synfig::warning("Could not load the file: %s", file.c_str());
@@ -3393,25 +3393,25 @@ CanvasView::on_audio_file_notify()
                disp_audio->set_profile(etl::handle<AudioProfile>());
        }else
        {
-               //save in canvasview            
+               //save in canvasview
                synfig::warning("Getting the profile of the music stuff");
-               
+
                //profile specific stuff for the preview widget
                //similar for other attachments
                Dialog_Preview *pd = preview_dialog.get();
                pd->get_widget().set_audio(audio);
-               
+
                handle<AudioProfile>    prof = audio->get_profile();
-               
+
                if(!prof)
                {
-                       synfig::warning("Agh, I couldn't build the profile captain!");                  
+                       synfig::warning("Agh, I couldn't build the profile captain!");
                }
                pd->get_widget().set_audioprofile(prof);
-               
+
                disp_audio->set_profile(audio->get_profile());
                disp_audio->show();
-               
+
                synfig::warning("successfully set the profiles and stuff");
        }
        disp_audio->queue_draw();
@@ -3424,7 +3424,7 @@ CanvasView::on_audio_offset_notify()
        audio->set_offset(t);
        sound_dialog->set_offset(t);
        disp_audio->queue_draw();
-       
+
        synfig::info("CanvasView::on_audio_offset_notify(): offset time set to %s",t.get_string(get_canvas()->rend_desc().get_frame_rate()).c_str());
 }
 
@@ -3435,7 +3435,7 @@ CanvasView::play_audio(float t)
        {
                synfig::info("Playing audio at %f s",t);
                audio->play(t);
-       }               
+       }
 }
 
 void
@@ -3547,6 +3547,6 @@ CanvasView::on_delete_event(GdkEventAny* event)
        }
        if(event)
                return Gtk::Window::on_delete_event(event);
-       
+
        return true;
 }
index efe10cf..21f7216 100644 (file)
@@ -89,7 +89,7 @@
 #if    _DEBUG
 #define DEBUGPOINT_CLASS(x)            struct debugpointclass_ ## x { debugpointclass_ ## x () { DEBUGPOINT(); } ~debugpointclass_ ## x () { DEBUGPOINT(); } } badfthguae_ ## x ;
 #else
-#define DEBUGPOINT_CLASS(x)    
+#define DEBUGPOINT_CLASS(x)
 #endif
 #endif
 
@@ -112,11 +112,11 @@ class Duckmatic;
 class Preview;
 struct PreviewInfo;
 class AudioContainer;
-       
+
 class Widget_Sound;
 class Widget_Timeslider;
 class Widget_Time;
-       
+
 class Dialog_SoundSelect;
 class Dialog_Preview;
 
@@ -124,29 +124,29 @@ class synfig::TransformStack;
 class Dock_Layers;
 class Dock_Children;
 class Dock_Keyframes;
-       
+
 class CanvasView : public Gtk::Window, public etl::shared_object
 {
        friend class UniversalScrubber;
        friend class Dock_Layers;
        friend class Dock_Children;
        friend class Dock_Keyframes;
-               
+
        friend class CanvasViewUIInterface;
        friend class CanvasViewSelectionManager;
 
        friend class Duckmatic;
-               
+
        /*
  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
        */
-       
+
 public:
 
        typedef etl::handle<CanvasView> Handle;
-       
+
        typedef etl::handle<const CanvasView> ConstHandle;
-       
+
        typedef etl::loose_handle<CanvasView> LooseHandle;
 
        typedef LayerTreeStore::Model LayerTreeModel;
@@ -202,9 +202,9 @@ private:
 
        SigC::Connection                                playcon;
        SigC::Connection                                stopcon;
-       
+
        std::auto_ptr<UniversalScrubber> universal_scrubber;
-       
+
        //! Tooltip controler
        Gtk::Tooltips tooltips;
 
@@ -223,7 +223,7 @@ private:
        //Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store_;
 
        DEBUGPOINT_CLASS(5);
-       
+
        //std::map<synfig::String,Glib::RefPtr<Gtk::TreeModel> > tree_model_book_;
        std::map<synfig::String,Glib::RefPtr<Glib::ObjectBase> > ref_obj_book_;
        std::map<synfig::String,Gtk::Widget*> ext_widget_book_;
@@ -231,14 +231,14 @@ private:
 
        //! The time adjustment's scope is defined by the time_window adjustment
        Gtk::Adjustment time_adjustment_;
-       
+
        //! The time_window adjustment governs the position of the time window on the whole time line
        //Gtk::Adjustment time_window_adjustment_;
        studio::Adjust_Window time_window_adjustment_;
-       
-                       
+
+
        LayerTree *layer_tree;
-       
+
        ChildrenTree *children_tree;
 
        KeyframeTree *keyframe_tree;
@@ -247,10 +247,10 @@ private:
 
        Gtk::ProgressBar *progressbar;
        Gtk::Statusbar *statusbar;
-       
+
        Gtk::TreeRow children_canvas_row;
        Gtk::TreeRow children_valuenode_row;
-       
+
        Gtk::Button *stopbutton;
        Gtk::Button *refreshbutton;
        Gtk::Button *treetogglebutton;
@@ -259,7 +259,7 @@ private:
 
        Widget_Time *current_time_widget;
        void on_current_time_widget_changed();
-       
+
        std::auto_ptr<Widget_Timeslider>                timeslider;
 
        std::list<sigc::connection> duck_changed_connections;
@@ -268,7 +268,7 @@ private:
 
        Gtk::Button *animatebutton;
        Gtk::Button *keyframebutton;
-       
+
 /*     DEBUGPOINT_CLASS(8);
 
        Gtk::Menu duckmaskmenu;
@@ -316,13 +316,13 @@ private:
        Glib::RefPtr<Gtk::ToggleAction> duck_mask_angle;
 
        Gtk::RadioButtonGroup quality_group;
-       
+
        Glib::RefPtr<Gtk::ActionGroup> action_group;
 
 
        etl::handle<synfigapp::UIInterface> ui_interface_;
        etl::handle<synfigapp::SelectionManager> selection_manager_;
-       
+
        bool is_playing_;
 
        sigc::signal<void> signal_deleted_;
@@ -370,7 +370,7 @@ public:
        */
 
 private:
-       
+
        // Constructor is private to force the use of the "create()" constructor
        CanvasView(etl::loose_handle<Instance> instance,etl::handle<synfigapp::CanvasInterface> canvas_interface);
 
@@ -395,8 +395,8 @@ private:
 
        void time_was_changed();
 
-       void refresh_rend_desc();       
-       
+       void refresh_rend_desc();
+
        void toggle_duck_mask(Duckmatic::Type type);
 
        Gtk::Widget *create_work_area();
@@ -407,14 +407,14 @@ private:
 
        void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc)
        { popup_param_menu(value_desc,location); }
-       
+
        void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0);
 
 
        void workarea_layer_selected(synfig::Layer::Handle layer);
 
        void selected_layer_color_set(synfig::Color color);
-               
+
 
 
        void register_layer_type(synfig::Layer::Book::value_type &lyr,std::map<synfig::String,Gtk::Menu*>*);
@@ -443,7 +443,7 @@ public:
 
        Gtk::Widget* get_ext_widget(const synfig::String& x);
        void set_ext_widget(const synfig::String& x, Gtk::Widget* y);
-       
+
        //std::map<synfig::String,Gtk::Widget*>& tree_view_book() { return tree_view_book_; }
        //std::map<synfig::String,Gtk::Widget*>& ext_widget_book() { return tree_view_book_; }
 
@@ -452,23 +452,23 @@ public:
        Smach& get_smach() { return smach_; }
 
        const Smach& get_smach()const { return smach_; }
-       
+
        Smach::event_result process_event_key(EventKey x);
-       
+
        void popup_layer_menu(synfig::Layer::Handle layer);
 
        virtual ~CanvasView();
 
        void set_mode(Mode x) { canvas_interface()->set_mode(x); }
-       
+
        Mode get_mode()const { return canvas_interface()->get_mode(); }
-                               
+
        Gtk::Adjustment &time_adjustment() { return time_adjustment_; }
-       
+
        const Gtk::Adjustment &time_adjustment()const { return time_adjustment_; }
 
        studio::Adjust_Window &time_window_adjustment() { return time_window_adjustment_; }
-       
+
        const studio::Adjust_Window &time_window_adjustment()const { return time_window_adjustment_; }
 
        etl::handle<synfigapp::UIInterface> get_ui_interface() { return ui_interface_;}
@@ -476,19 +476,19 @@ public:
        etl::handle<synfigapp::SelectionManager> get_selection_manager() { return selection_manager_; }
 
        Glib::RefPtr<Gtk::TreeModel> layer_tree_store() { return get_tree_model("layers"); }
-       
+
        Glib::RefPtr<const Gtk::TreeModel> layer_tree_store()const { return get_tree_model("layers"); }
 
        Glib::RefPtr<Gtk::TreeModel> children_tree_store() { return get_tree_model("children"); }
-       
+
        Glib::RefPtr<const Gtk::TreeModel> children_tree_store()const { return get_tree_model("children"); }
 
        Glib::RefPtr<Gtk::TreeModel> keyframe_tree_store() { return get_tree_model("keyframes"); }
-       
+
        Glib::RefPtr<const Gtk::TreeModel> keyframe_tree_store()const { return get_tree_model("keyframes"); }
 
        void set_time(synfig::Time t) { canvas_interface_->set_time(t); }
-       
+
        synfig::Time get_time() { return canvas_interface_->get_time(); }
 
        etl::handle<synfig::Canvas> get_canvas()const { return canvas_interface_->get_canvas(); }
@@ -544,24 +544,24 @@ public:
 
        //! \writeme
        void rebuild_ducks();
-       
+
        //bool add_to_ducks(synfigapp::ValueDesc value_desc, synfig::ParamDesc *param_desc=NULL);
-               
+
        //! Starts "playing" the animation in real-time
        void play();
 
        //! Shows the tables (Layer/Children)
        void show_tables();
-       
+
        //! Hides the tables (Layer/Children)
        void hide_tables();
-       
+
        //! Toggles the tables
        void toggle_tables();
 
        //! Gets the table status
        bool tables_are_visible();
-       
+
        //! Shows the time bar
        void show_timebar();
 
@@ -581,28 +581,28 @@ public:
 
        void time_zoom_in();
        void time_zoom_out();
-       
+
        void add_layer(synfig::String x);
-       
+
        void show_keyframe_dialog();
-       
+
        void play_audio(float t);
        void stop_audio();
-       
+
        void image_import();
 
        void on_waypoint_clicked(synfigapp::ValueDesc,synfig::Waypoint, int button);
-       
+
        void preview_option() {on_preview_option();}
-       
+
        void present();
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
 
 private:
-       
+
        void on_unselect_layers();
 
        void on_input_device_changed(GdkDevice*);
@@ -611,7 +611,7 @@ private:
 
        virtual bool on_focus_in_event(GdkEventFocus*);
        virtual bool on_focus_out_event(GdkEventFocus*);
-       
+
        //bool on_children_tree_event(GdkEvent *event);
 
        bool on_keyframe_tree_event(GdkEvent *event);
@@ -625,21 +625,21 @@ private:
        bool on_layer_user_click(int, Gtk::TreeRow, LayerTree::ColumnID);
 
 //     void on_layer_toggle(const Glib::ustring& path_string, Gtk::TreeModelColumn<bool> column);
-       
+
        void on_mode_changed(synfigapp::CanvasInterface::Mode mode);
 
 //     void on_layer_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator);
-       
+
        //void on_children_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator);
 
        void on_waypoint_changed();
-       
+
        void on_waypoint_delete();
 
        void on_refresh_pressed();
 
        void on_id_changed();
-       
+
        void on_time_changed();
 
        /*
@@ -648,7 +648,7 @@ private:
        void on_layer_duplicate_pressed();
        void on_layer_delete_pressed();
        */
-       
+
        void on_keyframe_add_pressed();
 
        void on_keyframe_duplicate_pressed();
@@ -658,17 +658,17 @@ private:
        void on_animate_button_pressed();
 
        void on_keyframe_button_pressed();
-       
+
        void on_preview_option();
        void on_preview_create(const PreviewInfo &);
-       
+
        void on_audio_option();
        void on_audio_file_change(const std::string &f);
        void on_audio_offset_change(const synfig::Time &t);
-       
+
        void on_audio_file_notify();
        void on_audio_offset_notify();
-       
+
        bool on_duck_changed(const synfig::Point &value,const synfigapp::ValueDesc& value_desc);
 
        void on_layer_toggle(synfig::Layer::Handle);
@@ -678,19 +678,19 @@ private:
        //void on_waypoint_clicked(synfigapp::ValueDesc,synfig::ValueNode_Animated::WaypointList::iterator, int button);
 
        void on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
-       
+
        //void on_audio_play();
        bool on_audio_scrub();
 
 protected:
        bool on_delete_event(GdkEventAny* event);
-       
+
        /*
  -- ** -- S T A T I C   P U B L I C   M E T H O D S ---------------------------
        */
 
 public:
-       
+
        static etl::handle<studio::CanvasView> create(etl::loose_handle<Instance> instance,etl::handle<synfig::Canvas> canvas);
 }; // END of class CanvasView
 
index 1772be0..7ce391e 100644 (file)
@@ -57,12 +57,12 @@ public:
        {return signal_edited_; }
 
        Glib::PropertyProxy<synfig::Gradient> property_gradient() { return property_gradient_.get_proxy();}
-       
+
        CellRenderer_Gradient();
        ~CellRenderer_Gradient();
 
 protected:
-       
+
        virtual void
        render_vfunc(
                const Glib::RefPtr<Gdk::Drawable>& window,
index ef733ce..3072d2d 100644 (file)
@@ -97,7 +97,7 @@ CellRenderer_Time::render_vfunc(
 
        const Time time(property_time_);
        const float fps((Real)Time(property_fps_));
-       
+
        property_text()=(Glib::ustring)time.get_string(fps,App::get_time_format());
 
        CellRendererText::render_vfunc(window,widget,background_area,ca,expose_area,flags);
@@ -119,7 +119,7 @@ CellRenderer_Time::start_editing_vfunc(
 
        const Time time(property_time_);
        const float fps((Real)Time(property_fps_));
-       
+
        property_text()=(Glib::ustring)time.get_string(fps,App::get_time_format()|Time::FORMAT_FULL);
 #if 0
        Widget_Time* widget_time(manage(new Widget_Time));
index cfccbd4..28a89eb 100644 (file)
@@ -63,12 +63,12 @@ public:
 
        Glib::PropertyProxy<synfig::Time> property_time() { return property_time_.get_proxy();}
        Glib::PropertyProxy<synfig::Time> property_fps() { return property_fps_.get_proxy();}
-       
+
        CellRenderer_Time();
        ~CellRenderer_Time();
 
 protected:
-       
+
        virtual void
        render_vfunc(
                const Glib::RefPtr<Gdk::Drawable>& window,
index 9c2a829..754d260 100644 (file)
@@ -77,7 +77,7 @@ CellRenderer_TimeTrack::CellRenderer_TimeTrack():
        Glib::ObjectBase        (typeid(CellRenderer_TimeTrack)),
        Gtk::CellRenderer       (),
        adjustment_                     (10,10,20,0,0,0),
-       
+
        property_valuedesc_     (*this,"value_desc",synfigapp::ValueDesc()),
        property_canvas_        (*this,"canvas",synfig::Canvas::Handle()),
        property_adjustment_(*this,"adjustment",&adjustment_),
@@ -129,20 +129,20 @@ const synfig::Node::time_set *get_times_from_vdesc(const synfigapp::ValueDesc &v
        if(v.get_value_type() == synfig::ValueBase::TYPE_CANVAS)
        {
                synfig::Canvas::Handle canvasparam = v.get_value().get(Canvas::Handle());
-       
+
                if(canvasparam)
                {
                        return &canvasparam->get_times();
                }
        }
-       
+
        ValueNode *base_value = v.get_value_node().get();
-       
-       ValueNode_DynamicList *parent_value_node = 
+
+       ValueNode_DynamicList *parent_value_node =
                        v.parent_is_value_node() ?
                                dynamic_cast<ValueNode_DynamicList *>(v.get_parent_value_node().get()) :
                                0;
-       
+
        //we want a dynamic list entry to override the normal...
        if(parent_value_node)
        {
@@ -157,33 +157,33 @@ const synfig::Node::time_set *get_times_from_vdesc(const synfigapp::ValueDesc &v
 bool get_closest_time(const synfig::Node::time_set &tset, const Time &t, const Time &range, Time &out)
 {
        Node::time_set::const_iterator  i,j,end = tset.end();
-       
+
        //TODO add in RangeGet so it's not so damn hard to click on points
-       
+
        i = tset.upper_bound(t); //where t is the lower bound, t < [first,i)
        j = i; --j;
-       
+
        double dist = Time::end();
        double closest = 0;
-       
+
        if(i != end)
        {
                closest = i->get_time();
                dist = abs(i->get_time() - t);
        }
-       
+
        if(j != end && (abs(j->get_time() - t) < dist) )
        {
                closest = j->get_time();
                dist = abs(j->get_time() - t);
        }
-       
+
        if( dist <= range/2 )
        {
                out = closest;
                return true;
        }
-       
+
        return false;
 }
 
@@ -198,7 +198,7 @@ CellRenderer_TimeTrack::render_vfunc(
 {
        if(!window)
                return;
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(window));
        Glib::RefPtr<Gdk::GC> inactive_gc(Gdk::GC::create(window));
        Gtk::Adjustment *adjustment=get_adjustment();
@@ -217,9 +217,9 @@ CellRenderer_TimeTrack::render_vfunc(
        inactive_gc->set_rgb_fg_color(inactive_color);
        inactive_gc->set_stipple(Gdk::Bitmap::create(stipple_xpm,2,2));
        inactive_gc->set_fill(Gdk::STIPPLED);
-       
+
        synfig::Canvas::Handle canvas(property_canvas().get_value());
-       
+
        synfigapp::ValueDesc value_desc = property_value_desc().get_value();
        synfig::ValueNode *base_value = value_desc.get_value_node().get();
        // synfig::ValueNode_Animated *value_node=dynamic_cast<synfig::ValueNode_Animated*>(base_value);
@@ -233,61 +233,61 @@ CellRenderer_TimeTrack::render_vfunc(
        {
                const synfig::KeyframeList& keyframe_list(canvas->keyframe_list());
                synfig::KeyframeList::const_iterator iter;
-               
+
                for(iter=keyframe_list.begin();iter!=keyframe_list.end();++iter)
                {
                        if(!iter->get_time().is_valid())
                                continue;
-                       
+
                        const int x((int)((float)area_.get_width()/(adjustment->get_upper()-adjustment->get_lower())*(iter->get_time()-adjustment->get_lower())));
                        if(iter->get_time()>=adjustment->get_lower() && iter->get_time()<adjustment->get_upper())
                        {
                                gc->set_rgb_fg_color(keyframe_color);
                                window->draw_rectangle(gc, true, area_.get_x()+x, area_.get_y(), 1, area_.get_height()+1);
-                       }                       
+                       }
                }
        }
-       
+
        //render all the time points that exist
        {
                const synfig::Node::time_set *tset = get_times_from_vdesc(value_desc);
-               
+
                if(tset)
                {
                        synfig::Node::time_set::const_iterator  i = tset->begin(), end = tset->end();
-                       
+
                        float   lower = adjustment->get_lower(),
                                        upper = adjustment->get_upper();
-                       
+
                        Glib::RefPtr<Gdk::GC>   gc = Gdk::GC::create(widget.get_window());
-                       
+
                        Gdk::Rectangle area(area_);
                        gc->set_clip_rectangle(area);
                        gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-                       
+
                        bool valselected = sel_value.get_value_node() == base_value && !sel_times.empty();
-                       
+
                        float cfps = get_canvas()->rend_desc().get_frame_rate();
-                       
+
                        vector<Time>    drawredafter;
-                       
+
                        Time diff = actual_time - actual_dragtime;//selected_time-drag_time;
                        for(; i != end; ++i)
                        {
                                //find the coordinate in the drawable space...
                                Time t = i->get_time();
-                               
+
                                if(!t.is_valid())
                                        continue;
-                               
-                               //if it found it... (might want to change comparison, and optimize 
+
+                               //if it found it... (might want to change comparison, and optimize
                                //                                       sel_times.find to not produce an overall nlogn solution)
-                               
+
                                bool selected=false;
                                //not dragging... just draw as per normal
                                //if move dragging draw offset
                                //if copy dragging draw both...
-                                                               
+
                                if(valselected && sel_times.find(t) != sel_times.end())
                                {
                                        if(dragging) //skip if we're dragging because we'll render it later
@@ -314,10 +314,10 @@ CellRenderer_TimeTrack::render_vfunc(
                                {
                                        gc->set_rgb_fg_color(Gdk::Color("#00EEEE"));
                                }
-                               
+
                                //synfig::info("Displaying time: %.3f s",(float)t);
                                const int x = (int)((t-lower)*area.get_width()/(upper-lower));
-                               
+
                                //should draw me a grey filled circle...
                                Gdk::Rectangle area2(
                                        area.get_x() - area.get_height()/2 + x + 1,
@@ -326,12 +326,12 @@ CellRenderer_TimeTrack::render_vfunc(
                                        area.get_height()-2
                                );
                                render_time_point_to_window(window,area2,*i,selected);
-                               
+
                                /*window->draw_arc(gc,true,
                                area.get_x() + x - area.get_height()/4, area.get_y() + area.get_height()/8,
                                area.get_height()/2, area.get_height()*3/4,
                                0, 64*360);
-                               
+
                                gc->set_rgb_fg_color(Gdk::Color("#000000"));
                                window->draw_arc(gc,false,
                                area.get_x() + x - area.get_height()/4, area.get_y() + area.get_height()/8,
@@ -339,22 +339,22 @@ CellRenderer_TimeTrack::render_vfunc(
                                0, 64*360);
                                */
                        }
-                       
+
                        {
                                vector<Time>::iterator i = drawredafter.begin(), end = drawredafter.end();
                                for(; i != end; ++i)
                                {
                                        //find the coordinate in the drawable space...
                                        Time t = *i;
-                                       
+
                                        if(!t.is_valid())
                                                continue;
-                                                                                                               
+
                                        //synfig::info("Displaying time: %.3f s",(float)t);
                                        const int x = (int)((t-lower)*area.get_width()/(upper-lower));
-                                       
+
                                        //should draw me a grey filled circle...
-                                       
+
                                        Gdk::Rectangle area2(
                                                area.get_x() - area.get_height()/2 + x + 1,
                                                area.get_y() + 1,
@@ -367,14 +367,14 @@ CellRenderer_TimeTrack::render_vfunc(
                                        area.get_x() + x - area.get_height()/4, area.get_y() + area.get_height()/8,
                                        area.get_height()/2, area.get_height()*3/4,
                                        0, 64*360);
-                                       
+
                                        gc->set_rgb_fg_color(Gdk::Color("#000000"));
                                        window->draw_arc(gc,false,
                                        area.get_x() + x - area.get_height()/4, area.get_y() + area.get_height()/8,
                                        area.get_height()/2, area.get_height()*3/4,
                                        0, 64*360);
 */
-                               }               
+                               }
                        }
                }
        }
@@ -382,7 +382,7 @@ CellRenderer_TimeTrack::render_vfunc(
        /* THIS IS NOW HANDLED ENTIRELY BY THE TIMEPOINT SYSTEM
        // This this is an animated value node, then render the waypoints
        if(value_node)
-       {                               
+       {
                //now render the actual waypoints
                synfig::ValueNode_Animated::WaypointList::iterator iter;
                for(
@@ -413,8 +413,8 @@ CellRenderer_TimeTrack::render_vfunc(
                                shadow=Gtk::SHADOW_OUT;
                                selected=false;
                        }
-                       
-                       
+
+
                        widget.get_style()->paint_diamond(
                                Glib::RefPtr<Gdk::Window>::cast_static(window),
                                state,
@@ -443,24 +443,24 @@ CellRenderer_TimeTrack::render_vfunc(
                bool is_off(false);
                if(!activepoint_list.empty())
                        is_off=!activepoint_list.front().state;
-               
+
                int xstart(0);
-               
+
                int x=0,prevx=0;
                for(next=activepoint_list.begin(),iter=next++;iter!=activepoint_list.end();iter=next++)
                {
                        x=((int)((float)area.get_width()/(adjustment->get_upper()-adjustment->get_lower())*(iter->time-adjustment->get_lower())));
                        if(x<0)x=0;
                        if(x>area.get_width())x=area.get_width();
-                       
+
                        bool status_at_time=0;
                        if(next!=activepoint_list.end())
                        {
-                               status_at_time=!list_entry.status_at_time((iter->time+next->time)/2.0); 
+                               status_at_time=!list_entry.status_at_time((iter->time+next->time)/2.0);
                        }
                        else
-                               status_at_time=!list_entry.status_at_time(Time::end()); 
-                       
+                               status_at_time=!list_entry.status_at_time(Time::end());
+
                        if(!is_off && status_at_time)
                        {
                                xstart=x;
@@ -472,7 +472,7 @@ CellRenderer_TimeTrack::render_vfunc(
                                window->draw_rectangle(inactive_gc, true, area.get_x()+xstart, area.get_y(), x-xstart, area.get_height());
                                is_off=false;
                        }
-                       
+
                        /*
                        if(!is_off && iter!=activepoint_list.end() && next->state==false && iter->state==false)
                        {
@@ -490,9 +490,9 @@ CellRenderer_TimeTrack::render_vfunc(
                                is_off=false;
                        }
                        */
-                       
-                       
-                       
+
+
+
                        if(iter->time>=adjustment->get_lower() && iter->time<adjustment->get_upper())
                        {
                                int w(1);
@@ -507,8 +507,8 @@ CellRenderer_TimeTrack::render_vfunc(
                {
                        window->draw_rectangle(inactive_gc, true, area.get_x()+xstart, area.get_y(), area.get_width()-xstart, area.get_height());
                }
-       }               
-               
+       }
+
        // Render a line that defines the current tick in time
        {
                gc->set_rgb_fg_color(curr_time_color);
@@ -581,9 +581,9 @@ CellRenderer_TimeTrack::activate_vfunc(
        {
        case GDK_MOTION_NOTIFY:
                curr_time=((float)event->motion.x-(float)cell_area.get_x())/(float)cell_area.get_width()*(adjustment->get_upper()-adjustment->get_lower())+adjustment->get_lower();
-               
-               mode = NONE;                    
-               {       
+
+               mode = NONE;
+               {
                        Gdk::ModifierType mod;
                        Gdk::Event(event).get_state(mod);
                        mode = mod;
@@ -593,20 +593,20 @@ CellRenderer_TimeTrack::activate_vfunc(
        case GDK_BUTTON_RELEASE:
        default:
                curr_time=((float)event->button.x-(float)cell_area.get_x())/(float)cell_area.get_width()*(adjustment->get_upper()-adjustment->get_lower())+adjustment->get_lower();
-               {       
+               {
                        Gdk::ModifierType mod;
                        Gdk::Event(event).get_state(mod);
                        mode = mod;
                }
-               break;          
+               break;
        }
-       actual_time = curr_time;        
+       actual_time = curr_time;
        if(canvas)
                curr_time=curr_time.round(canvas->rend_desc().get_frame_rate());
        selected_time=curr_time;
 
     Time pixel_width((adjustment->get_upper()-adjustment->get_lower())/cell_area.get_width());
-       
+
     switch(event->type)
     {
        case GDK_BUTTON_PRESS:
@@ -616,26 +616,26 @@ CellRenderer_TimeTrack::activate_vfunc(
                if(/*!value_node && */event->button.button == 1)
                {
                        Time stime;
-                       
+
                        /*!     UI specification:
-                       
+
                                When nothing is selected, clicking on a point in either normal mode order
-                                       addative mode will select the time point closest to the click. 
+                                       addative mode will select the time point closest to the click.
                                        Subtractive click will do nothing
-                       
+
                                When things are already selected, clicking on a selected point does
                                        nothing (in both normal and add mode).  Add mode clicking on an unselected
                                        point adds it to the set.  Normal clicking on an unselected point will
                                        select only that one time point.  Subtractive clicking on any point
                                        will remove it from the the set if it is included.
                        */
-                                               
+
                        synfigapp::ValueDesc valdesc = property_value_desc().get_value();
                        const Node::time_set *tset = get_times_from_vdesc(valdesc);
-                       
+
                        bool clickfound = tset && get_closest_time(*tset,actual_time,pixel_width*cell_area.get_height(),stime);
                        bool selectmode = mode & SELECT_MASK;
-                                               
+
                        //NOTE LATER ON WE SHOULD MAKE IT SO MULTIPLE VALUENODES CAN BE SELECTED AT ONCE
                        //we want to jump to the value desc if we're not currently on it
                        //      but only if we want to add the point
@@ -644,34 +644,34 @@ CellRenderer_TimeTrack::activate_vfunc(
                                sel_value = valdesc;
                                sel_times.clear();
                        }
-                       
+
                        //now that we've made sure we're selecting the correct value, deal with the already selected points
                        set<Time>::iterator foundi = clickfound ? sel_times.find(stime) : sel_times.end();
                        bool found = foundi != sel_times.end();
-                       
+
                        //remove all other points from our list... (only select the one we need)
                        if(!selectmode && !found)
                        {
                                sel_times.clear();
                        }
-                       
+
                        if(found && selectmode) //remove a single already selected point
                        {
                                sel_times.erase(foundi);
                        }else if(clickfound) //otherwise look at adding it
                        {
                                //for replace the list was cleared earlier, and for add it wasn't so it works
-                               sel_times.insert(stime);                                
+                               sel_times.insert(stime);
                        }
                }
-               
+
                selection=false;
                try
                {
                        iter=find_waypoint(selected_time,pixel_width*cell_area.get_height()/2);
                        selected_waypoint=iter;
                        selected=*iter;
-                       
+
                        selection=true;
                }
                catch(int)
@@ -679,7 +679,7 @@ CellRenderer_TimeTrack::activate_vfunc(
                        selection=false;
                        selected=synfig::UniqueID::nil();
                }
-               
+
                if((!sel_times.empty() || selection) && event->button.button==1)
                {
                        dragging=true;
@@ -695,7 +695,7 @@ CellRenderer_TimeTrack::activate_vfunc(
                        const int index(property_value_desc().get_value().get_index());
                        const synfig::ValueNode_DynamicList::ListEntry::ActivepointList& activepoint_list(parent_value_node->list[index].timing_info);
                        synfig::ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator iter;
-       
+
                        for(iter=activepoint_list.begin();iter!=activepoint_list.end();++iter)
                        {
                                Time val=abs(iter->time-selected_time);
@@ -708,15 +708,15 @@ CellRenderer_TimeTrack::activate_vfunc(
                        }
                        // Perhaps I sould signal if we selected this activepoint?
                }*/
-               
+
                        if(event->button.button==3)
                        {
                                Time stime;
                                synfigapp::ValueDesc valdesc = property_value_desc().get_value();
                                const Node::time_set *tset = get_times_from_vdesc(valdesc);
-                               
+
                                bool clickfound = tset && get_closest_time(*tset,actual_time,pixel_width*cell_area.get_height(),stime);
-                               
+
                                etl::handle<synfig::Node> node;
                                if(valdesc.get_value(stime).get_type()==ValueBase::TYPE_CANVAS)
                                {
@@ -726,7 +726,7 @@ CellRenderer_TimeTrack::activate_vfunc(
                                {
                                        node=valdesc.get_value_node();
                                }
-                               
+
                                if(clickfound && node)
                                {
                                        show_timepoint_menu(node, stime, actual_time<stime?SIDE_LEFT:SIDE_RIGHT);
@@ -739,22 +739,22 @@ CellRenderer_TimeTrack::activate_vfunc(
                //if(selection && dragging)
                //      selected_time=((float)event->motion.x-(float)cell_area.get_x())/(float)cell_area.get_width()*(adjustment->get_upper()-adjustment->get_lower())+adjustment->get_lower();
                return true;
-               
+
                break;
        case GDK_BUTTON_RELEASE:
                {
                        DEBUGPOINT();
-       
+
                        //selected_time=((float)event->button.x-(float)cell_area.get_x())/(float)cell_area.get_width()*(adjustment->get_upper()-adjustment->get_lower())+adjustment->get_lower();
                        dragging=false;
-       
+
                        /*if(event->button.button==3 && selection)
                        {
                                signal_waypoint_clicked_(path,*selected_waypoint,event->button.button-1);
                                return true;
                        }
                        */
-                       
+
                        //Time point stuff...
                        if(event->button.button == 1)
                        {
@@ -765,7 +765,7 @@ CellRenderer_TimeTrack::activate_vfunc(
                                        synfigapp::Action::ParamList param_list;
                                        param_list.add("canvas",canvas_interface()->get_canvas());
                                        param_list.add("canvas_interface",canvas_interface());
-                                       
+
                                        if(sel_value.get_value_type() == synfig::ValueBase::TYPE_CANVAS)
                                        {
                                                param_list.add("addcanvas",sel_value.get_value().get(Canvas::Handle()));
@@ -773,20 +773,20 @@ CellRenderer_TimeTrack::activate_vfunc(
                                        {
                                                param_list.add("addvaluedesc",sel_value);
                                        }
-                                       
+
                                        set<Time>       newset;
                                        std::set<synfig::Time>::iterator i = sel_times.begin(), end = sel_times.end();
                                        for(; i != end; ++i)
                                        {
                                                param_list.add("addtime",*i);
-                                               
+
                                                newset.insert((*i + deltatime).round(get_canvas()->rend_desc().get_frame_rate()));
                                        }
-                                                               
+
                                        if(!delmode)
                                                param_list.add("deltatime",deltatime);
                                //      param_list.add("time",canvas_interface()->get_time());
-                                       
+
                                        if(mode & COPY_MASK) //copy
                                        {
                                                etl::handle<studio::Instance>::cast_static(canvas_interface()->get_instance())
@@ -794,20 +794,20 @@ CellRenderer_TimeTrack::activate_vfunc(
                                        }else if(delmode) //DELETE
                                        {
                                                etl::handle<studio::Instance>::cast_static(canvas_interface()->get_instance())
-                                                       ->process_action("timepoint_delete", param_list);                                       
+                                                       ->process_action("timepoint_delete", param_list);
                                        }else //MOVE
                                        {
                                                etl::handle<studio::Instance>::cast_static(canvas_interface()->get_instance())
-                                                       ->process_action("timepoint_move", param_list);                                 
+                                                       ->process_action("timepoint_move", param_list);
                                        }
-                                       
+
                                        //now replace all the selected with the new selected
-                                       sel_times = newset;                     
+                                       sel_times = newset;
                                }
                        }
-                       
-                       
-                       
+
+
+
                        /*if(value_node && selection)
                        {
                                if(selected_time==drag_time && event->button.button!=3)
@@ -824,7 +824,7 @@ CellRenderer_TimeTrack::activate_vfunc(
                                        }
                                }
                        }*/
-                       
+
                        //if(selection)
                        //      selected_time=iter->time;
                        //selected_time=iter->get_time();
@@ -834,7 +834,7 @@ CellRenderer_TimeTrack::activate_vfunc(
                //std::cerr<<"unknown event type "<<event->type<<std::endl;
                return false;
                break;
-       }       
+       }
 
 
 
@@ -878,11 +878,11 @@ set_waypoint_model(std::set<synfig::Waypoint, std::less<UniqueID> > waypoints, W
        {
                Waypoint waypoint(*iter);
                waypoint.apply_model(model);
-               
+
                synfigapp::Action::Handle action(synfigapp::Action::create("waypoint_set"));
-               
+
                assert(action);
-               
+
                action->set_param("canvas",canvas_interface->get_canvas());
                action->set_param("canvas_interface",canvas_interface);
 
@@ -911,7 +911,7 @@ CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle<synfig::Node>& nod
        {
                Gtk::Menu* interp_menu(manage(new Gtk::Menu()));
                Waypoint::Model model;
-               
+
                if(side==SIDE_LEFT)model.set_before(INTERPOLATION_TCB);
                else model.set_after(INTERPOLATION_TCB);
                interp_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("TCB"),
@@ -955,8 +955,8 @@ CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle<synfig::Node>& nod
                                canvas_interface()
                        )
                ));
-               
-               
+
+
                menu->items().push_back(
                        Gtk::Menu_Helpers::MenuElem(
                                side==SIDE_LEFT?_("Change \"In\" Interp."):_("Change \"Out\" Interp."),
index 92f118b..270616f 100644 (file)
@@ -88,7 +88,7 @@ class CellRenderer_TimeTrack :
 private:
        //! Time adjustment window
        Gtk::Adjustment adjustment_;
-       
+
        //! Signal for when the user clicks on a waypoint
        sigc::signal<void, const Glib::ustring&,synfig::Waypoint, int> signal_waypoint_clicked_;
 
@@ -96,7 +96,7 @@ private:
 
        //! Iterator for selected waypoint. (Should this be an UniqueID instead?)
        synfig::ValueNode_Animated::WaypointList::iterator selected_waypoint;
-       
+
        synfig::UniqueID selected;
 
        //! selected information for time... (will work for way points etc...)
@@ -109,17 +109,17 @@ private:
 
        //! ???
        synfig::Time selected_time;
-    
+
        //! The path to the current item in the tree model
        Glib::ustring path;
-       
+
        //! ???
        bool selection;
 
        bool dragging;
 
        synfig::Time drag_time;
-       
+
        etl::loose_handle<synfigapp::CanvasInterface>   canvas_interface_;
 
        /*
@@ -127,7 +127,7 @@ private:
        */
 
 private:
-       
+
        //! ValueBase Desc
        Glib::Property<synfigapp::ValueDesc> property_valuedesc_;
 
@@ -172,7 +172,7 @@ public:
 
        CellRenderer_TimeTrack();
     ~CellRenderer_TimeTrack();
-       
+
        void show_timepoint_menu(const etl::handle<synfig::Node>& node, const synfig::Time& time, Side side=SIDE_RIGHT);
 
        void set_adjustment(Gtk::Adjustment &x);
@@ -181,9 +181,9 @@ public:
 
        etl::loose_handle<synfigapp::CanvasInterface>   canvas_interface()const {return canvas_interface_;}
        void set_canvas_interface(etl::loose_handle<synfigapp::CanvasInterface> h); //this should only be called by smart people
-       
+
        synfig::Canvas::Handle get_canvas()const;
-       
+
        bool is_selected(const synfig::Waypoint& waypoint)const;
 
        synfig::ValueNode_Animated::WaypointList::iterator find_waypoint(const synfig::Time& t, const synfig::Time& scope=synfig::Time::end());
index a9f931b..a0b5280 100644 (file)
@@ -104,18 +104,18 @@ public:
 
                //set_flags(Gtk::CAN_FOCUS);
                //set_events(Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
-               
+
                /*
                set_events(//(Gdk::ALL_EVENTS_MASK)
-               ~(      Gdk::EXPOSURE_MASK      
-                       | Gdk::ENTER_NOTIFY_MASK        
-                       | Gdk::LEAVE_NOTIFY_MASK        
-                       | Gdk::FOCUS_CHANGE_MASK        
-                       | Gdk::STRUCTURE_MASK   
-                       | Gdk::PROPERTY_CHANGE_MASK     
-                       | Gdk::VISIBILITY_NOTIFY_MASK   
-                       | Gdk::PROXIMITY_IN_MASK        
-                       | Gdk::PROXIMITY_OUT_MASK       
+               ~(      Gdk::EXPOSURE_MASK
+                       | Gdk::ENTER_NOTIFY_MASK
+                       | Gdk::LEAVE_NOTIFY_MASK
+                       | Gdk::FOCUS_CHANGE_MASK
+                       | Gdk::STRUCTURE_MASK
+                       | Gdk::PROPERTY_CHANGE_MASK
+                       | Gdk::VISIBILITY_NOTIFY_MASK
+                       | Gdk::PROXIMITY_IN_MASK
+                       | Gdk::PROXIMITY_OUT_MASK
                        | Gdk::SUBSTRUCTURE_MASK
                )
                );
@@ -124,14 +124,14 @@ public:
                //signal_remove_widget().connect(sigc::mem_fun(*this, &studio::ValueBase_Entry::hide));
 
                show_all_children();
-               
+
                //signal_show().connect(sigc::mem_fun(*this, &ValueBase_Entry::grab_focus));
        }
        ~ValueBase_Entry()
        {
                DEBUGPOINT();
        }
-       
+
        void on_editing_done()
        {
                hide();
@@ -199,7 +199,7 @@ public:
                if(valuewidget)
                        valuewidget->set_param_desc(data);
        }
-       
+
        const synfig::ValueBase &get_value()
        {
                if(valuewidget)
@@ -241,13 +241,13 @@ bool get_paragraph(synfig::String& text)
        entry.set_activates_default(true);
        dialog.get_vbox()->pack_start(entry);
 */
-       
+
        dialog.add_button(Gtk::StockID("gtk-ok"),Gtk::RESPONSE_OK);
        dialog.add_button(Gtk::StockID("gtk-cancel"),Gtk::RESPONSE_CANCEL);
        dialog.set_default_response(Gtk::RESPONSE_OK);
-       
+
        //text_entry.signal_activate().connect(sigc::bind(sigc::mem_fun(dialog,&Gtk::Dialog::response),Gtk::RESPONSE_OK));
-       
+
        dialog.show();
 
        if(dialog.run()!=Gtk::RESPONSE_OK)
@@ -270,7 +270,7 @@ CellRenderer_ValueBase::CellRenderer_ValueBase():
        CellRendererText::signal_edited().connect(sigc::mem_fun(*this,&CellRenderer_ValueBase::string_edited_));
        value_entry=new ValueBase_Entry();
        value_entry->hide();
-       
+
        Pango::AttrList attr_list;
        {
                Pango::AttrInt pango_size(Pango::Attribute::create_attr_size(Pango::SCALE*8));
@@ -279,7 +279,7 @@ CellRenderer_ValueBase::CellRenderer_ValueBase():
                attr_list.change(pango_size);
        }
        property_attributes()=attr_list;
-       
+
        property_foreground()=Glib::ustring("#7f7f7f");
        property_inconsistant()=false;
 }
@@ -294,14 +294,14 @@ CellRenderer_ValueBase::string_edited_(const Glib::ustring&path,const Glib::ustr
 {
        ValueBase old_value=property_value_.get_value();
        ValueBase value;
-       
+
        if(old_value.get_type()==ValueBase::TYPE_TIME)
        {
                value=ValueBase(Time((String)str,get_canvas()->rend_desc().get_frame_rate()));
        }
-       else 
+       else
                value=ValueBase((String)str);
-       
+
        if(old_value!=value)
                signal_edited_(path,value);
 }
@@ -367,7 +367,7 @@ CellRenderer_ValueBase::render_vfunc(
                        property_text()=(Glib::ustring)strprintf("(%i)",data.get(int()));
                        std::list<synfig::ParamDesc::EnumData> enum_list=((synfig::ParamDesc)property_param_desc_).get_enum_list();
                        std::list<synfig::ParamDesc::EnumData>::iterator iter;
-                                               
+
                        for(iter=enum_list.begin();iter!=enum_list.end();iter++)
                                if(iter->value==data.get(int()))
                                {
@@ -375,7 +375,7 @@ CellRenderer_ValueBase::render_vfunc(
                                        break;
                                }
                }
-                       
+
                break;
        case ValueBase::TYPE_VECTOR:
                {
@@ -386,9 +386,9 @@ CellRenderer_ValueBase::render_vfunc(
                        property_text()=static_cast<Glib::ustring>(strprintf("%s,%s",x.get_string(6).c_str(),y.get_string(6).c_str()));
                }
                break;
-       
+
        case ValueBase::TYPE_STRING:
-       
+
                if(data.get_type()==ValueBase::TYPE_STRING)
                {
                        if(!data.get(synfig::String()).empty())
@@ -417,7 +417,7 @@ CellRenderer_ValueBase::render_vfunc(
        case ValueBase::TYPE_BOOL:
                {
                        widget.get_style()->paint_check(
-                               Glib::RefPtr<Gdk::Window>::cast_static(window), state, 
+                               Glib::RefPtr<Gdk::Window>::cast_static(window), state,
                                data.get(bool())?Gtk::SHADOW_IN:Gtk::SHADOW_OUT,
                                ca, widget, "cellcheck",
                                ca.get_x()/* + x_offset + cell_xpad*/,
@@ -445,7 +445,7 @@ CellRenderer_ValueBase::render_vfunc(
                break;
        default:
                property_text()=static_cast<Glib::ustring>(_("UNKNOWN"));
-               break;  
+               break;
        }
        CellRendererText::render_vfunc(window,widget,background_area,ca,expose_area,flags);
 }
@@ -505,7 +505,7 @@ CellRenderer_ValueBase::start_editing_vfunc(
        // If we aren't editable, then there is nothing to do
        if(!property_editable())
                return 0;
-               
+
        ValueBase data=property_value_.get_value();
 
        switch(data.get_type())
@@ -516,7 +516,7 @@ CellRenderer_ValueBase::start_editing_vfunc(
        //case ValueBase::TYPE_TIME:
        //      property_text()=(Glib::ustring)data.get(Time()).get_string(get_canvas()->rend_desc().get_frame_rate(),App::get_time_format()|Time::FORMAT_FULL);
        //      return CellRendererText::start_editing_vfunc(event,widget,path,background_area,cell_area,flags);
-               
+
        case ValueBase::TYPE_GRADIENT:
                App::dialog_gradient->reset();
                App::dialog_gradient->set_gradient(data.get(Gradient()));
@@ -527,7 +527,7 @@ CellRenderer_ValueBase::start_editing_vfunc(
                        )
                );
                App::dialog_gradient->present();
-       
+
                return NULL;
 
        case ValueBase::TYPE_COLOR:
@@ -540,7 +540,7 @@ CellRenderer_ValueBase::start_editing_vfunc(
                        )
                );
                App::dialog_color->present();
-       
+
                return NULL;
        case ValueBase::TYPE_STRING:
                if(get_param_desc().get_hint()=="paragraph")
@@ -550,7 +550,7 @@ CellRenderer_ValueBase::start_editing_vfunc(
                        if(get_paragraph(string))
                        {
                                signal_edited_(path,ValueBase(string));
-                       }                       
+                       }
                        return NULL;
                }
                if(get_param_desc().get_hint()!="filename")
@@ -582,8 +582,8 @@ CellRenderer_ValueBase::on_value_editing_done()
 
                if(old_value!=value)
                        signal_edited_(value_entry->get_path(),value);
-               
+
                //delete value_entry;
                //value_entry=0;
-       }       
+       }
 }
index 2da751a..ce33119 100644 (file)
@@ -86,7 +86,7 @@ class CellRenderer_ValueBase : public Gtk::CellRendererText
 
        void gradient_edited(synfig::Gradient gradient, Glib::ustring path);
        void color_edited(synfig::Color color, Glib::ustring path);
-       
+
 public:
        sigc::signal<void, const Glib::ustring&> &signal_secondary_click()
        {return signal_secondary_click_; }
@@ -101,7 +101,7 @@ public:
 
        etl::handle<synfig::Canvas> get_canvas()const { return property_canvas_; }
        synfig::ParamDesc get_param_desc()const { return property_param_desc_; }
-       
+
        CellRenderer_ValueBase();
        ~CellRenderer_ValueBase();
 
@@ -117,7 +117,7 @@ public:
                const Gdk::Rectangle& ca,
                const Gdk::Rectangle& expose_area,
                Gtk::CellRendererState flags);
-       
+
        virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
                                                  Gtk::Widget& widget,
                                                  const Glib::ustring& path,
index 227380c..d809e0a 100644 (file)
@@ -96,14 +96,14 @@ ChildrenTree::ChildrenTree()
                // Pack the label into the column
                column->pack_start(model.label,true);
 
-               // Finish setting up the column         
+               // Finish setting up the column
                column->set_reorderable();
                column->set_resizable();
                column->set_clickable();
                column->set_min_width(150);
                column->set_sort_column_id(model.label);
                tree_view.append_column(*column);
-               
+
        }
        {       // --- T Y P E --------------------------------------------------------
                int cols_count = tree_view.append_column(_("Type"),model.type);
@@ -118,7 +118,7 @@ ChildrenTree::ChildrenTree()
        }
        {       // --- V A L U E  -----------------------------------------------------
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("ValueBase")) );
-               
+
                // Set up the value cell-renderer
                cellrenderer_value=ChildrenTreeStore::add_cell_renderer_value(column);
                cellrenderer_value->signal_edited().connect(sigc::mem_fun(*this, &studio::ChildrenTree::on_edited_value));
@@ -135,7 +135,7 @@ ChildrenTree::ChildrenTree()
        {       // --- T I M E   T R A C K --------------------------------------------
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Time Track")) );
                column_time_track=column;
-               
+
                // Set up the value-node cell-renderer
                cellrenderer_time_track=ChildrenTreeStore::add_cell_renderer_value_node(column);
                cellrenderer_time_track->property_mode()=Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
@@ -144,7 +144,7 @@ ChildrenTree::ChildrenTree()
                column->add_attribute(cellrenderer_time_track->property_canvas(), model.canvas);
 
                //column->pack_start(*cellrenderer_time_track);
-                               
+
                // Finish setting up the column
                column->set_reorderable();
                column->set_resizable();
@@ -153,10 +153,10 @@ ChildrenTree::ChildrenTree()
 
        // This makes things easier to read.
        tree_view.set_rules_hint();
-       
+
        // Make us more sensitive to several events
        tree_view.add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK|Gdk::POINTER_MOTION_MASK);
-       
+
        tree_view.signal_event().connect(sigc::mem_fun(*this, &studio::ChildrenTree::on_tree_event));
 
        // Create a scrolled window for that tree
@@ -170,15 +170,15 @@ ChildrenTree::ChildrenTree()
        attach(*scroll_children_tree, 0, 3, 0, 1, Gtk::EXPAND|Gtk::FILL,Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        hbox=manage(new Gtk::HBox());
-       
+
        attach(*hbox, 0, 1, 1, 2, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 0, 0);
 
-       
-       
+
+
        tree_view.set_enable_search(true);
        tree_view.set_search_column(model.label);
-       
-       
+
+
 /*
        Gtk::Image *icon;
        //Gtk::IconSize iconsize(Gtk::IconSize::from_name("synfig-small_icon"));
@@ -188,7 +188,7 @@ ChildrenTree::ChildrenTree()
        SMALL_BUTTON(button_lower,"gtk-go-down","Lower");
        SMALL_BUTTON(button_duplicate,"synfig-duplicate","Duplicate");
        SMALL_BUTTON(button_delete,"gtk-delete","Delete");
-       
+
        hbox->pack_start(*button_raise,Gtk::PACK_SHRINK);
        hbox->pack_start(*button_lower,Gtk::PACK_SHRINK);
        hbox->pack_start(*button_duplicate,Gtk::PACK_SHRINK);
@@ -252,7 +252,7 @@ ChildrenTree::on_dirty_preview()
 
 void
 ChildrenTree::on_selection_changed()
-{      
+{
        if(0)
                {
                button_raise->set_sensitive(false);
@@ -268,7 +268,7 @@ void
 ChildrenTree::on_edited_value(const Glib::ustring&path_string,synfig::ValueBase value)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(tree_view.get_model()->get_iter(path));
 
        row[model.value]=value;
@@ -279,9 +279,9 @@ void
 ChildrenTree::on_waypoint_clicked(const Glib::ustring &path_string, synfig::Waypoint waypoint,int button)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(tree_view.get_model()->get_iter(path));
-       
+
        signal_waypoint_clicked()(static_cast<synfigapp::ValueDesc>(row[model.value_desc]),waypoint,button);
 }
 
@@ -303,7 +303,7 @@ ChildrenTree::on_tree_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(tree_view.get_model()->get_iter(path));
-                       
+
                        if(column->get_first_cell_renderer()==cellrenderer_time_track)
                        {
                                return signal_user_click()(event->button.button,row,COLUMNID_TIME_TRACK);
@@ -312,10 +312,10 @@ ChildrenTree::on_tree_event(GdkEvent *event)
                                return signal_user_click()(event->button.button,row,COLUMNID_VALUE);
                        else
                                return signal_user_click()(event->button.button,row,COLUMNID_ID);
-                       
+
                }
                break;
-               
+
        case GDK_MOTION_NOTIFY:
                {
                        Gtk::TreeModel::Path path;
@@ -328,12 +328,12 @@ ChildrenTree::on_tree_event(GdkEvent *event)
                                cell_x,cell_y //int&cell_x,int&cell_y
                                )
                        ) break;
-                       
+
                        if(!tree_view.get_model()->get_iter(path))
                                break;
-                       
+
                        Gtk::TreeRow row = *(tree_view.get_model()->get_iter(path));
-                       
+
                        if(cellrenderer_time_track==column->get_first_cell_renderer())
                        {
                                // Movement on TimeLine
index ad7c72e..a2847f5 100644 (file)
@@ -69,9 +69,9 @@ public:
        */
 
 public:
-       
+
        ChildrenTreeStore::Model model;
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -106,13 +106,13 @@ private:
        Gtk::Button *button_delete;
 
        Widget_ValueBase blend_method_widget;
-       
+
        /*
  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
        */
 
 private:
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -146,10 +146,10 @@ public:
        Gtk::HBox& get_hbox() { return *hbox; }
 
        Gtk::TreeView& get_tree_view() { return tree_view; }
-       
+
        Glib::RefPtr<Gtk::TreeSelection> get_selection() { return tree_view.get_selection(); }
        Glib::SignalProxy1< bool,GdkEvent* >  signal_event () { return tree_view.signal_event(); }
-       
+
        ChildrenTree();
        ~ChildrenTree();
 
index e50f45d..dd807cf 100644 (file)
@@ -88,7 +88,7 @@ ChildrenTreeStore::ChildrenTreeStore(etl::loose_handle<synfigapp::CanvasInterfac
        canvas_interface()->signal_value_node_replaced().connect(sigc::mem_fun(*this,&studio::ChildrenTreeStore::on_value_node_replaced));
        canvas_interface()->signal_canvas_added().connect(sigc::mem_fun(*this,&studio::ChildrenTreeStore::on_canvas_added));
        canvas_interface()->signal_canvas_removed().connect(sigc::mem_fun(*this,&studio::ChildrenTreeStore::on_canvas_removed));
-       
+
        rebuild();
 }
 
@@ -124,13 +124,13 @@ ChildrenTreeStore::rebuild_value_nodes()
        Gtk::TreeModel::Children children(value_node_row.children());
 
        while(!children.empty())erase(children.begin());
-       
+
        clear_changed_queue();
-       
+
        std::for_each(
                canvas_interface()->get_canvas()->value_node_list().rbegin(), canvas_interface()->get_canvas()->value_node_list().rend(),
                sigc::mem_fun(*this, &studio::ChildrenTreeStore::on_value_node_added)
-       );      
+       );
 }
 
 void
@@ -153,13 +153,13 @@ void
 ChildrenTreeStore::rebuild_canvases()
 {
        Gtk::TreeModel::Children children(canvas_row.children());
-       
+
        while(!children.empty())erase(children.begin());
-               
+
        std::for_each(
                canvas_interface()->get_canvas()->children().rbegin(), canvas_interface()->get_canvas()->children().rend(),
                sigc::mem_fun(*this, &studio::ChildrenTreeStore::on_canvas_added)
-       );      
+       );
 }
 
 void
@@ -172,7 +172,7 @@ void
 ChildrenTreeStore::refresh_row(Gtk::TreeModel::Row &row, bool do_children)
 {
        CanvasTreeStore::refresh_row(row,false);
-       
+
        if((bool)row[model.is_value_node])
        {
                changed_set_.erase(row[model.value_node]);
@@ -185,18 +185,18 @@ ChildrenTreeStore::on_canvas_added(Canvas::Handle canvas)
 {
        Gtk::TreeRow row = *(prepend(canvas_row.children()));
 
-       row[model.icon] = Gtk::Button().render_icon(Gtk::StockID("synfig-canvas"),Gtk::ICON_SIZE_SMALL_TOOLBAR);        
+       row[model.icon] = Gtk::Button().render_icon(Gtk::StockID("synfig-canvas"),Gtk::ICON_SIZE_SMALL_TOOLBAR);
        row[model.id] = canvas->get_id();
        row[model.name] = canvas->get_name();
-       
+
        if(!canvas->get_id().empty())
                row[model.label] = canvas->get_id();
        else
        if(!canvas->get_name().empty())
-               row[model.label] = canvas->get_name();          
+               row[model.label] = canvas->get_name();
        else
-               row[model.label] = _("[Unnamed]");              
-       
+               row[model.label] = _("[Unnamed]");
+
        row[model.canvas] = canvas;
        row[model.type] = _("Canvas");
        //row[model.is_canvas] = true;
@@ -216,7 +216,7 @@ ChildrenTreeStore::on_value_node_added(ValueNode::Handle value_node)
 //             return;
 
        Gtk::TreeRow row = *prepend(value_node_row.children());
-       
+
        set_row(row,synfigapp::ValueDesc(canvas_interface()->get_canvas(),value_node->get_id()),false);
 }
 
@@ -224,7 +224,7 @@ void
 ChildrenTreeStore::on_value_node_deleted(etl::handle<ValueNode> value_node)
 {
        Gtk::TreeIter iter;
-       //int i(0);             
+       //int i(0);
 
        if(find_first_value_node(value_node,iter))
        {
@@ -243,18 +243,18 @@ ChildrenTreeStore::execute_changed_value_nodes()
 
        etl::clock timer;
        timer.reset();
-       
+
        while(!changed_set_.empty())
        {
                ValueNode::Handle value_node(*changed_set_.begin());
                changed_set_.erase(value_node);
 
                Gtk::TreeIter iter;
-               
+
                try
                {
                        Gtk::TreeIter iter;
-                       int i(0);               
+                       int i(0);
 
                        if(!value_node->is_exported() && find_first_value_node(value_node,iter))
                        {
@@ -268,13 +268,13 @@ ChildrenTreeStore::execute_changed_value_nodes()
                                i++;
                                refresh_row(row);
                        }while(find_next_value_node(value_node,iter));
-                       
+
                        if(!i)
                        {
                                refresh_value_nodes();
                                return false;
                        }
-                       
+
                }
                catch(...)
                {
@@ -289,7 +289,7 @@ ChildrenTreeStore::execute_changed_value_nodes()
                        return false;
                }
        }
-               
+
        return false;
 }
 
@@ -303,13 +303,13 @@ ChildrenTreeStore::on_value_node_changed(etl::handle<ValueNode> value_node)
 //     if(!execute_changed_queued())
 //             changed_connection=Glib::signal_idle().connect(sigc::mem_fun(*this,&ChildrenTreeStore::execute_changed_value_nodes));
        changed_connection=Glib::signal_timeout().connect(sigc::mem_fun(*this,&ChildrenTreeStore::execute_changed_value_nodes),150);
-       
+
        changed_set_.insert(value_node);
        /*
        try
        {
                Gtk::TreeIter iter;
-               int i(0);               
+               int i(0);
                while(find_next_value_node(value_node,iter))
                {
                        Gtk::TreeRow row(*iter);
@@ -335,7 +335,7 @@ ChildrenTreeStore::on_value_node_replaced(synfig::ValueNode::Handle replaced_val
        //if(!execute_changed_queued())
 //             changed_connection=Glib::signal_idle().connect(sigc::mem_fun(*this,&ChildrenTreeStore::execute_changed_value_nodes));
                changed_connection=Glib::signal_timeout().connect(sigc::mem_fun(*this,&ChildrenTreeStore::execute_changed_value_nodes),150);
-       
+
        replaced_set_.insert(replaced_value_node);
 }
 
@@ -377,5 +377,5 @@ ChildrenTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int colu
        catch(std::exception x)
        {
                g_warning(x.what());
-       }       
+       }
 }
index 1dcc66a..f0ed296 100644 (file)
@@ -55,7 +55,7 @@ public:
        */
 
 public:
-       
+
        //! TreeModel for the layers
        const Model model;
 
@@ -64,25 +64,25 @@ public:
        */
 
 private:
-       
+
        Gtk::TreeModel::Row value_node_row;
        Gtk::TreeModel::Row canvas_row;
-       
+
        std::set<synfig::ValueNode::Handle> changed_set_;
 
        std::set<synfig::ValueNode::Handle> replaced_set_;
-       
+
        /*
  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
        */
 
 private:
-       
+
        sigc::connection changed_connection;
        bool execute_changed_queued()const { return !changed_set_.empty() || !replaced_set_.empty(); }
        bool execute_changed_value_nodes();
        void clear_changed_queue() { changed_set_.clear(); replaced_set_.clear(); }
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -103,7 +103,7 @@ private:
        */
 
 public:
-       
+
        ChildrenTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
        ~ChildrenTreeStore();
 
@@ -122,7 +122,7 @@ public:
        void refresh_row(Gtk::TreeModel::Row &row, bool do_children=false);
 
        Gtk::TreeModel::Row get_canvas_row()const { return canvas_row; }
-       
+
        Gtk::TreeModel::Row get_value_node_row()const { return value_node_row; }
 
        /*
@@ -130,7 +130,7 @@ public:
        */
 
 public:
-       
+
        static Glib::RefPtr<ChildrenTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
 }; // END of class ChildrenTreeStore
 
index 9913202..f13920e 100644 (file)
@@ -57,7 +57,7 @@ using namespace studio;
 
 #define COLUMNID_JUMP          (787584)
 #define ColumnID       int
-       
+
 /* === G L O B A L S ======================================================= */
 
 /* === P R O C E D U R E S ================================================= */
@@ -83,7 +83,7 @@ CompView::CompView():
        notebook->append_page(*create_canvas_tree(),"Canvases");
        notebook->append_page(*create_action_tree(),"History");
 
-       
+
 
 /*
 
@@ -153,7 +153,7 @@ CompView::CompView():
        App::signal_instance_created().connect(sigc::mem_fun(*this,&studio::CompView::new_instance));
        App::signal_instance_deleted().connect(sigc::mem_fun(*this,&studio::CompView::delete_instance));
        App::signal_instance_selected().connect(sigc::mem_fun(*this,&studio::CompView::set_selected_instance_signal));
-       
+
        table->show_all();
        add(*table);
 
@@ -191,7 +191,7 @@ CompView::create_canvas_tree()
 //#ifdef NDEBUG
 //             column->add_attribute(icon_cellrenderer->property_pixbuf(), canvas_tree_model.icon);
 //#endif
-               
+
                canvas_tree->append_column(*column);
        }
        canvas_tree->set_rules_hint();
@@ -221,23 +221,23 @@ CompView::create_action_tree()
 
                Gtk::CellRendererToggle* toggle_cr = Gtk::manage( new Gtk::CellRendererToggle() );
                toggle_cr->signal_toggled().connect(sigc::mem_fun(*this, &studio::CompView::on_action_toggle) );
-               
+
                column->pack_start(*toggle_cr); //false = don't expand.
                column->add_attribute(toggle_cr->property_active(),history_tree_model.is_active);
                column->set_resizable();
                column->set_clickable();
-                               
+
                action_tree->append_column(*column);
        }
        /*{
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column("Canvas") );
                Gtk::CellRendererText *text_cr=Gtk::manage(new Gtk::CellRendererText());
                text_cr->property_foreground()=Glib::ustring("#7f7f7f");
-               
+
                column->pack_start(*text_cr);
                column->add_attribute(text_cr->property_text(),history_tree_model.canvas_id);
                column->add_attribute(text_cr->property_foreground_set(),history_tree_model.is_redo);
-                               
+
                action_tree->append_column(*column);
        }*/
        {
@@ -245,13 +245,13 @@ CompView::create_action_tree()
 
                Gtk::CellRendererText* cell_renderer_jump=Gtk::manage(new Gtk::CellRendererText());
                column->pack_start(*cell_renderer_jump,true);
-               
+
                cell_renderer_jump->property_text()="(JMP)";
                cell_renderer_jump->property_foreground()="#003a7f";
-               
+
                column->set_resizable();
                column->set_clickable();
-               
+
                column->set_sort_column_id(COLUMNID_JUMP);
 
                action_tree->append_column(*column);
@@ -263,17 +263,17 @@ CompView::create_action_tree()
                Gtk::CellRendererText *text_cr=Gtk::manage(new Gtk::CellRendererText());
                text_cr->property_foreground()=Glib::ustring("#7f7f7f");
 
-               
+
 
                //column->pack_start(history_tree_model.icon, false); //false = don't expand.
                column->pack_start(*text_cr);
                column->add_attribute(text_cr->property_text(),history_tree_model.name);
                column->add_attribute(text_cr->property_foreground_set(),history_tree_model.is_redo);
-                               
+
                action_tree->append_column(*column);
        }
 
-       
+
        action_tree->set_rules_hint();
 //     action_tree->signal_row_activated().connect(sigc::mem_fun(*this,&CompView::on_row_activate));
        action_tree->signal_event().connect(sigc::mem_fun(*this,&CompView::on_action_event));
@@ -293,14 +293,14 @@ CompView::create_action_tree()
 
        Gtk::Button* clear_redo_button(manage(new Gtk::Button(_("Clear Redo"))));
        clear_redo_button->signal_pressed().connect(sigc::mem_fun(*this,&studio::CompView::clear_redo));
-       
+
        Gtk::Table* table(manage(new Gtk::Table()));
        table->attach(*scrolledwindow, 0, 2, 0,1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        table->attach(*clear_button, 0, 1, 1,2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
        table->attach(*clear_redo_button, 1, 2, 1,2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0);
-       
+
        table->show_all();
-       
+
        return table;
 }
 
@@ -324,7 +324,7 @@ void
 CompView::clear_history()
 {
        if(selected_instance && App::dialog_yes_no(_("Clear History"), _("You will not be able to undo any changes that you have made!\nAre you sure you want to clear the undo stack?")))
-       {               
+       {
                selected_instance->clear_undo_stack();
        }
 }
@@ -333,7 +333,7 @@ void
 CompView::clear_redo()
 {
        if(selected_instance && App::dialog_yes_no(_("Clear History"), _("You will not be able to redo any changes that you have made!\nAre you sure you want to clear the redo stack?")))
-       {               
+       {
                selected_instance->clear_redo_stack();
        }
 }
@@ -437,7 +437,7 @@ CompView::set_selected_instance(etl::loose_handle<studio::Instance> x)
        else
                instance_selector->set_history(0);
 
-       set_selected_instance_(x);      
+       set_selected_instance_(x);
 }
 
 void
@@ -445,11 +445,11 @@ CompView::new_instance(etl::handle<studio::Instance> instance)
 {
        if(studio::App::shutdown_in_progress)
                return;
-       
+
        assert(instance);
-       
+
        etl::loose_handle<studio::Instance> loose_instance(instance);
-       
+
        instance->synfigapp::Instance::signal_filename_changed().connect(sigc::mem_fun(*this,&CompView::refresh_instances));
        instance->synfigapp::Instance::signal_filename_changed().connect(
                sigc::bind<etl::loose_handle<studio::Instance> >(
@@ -457,7 +457,7 @@ CompView::new_instance(etl::handle<studio::Instance> instance)
                        loose_instance
                )
        );
-       
+
        {
                std::string name=basename(instance->get_file_name());
 
@@ -533,7 +533,7 @@ CompView::on_action_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(action_tree->get_model()->get_iter(path));
-                       
+
                        //signal_user_click()(event->button.button,row,(ColumnID)column->get_sort_column_id());
                        if((ColumnID)column->get_sort_column_id()==COLUMNID_JUMP)
                        {
@@ -550,7 +550,7 @@ CompView::on_action_event(GdkEvent *event)
                                }
                        }
                }
-               
+
        case GDK_BUTTON_RELEASE:
                break;
        default:
@@ -575,7 +575,7 @@ CompView::on_tree_event(GdkEvent *event)
                        synfigapp::Action::ParamList param_list;
                        param_list.add("canvas",synfig::Canvas::Handle(get_selected_canvas()));
                        param_list.add("canvas_interface",get_selected_instance()->find_canvas_interface(get_selected_canvas()));
-                       get_selected_instance()->find_canvas_view(get_selected_canvas())->add_actions_to_menu(&menu, param_list,synfigapp::Action::CATEGORY_CANVAS);                                    
+                       get_selected_instance()->find_canvas_view(get_selected_canvas())->add_actions_to_menu(&menu, param_list,synfigapp::Action::CATEGORY_CANVAS);
                        menu.popup(0,0);
                        menu.show();
                        break;
@@ -600,10 +600,10 @@ CompView::on_action_toggle(const Glib::ustring& path_string)
        studio::HistoryTreeStore::Model history_tree_model;
 
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(selected_instance->history_tree_store()->get_iter(path));
 
        handle<synfigapp::Action::Undoable> action=row[history_tree_model.action];
-       
+
        selected_instance->synfigapp::Instance::set_action_status(action,!action->is_active());
 }
index 7c218c6..4bc2046 100644 (file)
@@ -57,7 +57,7 @@ class CanvasView;
 class CompView : public Gtk::Window
 {
        DialogSettings dialog_settings;
-       
+
        Gtk::Tooltips tooltips;
 
        Gtk::OptionMenu *instance_selector;
@@ -75,7 +75,7 @@ class CompView : public Gtk::Window
 
        void clear_history();
        void clear_redo();
-       
+
 public:
        CompView();
        ~CompView();
@@ -99,11 +99,11 @@ public:
        bool close();
 
 private:
-       
+
        Gtk::Widget* create_canvas_tree();
        Gtk::Widget* create_action_tree();
        Gtk::Widget* create_instance_selector();
-       
+
        void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *);
        bool on_tree_event(GdkEvent *event);
 
index 156a0a9..99c49ae 100644 (file)
@@ -58,17 +58,17 @@ DeviceTracker::DeviceTracker()
                GList*  device_list;
                GList*  iter;
                device_list=gdk_devices_list();
-               
+
                for(iter=device_list;iter;iter=g_list_next(iter))
                {
                        GdkDevice* device=reinterpret_cast<GdkDevice*>(iter->data);
                        gdk_device_set_mode(device,GDK_MODE_SCREEN);
-                       
+
                        synfigapp::InputDevice::Handle input_device;
                        input_device=synfigapp::Main::add_input_device(device->name,synfigapp::InputDevice::Type(device->source));
                        if(input_device->get_type()==synfigapp::InputDevice::TYPE_MOUSE)
                                synfigapp::Main::select_input_device(input_device);
-               }               
+               }
        }
 }
 
index de8f64d..7aab6e5 100644 (file)
@@ -83,7 +83,7 @@ Dialog_Color::Dialog_Color():
        Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close"))));
        cancel_button->show();
        add_action_widget(*cancel_button,0);
-       cancel_button->signal_clicked().connect(sigc::hide_return(sigc::mem_fun(*this, &Dialog_Color::on_close_pressed)));      
+       cancel_button->signal_clicked().connect(sigc::hide_return(sigc::mem_fun(*this, &Dialog_Color::on_close_pressed)));
        signal_delete_event().connect(sigc::hide(sigc::mem_fun(*this, &Dialog_Color::on_close_pressed)));
 
        Gtk::Table* table(manage(new Gtk::Table(2,2,false)));
@@ -92,7 +92,7 @@ Dialog_Color::Dialog_Color():
        widget_color=manage(new Widget_ColorEdit());
        widget_color->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Color::on_color_changed));
        //widget_color->signal_activate().connect(sigc::mem_fun(*this,&studio::Dialog_Color::on_color_changed));
-       table->attach(*widget_color, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);   
+       table->attach(*widget_color, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        add_accel_group(App::ui_manager()->get_accel_group());
 
index c99c1f6..3606aec 100644 (file)
@@ -61,11 +61,11 @@ class CanvasInterface;
 namespace studio {
 
 class Widget_Color;
-       
+
 class Dialog_Color : public Gtk::Dialog
 {
        DialogSettings dialog_settings;
-       
+
        sigc::signal<void,synfig::Color> signal_edited_;
        //sigc::signal<void,synfig::Color> signal_apply_;
 
@@ -76,21 +76,21 @@ class Dialog_Color : public Gtk::Dialog
        Widget_ColorEdit* widget_color;
 
        bool busy_;
-       
+
 public:
        bool busy()const { return busy_; }
-       
+
        sigc::signal<void,synfig::Color>& signal_edited() { return signal_edited_; }
-       
+
        //sigc::signal<void,synfig::Color>& signal_apply() { return signal_apply_; }
-       
+
        void set_color(const synfig::Color& x) { widget_color->set_value(x); }
 
        synfig::Color get_color()const { return widget_color->get_value(); }
-               
+
        void reset();
 
-       
+
        Dialog_Color();
        ~Dialog_Color();
 
index 86bcf9a..5b25680 100644 (file)
@@ -68,7 +68,7 @@ Dialog_Gradient::Dialog_Gradient():
        set_keep_above(false);
 
        set_role("gradient_editor");
-       
+
        // Setup the buttons
        Gtk::Button *grab_button(manage(new class Gtk::Button(Gtk::StockID("Grab"))));
        grab_button->show();
@@ -81,36 +81,36 @@ Dialog_Gradient::Dialog_Gradient():
        add_action_widget(*apply_button,1);
        apply_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::on_apply_pressed));
        */
-       
+
        Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close"))));
        cancel_button->show();
        add_action_widget(*cancel_button,0);
-       cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::hide));  
+       cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Gradient::hide));
 
        Gtk::Table* table(manage(new Gtk::Table(2,2,false)));
        get_vbox()->pack_start(*table);
 
        widget_gradient=manage(new Widget_Gradient());
        widget_gradient->set_editable();
-       widget_gradient->signal_cpoint_selected().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_cpoint_selected));   
+       widget_gradient->signal_cpoint_selected().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_cpoint_selected));
        widget_gradient->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_changed));
-       //table->attach(*manage(new Gtk::Label(_("Not yet fully implemented"))), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);       
-       table->attach(*widget_gradient, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);        
+       //table->attach(*manage(new Gtk::Label(_("Not yet fully implemented"))), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       table->attach(*widget_gradient, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        widget_color=manage(new Widget_ColorEdit());
        widget_color->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_values_adjusted));
        widget_color->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_changed));
        widget_color->signal_activated().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_values_adjusted));
-       table->attach(*widget_color, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);   
+       table->attach(*widget_color, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
 
        spinbutton_pos=manage(new class Gtk::SpinButton(adjustment_pos,0.0001,4));
        spinbutton_pos->set_update_policy(Gtk::UPDATE_ALWAYS);
        adjustment_pos.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_values_adjusted));
        adjustment_pos.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Gradient::on_changed));
-       table->attach(*spinbutton_pos, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
+       table->attach(*spinbutton_pos, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+
 
-       
        add_accel_group(App::ui_manager()->get_accel_group());
 
        show_all_children();
@@ -184,7 +184,7 @@ Dialog_Gradient::edit(const synfigapp::ValueDesc &x, etl::handle<synfigapp::Canv
                set_gradient(x.get_value().get(Gradient()));
        else if(x.is_value_node())
                set_gradient((*x.get_value_node())(time).get(Gradient()));
-               
+
        signal_edited().connect(
                sigc::bind(
                        sigc::bind(
@@ -194,6 +194,6 @@ Dialog_Gradient::edit(const synfigapp::ValueDesc &x, etl::handle<synfigapp::Canv
                        x
                )
        );
-               
+
        present();
 }
index 572a83d..ff3a7d0 100644 (file)
@@ -63,11 +63,11 @@ namespace studio {
 
 class Widget_Gradient;
 class Widget_ColorEdit;
-       
+
 class Dialog_Gradient : public Gtk::Dialog
 {
        DialogSettings dialog_settings;
-       
+
        Gtk::SpinButton *spinbutton_pos;
 
        Gtk::Adjustment adjustment_pos;
@@ -76,11 +76,11 @@ class Dialog_Gradient : public Gtk::Dialog
        sigc::signal<void,synfig::Gradient> signal_edited_;
 
        sigc::connection value_changed_connection;
-       
+
        void on_ok_pressed();
        void on_apply_pressed();
        void on_grab_pressed();
-       
+
        void on_cpoint_selected(synfig::Gradient::CPoint x);
        void on_values_adjusted();
 
@@ -88,18 +88,18 @@ class Dialog_Gradient : public Gtk::Dialog
        Widget_ColorEdit* widget_color;
 
        void on_changed();
-       
+
 public:
 
        sigc::signal<void,synfig::Gradient>& signal_edited() { return signal_edited_; }
-       
+
        void set_gradient(const synfig::Gradient& x);
 
        const synfig::Gradient& get_gradient()const { return widget_gradient->get_value(); }
-               
+
        void reset();
 
-       
+
        Dialog_Gradient();
        ~Dialog_Gradient();
 
index 4dee4f7..1fb0784 100644 (file)
@@ -63,17 +63,17 @@ Dialog_Keyframe::Dialog_Keyframe(Gtk::Window& parent,handle<synfigapp::CanvasInt
                ok_button->show();
                add_action_widget(*ok_button,2);
                ok_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Keyframe::on_ok_pressed));
-       
+
 /*             Gtk::Button *apply_button(manage(new class Gtk::Button(Gtk::StockID("gtk-apply"))));
                apply_button->show();
                add_action_widget(*apply_button,1);
                apply_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Keyframe::on_apply_pressed));
-*/     
+*/
                Gtk::Button *delete_button(manage(new class Gtk::Button(Gtk::StockID("gtk-delete"))));
                delete_button->show();
                add_action_widget(*delete_button,3);
                delete_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Keyframe::on_delete_pressed));
-       
+
                Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close"))));
                cancel_button->show();
                add_action_widget(*cancel_button,0);
@@ -85,12 +85,12 @@ Dialog_Keyframe::Dialog_Keyframe(Gtk::Window& parent,handle<synfigapp::CanvasInt
        get_vbox()->pack_start(*table);
 
        entry_description.set_text("Not yet implemented");
-       
-       //table->attach(*manage(new Gtk::Label(_("Description"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);     
+
+       //table->attach(*manage(new Gtk::Label(_("Description"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        //table->attach(entry_description, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
 
        table->show_all();
-       
+
        widget_waypoint_model=Gtk::manage(new Widget_WaypointModel());
        widget_waypoint_model->show();
        table->attach(*widget_waypoint_model, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
@@ -118,16 +118,16 @@ Dialog_Keyframe::on_ok_pressed()
 {
        if(widget_waypoint_model->get_waypoint_model().is_trivial())
                return;
-       
+
        synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_waypoint_set"));
-       
+
        assert(action);
-       
-       action->set_param("canvas",canvas_interface->get_canvas());                     
-       action->set_param("canvas_interface",canvas_interface);                 
+
+       action->set_param("canvas",canvas_interface->get_canvas());
+       action->set_param("canvas_interface",canvas_interface);
        action->set_param("keyframe",keyframe_);
        action->set_param("model",widget_waypoint_model->get_waypoint_model());
-       
+
        if(!canvas_interface->get_instance()->perform_action(action))
        {
        }
index b1c65f1..f340c70 100644 (file)
@@ -50,11 +50,11 @@ class Dialog_Keyframe : public Gtk::Dialog
 {
        Gtk::Tooltips tooltips_;
        etl::handle<synfigapp::CanvasInterface> canvas_interface;
-       
+
        synfig::Keyframe keyframe_;
 
        Gtk::Entry entry_description;
-       
+
        Widget_WaypointModel* widget_waypoint_model;
 
        void on_ok_pressed();
@@ -71,7 +71,7 @@ public:
 private:
 
 }; // END of class RenderSettings
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index d1b9e15..3bb641e 100644 (file)
@@ -92,8 +92,8 @@ settings(this,"prevoptions")
 {
        //framerate = 15.0f;
        //zoom = 0.2f;
-       
-       //set the fps of the time widgets       
+
+       //set the fps of the time widgets
        Gtk::Alignment *dialogPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
        dialogPadding->set_padding(12, 12, 12, 12);
        get_vbox()->add(*dialogPadding);
@@ -109,7 +109,7 @@ settings(this,"prevoptions")
        Gtk::Alignment *generalPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
        generalPadding->set_padding(6, 0, 24, 0);
        generalFrame->add(*generalPadding);
-       
+
        Gtk::Table *generalTable = manage(new Gtk::Table(2, 2, false));
        generalTable->set_row_spacings(6);
        generalTable->set_col_spacings(12);
@@ -132,7 +132,7 @@ settings(this,"prevoptions")
        fpsSpinner->set_alignment(1);
        generalTable->attach(*fpsLabel, 0, 1, 1, 2, Gtk::SHRINK | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
        generalTable->attach(*fpsSpinner, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
-       
+
        Gtk::Frame *timeFrame = manage(new Gtk::Frame(_("Time Settings")));
        timeFrame->set_shadow_type(Gtk::SHADOW_NONE);
        ((Gtk::Label *) timeFrame->get_label_widget())->set_markup(_("<b>Time Settings</b>"));
@@ -146,7 +146,7 @@ settings(this,"prevoptions")
        timeTable->set_row_spacings(6);
        timeTable->set_col_spacings(12);
        timePadding->add(*timeTable);
-       
+
        check_overbegin.set_alignment(0, 0.5);
        check_overbegin.set_use_underline(TRUE);
        check_overend.set_alignment(0, 0.5);
@@ -157,10 +157,10 @@ settings(this,"prevoptions")
        timeTable->attach(time_begin, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
        timeTable->attach(check_overend, 0, 1, 1, 2, Gtk::SHRINK | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
        timeTable->attach(time_end, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0);
-       
+
        check_overbegin.signal_toggled().connect(sigc::mem_fun(*this,&Dialog_PreviewOptions::on_overbegin_toggle));
        check_overend.signal_toggled().connect(sigc::mem_fun(*this,&Dialog_PreviewOptions::on_overend_toggle));
-               
+
        Gtk::Button *cancelButton = manage(new Gtk::Button(Gtk::StockID("gtk-cancel")));
        cancelButton->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_PreviewOptions::on_cancel_pressed));
        add_action_widget(*cancelButton, 1);
@@ -169,7 +169,7 @@ settings(this,"prevoptions")
        okbutton->set_label(_("Preview"));
        okbutton->signal_clicked().connect(sigc::mem_fun(*this,&Dialog_PreviewOptions::on_ok_pressed));
        add_action_widget(*okbutton, 0);
-       
+
        time_begin.set_sensitive(false);
        time_end.set_sensitive(false);
        show_all();
@@ -188,7 +188,7 @@ void Dialog_PreviewOptions::on_ok_pressed()
        i.overend = get_end_override();
        if(i.overbegin) i.begintime = (float)get_begintime();
        if(i.overend)   i.endtime = (float)get_endtime();
-       
+
        hide();
        signal_finish_(i);
        signal_finish_.clear();
@@ -210,9 +210,9 @@ void Dialog_PreviewOptions::on_overend_toggle()
        time_end.set_sensitive(get_end_override());
 }
 
-void studio::Dialog_PreviewOptions::set_global_fps(float f) 
-{ 
-       globalfps = f; 
-       time_begin.set_fps(f); 
+void studio::Dialog_PreviewOptions::set_global_fps(float f)
+{
+       globalfps = f;
+       time_begin.set_fps(f);
        time_end.set_fps(f);
 }
index b65c121..5d6dd16 100644 (file)
@@ -55,9 +55,9 @@ class Dialog_Preview : public Gtk::Dialog
 {
        Widget_Preview  preview;
        DialogSettings  settings;
-       
+
        //etl::handle<synfig::Canvas> canvas;
-                       
+
 public:
        Dialog_Preview();
        ~Dialog_Preview();
@@ -73,29 +73,29 @@ public:
 
 class Dialog_PreviewOptions : public Gtk::Dialog
 {
-       //all the info needed to construct a render description...      
+       //all the info needed to construct a render description...
        Gtk::Adjustment adj_zoom;       // factor at which to resize the window...
-       
+
        Gtk::Adjustment adj_fps;        // how often to take samples of the animation
-       
+
        studio::Widget_Time time_begin;
        studio::Widget_Time time_end;
-                       
+
        Gtk::CheckButton check_overbegin;
        Gtk::CheckButton check_overend;
-       
+
        DialogSettings  settings;
-       
+
        float   globalfps;
-       
+
        // for finishing
        void on_ok_pressed();
        void on_cancel_pressed();
-       
+
        //for ui stuff
        void on_overbegin_toggle();
        void on_overend_toggle();
-       
+
        sigc::signal<void,const PreviewInfo &>  signal_finish_;
 public:
        Dialog_PreviewOptions();
@@ -103,25 +103,25 @@ public:
 
        float get_zoom() const { return adj_zoom.get_value(); }
        void set_zoom(float z) { adj_zoom.set_value(z); }
-       
+
        float get_fps() const { return adj_fps.get_value(); }
        void set_fps(float z) { adj_fps.set_value(z); }
-       
+
        float get_global_fps() const { return globalfps; }
        void set_global_fps(float f);
-       
+
        synfig::Time get_begintime() const { return time_begin.get_value(); }
        void set_begintime(const synfig::Time &t) { time_begin.set_value(t); }
-       
+
        synfig::Time get_endtime() const { return time_end.get_value(); }
        void set_endtime(const synfig::Time &t) { time_end.set_value(t); }
-       
+
        bool get_begin_override() const { return check_overbegin.get_active(); }
        void set_begin_override(bool o) { check_overbegin.set_active(o); }
-       
+
        bool get_end_override() const { return check_overend.get_active(); }
        void set_end_override(bool o) { check_overend.set_active(o); }
-       
+
        sigc::signal<void,const PreviewInfo &>  &signal_finish() {return signal_finish_;}
 };
 
index e1e7125..7a8a6f0 100644 (file)
@@ -93,41 +93,41 @@ Dialog_Setup::Dialog_Setup():
        Gtk::Table *gamma_table=manage(new Gtk::Table(2,2,false));
        notebook->append_page(*gamma_table,_("Gamma"));
        //gamma_frame->add(*gamma_table);
-       
-       gamma_table->attach(gamma_pattern, 0, 2, 0, 1, Gtk::EXPAND, Gtk::SHRINK|Gtk::FILL, 0, 0);       
+
+       gamma_table->attach(gamma_pattern, 0, 2, 0, 1, Gtk::EXPAND, Gtk::SHRINK|Gtk::FILL, 0, 0);
 
        Gtk::HScale* scale_gamma_r(manage(new Gtk::HScale(adj_gamma_r)));
-       gamma_table->attach(*manage(new Gtk::Label(_("Red"))), 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
-       gamma_table->attach(*scale_gamma_r, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
+       gamma_table->attach(*manage(new Gtk::Label(_("Red"))), 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       gamma_table->attach(*scale_gamma_r, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        adj_gamma_r.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_gamma_r_change));
-       
+
        Gtk::HScale* scale_gamma_g(manage(new Gtk::HScale(adj_gamma_g)));
-       gamma_table->attach(*manage(new Gtk::Label(_("Green"))), 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);       
-       gamma_table->attach(*scale_gamma_g, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
+       gamma_table->attach(*manage(new Gtk::Label(_("Green"))), 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       gamma_table->attach(*scale_gamma_g, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        adj_gamma_g.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_gamma_g_change));
 
        Gtk::HScale* scale_gamma_b(manage(new Gtk::HScale(adj_gamma_b)));
-       gamma_table->attach(*manage(new Gtk::Label(_("Blue"))), 0, 1, 3, 4, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);        
-       gamma_table->attach(*scale_gamma_b, 1, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
+       gamma_table->attach(*manage(new Gtk::Label(_("Blue"))), 0, 1, 3, 4, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       gamma_table->attach(*scale_gamma_b, 1, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        adj_gamma_b.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_gamma_b_change));
 
-       gamma_table->attach(*manage(new Gtk::Label(_("Black Level"))), 0, 1, 4, 5, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
-       gamma_table->attach(black_level_selector, 1, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);      
+       gamma_table->attach(*manage(new Gtk::Label(_("Black Level"))), 0, 1, 4, 5, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       gamma_table->attach(black_level_selector, 1, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        black_level_selector.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_black_level_change));
 
-       //gamma_table->attach(*manage(new Gtk::Label(_("Red-Blue Level"))), 0, 1, 5, 6, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
-       //gamma_table->attach(red_blue_level_selector, 1, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
+       //gamma_table->attach(*manage(new Gtk::Label(_("Red-Blue Level"))), 0, 1, 5, 6, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       //gamma_table->attach(red_blue_level_selector, 1, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        //red_blue_level_selector.signal_value_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_red_blue_level_change));
 
 
        // Misc
        Gtk::Table *misc_table=manage(new Gtk::Table(2,2,false));
        notebook->append_page(*misc_table,_("Misc."));
-       
+
        // Misc - Timestamp
        timestamp_menu=manage(new class Gtk::Menu());
-       misc_table->attach(*manage(new Gtk::Label(_("Timestamp"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
-       misc_table->attach(timestamp_optionmenu, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);       
+       misc_table->attach(*manage(new Gtk::Label(_("Timestamp"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       misc_table->attach(timestamp_optionmenu, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
 
 #define ADD_TIMESTAMP(desc,x)  \
        timestamp_menu->items().push_back(      \
@@ -149,7 +149,7 @@ Dialog_Setup::Dialog_Setup():
        ADD_TIMESTAMP("HHhMMmSSsFFf",Time::FORMAT_NORMAL|Time::FORMAT_NOSPACES|Time::FORMAT_FULL);
 
        timestamp_optionmenu.set_menu(*timestamp_menu);
-       
+
 #undef ADD_TIMESTAMP
 
        {
@@ -167,18 +167,18 @@ Dialog_Setup::Dialog_Setup():
                widget_enum=manage(new Widget_Enum());
                widget_enum->set_param_desc(param_desc);
 
-               misc_table->attach(*manage(new Gtk::Label(_("Unit System"))), 0, 1, 3, 4, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);  
-               misc_table->attach(*widget_enum, 1, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);       
+               misc_table->attach(*manage(new Gtk::Label(_("Unit System"))), 0, 1, 3, 4, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+               misc_table->attach(*widget_enum, 1, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        }
 
        // Misc - recent files
        Gtk::SpinButton* recent_files_spinbutton(manage(new Gtk::SpinButton(adj_recent_files,1,0)));
-       misc_table->attach(*manage(new Gtk::Label(_("Recent Files"))), 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
-       misc_table->attach(*recent_files_spinbutton, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);   
+       misc_table->attach(*manage(new Gtk::Label(_("Recent Files"))), 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+       misc_table->attach(*recent_files_spinbutton, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
 
        // Misc - use_colorspace_gamma
-       misc_table->attach(toggle_use_colorspace_gamma, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);        
-       
+       misc_table->attach(toggle_use_colorspace_gamma, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
+
        show_all_children();
 }
 
@@ -198,16 +198,16 @@ Dialog_Setup::on_apply_pressed()
 {
        App::gamma.set_all(1.0/adj_gamma_r.get_value(),1.0/adj_gamma_g.get_value(),1.0/adj_gamma_b.get_value(),black_level_selector.get_value(),red_blue_level_selector.get_value());
 
-       App::set_max_recent_files((int)adj_recent_files.get_value());   
-       
+       App::set_max_recent_files((int)adj_recent_files.get_value());
+
        // Set the time format
        App::set_time_format(get_time_format());
-       
+
        // Set the use_colorspace_gamma flag
        App::use_colorspace_gamma=toggle_use_colorspace_gamma.get_active();
 
        App::distance_system=Distance::System(widget_enum->get_value());
-       
+
        App::save_settings();
 }
 
@@ -255,12 +255,12 @@ Dialog_Setup::on_red_blue_level_change()
 void
 Dialog_Setup::refresh()
 {
-       adj_gamma_r.set_value(1.0/App::gamma.get_gamma_r());    
-       adj_gamma_g.set_value(1.0/App::gamma.get_gamma_g());    
-       adj_gamma_b.set_value(1.0/App::gamma.get_gamma_b());    
+       adj_gamma_r.set_value(1.0/App::gamma.get_gamma_r());
+       adj_gamma_g.set_value(1.0/App::gamma.get_gamma_g());
+       adj_gamma_b.set_value(1.0/App::gamma.get_gamma_b());
        black_level_selector.set_value(App::gamma.get_black_level());
        red_blue_level_selector.set_value(App::gamma.get_red_blue_level());
-       
+
        // Refresh the temporary gamma
        gamma_pattern.set_gamma_r(1.0/adj_gamma_r.get_value());
        gamma_pattern.set_gamma_g(1.0/adj_gamma_g.get_value());
@@ -268,14 +268,14 @@ Dialog_Setup::refresh()
        gamma_pattern.set_black_level(black_level_selector.get_value());
        gamma_pattern.set_red_blue_level(red_blue_level_selector.get_value());
        gamma_pattern.refresh();
-       
+
        adj_recent_files.set_value(App::get_max_recent_files());
-       
+
        // Refresh the time format
        set_time_format(App::get_time_format());
 
        widget_enum->set_value(App::distance_system);
-       
+
        // Refresh the status of the use_colorspace_gamma flag
        toggle_use_colorspace_gamma.set_active(App::use_colorspace_gamma);
 
@@ -288,7 +288,7 @@ GammaPattern::GammaPattern():
        set_size_request(tile_w*4,tile_h*3);
        signal_expose_event().connect(sigc::mem_fun(*this, &studio::GammaPattern::redraw));
 }
-       
+
 GammaPattern::~GammaPattern()
 {
 }
@@ -297,23 +297,23 @@ void
 GammaPattern::refresh()
 {
        black[0].set_rgb_p(
-               r_F32_to_F32(0.0),      
-               g_F32_to_F32(0.0),      
+               r_F32_to_F32(0.0),
+               g_F32_to_F32(0.0),
                b_F32_to_F32(0.0)
        );
        white[0].set_rgb_p(
-               r_F32_to_F32(1.0),      
-               g_F32_to_F32(1.0),      
+               r_F32_to_F32(1.0),
+               g_F32_to_F32(1.0),
                b_F32_to_F32(1.0)
        );
        gray50[0].set_rgb_p(
-               r_F32_to_F32(0.5),      
-               g_F32_to_F32(0.5),      
+               r_F32_to_F32(0.5),
+               g_F32_to_F32(0.5),
                b_F32_to_F32(0.5)
        );
        gray25[0].set_rgb_p(
-               r_F32_to_F32(0.25),     
-               g_F32_to_F32(0.25),     
+               r_F32_to_F32(0.25),
+               g_F32_to_F32(0.25),
                b_F32_to_F32(0.25)
        );
 
@@ -342,24 +342,24 @@ GammaPattern::redraw(GdkEventExpose*bleh)
        static const char hlines[] = { 3, 0 };
 
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
-       
+
        int i;
        Gdk::Color trueblack("#000000");
-       
+
        // 50% Pattern
        for(i=0;i<4;i++)
        {
                gc->set_rgb_fg_color(black[i]);
                get_window()->draw_rectangle(gc, true, i*tile_w, 0, tile_w, tile_h);
-       
+
                gc->set_stipple(Gdk::Bitmap::create(hlines,2,2));
                gc->set_fill(Gdk::STIPPLED);
                gc->set_rgb_fg_color(white[i]);
                get_window()->draw_rectangle(gc, true, i*tile_w, 0, tile_w, tile_h);
-       
+
                gc->set_fill(Gdk::SOLID);
                gc->set_rgb_fg_color(gray50[i]);
-       
+
                get_window()->draw_rectangle(gc, true, i*tile_w+tile_w/4, tile_h/4, tile_w-tile_w/2, tile_h-tile_h/2);
        }
 
@@ -368,15 +368,15 @@ GammaPattern::redraw(GdkEventExpose*bleh)
        {
                gc->set_rgb_fg_color(black[i]);
                get_window()->draw_rectangle(gc, true, i*tile_w, tile_h, tile_w, tile_h);
-       
+
                gc->set_stipple(Gdk::Bitmap::create(hlines,2,2));
                gc->set_fill(Gdk::STIPPLED);
                gc->set_rgb_fg_color(gray50[i]);
                get_window()->draw_rectangle(gc, true, i*tile_w, tile_h, tile_w, tile_h);
-       
+
                gc->set_fill(Gdk::SOLID);
                gc->set_rgb_fg_color(gray25[i]);
-       
+
                get_window()->draw_rectangle(gc, true, i*tile_w+tile_w/4, tile_h+tile_h/4, tile_w-tile_w/2, tile_h-tile_h/2);
        }
 
@@ -387,19 +387,19 @@ GammaPattern::redraw(GdkEventExpose*bleh)
        for(i=0;i<4;i++)
        {
                gc->set_rgb_fg_color(black[i]);
-       
+
                get_window()->draw_rectangle(gc, true, i*tile_w+tile_w/4, tile_h*2+tile_h/4, tile_w-tile_w/2, tile_h-tile_h/2);
        }
 
        return true;
 }
 
-       
+
 BlackLevelSelector::BlackLevelSelector()
 {
-       set_size_request(-1,24);        
+       set_size_request(-1,24);
        signal_expose_event().connect(sigc::mem_fun(*this, &studio::BlackLevelSelector::redraw));
-       
+
        add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
        add_events(Gdk::BUTTON1_MOTION_MASK);
        add_events(Gdk::BUTTON1_MOTION_MASK);
@@ -419,16 +419,16 @@ BlackLevelSelector::redraw(GdkEventExpose*bleh)
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
 
        int i;
-       
+
        // Draw the gradient
        for(i=0;i<w;i++)
        {
                color.set_rgb(i*65536/w,i*65536/w,i*65536/w);
-               
+
                gc->set_rgb_fg_color(color);
                get_window()->draw_rectangle(gc, true, i, 0, 1, h);
        }
-               
+
        // Draw a frame
        gc->set_rgb_fg_color(Gdk::Color("#000000"));
        get_window()->draw_rectangle(gc, false, 0, 0, w-1, h-1);
@@ -439,7 +439,7 @@ BlackLevelSelector::redraw(GdkEventExpose*bleh)
        get_window()->draw_rectangle(gc, true, i, 1, 1, h-1);
 
        // Print out the value
-       Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));         
+       Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
        layout->set_text(etl::strprintf("%0.01f%%",level*100.0f));
        layout->set_alignment(Pango::ALIGN_CENTER);
        gc->set_rgb_fg_color(Gdk::Color("#a00000"));
@@ -522,9 +522,9 @@ Dialog_Setup::set_time_format(Time::Format x)
 
 RedBlueLevelSelector::RedBlueLevelSelector()
 {
-       set_size_request(-1,24);        
+       set_size_request(-1,24);
        signal_expose_event().connect(sigc::mem_fun(*this, &studio::RedBlueLevelSelector::redraw));
-       
+
        add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
        add_events(Gdk::BUTTON1_MOTION_MASK);
        add_events(Gdk::BUTTON1_MOTION_MASK);
@@ -544,7 +544,7 @@ RedBlueLevelSelector::redraw(GdkEventExpose*bleh)
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
 
        int i;
-       
+
        // Draw the gradient
        for(i=0;i<w;i++)
        {
@@ -552,17 +552,17 @@ RedBlueLevelSelector::redraw(GdkEventExpose*bleh)
                float blue_red(2.0f-(red_blue));
                if(red_blue>1.0f)red_blue=1.0f;
                if(blue_red>1.0f)blue_red=1.0f;
-                       
+
                color.set_rgb(
                        round_to_int(min(red_blue,1.0f)*65535),
                        round_to_int(sqrt(min(red_blue,blue_red))*65535),
                        round_to_int(min(blue_red,1.0f)*65535)
                );
-               
+
                gc->set_rgb_fg_color(color);
                get_window()->draw_rectangle(gc, true, i, 0, 1, h);
        }
-               
+
        // Draw a frame
        gc->set_rgb_fg_color(Gdk::Color("#000000"));
        get_window()->draw_rectangle(gc, false, 0, 0, w-1, h-1);
@@ -573,7 +573,7 @@ RedBlueLevelSelector::redraw(GdkEventExpose*bleh)
        get_window()->draw_rectangle(gc, true, i, 1, 1, h-1);
 
        // Print out the value
-       Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));         
+       Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
        layout->set_text(etl::strprintf("%0.02f",level));
        layout->set_alignment(Pango::ALIGN_CENTER);
        gc->set_rgb_fg_color(Gdk::Color("#a00000"));
index 51b661e..8c9ef55 100644 (file)
@@ -65,11 +65,11 @@ class GammaPattern : public Gtk::DrawingArea
        float r_F32_to_F32(float x)const { float f((pow(x,gamma_r)*std::min(red_blue_level,1.0f)*(1.0f-black_level)+black_level)); if(f<0)f=0; if(f>1)f=1; return f; }
        float g_F32_to_F32(float x)const { float f((pow(x,gamma_g)*sqrt(std::min(2.0f-red_blue_level,red_blue_level))*(1.0f-black_level)+black_level)); if(f<0)f=0; if(f>1)f=1; return f; }
        float b_F32_to_F32(float x)const { float f((pow(x,gamma_b)*std::min(2.0f-red_blue_level,1.0f)*(1.0f-black_level)+black_level)); if(f<0)f=0; if(f>1)f=1; return f; }
-       
+
 public:
-       
+
        void refresh();
-       
+
        void set_gamma_r(float x) { gamma_r=x; }
        void set_gamma_g(float x) { gamma_g=x; };
        void set_gamma_b(float x) { gamma_b=x; };
@@ -81,9 +81,9 @@ public:
        float get_gamma_b()const { return gamma_b; }
        float get_black_level()const { return black_level; }
        float get_red_blue_level()const { return red_blue_level; }
-       
+
        GammaPattern();
-       
+
        ~GammaPattern();
 
        bool redraw(GdkEventExpose*bleh=NULL);
@@ -96,16 +96,16 @@ class BlackLevelSelector : public Gtk::DrawingArea
        sigc::signal<void> signal_value_changed_;
 
 public:
-       
+
        BlackLevelSelector();
-       
+
        ~BlackLevelSelector();
 
        sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
-       
+
        void set_value(float x) { level=x; queue_draw(); }
 
-       const float &get_value()const { return level; } 
+       const float &get_value()const { return level; }
 
        bool redraw(GdkEventExpose*bleh=NULL);
 
@@ -119,16 +119,16 @@ class RedBlueLevelSelector : public Gtk::DrawingArea
        sigc::signal<void> signal_value_changed_;
 
 public:
-       
+
        RedBlueLevelSelector();
-       
+
        ~RedBlueLevelSelector();
 
        sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
-       
+
        void set_value(float x) { level=x; queue_draw(); }
 
-       const float &get_value()const { return level; } 
+       const float &get_value()const { return level; }
 
        bool redraw(GdkEventExpose*bleh=NULL);
 
@@ -139,7 +139,7 @@ class Widget_Enum;
 
 class Dialog_Setup : public Gtk::Dialog
 {
-               
+
        void on_ok_pressed();
        void on_apply_pressed();
 
@@ -149,11 +149,11 @@ class Dialog_Setup : public Gtk::Dialog
        void on_black_level_change();
        void on_red_blue_level_change();
 
-       GammaPattern gamma_pattern;     
+       GammaPattern gamma_pattern;
        BlackLevelSelector black_level_selector;
        RedBlueLevelSelector red_blue_level_selector;
        Gtk::OptionMenu timestamp_optionmenu;
-       
+
        Gtk::Adjustment adj_gamma_r;
        Gtk::Adjustment adj_gamma_g;
        Gtk::Adjustment adj_gamma_b;
@@ -164,7 +164,7 @@ class Dialog_Setup : public Gtk::Dialog
        Gtk::CheckButton toggle_use_colorspace_gamma;
 
        synfig::Time::Format time_format;
-       
+
        Gtk::Menu *timestamp_menu;
        Widget_Enum *widget_enum;
 public:
@@ -172,7 +172,7 @@ public:
        void set_time_format(synfig::Time::Format time_format);
 
        const synfig::Time::Format& get_time_format()const { return time_format; }
-       
+
        Dialog_Setup();
        ~Dialog_Setup();
 
index 94f5928..0c015f8 100644 (file)
@@ -60,12 +60,12 @@ canvas_interface(ci)
        table->attach(soundfile,0,1,0,1);
        table->attach(offset,1,2,0,1);
        table->attach(okbutton,0,2,1,2);
-       
+
        table->show_all();
        get_vbox()->pack_start(*table);
-       
+
        offset.set_value(0);
-       
+
        okbutton.signal_clicked().connect(sigc::mem_fun(*this,&Dialog_SoundSelect::on_ok));
 }
 
@@ -86,7 +86,7 @@ void studio::Dialog_SoundSelect::on_offset()
 void studio::Dialog_SoundSelect::on_ok()
 {
        hide();
-               
+
        //signal_finish_(a);
        signal_file_changed_(soundfile.get_value());
        signal_offset_changed_(offset.get_value());
index d4ed658..1e7bfe2 100644 (file)
@@ -45,22 +45,22 @@ struct AudioBaseInfo
        std::string             file;
        synfig::Time            offset;
 };
-       
+
 class Dialog_SoundSelect : public Gtk::Dialog
 {
        Widget_Filename         soundfile;
        Widget_Time                     offset;
        Gtk::Button                     okbutton;
-       
+
        etl::handle<synfigapp::CanvasInterface> canvas_interface;
-       
+
        sigc::signal<void,const std::string &>  signal_file_changed_;
        sigc::signal<void,const synfig::Time &> signal_offset_changed_;
-       
+
        void on_file();
        void on_offset();
        void on_ok();
-       
+
 public:
        Dialog_SoundSelect(Gtk::Window &parent,etl::handle<synfigapp::CanvasInterface> ci );
        ~Dialog_SoundSelect();
@@ -70,14 +70,14 @@ public:
 
        synfig::Time get_offset() const { return offset.get_value(); }
        void set_offset(const synfig::Time &t) {offset.set_value(t); }
-       
+
        std::string get_file() const { return soundfile.get_value(); }
        void set_file(const std::string &f) {soundfile.set_value(f); }
-       
+
        sigc::signal<void,const std::string &> &signal_file_changed() { return signal_file_changed_; }
        sigc::signal<void,const synfig::Time &> &signal_offset_changed() { return signal_offset_changed_; }
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 85b37b2..0ad27d1 100644 (file)
@@ -56,11 +56,11 @@ Dialog_ToolOptions::Dialog_ToolOptions():
 {
        //scrolled_.add(sub_vbox_);
        //scrolled_.set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
-       //scrolled_.show();     
+       //scrolled_.show();
        //get_vbox()->pack_start(scrolled_);
 
        add(sub_vbox_);
-       
+
        set_widget(empty_label);
        empty_label.show();
 }
index fe39ca7..144c3af 100644 (file)
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 class Dialog_ToolOptions : public Dockable
-{              
+{
        Gtk::Label empty_label;
        Gtk::ScrolledWindow scrolled_;
        Gtk::VBox sub_vbox_;
-       
+
 public:
-               
+
        void clear();
        void set_widget(Gtk::Widget&);
        void set_name(const synfig::String& name);
index 640f752..36e063b 100644 (file)
@@ -85,7 +85,7 @@ Dialog_Waypoint::Dialog_Waypoint(Gtk::Window& parent,etl::handle<synfig::Canvas>
        add_action_widget(*cancel_button,0);
        cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Waypoint::hide));
 
-       
+
        waypointwidget->show_all();
 }
 
@@ -103,14 +103,14 @@ Dialog_Waypoint::on_ok_pressed()
 void
 Dialog_Waypoint::on_apply_pressed()
 {
-    signal_changed_(); 
+    signal_changed_();
 }
 
 void
 Dialog_Waypoint::on_delete_pressed()
 {
        hide();
-    signal_delete_();  
+    signal_delete_();
 }
 
 void
index c296db9..18f1bdf 100644 (file)
@@ -75,7 +75,7 @@ class Dialog_Waypoint : public Gtk::Dialog
        etl::handle<synfig::Canvas> canvas;
        synfig::ValueNode_Animated::WaypointList::iterator waypoint;
        synfigapp::ValueDesc value_desc_;
-               
+
        sigc::signal<void> signal_changed_;
 
        sigc::signal<void> signal_delete_;
index 51817d3..4c6b620 100644 (file)
@@ -116,8 +116,8 @@ DialogSettings::set_value(const synfig::String& key,const synfig::String& value)
 {
        if(value.empty())
                return false;
-       
-       if(key=="pos") 
+
+       if(key=="pos")
        {
                int x,y;
                if(!strscanf(value,"%d %d",&x, &y))
@@ -125,7 +125,7 @@ DialogSettings::set_value(const synfig::String& key,const synfig::String& value)
                window->move(x,y);
                return true;
        }
-       if(key=="size") 
+       if(key=="size")
        {
                int x,y;
                if(!strscanf(value,"%d %d",&x, &y))
@@ -133,7 +133,7 @@ DialogSettings::set_value(const synfig::String& key,const synfig::String& value)
                window->set_default_size(x,y);
                return true;
        }
-       if(key=="x") 
+       if(key=="x")
        {
                int x,y; window->get_position(x,y);
                x=atoi(value.c_str());
@@ -177,10 +177,10 @@ synfigapp::Settings::KeyList
 DialogSettings::get_key_list()const
 {
        synfigapp::Settings::KeyList ret(synfigapp::Settings::get_key_list());
-       
+
        ret.push_back("size");
        ret.push_back("pos");
        ret.push_back("visible");
-       
+
        return ret;
 }
index e1af84e..9b4631c 100644 (file)
@@ -57,7 +57,7 @@ Dock_Canvases::Dock_Canvases():
        App::signal_instance_deleted().connect(sigc::mem_fun(*this,&studio::Dock_Canvases::delete_instance));
        App::signal_instance_selected().connect(sigc::mem_fun(*this,&studio::Dock_Canvases::set_selected_instance_signal));
 
-       
+
        add(*create_canvas_tree());
 
 /*
@@ -113,7 +113,7 @@ Dock_Canvases::create_canvas_tree()
 //#ifdef NDEBUG
 //             column->add_attribute(icon_cellrenderer->property_pixbuf(), canvas_tree_model.icon);
 //#endif
-               
+
                canvas_tree->append_column(*column);
        }
        canvas_tree->set_rules_hint();
@@ -123,7 +123,7 @@ Dock_Canvases::create_canvas_tree()
        canvas_tree->add_events(Gdk::BUTTON1_MOTION_MASK);
        canvas_tree->show();
        canvas_tree->set_headers_visible(false);
-       
+
        Gtk::ScrolledWindow *scrolledwindow = manage(new class Gtk::ScrolledWindow());
        scrolledwindow->set_flags(Gtk::CAN_FOCUS);
        scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -190,7 +190,7 @@ Dock_Canvases::set_selected_instance(etl::loose_handle<studio::Instance> x)
        if (x==selected_instance)
                return;
 
-       set_selected_instance_(x);      
+       set_selected_instance_(x);
 }
 
 void
@@ -198,11 +198,11 @@ Dock_Canvases::new_instance(etl::handle<studio::Instance> instance)
 {
        if(studio::App::shutdown_in_progress)
                return;
-       
+
        assert(instance);
-       
+
        etl::loose_handle<studio::Instance> loose_instance(instance);
-       
+
        instance->synfigapp::Instance::signal_filename_changed().connect(sigc::mem_fun(*this,&Dock_Canvases::refresh_instances));
        instance->synfigapp::Instance::signal_filename_changed().connect(
                sigc::bind<etl::loose_handle<studio::Instance> >(
@@ -210,9 +210,9 @@ Dock_Canvases::new_instance(etl::handle<studio::Instance> instance)
                        loose_instance
                )
        );
-       
+
        present();
-       
+
 }
 
 void
index 201d81f..8dda5b7 100644 (file)
 namespace studio {
 
 class Dock_Canvases : public Dockable
-{      
+{
        Gtk::TreeView *canvas_tree;
        //Gtk::Menu     menu;
        etl::loose_handle<studio::Instance>     selected_instance;
 
 private:
-       
+
        void set_selected_instance_(etl::handle<studio::Instance> x);
 
        etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
@@ -66,7 +66,7 @@ private:
        void refresh_instances();
 
        bool close();
-       
+
        void on_row_activate(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *);
        //bool on_tree_event(GdkEvent *event);
 
index aa49bf8..6308425 100644 (file)
@@ -127,7 +127,7 @@ Dock_CanvasSpecific::init_canvas_view(CanvasView* canvas_view)
                                ),
                                false
                        )
-               )       
+               )
        );
        */
        synfig::info("%s init_canvas_view() Starting init...",get_local_name().c_str());
@@ -162,7 +162,7 @@ Dock_CanvasSpecific::canvas_view_changed()
                );
        }
 */
-       
+
 #ifdef _DEBUG
        synfig::info("%s canvas_view_changed: start",get_local_name().c_str());
 #endif
index 9792a20..5c872e2 100644 (file)
@@ -41,9 +41,9 @@ namespace studio {
 
 class CanvasView;
 class Instance;
-       
+
 class Dock_CanvasSpecific : public Dockable
-{              
+{
        SigC::Connection canvas_delete_connection;
 protected:
        virtual void init_instance_vfunc(etl::loose_handle<Instance> instance);
index 673349b..535a601 100644 (file)
@@ -93,7 +93,7 @@ Dock_Children::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
        children_tree->set_model(children_tree_store);
        children_tree->set_time_adjustment(canvas_view->time_adjustment());
 
-       
+
        canvas_view->set_tree_model(get_name(),children_tree_store);
        canvas_view->set_ext_widget(get_name(),children_tree);
 }
@@ -104,7 +104,7 @@ Dock_Children::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_vi
        if(canvas_view)
        {
                Gtk::Widget* tree_view(canvas_view->get_ext_widget(get_name()));
-       
+
                add(*tree_view);
                tree_view->show();
        }
index 7b6a47c..4698ae0 100644 (file)
@@ -41,7 +41,7 @@
 namespace studio {
 
 class Dock_Children : public Dock_CanvasSpecific
-{      
+{
 protected:
        virtual void init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
index 550e58b..cca1a85 100644 (file)
@@ -69,7 +69,7 @@ Dock_Curves::Dock_Curves():
 {
        last_widget_curves_=0;
        table_=0;
-       
+
        hscrollbar_=new Gtk::HScrollbar();
        vscrollbar_=new Gtk::VScrollbar();
        widget_timeslider_= new Widget_Timeslider();
@@ -93,17 +93,17 @@ _curve_selection_changed(Gtk::TreeView* param_tree_view,Widget_Curves* curves)
                curves->clear();
                return;
        }
-       
+
        std::list<synfigapp::ValueDesc> value_descs;
 
        //std::list<Gtk::TreePath> path_list(
        //param_tree_view->get_selection()->selected_foreach_iter(tmp);
        iter=param_tree_view->get_selection()->get_selected();
-       
+
        value_descs.push_back((*iter)[model.value_desc]);
        curves->set_value_descs(value_descs);
-       
-       //curves->set_value_descs(tmp.value_descs);     
+
+       //curves->set_value_descs(tmp.value_descs);
 }
 
 void
@@ -111,11 +111,11 @@ Dock_Curves::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
 {
        Widget_Curves* curves(new Widget_Curves());
        curves->set_time_adjustment(canvas_view->time_adjustment());
-       
+
        Gtk::TreeView* param_tree_view(
                static_cast<Gtk::TreeView*>(canvas_view->get_ext_widget("params"))
        );
-       
+
        param_tree_view->get_selection()->signal_changed().connect(
                sigc::bind(
                        sigc::bind(
@@ -125,7 +125,7 @@ Dock_Curves::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
                        ),param_tree_view
                )
        );
-       
+
        canvas_view->set_ext_widget(get_name(),curves);
 }
 
@@ -136,7 +136,7 @@ Dock_Curves::refresh_selected_param()
                static_cast<Gtk::TreeView*>(get_canvas_view()->get_ext_widget(get_name()))
        );
        Gtk::TreeModel::iterator iter(tree_view->get_selection()->get_selected());
-       
+
        if(iter)
        {
                LayerParamTreeStore::Model model;
@@ -164,7 +164,7 @@ Dock_Curves::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view
                table_=0;
        }
 
-       
+
        if(canvas_view)
        {
                last_widget_curves_=dynamic_cast<Widget_Curves*>(
@@ -183,7 +183,7 @@ Dock_Curves::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view
                table_->attach(*hscrollbar_, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK);
                table_->attach(*vscrollbar_, 1, 2, 0, 2, Gtk::FILL|Gtk::SHRINK, Gtk::FILL|Gtk::EXPAND);
                add(*table_);
-               
+
                //add(*last_widget_curves_);
                last_widget_curves_->show();
                table_->show_all();
index 8dcaf81..88fe6d0 100644 (file)
@@ -44,16 +44,16 @@ namespace studio {
 
 class Widget_Curves;
 class Widget_Timeslider;
-       
+
 class Dock_Curves : public Dock_CanvasSpecific
-{      
+{
        Gtk::Table* table_;
        Gtk::HScrollbar* hscrollbar_;
        Gtk::VScrollbar* vscrollbar_;
-       
+
        Widget_Timeslider* widget_timeslider_;
        Widget_Curves* last_widget_curves_;
-       
+
 protected:
        virtual void init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
index af43e04..1c0f2d8 100644 (file)
@@ -68,7 +68,7 @@ Dock_History::Dock_History():
 {
        App::signal_instance_deleted().connect(sigc::mem_fun(*this,&studio::Dock_History::delete_instance));
        App::signal_instance_selected().connect(sigc::mem_fun(*this,&studio::Dock_History::set_selected_instance_signal));
-       
+
        action_group->add(Gtk::Action::create(
                "clear-undo",
                Gtk::StockID("synfig-clear_undo"),
@@ -97,7 +97,7 @@ Dock_History::Dock_History():
                _("Undo previous action"),
                _("Undo previous action")
        ),
-               sigc::ptr_fun(studio::App::undo)        
+               sigc::ptr_fun(studio::App::undo)
        );
        action_group->add(Gtk::Action::create(
                "redo",
@@ -105,7 +105,7 @@ Dock_History::Dock_History():
                _("Redo previous action"),
                _("Redo previous action")
        ),
-               sigc::ptr_fun(studio::App::redo)        
+               sigc::ptr_fun(studio::App::redo)
        );
 
        action_group->add( Gtk::Action::create("toolbar-history", "History") );
@@ -126,9 +126,9 @@ Dock_History::Dock_History():
 
        action_group->set_sensitive(false);
 
-       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-history")));   
+       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-history")));
        add(*create_action_tree());
-       
+
        /*
        add_button(
                Gtk::StockID("synfig-clear_undo"),
@@ -173,23 +173,23 @@ Dock_History::create_action_tree()
 
                Gtk::CellRendererToggle* toggle_cr = Gtk::manage( new Gtk::CellRendererToggle() );
                toggle_cr->signal_toggled().connect(sigc::mem_fun(*this, &studio::Dock_History::on_action_toggle) );
-               
+
                column->pack_start(*toggle_cr); //false = don't expand.
                column->add_attribute(toggle_cr->property_active(),history_tree_model.is_active);
                column->set_resizable();
                column->set_clickable();
-                               
+
                action_tree->append_column(*column);
        }
        /*{
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column("Canvas") );
                Gtk::CellRendererText *text_cr=Gtk::manage(new Gtk::CellRendererText());
                text_cr->property_foreground()=Glib::ustring("#7f7f7f");
-               
+
                column->pack_start(*text_cr);
                column->add_attribute(text_cr->property_text(),history_tree_model.canvas_id);
                column->add_attribute(text_cr->property_foreground_set(),history_tree_model.is_redo);
-                               
+
                action_tree->append_column(*column);
        }*/
        {
@@ -197,13 +197,13 @@ Dock_History::create_action_tree()
 
                Gtk::CellRendererText* cell_renderer_jump=Gtk::manage(new Gtk::CellRendererText());
                column->pack_start(*cell_renderer_jump,true);
-               
+
                cell_renderer_jump->property_text()="(JMP)";
                cell_renderer_jump->property_foreground()="#003a7f";
-               
+
                column->set_resizable();
                column->set_clickable();
-               
+
                column->set_sort_column_id(COLUMNID_JUMP);
 
                action_tree->append_column(*column);
@@ -215,17 +215,17 @@ Dock_History::create_action_tree()
                Gtk::CellRendererText *text_cr=Gtk::manage(new Gtk::CellRendererText());
                text_cr->property_foreground()=Glib::ustring("#7f7f7f");
 
-               
+
 
                //column->pack_start(history_tree_model.icon, false); //false = don't expand.
                column->pack_start(*text_cr);
                column->add_attribute(text_cr->property_text(),history_tree_model.name);
                column->add_attribute(text_cr->property_foreground_set(),history_tree_model.is_redo);
-                               
+
                action_tree->append_column(*column);
        }
 
-       
+
        action_tree->set_rules_hint();
 //     action_tree->signal_row_activated().connect(sigc::mem_fun(*this,&Dock_History::on_row_activate));
        action_tree->signal_event().connect(sigc::mem_fun(*this,&Dock_History::on_action_event));
@@ -255,7 +255,7 @@ void
 Dock_History::clear_undo()
 {
        if(selected_instance && App::dialog_yes_no(_("Clear History"), _("You will not be able to undo any changes that you have made!\nAre you sure you want to clear the undo stack?")))
-       {               
+       {
                selected_instance->clear_undo_stack();
        }
 }
@@ -264,7 +264,7 @@ void
 Dock_History::clear_redo()
 {
        if(selected_instance && App::dialog_yes_no(_("Clear History"), _("You will not be able to redo any changes that you have made!\nAre you sure you want to clear the redo stack?")))
-       {               
+       {
                selected_instance->clear_redo_stack();
        }
 }
@@ -322,7 +322,7 @@ Dock_History::set_selected_instance(etl::loose_handle<studio::Instance> x)
 
        std::list<etl::handle<studio::Instance> >::iterator iter;
 
-       set_selected_instance_(x);      
+       set_selected_instance_(x);
 }
 
 void
@@ -357,7 +357,7 @@ Dock_History::on_action_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(action_tree->get_model()->get_iter(path));
-                       
+
                        //signal_user_click()(event->button.button,row,(ColumnID)column->get_sort_column_id());
                        if((ColumnID)column->get_sort_column_id()==COLUMNID_JUMP)
                        {
@@ -382,7 +382,7 @@ Dock_History::on_action_event(GdkEvent *event)
                                }
                        }
                }
-               
+
        case GDK_BUTTON_RELEASE:
                break;
        default:
@@ -397,10 +397,10 @@ Dock_History::on_action_toggle(const Glib::ustring& path_string)
        studio::HistoryTreeStore::Model history_tree_model;
 
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(selected_instance->history_tree_store()->get_iter(path));
 
        handle<synfigapp::Action::Undoable> action=row[history_tree_model.action];
-       
+
        selected_instance->synfigapp::Instance::set_action_status(action,!action->is_active());
 }
index 253022f..ba7c387 100644 (file)
@@ -42,7 +42,7 @@
 namespace studio {
 
 class Dock_History : public Dock_CanvasSpecific
-{      
+{
        Glib::RefPtr<Gtk::ActionGroup> action_group;
        Gtk::TreeView *action_tree;
 
@@ -69,7 +69,7 @@ public:
        void on_action_toggle(const Glib::ustring& path);
 
        void update_undo_redo();
-       
+
        Dock_History();
        ~Dock_History();
 protected:
index c827967..744e861 100644 (file)
@@ -64,28 +64,28 @@ using namespace synfig;
 void studio::Dock_Info::on_mouse_move()
 {
        Point pos = get_canvas_view()->work_area->get_cursor_pos();
-       
-       Distance xv(pos[0],Distance::SYSTEM_UNITS); 
+
+       Distance xv(pos[0],Distance::SYSTEM_UNITS);
        xv.convert(App::distance_system, get_canvas_view()->get_canvas()->rend_desc());
-       
-       Distance yv(pos[1],Distance::SYSTEM_UNITS); 
+
+       Distance yv(pos[1],Distance::SYSTEM_UNITS);
        yv.convert(App::distance_system, get_canvas_view()->get_canvas()->rend_desc());
-       
+
        //get the color and set the labels
-       
-       x.set_text(xv.get_string(3));   
+
+       x.set_text(xv.get_string(3));
        y.set_text(yv.get_string(3));
-       
+
        Color c = get_canvas_view()->get_canvas()->get_context().get_color(pos);
        float cr = c.get_r(),cg = c.get_g(), cb = c.get_b();
-       
+
        if(use_colorspace_gamma())
        {
                cr = gamma_in(cr);
                cg = gamma_in(cg);
-               cb = gamma_in(cb);              
+               cb = gamma_in(cb);
        }
-       
+
        r.set_text(strprintf("%.1f%%",cr*100));
        g.set_text(strprintf("%.1f%%",cg*100));
        b.set_text(strprintf("%.1f%%",cb*100));
@@ -96,36 +96,36 @@ studio::Dock_Info::Dock_Info()
 :Dock_CanvasSpecific("info",_("Info"),Gtk::StockID("synfig-info"))
 {
        set_use_scrolled(false);
-       
+
        Gtk::Table *table = manage(new Gtk::Table);
-       
+
        //pos labels
        table->attach(*manage(new Gtk::Label(_("X: "))),0,1,0,2,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(*manage(new Gtk::Label(_("Y: "))),0,1,2,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        //pos
        table->attach(x,1,2,0,2,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(y,1,2,2,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        //seperator
        table->attach(*manage(new Gtk::VSeparator),2,3,0,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        //color label
        table->attach(*manage(new Gtk::Label(_("R: "))),3,4,0,1,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(*manage(new Gtk::Label(_("G: "))),3,4,1,2,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(*manage(new Gtk::Label(_("B: "))),3,4,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(*manage(new Gtk::Label(_("A: "))),3,4,3,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        //color
        table->attach(r,4,5,0,1,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(g,4,5,1,2,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(b,4,5,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        table->attach(a,4,5,3,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        table->attach(*manage(new Gtk::Label),0,5,4,5);
-       
+
        table->show_all();
-       
+
        add(*table);
 }
 
@@ -136,7 +136,7 @@ studio::Dock_Info::~Dock_Info()
 void studio::Dock_Info::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
 {
        mousecon.disconnect();
-       
+
        if(canvas_view && canvas_view->get_work_area())
        {
                mousecon = get_canvas_view()->work_area->signal_cursor_moved().connect(sigc::mem_fun(*this,&Dock_Info::on_mouse_move));
index 28a6fc4..390a973 100644 (file)
@@ -43,21 +43,21 @@ class Dock_Info : public Dock_CanvasSpecific
 {
        //bool                  valid;
        //synfig::Point pos;
-       
+
        Gtk::Label  r,g,b,a;
        Gtk::Label      x,y;
-       
-       SigC::Connection mousecon;      
-       
-       void on_mouse_move();   
-               
+
+       SigC::Connection mousecon;
+
+       void on_mouse_move();
+
 public:
        Dock_Info();
        ~Dock_Info();
 
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 9fff10a..a17c2dd 100644 (file)
@@ -112,7 +112,7 @@ Dock_Keyframes::Dock_Keyframes():
 
        App::ui_manager()->add_ui_from_string(ui_info);
 
-       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-keyframe")));  
+       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-keyframe")));
 }
 
 Dock_Keyframes::~Dock_Keyframes()
@@ -169,10 +169,10 @@ Dock_Keyframes::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_v
        if(canvas_view)
        {
                Gtk::Widget* tree_view(canvas_view->get_ext_widget(get_name()));
-       
+
                add(*tree_view);
                tree_view->show();
-               
+
                keyframe_action_manager->set_keyframe_tree(dynamic_cast<KeyframeTree*>(canvas_view->get_ext_widget(get_name())));
                keyframe_action_manager->set_canvas_interface(canvas_view->canvas_interface());
                keyframe_action_manager->refresh();
@@ -180,7 +180,7 @@ Dock_Keyframes::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_v
        else
        {
                clear_previous();
-               
+
                keyframe_action_manager->set_keyframe_tree(0);
                keyframe_action_manager->set_canvas_interface(0);
                keyframe_action_manager->refresh();
index 68a55a4..cf3f182 100644 (file)
@@ -45,9 +45,9 @@ class KeyframeTreeStore;
 class KeyframeTree;
 
 class KeyframeActionManager;
-       
+
 class Dock_Keyframes : public Dock_CanvasSpecific
-{      
+{
        Glib::RefPtr<Gtk::ActionGroup> action_group;
 
        /*
@@ -55,11 +55,11 @@ class Dock_Keyframes : public Dock_CanvasSpecific
        void duplicate_keyframe_pressed();
        void delete_keyframe_pressed();
        */
-       
+
        void show_keyframe_properties();
-       
+
        KeyframeActionManager* keyframe_action_manager;
-       
+
 protected:
        virtual void init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
index 6c65bf9..48b5392 100644 (file)
@@ -66,7 +66,7 @@ Dock_LayerGroups::Dock_LayerGroups():
        Dock_CanvasSpecific("groups",_("Groups"),Gtk::StockID("synfig-group")),
        action_group_group_ops(Gtk::ActionGroup::create()),
        group_action_manager(new GroupActionManager)
-{      
+{
        group_action_manager->set_ui_manager(App::ui_manager());
 
        action_group_group_ops->add( Gtk::Action::create("toolbar-groups", "Group Ops") );
@@ -74,7 +74,7 @@ Dock_LayerGroups::Dock_LayerGroups():
        action_group_add=Gtk::Action::create("action-group_add", Gtk::Stock::ADD,_("Add a New Group"),_("Add a New Group"));
        action_group_group_ops->add(action_group_add);
        action_group_add->set_sensitive(false);
-       
+
        App::ui_manager()->insert_action_group(action_group_group_ops);
 
     Glib::ustring ui_info =
@@ -88,7 +88,7 @@ Dock_LayerGroups::Dock_LayerGroups():
 
        App::ui_manager()->add_ui_from_string(ui_info);
 
-       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-groups")));    
+       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-groups")));
 }
 
 Dock_LayerGroups::~Dock_LayerGroups()
@@ -116,17 +116,17 @@ Dock_LayerGroups::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas
        if(canvas_view)
        {
                Gtk::Widget* tree_view(canvas_view->get_ext_widget(get_name()));
-       
+
                add(*tree_view);
                tree_view->show();
-               
+
                group_action_manager->set_group_tree(dynamic_cast<LayerGroupTree*>(tree_view));
                group_action_manager->set_canvas_interface(canvas_view->canvas_interface());
                group_action_manager->refresh();
        }
        else
        {
-               clear_previous();               
+               clear_previous();
                group_action_manager->clear();
                group_action_manager->set_canvas_interface(0);
                group_action_manager->set_group_tree(0);
index c52303a..f178e62 100644 (file)
@@ -44,9 +44,9 @@ namespace Gtk { class HScale; }
 namespace studio {
 
 class GroupActionManager ;
-       
+
 class Dock_LayerGroups : public Dock_CanvasSpecific
-{      
+{
        Glib::RefPtr<Gtk::ActionGroup> action_group_group_ops;
        Glib::RefPtr<Gtk::Action> action_group_add;
 
index 0402c3c..1df60b8 100644 (file)
@@ -76,7 +76,7 @@ Dock_Layers::Dock_Layers():
 
        action_group_new_layers=Gtk::ActionGroup::create();
        action_group_layer_ops=Gtk::ActionGroup::create();
-       
+
        std::map<synfig::String,synfig::String> category_map;
 
        // Build layer creation actions
@@ -84,10 +84,10 @@ Dock_Layers::Dock_Layers():
        for(iter=synfig::Layer::book().begin();iter!=synfig::Layer::book().end();++iter)
        {
                synfig::Layer::Book::value_type lyr(*iter);
-               
+
                if(lyr.second.category==_("Do Not Use"))
                        continue;
-               
+
                action_group_new_layers->add(Gtk::Action::create(
                        strprintf("layer-new-%s",lyr.first.c_str()),
                        layer_icon(lyr.first.c_str()),
@@ -102,15 +102,15 @@ Dock_Layers::Dock_Layers():
                );
 
                category_map[lyr.second.category]+=strprintf("<menuitem action='layer-new-%s' />",lyr.first.c_str());
-       
+
                //(*category_map)[lyr.second.category]->items().push_back(Gtk::Menu_Helpers::MenuElem(lyr.second.local_name,
                //));
        }
-       
+
        {
                Glib::RefPtr<Gtk::ActionGroup> action_group_categories(Gtk::ActionGroup::create("layer-category"));
                synfig::String layer_ui_info;
-               
+
                layer_ui_info+="<ui><menubar action='menu-main'><menu action='menu-layer'><menu action='menu-layer-new'>";
 
                std::map<synfig::String,synfig::String>::iterator iter;
@@ -121,13 +121,13 @@ Dock_Layers::Dock_Layers():
                }
 
                layer_ui_info+="</menu></menu></menubar></ui>";
-               
+
                App::ui_manager()->insert_action_group(action_group_categories);
                App::ui_manager()->insert_action_group(action_group_new_layers);
                App::ui_manager()->add_ui_from_string(layer_ui_info);
        }
-       
-       
+
+
        action_group_layer_ops->add( Gtk::Action::create("toolbar-layer", "Layer Ops") );
        App::ui_manager()->insert_action_group(action_group_layer_ops);
 
@@ -150,7 +150,7 @@ Dock_Layers::Dock_Layers():
 
        action_group_new_layers->set_sensitive(false);
 
-       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-layer")));     
+       set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-layer")));
 
 
 
@@ -162,21 +162,21 @@ Dock_Layers::Dock_Layers():
 
        {
                sigc::signal<void> tmp_signal;
-               
+
                tmp_signal.connect(
                        sigc::bind(
                                sigc::ptr_fun(do_nothing),
                                ref_count
                        )
                );
-               
+
        synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count());
                tmp_signal();
        synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count());
-               
+
                tmp_signal.clear();
        synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count());
-               
+
                tmp_signal();
        synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count());
                tmp_signal.connect(
@@ -188,7 +188,7 @@ Dock_Layers::Dock_Layers():
        synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count());
        }
        synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count());
-       assert(ref_count.count()==1);   
+       assert(ref_count.count()==1);
        */
 }
 
@@ -240,7 +240,7 @@ Dock_Layers::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view
        if(canvas_view)
        {
                Gtk::Widget* tree_view(canvas_view->get_ext_widget(get_name()));
-       
+
                add(*tree_view);
                tree_view->show();
                action_group_new_layers->set_sensitive(true);
@@ -260,8 +260,8 @@ Dock_Layers::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view
                        layer_action_manager->set_canvas_interface(0);
                        layer_action_manager->set_layer_tree(0);
                }
-               
-               clear_previous();               
+
+               clear_previous();
        }
 }
 
index 719d529..ff47397 100644 (file)
@@ -47,14 +47,14 @@ namespace studio {
 class LayerActionManager;
 
 class Dock_Layers : public Dock_CanvasSpecific
-{      
+{
        Glib::RefPtr<Gtk::ActionGroup> action_group_new_layers;
        Glib::RefPtr<Gtk::ActionGroup> action_group_layer_ops;
-       
+
        Gtk::HScale *layer_amount_hscale;
 
        LayerActionManager* layer_action_manager;
-       
+
 protected:
        virtual void init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
index cf2a810..8eb536d 100644 (file)
@@ -63,11 +63,11 @@ Dock_MetaData::Dock_MetaData():
        tree_view(manage(new Gtk::TreeView()))
 {
        MetaDataTreeStore::Model model;
-       
+
        tree_view->append_column(_("Key"),model.key);
        tree_view->append_column_editable(_("Data"),model.data);
        tree_view->set_rules_hint();
-       
+
        Gtk::ScrolledWindow *scrolledwindow = manage(new class Gtk::ScrolledWindow());
        scrolledwindow->set_flags(Gtk::CAN_FOCUS);
        scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
index 115801d..96b2527 100644 (file)
@@ -42,21 +42,21 @@ namespace studio {
 
 class CanvasView;
 class Instance;
-       
+
 class Dock_MetaData : public Dock_CanvasSpecific
-{      
+{
 
        Gtk::TreeView *tree_view;
-       
+
 
        void on_add_pressed();
        void on_delete_pressed();
 
 protected:
-       
+
        virtual void init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
-       
+
 public:
 
 
index b1b2c98..2e1947a 100644 (file)
@@ -69,45 +69,45 @@ scrolling(false),
 surface(new synfig::Surface)
 {
        attach(drawto,0,4,0,1);
-       
+
        attach(*manage(new Gtk::HSeparator),0,4,1,2,Gtk::SHRINK|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        //zooming stuff
        attach(zoom_print,0,1,2,3,Gtk::SHRINK|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
        zoom_print.set_size_request(40,-1);
-       
+
        Gtk::HScale *s = manage(new Gtk::HScale(adj_zoom));
        s->set_draw_value(false);
        //s->set_update_policy(Gtk::UPDATE_DELAYED);
        //s->signal_event().connect(sigc::mem_fun(*this,&Dock_Navigator::on_scroll_event));
        attach(*s,1,4,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-               
+
        show_all();
-       
+
        adj_zoom.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_NavView::on_number_modify));
-       
+
        if(cv)
        {
                drawto.signal_expose_event().connect(sigc::mem_fun(*this,&Widget_NavView::on_expose_draw));
                drawto.signal_event().connect(sigc::mem_fun(*this,&Widget_NavView::on_mouse_event));
-               
+
                drawto.add_events(Gdk::BUTTON_MOTION_MASK|Gdk::BUTTON_PRESS_MASK);
-               
+
                //get_canvas_view()->canvas_interface()->signal_dirty_preview()
                //                              .connect(sigc::mem_fun(*this,&Widget_NavView::on_dirty_preview));
                get_canvas_view()->work_area->signal_rendering()
                                                .connect(sigc::mem_fun(*this,&Widget_NavView::on_dirty_preview));
-               
+
                get_canvas_view()->work_area->signal_view_window_changed()
                                                .connect(sigc::mem_fun(*this,&Widget_NavView::on_workarea_view_change));
-               
+
                //update with this canvas' view
                on_workarea_view_change();
-                               
+
                dirty = true;
                queue_draw();
        }
-       
+
        adj_zoom.set_value(0);
 }
 
@@ -128,42 +128,42 @@ void studio::Widget_NavView::on_start_render()
                //synfig::warning("Nav: Starting render");
                //synfig::warning("Nav: Rendering canvas");
                etl::handle<Target_Scanline>    targ = surface_target(surface.get());
-               
+
                targ->set_canvas(get_canvas_view()->get_canvas());
                targ->set_remove_alpha();
                targ->set_avoid_time_sync();
                targ->set_quality(get_canvas_view()->get_work_area()->get_quality());
                //synfig::info("Set the quality level to: %d", get_canvas_view()->get_work_area()->get_quality());
-               
+
                //this should set it to render a single frame
                RendDesc        r = get_canvas_view()->get_canvas()->rend_desc();
                r.set_time(get_canvas_view()->canvas_interface()->get_time());
-               
+
                //this changes the size of the canvas to the closest thing we can find
                int sw = r.get_w(), sh = r.get_h();
-               
+
                //synfig::warning("Nav: source image is %d x %d", sw,sh);
-               
+
                //resize so largest dimension is 128
                int dw = sw > sh ? 128 : sw*128/sh,
                        dh = sh > sw ? 128 : sh*128/sw;
-               
+
                //synfig::warning("Nav: dest image is %d x %d", dw,dh);
-               
+
                r.set_w(dw);
                r.set_h(dh);
 
                //get the pw and ph
                //float pw = r.get_pw();
                //float ph = r.get_ph();
-               
+
                //synfig::warning("Nav: pixel size is %f x %f", pw,ph);
-               
+
                //this renders that single frame
                targ->set_rend_desc(&r);
-               
+
                //synfig::warning("Nav: Building async renderer and starting it...");
-               
+
                renderer = new AsyncRenderer(targ);
                renderer->signal_success().connect(sigc::mem_fun(*this,&Widget_NavView::on_finish_render));
                renderer->start();
@@ -175,9 +175,9 @@ void studio::Widget_NavView::on_finish_render()
 {
        //convert it into our pixmap
        PixelFormat pf(PF_RGB);
-       
+
        //synfig::warning("Nav: It hath succeeded!!!");
-       
+
        //assert(renderer && renderer->has_success());
        DEBUGPOINT();
        //synfig::warning("Nav: now we know it really succeeded");
@@ -186,31 +186,31 @@ void studio::Widget_NavView::on_finish_render()
                synfig::warning("dock_navigator: Bad surface");
                return;
        }
-       
+
        int w = 0, h = 0;
        int dw = surface->get_w();
        int dh = surface->get_h();
-       
+
        if(prev)
        {
                w = prev->get_width();
                h = prev->get_height();
        }
-       
+
        if(w != dw || h != dh || !prev)
        {
                const int total_bytes(dw*dh*synfig::channels(pf));
-               
+
                //synfig::warning("Nav: Updating the pixbuf to be the right size, etc. (%d bytes)", total_bytes);
-               
+
                prev.clear();
                guint8 *bytes = new guint8[total_bytes]; //24 bits per pixel
-               
+
                //convert into our buffered dataS
                //synfig::warning("Nav: converting color format into buffer");
                convert_color_format((unsigned char *)bytes, (*surface)[0], dw*dh, pf, App::gamma);
-               
-               prev = 
+
+               prev =
                Gdk::Pixbuf::create_from_data(
                        bytes,  // pointer to the data
                        Gdk::COLORSPACE_RGB, // the colorspace
@@ -232,7 +232,7 @@ void studio::Widget_NavView::on_finish_render()
                        convert_color_format((unsigned char *)prev->get_pixels(), (*surface)[0], dw*dh, pf, App::gamma);
                }
        }
-       queue_draw();   
+       queue_draw();
 }
 
 /*     zoom slider is on exponential scale
@@ -260,41 +260,41 @@ bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *exp)
        //print out the zoom
        //HACK kind of...
        //zoom_print.set_text(strprintf("%.1f%%",100*unit_to_zoom(adj_zoom.get_value())));
-       
+
        //draw the good stuff
        on_start_render();
-       
+
        //if we've got a preview etc. display it...
        if(get_canvas_view() && prev)
        {
                //axis transform from units to pixel coords
                float xaxis = 0, yaxis = 0;
-               
+
                int canvw = get_canvas_view()->get_canvas()->rend_desc().get_w();
                //int canvh = get_canvas_view()->get_canvas()->rend_desc().get_h();
-               
+
                float pw = get_canvas_view()->get_canvas()->rend_desc().get_pw();
                float ph = get_canvas_view()->get_canvas()->rend_desc().get_ph();
-               
+
                int w = prev->get_width();
                int h = prev->get_height();
-                               
+
                //scale up/down to the nearest pixel ratio...
                //and center in center
                int offx=0, offy=0;
-               
+
                float sx, sy;
                int nw,nh;
-               
+
                sx = drawto.get_width() / (float)w;
                sy = drawto.get_height() / (float)h;
-               
+
                //synfig::warning("Nav redraw: now to scale the bitmap: %.3f x %.3f",sx,sy);
-               
+
                //round to smallest scale (fit entire thing in window without distortion)
                if(sx > sy) sx = sy;
                //else sy = sx;
-               
+
                //scaling and stuff
                // the point to navpixel space conversion should be:
                //              (navpixels / canvpixels) * (canvpixels / canvsize)
@@ -302,24 +302,24 @@ bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *exp)
                xaxis = sx * w / (float)canvw;
                yaxis = xaxis/ph;
                xaxis /= pw;
-               
+
                //scale to a new pixmap and then copy over to the window
                nw = (int)(w*sx);
                nh = (int)(h*sx);
-               
+
                //must now center to be cool
                offx = (drawto.get_width() - nw)/2;
                offy = (drawto.get_height() - nh)/2;
-               
+
                //trivial escape
                if(nw == 0 || nh == 0)return true;
-                                                       
+
                //draw to drawing area
                Glib::RefPtr<Gdk::GC>   gc = Gdk::GC::create(drawto.get_window());
-               
+
                //synfig::warning("Nav: Scaling pixmap to off (%d,%d) with size (%d,%d)", offx,offy,nw, nh);
                Glib::RefPtr<Gdk::Pixbuf> scalepx = prev->scale_simple(nw,nh,Gdk::INTERP_NEAREST);
-               
+
                //synfig::warning("Nav: Drawing scaled bitmap");
                drawto.get_window()->draw_pixbuf(
                        gc, //GC
@@ -330,18 +330,18 @@ bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *exp)
                        Gdk::RGB_DITHER_MAX, // RgbDither
                        2, 2 // Dither offset X and Y
                );
-                               
+
                //draw fancy red rectangle around focus point
                const Point &wtl = get_canvas_view()->work_area->get_window_tl(),
                                        &wbr = get_canvas_view()->work_area->get_window_br();
-               
+
                gc->set_rgb_fg_color(Gdk::Color("#ff0000"));
                gc->set_line_attributes(2,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-               
+
                //it must be clamped to the drawing area though
                int l=0,rw=0,t=0,rh=0;
                const Point fp = -get_canvas_view()->work_area->get_focus_point();
-               
+
                //get focus point in normal space
                rw = (int)(abs((wtl[0]-wbr[0])*xaxis));
                rh = (int)(abs((wtl[1]-wbr[1])*yaxis));
@@ -349,7 +349,7 @@ bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *exp)
                //transform into pixel space
                l = (int)(drawto.get_width()/2 + fp[0]*xaxis - rw/2);
                t = (int)(drawto.get_height()/2 + fp[1]*yaxis - rh/2);
-       
+
                //coord system:
                // tl : (offx,offy)
                // axis multipliers = xaxis,yaxis
@@ -358,7 +358,7 @@ bool studio::Widget_NavView::on_expose_draw(GdkEventExpose *exp)
                //synfig::warning("Nav: Drawing Rectangle (%d,%d) with dim (%d,%d)", l,t,rw,rh);
                drawto.get_window()->draw_rectangle(gc,false,l,t,rw,rh);
        }
-       
+
        return false; //draw everything else too
 }
 
@@ -369,11 +369,11 @@ void studio::Widget_NavView::on_dirty_preview()
 }
 
 bool studio::Widget_NavView::on_scroll_event(GdkEvent *event)
-{      
+{
        if(get_canvas_view() && get_canvas_view()->get_work_area())
        {
                double z = unit_to_zoom(adj_zoom.get_value());
-               
+
                switch(event->type)
                {
                        case GDK_BUTTON_PRESS:
@@ -381,12 +381,12 @@ bool studio::Widget_NavView::on_scroll_event(GdkEvent *event)
                                if(event->button.button == 1)
                                {
                                        scrolling = true;
-                                       get_canvas_view()->get_work_area()->set_zoom(z);                                        
+                                       get_canvas_view()->get_work_area()->set_zoom(z);
                                        scrolling = false;
                                }
                                break;
                        }
-                       
+
                        case GDK_MOTION_NOTIFY:
                        {
                                if(Gdk::ModifierType(event->motion.state) & Gdk::BUTTON1_MASK)
@@ -397,21 +397,21 @@ bool studio::Widget_NavView::on_scroll_event(GdkEvent *event)
                                }
                                break;
                        }
-                       
+
                        default:
                                break;
                }
        }
-       
+
        return false;
 }
 
 void studio::Widget_NavView::on_number_modify()
 {
        double z = unit_to_zoom(adj_zoom.get_value());
-       zoom_print.set_text(strprintf("%.1f%%",z*100.0));       
+       zoom_print.set_text(strprintf("%.1f%%",z*100.0));
        //synfig::warning("Updating zoom to %f",adj_zoom.get_value());
-       
+
        if(get_canvas_view() && z != get_canvas_view()->get_work_area()->get_zoom())
        {
                scrolling = true;
@@ -438,46 +438,46 @@ bool studio::Widget_NavView::on_mouse_event(GdkEvent * e)
 {
        Point p;
        bool    setpos = false;
-               
+
        if(e->type == GDK_BUTTON_PRESS && e->button.button == 1)
        {
                p[0] = e->button.x - drawto.get_width()/2;
                p[1] = e->button.y - drawto.get_height()/2;
-               
+
                setpos = true;
        }
-       
+
        if(e->type == GDK_MOTION_NOTIFY && (Gdk::ModifierType(e->motion.state) & Gdk::BUTTON1_MASK))
-       {               
+       {
                p[0] = e->motion.x - drawto.get_width()/2;
-               p[1] = e->motion.y - drawto.get_height()/2;     
-               
+               p[1] = e->motion.y - drawto.get_height()/2;
+
                setpos = true;
        }
-       
+
        if(setpos && prev && get_canvas_view())
        {
                const Point &tl = get_canvas_view()->get_canvas()->rend_desc().get_tl();
                const Point &br = get_canvas_view()->get_canvas()->rend_desc().get_br();
-               
+
                float max = abs((br[0]-tl[0]) / drawto.get_width());
-               
+
                if((prev->get_width() / drawto.get_width()) < (prev->get_height() / drawto.get_height()))
                        max = abs((br[1]-tl[1]) / drawto.get_height());
-               
+
                float signx = (br[0]-tl[0]) < 0 ? -1 : 1;
                float signy = (br[1]-tl[1]) < 0 ? -1 : 1;
-               
+
                Point pos;
-               
+
                pos[0] = p[0] * max * signx;
                pos[1] = p[1] * max * signy;
-               
+
                get_canvas_view()->get_work_area()->set_focus_point(-pos);
-               
+
                return true;
        }
-       
+
        return false;
 }
 
@@ -494,11 +494,11 @@ studio::Dock_Navigator::~Dock_Navigator()
 }
 
 void studio::Dock_Navigator::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
-{      
+{
        if(canvas_view)
-       {               
+       {
                Widget *v = canvas_view->get_ext_widget("navview");
-               
+
                if(!v)
                {
                        v = new Widget_NavView(canvas_view);
@@ -509,6 +509,6 @@ void studio::Dock_Navigator::changed_canvas_view_vfunc(etl::loose_handle<CanvasV
        }else
        {
                clear_previous();
-               //add(dummy);                   
+               //add(dummy);
        }
 }
index 34e564c..b530e7a 100644 (file)
 
 namespace studio {
 class AsyncRenderer;
-       
+
 class Widget_NavView : public Gtk::Table
 {
        //handle to out parent canvas
        CanvasView::LooseHandle         canvview;
-       
+
        Glib::RefPtr<Gdk::Pixbuf>       prev;
        bool dirty;
-       
-       //The drawing stuff     
+
+       //The drawing stuff
        Gtk::DrawingArea        drawto;
-       
+
        //The input stuff
        Gtk::Adjustment         adj_zoom;
        Gtk::Label                      zoom_print;
-       
+
        //zoom window stuff
        bool                            scrolling;
-       
+
        //asyncronous rendering stuff
        etl::handle<AsyncRenderer>      renderer;
        etl::smart_ptr<synfig::Surface> surface;
        bool                                            rendering;
-       
+
        //drawing functionality
        void on_start_render(); //breaks out into asynchronous rendering
        void on_finish_render();
        void on_draw(); //renders the small thing we have
        void on_dirty_preview(); //dirties the preview for rerender
-       
+
        //for the zoom buttons
        void on_zoom_in();
        void on_zoom_out();
-       
+
        //handles the zoom scroller
        bool on_scroll_event(GdkEvent *event);
        void on_number_modify();
-       
+
        //
        bool on_mouse_event(GdkEvent * e);
-       
+
        //draws the gotten bitmap on the draw area
        bool on_expose_draw(GdkEventExpose *exp=0);
-       
+
        //for when the canvasview view changes (boolean value scrolling solves cyclic problems)
        void on_workarea_view_change();
 
@@ -102,18 +102,18 @@ public:
 
        etl::loose_handle<studio::CanvasView> get_canvas_view() {return canvview;}
 };
-       
+
 class Dock_Navigator : public Dock_CanvasSpecific
 {
        Widget_NavView  dummy;
-               
+
 public:
        Dock_Navigator();
        ~Dock_Navigator();
 
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 4733164..1f375a4 100644 (file)
@@ -91,7 +91,7 @@ Dock_Params::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
        Gtk::TreeView* tree_view(
                static_cast<Gtk::TreeView*>(canvas_view->get_ext_widget(get_name()))
        );
-       
+
        if(tree_view)
        {
                tree_view->get_selection()->signal_changed().connect(
@@ -110,7 +110,7 @@ Dock_Params::refresh_selected_param()
                static_cast<Gtk::TreeView*>(get_canvas_view()->get_ext_widget(get_name()))
        );
        Gtk::TreeModel::iterator iter(tree_view->get_selection()->get_selected());
-       
+
        if(iter)
        {
                LayerParamTreeStore::Model model;
@@ -130,7 +130,7 @@ Dock_Params::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view
        if(canvas_view)
        {
                Gtk::Widget* tree_view(canvas_view->get_ext_widget(get_name()));
-               
+
                add(*tree_view);
                tree_view->show();
                show_all();
index cbb8343..e1118cc 100644 (file)
@@ -43,7 +43,7 @@ namespace studio {
 class Dock_Params : public Dock_CanvasSpecific
 {
        Glib::RefPtr<Gtk::ActionGroup> action_group;
-       
+
 protected:
        virtual void init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
        virtual void changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view);
index 0d696f2..45e9723 100644 (file)
@@ -61,8 +61,8 @@ class TimeTrackView : public Gtk::TreeView
        CellRenderer_TimeTrack *cellrenderer_time_track;
 
        Glib::RefPtr<LayerParamTreeStore> param_tree_store_;
-       
-       Gtk::TreeView *mimic_tree_view; 
+
+       Gtk::TreeView *mimic_tree_view;
 public:
 
        sigc::signal<void,synfigapp::ValueDesc,synfig::Waypoint,int> signal_waypoint_clicked;
@@ -78,10 +78,10 @@ public:
        {
                int label_index(append_column_editable(_("Name"),model.label));
                Gtk::TreeView::Column* label_column = get_column(label_index-1);
-       
+
                {       // --- T I M E   T R A C K --------------------------------------------
                        Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Time Track")) );
-                       
+
                        // Set up the value-node cell-renderer
                        cellrenderer_time_track=LayerParamTreeStore::add_cell_renderer_value_node(column);
                        cellrenderer_time_track->property_mode()=Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
@@ -90,19 +90,19 @@ public:
                        column->add_attribute(cellrenderer_time_track->property_value_desc(), model.value_desc);
                        column->add_attribute(cellrenderer_time_track->property_canvas(), model.canvas);
                        //column->add_attribute(cellrenderer_time_track->property_visible(), model.is_value_node);
-       
+
                        //column->pack_start(*cellrenderer_time_track);
-                                       
+
                        // Finish setting up the column
                        column->set_reorderable();
                        column->set_resizable();
                        column->set_min_width(200);
 
-       
+
                        append_column(*column);
                }
                set_rules_hint();
-       
+
                set_expander_column(*label_column);
                label_column->set_visible(false);
                set_headers_visible(false);
@@ -135,7 +135,7 @@ public:
                                                std::max(
                                                        mimic_tree_view->get_vadjustment()->get_value()-
                                                        mimic_tree_view->get_vadjustment()->get_step_increment(),
-                                                       mimic_tree_view->get_vadjustment()->get_lower()                                 
+                                                       mimic_tree_view->get_vadjustment()->get_lower()
                                                )
                                        );
                                        mimic_tree_view->get_vadjustment()->value_changed();
@@ -155,7 +155,7 @@ public:
                                        )
                                ) break;
                                const Gtk::TreeRow row = *(get_model()->get_iter(path));
-                               
+
                                if(column && column->get_first_cell_renderer()==cellrenderer_time_track)
                                {
                                        Gdk::Rectangle rect;
@@ -167,7 +167,7 @@ public:
                                        return true;
                                        //return signal_param_user_click()(event->button.button,row,COLUMNID_TIME_TRACK);
                                }
-/*                             else 
+/*                             else
                                {
                                        if(event->button.button==3)
                                        {
@@ -175,12 +175,12 @@ public:
                                                if(layer_list.size()<=1)
                                                {
                                                        synfigapp::ValueDesc value_desc(row[model.value_desc]);
-                                                       Gtk::Menu* menu(manage(new Gtk::Menu()));                                       
+                                                       Gtk::Menu* menu(manage(new Gtk::Menu()));
                                                        App::get_instance(param_tree_store_->canvas_interface()->get_canvas())->make_param_menu(menu,param_tree_store_->canvas_interface()->get_canvas(),value_desc,0.5f);
                                                        menu->popup(event->button.button,gtk_get_current_event_time());
                                                        return true;
                                                }
-                                               Gtk::Menu* menu(manage(new Gtk::Menu()));                                       
+                                               Gtk::Menu* menu(manage(new Gtk::Menu()));
                                                std::list<synfigapp::ValueDesc> value_desc_list;
                                                ParamDesc param_desc(row[model.param_desc]);
                                                for(;!layer_list.empty();layer_list.pop_back())
@@ -200,7 +200,7 @@ public:
                                */
                        }
                        break;
-                       
+
                case GDK_MOTION_NOTIFY:
                        {
                                Gtk::TreeModel::Path path;
@@ -213,12 +213,12 @@ public:
                                        cell_x,cell_y //int&cell_x,int&cell_y
                                        )
                                ) break;
-                               
+
                                if(!get_model()->get_iter(path))
                                        break;
-                               
+
                                Gtk::TreeRow row = *(get_model()->get_iter(path));
-                               
+
                                if((event->motion.state&GDK_BUTTON1_MASK ||event->motion.state&GDK_BUTTON3_MASK) && column && cellrenderer_time_track==column->get_first_cell_renderer())
                                {
                                        Gdk::Rectangle rect;
@@ -258,12 +258,12 @@ public:
                                        cell_x,cell_y //int&cell_x,int&cell_y
                                        )
                                ) break;
-                               
+
                                if(!get_model()->get_iter(path))
                                        break;
-                               
+
                                Gtk::TreeRow row = *(get_model()->get_iter(path));
-                               
+
                                if(column && cellrenderer_time_track==column->get_first_cell_renderer())
                                {
                                        Gdk::Rectangle rect;
@@ -297,7 +297,7 @@ public:
                cellrenderer_time_track->set_canvas_interface(param_tree_store_->canvas_interface());
                store->signal_changed().connect(sigc::mem_fun(*this, &TimeTrackView::queue_draw));
        }
-       
+
        void
        on_waypoint_changed( synfig::Waypoint waypoint , synfig::ValueNode::Handle value_node)
        {
@@ -307,12 +307,12 @@ public:
                param_list.add("value_node",value_node);
                param_list.add("waypoint",waypoint);
        //      param_list.add("time",canvas_interface()->get_time());
-       
+
                etl::handle<studio::Instance>::cast_static(param_tree_store_->canvas_interface()->get_instance())->process_action("waypoint_set_smart", param_list);
        }
 
        void mimic(Gtk::TreeView *param_tree_view)
-       {       
+       {
                mimic_tree_view=param_tree_view;
                param_tree_view->signal_row_expanded().connect(
                        sigc::hide<0>(
@@ -337,33 +337,33 @@ public:
                );
                mimic_resync();
        }
-       
+
        void mimic_resync()
        {
-               
+
                if(mimic_tree_view)
                {
                        Gtk::Adjustment &adjustment(*mimic_tree_view->get_vadjustment());
                        set_vadjustment(adjustment);
-                       
+
                        if(adjustment.get_page_size()>get_height())
                                adjustment.set_page_size(get_height());
-                       
+
                        cellrenderer_time_track->set_fixed_size(-1,18);
                }
        }
-       
+
        void
        on_waypoint_clicked(const Glib::ustring &path_string, synfig::Waypoint waypoint,int button)
        {
 /*
                Gtk::TreePath path(path_string);
-               
+
                const Gtk::TreeRow row = *(get_model()->get_iter(path));
                if(!row)
                        return;
 */
-               
+
                ValueNode::Handle value_node(waypoint.get_parent_value_node());
                assert(value_node);
 
@@ -373,10 +373,10 @@ public:
                        synfig::error(__FILE__":%d: Unable to find the valuenode",__LINE__);
                        return;
                }
-               
+
                if(!row)
                        return;
-               
+
                synfigapp::ValueDesc value_desc(static_cast<synfigapp::ValueDesc>(row[model.value_desc]));
 
                signal_waypoint_clicked(value_desc,waypoint,button);
@@ -411,7 +411,7 @@ void
 Dock_Timetrack::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view)
 {
        LayerParamTreeStore::Model model;
-       
+
        Glib::RefPtr<LayerParamTreeStore> tree_store(
                Glib::RefPtr<LayerParamTreeStore>::cast_dynamic(
                        canvas_view->get_tree_model("params")
@@ -426,7 +426,7 @@ Dock_Timetrack::init_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_view
 
        tree_view->signal_waypoint_clicked.connect(sigc::mem_fun(*canvas_view, &studio::CanvasView::on_waypoint_clicked));
 
-       
+
        canvas_view->time_adjustment().signal_value_changed().connect(sigc::mem_fun(*tree_view,&Gtk::TreeView::queue_draw));
        canvas_view->time_adjustment().signal_changed().connect(sigc::mem_fun(*tree_view,&Gtk::TreeView::queue_draw));
 
@@ -440,7 +440,7 @@ Dock_Timetrack::refresh_selected_param()
                static_cast<Gtk::TreeView*>(get_canvas_view()->get_ext_widget(get_name()))
        );
        Gtk::TreeModel::iterator iter(tree_view->get_selection()->get_selected());
-       
+
        if(iter)
        {
                LayerParamTreeStore::Model model;
@@ -468,13 +468,13 @@ Dock_Timetrack::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_v
                table_=0;
        }
 
-       
+
        if(canvas_view)
        {
                TimeTrackView* tree_view(dynamic_cast<TimeTrackView*>(canvas_view->get_ext_widget(get_name())));
        Gtk::TreeView* param_tree_view(dynamic_cast<Gtk::TreeView*>(canvas_view->get_ext_widget("params")));
        tree_view->set_vadjustment(*param_tree_view->get_vadjustment());
-               
+
                assert(tree_view);
 
                widget_timeslider_->set_time_adjustment(&canvas_view->time_adjustment());
@@ -489,7 +489,7 @@ Dock_Timetrack::changed_canvas_view_vfunc(etl::loose_handle<CanvasView> canvas_v
                table_->attach(*hscrollbar_, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK);
                table_->attach(*vscrollbar_, 1, 2, 0, 2, Gtk::FILL|Gtk::SHRINK, Gtk::FILL|Gtk::EXPAND);
                add(*table_);
-               
+
                //add(*last_widget_curves_);
                table_->show_all();
                show_all();
index 5ba33bd..2007994 100644 (file)
@@ -82,24 +82,24 @@ Dockable::Dockable(const synfig::String& name,const synfig::String& local_name,G
 {
        parent_=0;
        scrolled_=0;
-       
+
        use_scrolled_=true;
-       
+
        //set_title(local_name);
        //set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
-       
+
 
        title_label_.show();
 
        attach_dnd_to(title_label_);
-       
+
        //scrolled_.set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
-       //scrolled_.show();     
+       //scrolled_.show();
        //scrolled_.set_shadow_type(Gtk::SHADOW_NONE);
 
        toolbar_=0;
        //button_box_.show();
-       
+
        Gtk::Table* table(this);
 
        {
@@ -108,14 +108,14 @@ Dockable::Dockable(const synfig::String& name,const synfig::String& local_name,G
                event_box->set_border_width(0);
                event_box->add(title_label_);
                //table->attach(*event_box, 0, 1, 0,1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
-               
+
                header_box_.pack_start(*event_box);
-               
+
                attach_dnd_to(*event_box);
                event_box->show();
        //      event_box->set_events(Gdk::ALL_EVENTS_MASK); //!< \todo change this to only allow what is necessary for DnD
 
-               
+
                Gtk::Button* bttn_close(manage(new Gtk::Button("X")));
                //table->attach(*bttn_close, 1, 2, 0,1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
                header_box_.pack_end(*bttn_close,false,false);
@@ -127,7 +127,7 @@ Dockable::Dockable(const synfig::String& name,const synfig::String& local_name,G
        }
 
        prev_widget_=manage(new Gtk::Label(" "));
-       
+
        //table->attach(header_box_, 0, 1, 0,1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        table->attach(*prev_widget_, 0, 1, 1,2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        //table->attach(*toolbar_, 0, 1, 2,3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
@@ -138,7 +138,7 @@ Dockable::Dockable(const synfig::String& name,const synfig::String& local_name,G
 
        set_size_request(175,120);
        //scrolled_.set_shadow_type(Gtk::SHADOW_NONE);
-       
+
 }
 
 Dockable::~Dockable()
@@ -178,7 +178,7 @@ Dockable::attach_dnd_to(Gtk::Widget& widget)
        widget.signal_drag_data_get().connect(sigc::mem_fun(*this,&Dockable::on_drag_data_get));
        widget.signal_drag_end().connect(sigc::mem_fun(*this,&Dockable::on_drag_end));
        widget.signal_drag_begin().connect(sigc::mem_fun(*this,&Dockable::on_drag_begin));
-       widget.signal_drag_data_received().connect(sigc::mem_fun(*this,&Dockable::on_drag_data_received));      
+       widget.signal_drag_data_received().connect(sigc::mem_fun(*this,&Dockable::on_drag_data_received));
 }
 
 void
@@ -187,7 +187,7 @@ Dockable::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, i
        if ((selection_data.get_length() >= 0) && (selection_data.get_format() == 8))
        {
                Dockable& dockable(**reinterpret_cast<Dockable**>(const_cast<guint8*>(selection_data.get_data())));
-               
+
                if(dockable.parent_ != parent_)
                        parent_->add(dockable,parent_->page_num(*this));
                else
@@ -196,7 +196,7 @@ Dockable::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, i
                context->drag_finish(true, false, time);
                return;
        }
-       
+
        context->drag_finish(false, false, time);
 }
 
@@ -278,19 +278,19 @@ Dockable::add(Gtk::Widget& x)
                delete scrolled_;
                scrolled_=0;
        }
-       
+
        if(use_scrolled_)
        {
                scrolled_=new Gtk::ScrolledWindow;
-               
+
                scrolled_->add(x);
 
                attach(*scrolled_, 0, 1, 1,2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-               
+
                x.show();
-       
+
                scrolled_->show();
-               
+
                scrolled_->set_shadow_type(Gtk::SHADOW_NONE);
                scrolled_->set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
                prev_widget_=scrolled_;
@@ -331,7 +331,7 @@ Dockable::add_button(const Gtk::StockID& stock_id, const synfig::String& tooltip
        ret->show();
        //icon->show();
        toolbar_->set_tooltips(true);
-       
+
        toolbar_->append(*ret);
        //button_box_.pack_start(*ret,false,false);
        //get_action_area()->pack_start(*ret,false,false);
@@ -369,13 +369,13 @@ Gtk::Widget*
 Dockable::create_tab_label()
 {
        Gtk::EventBox* event_box(manage(new Gtk::EventBox()));
-       
+
        attach_dnd_to(*event_box);
-       
+
        {
                Gtk::StockID stock_id(get_stock_id());
                Gtk::StockItem item;
-               
+
                // Check to make sure the icon is valid
                if(Gtk::Stock::lookup(stock_id,item))
                {
@@ -387,7 +387,7 @@ Dockable::create_tab_label()
                else
                {
                        // Bad icon, try to make a label
-                       
+
                        Glib::ustring text(get_local_name());
 
                        Gtk::Label* label(manage(new Gtk::Label(text)));
@@ -395,6 +395,6 @@ Dockable::create_tab_label()
                        label->show();
                }
        }
-       
+
        return event_box;
 }
index d4be6ee..7361562 100644 (file)
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 class DockManager;
 class DockBook;
-       
+
 class Dockable : public Gtk::Table
 {
        friend class DockManager;
        friend class DockBook;
 
-       
+
        sigc::signal<void> signal_stock_id_changed_;
        SigC::Connection prev_widget_delete_connection;
 protected:
-       
+
 //     DialogSettings dialog_settings;
 
 
@@ -77,13 +77,13 @@ private:
        //Gtk::HBox button_box_;
        Gtk::HBox header_box_;
        //Gtk::VBox vbox_;
-       
+
        //Gtk::HandleBox handle_box_;
        Gtk::ScrolledWindow *scrolled_;
        Gtk::Widget *prev_widget_;
 
        bool use_scrolled_;
-       
+
        Gtk::StockID stock_id_;
 
        DockBook* parent_;
@@ -96,7 +96,7 @@ public:
        void set_toolbar(Gtk::Toolbar& toolbar);
 
        void set_use_scrolled(bool x) { use_scrolled_=x; }
-       
+
        Dockable(const synfig::String& name,const synfig::String& local_name,Gtk::StockID stock_id_=Gtk::StockID(" "));
        ~Dockable();
 
@@ -107,31 +107,31 @@ public:
 
        const Gtk::StockID& get_stock_id()const { return stock_id_; }
        void set_stock_id(Gtk::StockID x) { stock_id_=x; signal_stock_id_changed()(); }
-       
+
        void set_local_name(const synfig::String&);
 
        void clear();
-       
+
        Gtk::Tooltips& get_tooltips() { return tooltips_; }
-       
+
        //DialogSettings& settings() { return dialog_settings; }
        //const DialogSettings& settings()const { return dialog_settings; }
-       
+
        void add(Gtk::Widget& x);
-       
-       Gtk::ToolButton* add_button(const Gtk::StockID& stock_id, const synfig::String& tooltip=synfig::String());      
-       
+
+       Gtk::ToolButton* add_button(const Gtk::StockID& stock_id, const synfig::String& tooltip=synfig::String());
+
        void detach();
 
        void present();
-       
+
        void attach_dnd_to(Gtk::Widget& widget);
 
        bool clear_previous();
        virtual Gtk::Widget* create_tab_label();
 
 private:
-       
+
        void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, Gtk::SelectionData& selection_data, guint info, guint time);
        void on_drag_end(const Glib::RefPtr<Gdk::DragContext>&context);
        void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>&context);
index 57828c9..290d48f 100644 (file)
@@ -96,7 +96,7 @@ DockBook::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, i
                context->drag_finish(true, false, time);
                return;
        }
-       
+
        context->drag_finish(false, false, time);
 }
 
@@ -104,7 +104,7 @@ void
 DockBook::add(Dockable& dockable, int position)
 {
        dockable.detach();
-       
+
        if(position==-1)
                append_page(dockable, " ");
        else
@@ -121,13 +121,13 @@ DockBook::add(Dockable& dockable, int position)
                        &dockable
                )
        );
-       
+
        dockable.parent_=this;
 
        dockable.show();
 
        //set_current_page(get_n_pages()-1);
-               
+
        signal_changed_();
 }
 
@@ -135,7 +135,7 @@ void
 DockBook::refresh_tab(Dockable* dockable)
 {
        Gtk::Widget* label(dockable->create_tab_label());
-       
+
        label->signal_button_press_event().connect(
                sigc::bind(
                        sigc::mem_fun(
@@ -161,7 +161,7 @@ DockBook::remove(Dockable& dockable)
        if(!deleting_)
        {
                signal_changed_();
-       
+
                if(get_n_pages()==0)
                        signal_empty()();
        }
@@ -177,16 +177,16 @@ synfig::String
 DockBook::get_local_contents()const
 {
        synfig::String ret;
-       
+
        for(int i(0);i!=const_cast<DockBook*>(this)->get_n_pages();i++)
        {
                Dockable& dockable(static_cast<Dockable&>(*const_cast<DockBook*>(this)->get_nth_page(i)));
-               
+
                if(i)
                        ret+=", ";
                ret+=dockable.get_local_name();
        }
-       
+
        return ret;
 }
 
@@ -194,16 +194,16 @@ synfig::String
 DockBook::get_contents()const
 {
        synfig::String ret;
-       
+
        for(int i(0);i!=const_cast<DockBook*>(this)->get_n_pages();i++)
        {
                Dockable& dockable(static_cast<Dockable&>(*const_cast<DockBook*>(this)->get_nth_page(i)));
-               
+
                if(i)
                        ret+=' ';
                ret+=dockable.get_name();
        }
-       
+
        return ret;
 }
 
@@ -225,7 +225,7 @@ DockBook::set_contents(const synfig::String& x)
                        dock=String(str.begin(),str.begin()+separator);
                        str=String(str.begin()+separator+1,str.end());
                }
-               
+
                try
                {
                        add(App::dock_manager->find_dockable(dock));
@@ -238,9 +238,9 @@ DockBook::tab_button_pressed(GdkEventButton* event, Dockable* dockable)
 {
        if(event->button!=3)
                return false;
-       
+
        Gtk::Menu *tabmenu=manage(new class Gtk::Menu());
-       
+
        tabmenu->items().push_back(
                Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-close"),
                        sigc::mem_fun(*dockable,&Dockable::detach)
@@ -248,6 +248,6 @@ DockBook::tab_button_pressed(GdkEventButton* event, Dockable* dockable)
        );
 
        tabmenu->popup(event->button,gtk_get_current_event_time());
-       
+
        return true;
 }
index 267b72d..ca39e14 100644 (file)
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 class DockManager;
 class Dockable;
-       
+
 class DockBook : public Gtk::Notebook
 {
        friend class DockManager;
@@ -49,11 +49,11 @@ class DockBook : public Gtk::Notebook
 
        sigc::signal<void> signal_empty_;
        sigc::signal<void> signal_changed_;
-       
-       Gtk::Tooltips tooltips_;        
-       
+
+       Gtk::Tooltips tooltips_;
+
        bool deleting_;
-       
+
 protected:
 public:
        DockBook();
@@ -70,12 +70,12 @@ public:
        void clear();
 
        synfig::String get_local_contents()const;
-       
+
        synfig::String get_contents()const;
        void set_contents(const synfig::String& x);
 
        void refresh_tabs_headers();
-       
+
        void refresh_tab(Dockable*);
 
        bool tab_button_pressed(GdkEventButton* event, Dockable* dockable);
index 3fff0d9..803fa98 100644 (file)
@@ -83,12 +83,12 @@ DockDialog::DockDialog():
        is_horizontal=false;
        last_dock_book=0;
        box=0;
-       
+
        widget_comp_select=new Widget_CompSelect();
-       
+
        // Give ourselves an ID that is most likely unique
        set_id(synfig::UniqueID().get_uid()^reinterpret_cast<long>(this));
-       
+
        set_role(strprintf("dock_dialog_%d",get_id()));
        GRAB_HINT_DATA(
                "dock_dialog",
@@ -99,22 +99,22 @@ DockDialog::DockDialog():
 #endif
        );
        set_keep_above(false);
-       
+
        // Set up the window
        //set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
        set_title("Dock Dialog");
-       
+
        // Register with the dock manager
        App::dock_manager->dock_dialog_list_.push_back(this);
 
-       
-       // connect our signals  
+
+       // connect our signals
        signal_delete_event().connect(
                sigc::hide(
                        sigc::mem_fun(*this,&DockDialog::close)
                )
        );
-       
+
 /*
        App::signal_canvas_view_focus().connect(
                sigc::hide(
@@ -149,7 +149,7 @@ DockDialog::~DockDialog()
                // but it causes crashes. Without it, a small
                // memory hole is created--but at least it doesn't crash
                // delete dock_book_list.front();
-               
+
                // Oddly enough, the following line should
                // theoreticly do the same thing after this
                // class is destroyed, but it doesn't seem to
@@ -187,7 +187,7 @@ DockDialog::drop_on_prepend(const Glib::RefPtr<Gdk::DragContext>& context, int,
                context->drag_finish(true, false, time);
                return;
        }
-       
+
        context->drag_finish(false, false, time);
 }
 
@@ -201,7 +201,7 @@ DockDialog::drop_on_append(const Glib::RefPtr<Gdk::DragContext>& context, int, i
                context->drag_finish(true, false, time);
                return;
        }
-       
+
        context->drag_finish(false, false, time);
 }
 
@@ -217,7 +217,7 @@ DockBook*
 DockDialog::prepend_dock_book()
 {
        if(is_deleting)return 0;
-               
+
        dock_book_list.push_front(new DockBook);
        last_dock_book=dock_book_list.front();
 
@@ -238,7 +238,7 @@ DockBook*
 DockDialog::append_dock_book()
 {
        if(is_deleting)return 0;
-               
+
        dock_book_list.push_back(new DockBook);
        last_dock_book=dock_book_list.back();
        last_dock_book->signal_empty().connect(
@@ -282,9 +282,9 @@ DockDialog::erase_dock_book(DockBook* dock_book)
                                if(last_dock_book==dock_book)
                                        last_dock_book=dock_book_list.front();
                        }
-                       
+
                        refresh();
-                       
+
                        return;
                }
 }
@@ -297,16 +297,16 @@ DockDialog::refresh()
 
        if(dock_book_list.empty())
                return;
-       
+
        if(box)delete box;
        box=(manage(is_horizontal?(Gtk::Box*)new Gtk::HBox:(Gtk::Box*)new Gtk::VBox));
        add(*box);
-       
+
        box->pack_start(*widget_comp_select,false,true);
 
        Gtk::Button* append_button(manage(new Gtk::Button));
        Gtk::Button* prepend_button(manage(new Gtk::Button));
-       
+
        std::list<Gtk::TargetEntry> listTargets;
        listTargets.push_back( Gtk::TargetEntry("DOCK") );
 
@@ -320,14 +320,14 @@ DockDialog::refresh()
        prepend_button->signal_drag_data_received().connect(
                sigc::mem_fun(*this,&DockDialog::drop_on_prepend)
        );
-       
+
        box->pack_start(*prepend_button,false,true);
        box->pack_end(*append_button,false,true);
 
        //prepend_button->show();
        //append_button->show();
        pannels_.clear();
-       
+
        if(dock_book_list.size()==1)
        {
                box->pack_start(get_dock_book(),true,true);
@@ -335,9 +335,9 @@ DockDialog::refresh()
        else
        {
                Gtk::Paned* parent(manage(is_horizontal?(Gtk::Paned*)new Gtk::HPaned:(Gtk::Paned*)new Gtk::VPaned));
-               
+
                pannels_.push_back(parent);
-               
+
                if(pannels_.size()<=dock_book_sizes_.size())
                        pannels_.back()->set_position(dock_book_sizes_[pannels_.size()-1]);
                pannels_.back()->property_position().signal_changed().connect(
@@ -346,15 +346,15 @@ DockDialog::refresh()
                //parent->show();
                parent->add1(*dock_book_list.front());
                //dock_book_list.front()->show();
-        
+
                box->pack_start(*parent,true,true);
-               
+
                std::list<DockBook*>::iterator iter,next;
                for(next=dock_book_list.begin(),next++,iter=next++;next!=dock_book_list.end();iter=next++)
                {
                        Gtk::Paned* current(manage(is_horizontal?(Gtk::Paned*)new Gtk::HPaned:(Gtk::Paned*)new Gtk::VPaned));
                        pannels_.push_back(current);
-                       
+
                        if(pannels_.size()<=dock_book_sizes_.size())
                                pannels_.back()->set_position(dock_book_sizes_[pannels_.size()-1]);
                        pannels_.back()->property_position().signal_changed().connect(
@@ -367,13 +367,13 @@ DockDialog::refresh()
                        current->add1(**iter);
                        //(*iter)->show();
                        //current->show();
-                       
+
                        parent=current;
                }
                parent->add2(**iter);
                //(*iter)->show();
        }
-       
+
        box->show_all();
        if(!composition_selector_)
                widget_comp_select->hide();
@@ -413,7 +413,7 @@ DockDialog::refresh_accel_group()
                remove_accel_group(last_accel_group_);
                last_accel_group_=Glib::RefPtr<Gtk::AccelGroup>();
        }
-       
+
        etl::loose_handle<CanvasView> canvas_view(App::get_selected_canvas_view());
        if(canvas_view)
        {
@@ -435,7 +435,7 @@ DockDialog::close()
        synfig::info("DockDialog::close(): DELETED!");
        empty_sig.disconnect();
        //get_dock_book().clear();
-       delete this;    
+       delete this;
        return true;
 }
 
@@ -466,8 +466,8 @@ DockDialog::get_contents()const
                        ret+=is_horizontal?" | ":" - ";
                ret+=(*iter)->get_contents();
        }
-               
-       
+
+
        return ret;
 }
 
@@ -494,7 +494,7 @@ DockDialog::set_contents(const synfig::String& z)
                                        is_horizontal=false;
                        }
                }
-               
+
                synfig::String book_contents;
                if(separator==synfig::String::npos)
                {
@@ -506,7 +506,7 @@ DockDialog::set_contents(const synfig::String& z)
                        book_contents=String(str.begin(),str.begin()+separator);
                        str=String(str.begin()+separator+1,str.end());
                }
-               
+
                try
                {
                        append_dock_book()->set_contents(book_contents);
index f2fdcd4..dc81b08 100644 (file)
 
 namespace Gtk { class Box; class Paned;  };
 namespace studio {
-       
+
 class DockManager;
 class DockBook;
 class Dockable;
 class Widget_CompSelect;
 class CanvasView;
-       
+
 class DockDialog : public Gtk::Window
 {
        friend class DockManager;
@@ -62,11 +62,11 @@ class DockDialog : public Gtk::Window
        SigC::Connection empty_sig;
 
        bool composition_selector_;
-       
+
        bool is_deleting;
-       
+
        bool is_horizontal;
-       
+
 private:
        std::list<DockBook*> dock_book_list;
 
@@ -93,24 +93,24 @@ private:
 
        void drop_on_append(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
        void drop_on_prepend(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
-       
+
 public:
 
        const std::vector<int>& get_dock_book_sizes()const { return dock_book_sizes_;}
        void set_dock_book_sizes(const std::vector<int>&);
        void rebuild_sizes();
-       
+
        bool close();
-       
+
        int get_id()const { return id_; }
-       
+
        DockBook* append_dock_book();
        DockBook* prepend_dock_book();
        void erase_dock_book(DockBook*);
-       
+
        void set_composition_selector(bool x);
        bool get_composition_selector()const { return composition_selector_; }
-       
+
        DockDialog();
        ~DockDialog();
 
index a280a32..4c15620 100644 (file)
@@ -53,13 +53,13 @@ using namespace studio;
 class studio::DockSettings : public synfigapp::Settings
 {
        DockManager* dock_manager;
-       
+
 public:
        DockSettings(DockManager* dock_manager):dock_manager(dock_manager)
        {
                synfigapp::Main::settings().add_domain(this,"dock");
        }
-       
+
        virtual ~DockSettings()
        {
                synfigapp::Main::settings().remove_domain("dock");
@@ -69,16 +69,16 @@ public:
        {
                int screen_w(Gdk::screen_width());
                int screen_h(Gdk::screen_height());
-               
+
                if(key_.size()>6 && String(key_.begin(),key_.begin()+6)=="dialog")try
                {
                        synfig::String key(key_.begin()+7,key_.end());
                        synfig::String::size_type separator=key.find_first_of('.');
                        int id(atoi(synfig::String(key.begin(),key.begin()+separator).c_str()));
                        key=synfig::String(key.begin()+separator+1,key.end());
-                       
+
                        DockDialog& dock_dialog(dock_manager->find_dock_dialog(id));
-                       
+
                        if(key=="contents_size")
                        {
                                dock_dialog.rebuild_sizes();
@@ -126,13 +126,13 @@ public:
                        synfig::String::size_type separator=key.find_first_of('.');
                        int id(atoi(synfig::String(key.begin(),key.begin()+separator).c_str()));
                        key=synfig::String(key.begin()+separator+1,key.end());
-                       
+
                        DockDialog& dock_dialog(dock_manager->find_dock_dialog(id));
 
                        if(key=="contents_size")
                        {
                                try {
-                                       
+
                                vector<int> data;
                                String::size_type n=0;
                                String value_(value);
@@ -147,7 +147,7 @@ public:
                                        n=value_.find(" ");
                                        if(n!=String::npos)
                                                n++;
-                                               
+
                                }
                                dock_dialog.set_dock_book_sizes(data);
                                }
@@ -195,7 +195,7 @@ public:
                }
                return synfigapp::Settings::set_value(key_,value);
        }
-       
+
        virtual KeyList get_key_list()const
        {
                synfigapp::Settings::KeyList ret(synfigapp::Settings::get_key_list());
@@ -230,7 +230,7 @@ DockManager::~DockManager()
        {
                Dockable* dockable(dockable_list_.back());
                synfig::info("DockManager::~DockManager(): Deleting dockable \"%s\"",dockable->get_name().c_str());
-               dockable_list_.pop_back();              
+               dockable_list_.pop_back();
                delete dockable;
        }
 }
@@ -267,7 +267,7 @@ DockManager::find_dockable(const synfig::String& x)
        for(iter=dockable_list_.begin();iter!=dockable_list_.end();++iter)
                if((*iter)->get_name()==x)
                        return **iter;
-       
+
        throw std::runtime_error("DockManager::find_dockable(): not found");
 }
 
@@ -304,6 +304,6 @@ DockManager::find_dock_dialog(int id)const
        for(iter=dock_dialog_list_.begin();iter!=dock_dialog_list_.end();++iter)
                if((*iter)->get_id()==id)
                        return **iter;
-       
+
        throw std::runtime_error("DockManager::find_dock_dialog(int id)const: not found");
 }
index 7d99f00..d8e5cae 100644 (file)
@@ -45,18 +45,18 @@ namespace studio {
 class Dockable;
 class DockDialog;
 class DockSettings;
-       
+
 class DockManager : public sigc::trackable
 {
        friend class Dockable;
        friend class DockDialog;
        friend class DockSettings;
-               
+
        std::list<Dockable*> dockable_list_;
        std::list<DockDialog*> dock_dialog_list_;
 
        sigc::signal<void,Dockable*> signal_dockable_registered_;
-       
+
        etl::smart_ptr<DockSettings> dock_settings;
 
 public:
@@ -72,7 +72,7 @@ public:
        bool unregister_dockable(Dockable& x);
        Dockable& find_dockable(const synfig::String& x);
        void present(synfig::String x);
-       
+
 }; // END of class DockManager
 
 }; // END of namespace studio
index 8b98d56..aea6b94 100644 (file)
@@ -133,7 +133,7 @@ Duck::get_trans_point()const
 {
        return transform_stack_.perform(get_sub_trans_point());
 }
-       
+
 void
 Duck::set_trans_point(const synfig::Point &x)
 {
index 8be49d6..c688031 100644 (file)
@@ -73,13 +73,13 @@ public:
 
 namespace studio {
 class Duckmatic;
-       
+
 /*! \class Duck
 **     \writeme */
 class Duck : public etl::shared_object
 {
        friend class Duckmatic;
-               
+
 public:
        enum Type
        {
@@ -98,18 +98,18 @@ public:
 
        typedef etl::handle<Duck> Handle;
        typedef etl::loose_handle<Duck> LooseHandle;
-       
+
 private:
 
        sigc::signal<bool,const synfig::Point &> signal_edited_;
        sigc::signal<void> signal_user_click_[5];
-       
+
        Type type_;
 
        synfig::Point point;
 
        etl::smart_ptr<synfig::Point> shared_point;
-       
+
        synfig::Point origin;
        synfig::String name;
        synfig::Real scalar;
@@ -119,13 +119,13 @@ private:
        etl::handle<Duck> connect_duck;
        etl::handle<Duck> box_duck;
 
-       synfig::GUID guid_;     
+       synfig::GUID guid_;
 
        // Flags
        bool editable;
        bool radius_;
        bool tangent_;
-       
+
        synfig::TransformStack transform_stack_;
 
        synfigapp::ValueDesc value_desc_;
@@ -136,7 +136,7 @@ public:
        Duck(const synfig::Point &point);
        Duck(const synfig::Point &point,const synfig::Point &origin);
        ~Duck();
-               
+
        sigc::signal<bool,const synfig::Point &> &signal_edited() { return signal_edited_; }
        sigc::signal<void> &signal_user_click(int i=0) { assert(i>=0); assert(i<5); return signal_user_click_[i]; }
 
@@ -170,7 +170,7 @@ public:
        void set_transform_stack(const synfig::TransformStack& x) { transform_stack_=x; }
 
        const synfig::TransformStack& get_transform_stack()const { return transform_stack_; }
-       
+
        //! \writeme
        void set_type(Type x) { type_=x; }
 
@@ -187,12 +187,12 @@ public:
 
        //! Sets the location of the duck with respect to the origin
        void set_point(const synfig::Point &x) { (shared_point?*shared_point:point)=x; }
-               
+
        //! Returns the location of the duck
        synfig::Point get_point()const { return shared_point?*shared_point:point; }
-       
+
        synfig::Point get_trans_point()const;
-       
+
        void set_trans_point(const synfig::Point &x);
 
        synfig::Point get_sub_trans_point()const;
@@ -207,22 +207,22 @@ public:
 
        //! Retrieves the origin location
        synfig::Point get_origin()const;
-       
+
        //! Retrieves the origin duck
-       const etl::handle<Duck> & get_origin_duck() const;      
+       const etl::handle<Duck> & get_origin_duck() const;
 
        //! Retrieves the origin location
        synfig::Point get_trans_origin()const;
 
        void set_radius(bool r) { radius_=r; }
        bool is_radius()const { return radius_; }
-       
+
        //! Sets the name of the duck
        void set_name(const synfig::String &x);
 
        //! Retrieves the name of the duck
        synfig::String get_name()const { return name; }
-       
+
        bool operator==(const Duck &rhs)const;
 }; // END of class Duck
 
index 23acd79..9634f7c 100644 (file)
@@ -206,7 +206,7 @@ Duckmatic::refresh_selected_ducks()
                signal_duck_selection_changed_();
                return;
        }
-       
+
        for(iter=selected_duck_list.begin();iter!=selected_duck_list.end();++iter)
        {
                etl::handle<Duck> similar(find_similar_duck(*iter));
@@ -219,7 +219,7 @@ Duckmatic::refresh_selected_ducks()
 */
        GUIDSet old_set(selected_ducks);
        GUIDSet::const_iterator iter;
-       
+
        for(iter=old_set.begin();iter!=old_set.end();++iter)
        {
                if(duck_map.count(*iter)==0)
@@ -262,7 +262,7 @@ Duckmatic::is_duck_group_selectable(const etl::handle<Duck>& x)const
 void
 Duckmatic::select_all_ducks()
 {
-       DuckMap::const_iterator iter;   
+       DuckMap::const_iterator iter;
        for(iter=duck_map.begin();iter!=duck_map.end();++iter)
                if(is_duck_group_selectable(iter->second))
                        select_duck(iter->second);
@@ -278,8 +278,8 @@ Duckmatic::select_ducks_in_box(const synfig::Vector& tl,const synfig::Vector& br
        vmax[1]=std::max(tl[1],br[1]);
 
 //     Type type(get_type_mask());
-       
-       DuckMap::const_iterator iter;   
+
+       DuckMap::const_iterator iter;
        for(iter=duck_map.begin();iter!=duck_map.end();++iter)
        {
                Point p(iter->second->get_trans_point());
@@ -313,14 +313,14 @@ Duckmatic::get_selected_ducks()const
        DuckList ret;
        GUIDSet::const_iterator iter;
        const Type type(get_type_mask());
-       
+
        for(iter=selected_ducks.begin();iter!=selected_ducks.end();++iter)
        {
                const DuckMap::const_iterator d_iter(duck_map.find(*iter));
-               
+
                if(d_iter==duck_map.end())
                        continue;
-       
+
                if(( d_iter->second->get_type() && (!(type & d_iter->second->get_type())) ) )
                        continue;
 
@@ -391,7 +391,7 @@ Duckmatic::snap_point_to_grid(const Point& x, float radius)const
 
        GuideList::const_iterator guide_x,guide_y;
        bool has_guide_x(false), has_guide_y(false);
-       
+
        guide_x=find_guide_x(ret,radius);
        if(guide_x!=guide_list_x_.end())
                has_guide_x=true;
@@ -420,7 +420,7 @@ Duckmatic::snap_point_to_grid(const Point& x, float radius)const
                if(has_guide_y)
                        ret[1]=*guide_y;
        }
-       
+
        if(axis_lock)
        {
                ret-=drag_offset_;
@@ -430,7 +430,7 @@ Duckmatic::snap_point_to_grid(const Point& x, float radius)const
                        ret[1]=0;
                ret+=drag_offset_;
        }
-       
+
        return ret;
 }
 
@@ -443,10 +443,10 @@ DuckDrag_Translate::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector&
 
                snap=Vector(0,0);
        }
-       
+
        const DuckList selected_ducks(duckmatic->get_selected_ducks());
        DuckList::const_iterator iter;
-       
+
        positions.clear();
        for(iter=selected_ducks.begin();iter!=selected_ducks.end();++iter)
        {
@@ -478,7 +478,7 @@ DuckDrag_Translate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector
 
        synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_);
        int i;
-       
+
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
        {
                if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)continue;
@@ -508,11 +508,11 @@ Duckmatic::signal_edited_selected_ducks()
        DuckList::const_iterator iter;
 
        synfig::GUIDSet old_set(selected_ducks);
-       
+
        // If we have more than 20 things to move, then display
        // something to explain that it may take a moment
        smart_ptr<OneMoment> wait; if(ducks.size()>20)wait.spawn();
-               
+
        // Go ahead and call everyone's signals
        for(iter=ducks.begin();iter!=ducks.end();++iter)
        {
@@ -556,7 +556,7 @@ Duckmatic::add_duck(const etl::handle<Duck> &duck)
                        duck->set_shared_point(point);
                        duck_data_share_map[duck->get_data_guid()]=point;
                }
-               
+
                duck_map.insert(duck);
        }
 
@@ -587,7 +587,7 @@ Duckmatic::add_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_lis
        stroke->stroke_data=stroke_point_list;
        stroke->color=color;
 
-       stroke_list_.push_back(stroke); 
+       stroke_list_.push_back(stroke);
 }
 
 void
@@ -619,7 +619,7 @@ Duckmatic::set_show_persistant_strokes(bool x)
 void
 Duckmatic::erase_duck(const etl::handle<Duck> &duck)
 {
-       duck_map.erase(duck->get_guid());       
+       duck_map.erase(duck->get_guid());
 }
 
 etl::handle<Duckmatic::Duck>
@@ -629,7 +629,7 @@ Duckmatic::find_similar_duck(etl::handle<Duck> duck)
        if(iter!=duck_map.end())
                return iter->second;
        return 0;
-               
+
 /*     std::list<handle<Duck> >::reverse_iterator iter;
 
        for(iter=duck_list_.rbegin();iter!=duck_list_.rend();++iter)
@@ -692,10 +692,10 @@ etl::handle<Duckmatic::Duck>
 Duckmatic::find_duck(synfig::Point point, synfig::Real radius, Duck::Type type)
 {
        if(radius==0)radius=10000000;
-       
+
        if(type==Duck::TYPE_DEFAULT)
                type=get_type_mask();
-       
+
        Real closest(10000000);
        etl::handle<Duck> ret;
 
@@ -704,7 +704,7 @@ Duckmatic::find_duck(synfig::Point point, synfig::Real radius, Duck::Type type)
        for(iter=duck_map.begin();iter!=duck_map.end();++iter)
        {
                const Duck::Handle& duck(iter->second);
-               
+
                if(!duck->get_editable())
                        continue;
                Real dist((duck->get_trans_point()-point).mag_squared());
@@ -730,22 +730,22 @@ Duckmatic::find_duck(synfig::Point point, synfig::Real radius, Duck::Type type)
 etl::handle<Duckmatic::Bezier>
 Duckmatic::find_bezier(synfig::Point point, synfig::Real radius,float* location)
 {
-       return find_bezier(point,radius,radius,location);       
+       return find_bezier(point,radius,radius,location);
 }
 
-etl::handle<Duckmatic::Bezier> 
+etl::handle<Duckmatic::Bezier>
 Duckmatic::find_bezier(synfig::Point pos, synfig::Real scale, synfig::Real radius, float* location)
 {
        if(radius==0)radius=10000000;
        Real closest(10000000);
        etl::handle<Bezier> ret;
-       
+
        bezier<Point>   curve;
-       
+
        Real    d,step;
        float   time = 0;
        float   best_time = 0;
-       
+
        for(std::list<handle<Bezier> >::const_iterator iter=bezier_list().begin();iter!=bezier_list().end();++iter)
        {
                curve[0] = (*iter)->p1->get_trans_point();
@@ -753,21 +753,21 @@ Duckmatic::find_bezier(synfig::Point pos, synfig::Real scale, synfig::Real radiu
                curve[2] = (*iter)->c2->get_trans_point();
                curve[3] = (*iter)->p2->get_trans_point();
                curve.sync();
-               
+
 #if 0
                // I don't know why this doesn't work
                time=curve.find_closest(pos,6);
                d=((curve(time)-pos).mag_squared());
 
-#else          
+#else
                //set the step size based on the size of the picture
                d = (curve[1] - curve[0]).mag() + (curve[2]-curve[1]).mag()     + (curve[3]-curve[2]).mag();
-               
+
                step = d/(2*scale); //want to make the distance between lines happy
-               
+
                step = max(step,0.01); //100 samples should be plenty
-               step = min(step,0.1); //10 is minimum           
-               
+               step = min(step,0.1); //10 is minimum
+
                d = find_closest(curve,pos,step,&closest,&time);
 #endif
 
@@ -776,18 +776,18 @@ Duckmatic::find_bezier(synfig::Point pos, synfig::Real scale, synfig::Real radiu
                        closest = d;
                        ret = *iter;
                        best_time=time;
-               }               
+               }
        }
 
        if(closest < radius*radius)
        {
                if(location)
                        *location = best_time;  // We need to square-root this because we were dealing with squared distances
-               
+
                return ret;
        }
-       
-       return 0;       
+
+       return 0;
 }
 
 
@@ -800,9 +800,9 @@ Duckmatic::save_sketch(const synfig::String& filename)const
        if(!file)return false;
 
        file<<"SKETCH"<<endl;
-       
+
        std::list<etl::handle<Stroke> >::const_iterator iter;
-       
+
        for(iter=persistant_stroke_list_.begin();iter!=persistant_stroke_list_.end();++iter)
        {
                file<<"C "
@@ -829,7 +829,7 @@ bool
 Duckmatic::load_sketch(const synfig::String& filename)
 {
        std::ifstream file(filename.c_str());
-                       
+
        if(!file)
                return false;
 
@@ -844,14 +844,14 @@ Duckmatic::load_sketch(const synfig::String& filename)
 
 
        etl::smart_ptr<std::list<synfig::Point> > stroke_data;
-       
+
        while(file)
        {
                getline(file,line);
 
                if(line.empty())
                        continue;
-               
+
                switch(line[0])
                {
                case 'C':
@@ -885,7 +885,7 @@ Duckmatic::load_sketch(const synfig::String& filename)
                        break;
                }
        }
-       
+
        sketch_filename_=filename;
        return true;
 }
@@ -900,8 +900,8 @@ Duckmatic::load_sketch(const synfig::String& filename)
 Duckmatic::Push::Push(Duckmatic *duckmatic_):
        duckmatic_(duckmatic_)
 {
-       duck_map=duckmatic_->duck_map;  
-       bezier_list_=duckmatic_->bezier_list_;  
+       duck_map=duckmatic_->duck_map;
+       bezier_list_=duckmatic_->bezier_list_;
        duck_data_share_map=duckmatic_->duck_data_share_map;
        stroke_list_=duckmatic_->stroke_list_;
        duck_dragger_=duckmatic_->duck_dragger_;
@@ -917,8 +917,8 @@ Duckmatic::Push::~Push()
 void
 Duckmatic::Push::restore()
 {
-       duckmatic_->duck_map=duck_map;  
-       duckmatic_->bezier_list_=bezier_list_;  
+       duckmatic_->duck_map=duck_map;
+       duckmatic_->bezier_list_=bezier_list_;
        duckmatic_->duck_data_share_map=duck_data_share_map;
        duckmatic_->stroke_list_=stroke_list_;
        duckmatic_->duck_dragger_=duck_dragger_;
@@ -936,7 +936,7 @@ Duckmatic::Push::restore()
 inline String guid_string(const synfigapp::ValueDesc& x)
 {
        if(x.parent_is_layer_param())
-               return strprintf("%s",x.get_layer()->get_guid().get_string().c_str())+x.get_param_name();               
+               return strprintf("%s",x.get_layer()->get_guid().get_string().c_str())+x.get_param_name();
        //if(x.is_value_node())
                return strprintf("%s",x.get_value_node()->get_guid().get_string().c_str());
 }
@@ -944,7 +944,7 @@ inline String guid_string(const synfigapp::ValueDesc& x)
 inline GUID calc_duck_guid(const synfigapp::ValueDesc& x,const synfig::TransformStack& transform_stack)
 {
        GUID ret(0);
-       
+
        if(x.parent_is_layer_param())
        {
                ret=x.get_layer()->get_guid()^GUID::hasher(x.get_param_name());
@@ -955,7 +955,7 @@ inline GUID calc_duck_guid(const synfigapp::ValueDesc& x,const synfig::Transform
        }
 
        ret^=transform_stack.get_guid();
-       return ret;     
+       return ret;
 }
 
 /*
@@ -964,7 +964,7 @@ Duckmatic::create_duck_from(const synfigapp::ValueDesc& value_desc,etl::handle<C
 {
        GUID duck_guid(calc_duck_guid(value_desc,transform_stack)^GUID::hasher(modifier));
        etl::handle<Duck> duck=new Duck();
-       
+
        return duck;
 }
 */
@@ -973,11 +973,11 @@ bool
 Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<CanvasView> canvas_view, const synfig::TransformStack& transform_stack, synfig::ParamDesc *param_desc, int multiple)
 {
        ValueBase::Type type=value_desc.get_value_type();
-#define REAL_COOKIE            reinterpret_cast<synfig::ParamDesc*>(28)                
+#define REAL_COOKIE            reinterpret_cast<synfig::ParamDesc*>(28)
        switch(type)
        {
        case ValueBase::TYPE_REAL:
-               
+
                if(!param_desc || param_desc==REAL_COOKIE || !param_desc->get_origin().empty())
                {
                        etl::handle<Duck> duck=new Duck();
@@ -997,7 +997,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        {
                                duck->set_editable(true);
                        }
-                       
+
                        if(param_desc && param_desc!=REAL_COOKIE)
                        {
                                if(!param_desc->get_origin().empty())
@@ -1034,11 +1034,11 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                0.0f
                                        ),
                                        value_desc
-                               )       
+                               )
                        );
 
                        duck->set_guid(calc_duck_guid(value_desc,transform_stack)^GUID::hasher(multiple));
-                       
+
                        add_duck(duck);
 
                        return true;
@@ -1046,14 +1046,14 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                break;
 
        case ValueBase::TYPE_ANGLE:
-               
+
                if(!param_desc || param_desc==REAL_COOKIE || !param_desc->get_origin().empty())
                {
                        etl::handle<Duck> duck=new Duck();
                        duck->set_type(Duck::TYPE_ANGLE);
                        duck->set_transform_stack(transform_stack);
                        synfig::Angle angle;
-                       
+
                        angle=value_desc.get_value(get_time()).get(Angle());
                        duck->set_point(Point(Angle::cos(angle).get(),Angle::sin(angle).get()));
                        duck->set_name(guid_string(value_desc));
@@ -1061,7 +1061,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        {
                                ValueNode::Handle value_node=value_desc.get_value_node();
                                //duck->set_name(strprintf("%x",value_node.get()));
-                               
+
                                // If the ValueNode can be directly manipulated,
                                // then set it as so.
                                duck->set_editable(synfigapp::is_editable(value_desc.get_value_node()));
@@ -1073,7 +1073,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                //duck->set_name(strprintf("%x",value_desc.get_layer().get())+value_desc.get_param_name());
                                duck->set_editable(true);
                        }
-                       
+
                        if(param_desc && param_desc!=REAL_COOKIE)
                        {
                                if(!param_desc->get_origin().empty())
@@ -1110,7 +1110,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                0.0f
                                        ),
                                        value_desc
-                               )       
+                               )
                        );
                        duck->set_guid(calc_duck_guid(value_desc,transform_stack)^GUID::hasher(multiple));
 
@@ -1119,18 +1119,18 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        return true;
                }
                break;
-               
+
        case ValueBase::TYPE_VECTOR:
                {
                        etl::handle<Duck> duck=new Duck();
                        duck->set_transform_stack(transform_stack);
-                       
+
                        duck->set_point(value_desc.get_value(get_time()).get(Point()));
                        duck->set_name(guid_string(value_desc));
                        if(value_desc.is_value_node())
                        {
                                //duck->set_name(strprintf("%x",value_desc.get_value_node().get()));
-                               
+
                                // If the ValueNode can be directly manipulated,
                                // then set it as so.
                                duck->set_editable(synfigapp::is_editable(value_desc.get_value_node()));
@@ -1141,7 +1141,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                //duck->set_name(strprintf("%x",value_desc.get_layer().get())+value_desc.get_param_name());
                                duck->set_editable(true);
                        }
-                       
+
                        // If we were passed a parameter description
                        if(param_desc)
                        {
@@ -1166,7 +1166,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        add_to_ducks(value_desc_origin,canvas_view, transform_stack);
                                        duck->set_box_duck(last_duck());
                                }
-                               
+
                                // If we have an origin
                                if(!param_desc->get_origin().empty())
                                {
@@ -1180,7 +1180,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                }
                                else
                                        duck->set_type(Duck::TYPE_POSITION);
-                                       
+
                                duck->set_scalar(param_desc->get_scalar());
                        }
                        else
@@ -1221,7 +1221,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                {
                        etl::handle<Bezier> bezier(new Bezier());
                        ValueNode_Composite::Handle value_node;
-                       
+
                        if(value_desc.is_value_node() &&
                                (value_node=ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node()))
                        )
@@ -1232,20 +1232,20 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                bezier->p1->set_type(Duck::TYPE_VERTEX);
                                if(!add_to_ducks(synfigapp::ValueDesc(value_node,1),canvas_view,transform_stack))
                                        return false;
-                               bezier->c1=last_duck();                         
+                               bezier->c1=last_duck();
                                bezier->c1->set_type(Duck::TYPE_TANGENT);
                                bezier->c1->set_origin(bezier->p1);
                                bezier->c1->set_scalar(0.33333333333333333);
                                bezier->c1->set_tangent(true);
 
-                               
+
                                if(!add_to_ducks(synfigapp::ValueDesc(value_node,2),canvas_view,transform_stack))
                                        return false;
                                bezier->p2=last_duck();
                                bezier->p2->set_type(Duck::TYPE_VERTEX);
                                if(!add_to_ducks(synfigapp::ValueDesc(value_node,3),canvas_view,transform_stack))
                                        return false;
-                               bezier->c2=last_duck();                         
+                               bezier->c2=last_duck();
                                bezier->c2->set_type(Duck::TYPE_TANGENT);
                                bezier->c2->set_origin(bezier->p2);
                                bezier->c2->set_scalar(-0.33333333333333333);
@@ -1260,7 +1260,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                value_desc
                                        )
                                );
-                               
+
                                add_bezier(bezier);
                        }
                        else if(value_desc.get_value().is_valid())
@@ -1277,15 +1277,15 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        name=guid_string(value_desc);
                                }
 
-                               duck_p=new class Duck(segment.p1);              
-                               duck_p->set_name(name+".P1");                                   
+                               duck_p=new class Duck(segment.p1);
+                               duck_p->set_name(name+".P1");
                                duck_p->set_type(Duck::TYPE_VERTEX);
-                               add_duck(duck_p);                                               
+                               add_duck(duck_p);
 
-                               duck_c=new class Duck(segment.t1);              
-                               duck_c->set_name(name+".T1");                                   
+                               duck_c=new class Duck(segment.t1);
+                               duck_c->set_name(name+".T1");
                                duck_c->set_type(Duck::TYPE_TANGENT);
-                               add_duck(duck_c);                                               
+                               add_duck(duck_c);
                                duck_c->set_origin(duck_p);
                                duck_c->set_scalar(0.33333333333333333);
                                duck_c->set_tangent(true);
@@ -1293,15 +1293,15 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                bezier->p1=duck_p;
                                bezier->c1=duck_c;
 
-                               duck_p=new class Duck(segment.p2);              
-                               duck_p->set_name(name+".P2");                                   
+                               duck_p=new class Duck(segment.p2);
+                               duck_p->set_name(name+".P2");
                                duck_p->set_type(Duck::TYPE_VERTEX);
-                               add_duck(duck_p);                                               
+                               add_duck(duck_p);
 
-                               duck_c=new class Duck(segment.t2);              
+                               duck_c=new class Duck(segment.t2);
                                duck_c->set_type(Duck::TYPE_TANGENT);
-                               duck_c->set_name(name+".T2");                                   
-                               add_duck(duck_c);                                               
+                               duck_c->set_name(name+".T2");
+                               add_duck(duck_c);
                                duck_c->set_origin(duck_p);
                                duck_c->set_scalar(-0.33333333333333333);
                                duck_c->set_tangent(true);
@@ -1310,14 +1310,14 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                bezier->c2=duck_c;
                                add_bezier(bezier);
                        }
-                       
+
                        return true;
                }
                break;
 */
        case ValueBase::TYPE_BLINEPOINT:
        {
-                       
+
                if(value_desc.is_value_node() &&
                        ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node())
                )
@@ -1325,7 +1325,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        ValueNode_Composite::Handle value_node;
                        value_node=ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node());
 
-                       
+
                        if(!add_to_ducks(synfigapp::ValueDesc(value_node,0),canvas_view,transform_stack))
                                return false;
                        etl::handle<Duck> vertex_duck(last_duck());
@@ -1333,13 +1333,13 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        if(!add_to_ducks(synfigapp::ValueDesc(value_node,4),canvas_view,transform_stack))
                                return false;
                        etl::handle<Duck> t1_duck(last_duck());
-                       
+
                        t1_duck->set_origin(vertex_duck);
                        t1_duck->set_scalar(-0.33333333333333333);
                        t1_duck->set_tangent(true);
-                       
+
                        etl::handle<Duck> t2_duck;
-                       
+
                        // If the tangents are split
                        if((*value_node->get_link("split"))(get_time()).get(bool()))
                        {
@@ -1361,7 +1361,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        }
                        return true;
                }
-               
+
        }
        break;
        case ValueBase::TYPE_LIST:
@@ -1373,28 +1373,28 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                {
                        ValueNode_BLine::Handle value_node;
                        value_node=ValueNode_BLine::Handle::cast_dynamic(value_desc.get_value_node());
-                       
+
                        int i,first=-1;
 
                        etl::handle<Bezier> bezier;
                        etl::handle<Duck> first_duck;
                        etl::handle<Duck> duck, tduck;
-                       
+
                        for(i=0;i<value_node->link_count();i++)
                        {
                                float amount(value_node->list[i].amount_at_time(get_time()));
                                if(amount<0.9999f)
                                        continue;
                                if(first==-1)first=i;
-                                       
+
                                BLinePoint bline_point((*value_node->get_link(i))(get_time()));
-                               
+
                                ValueNode_Composite::Handle vertex_value_node(
                                        ValueNode_Composite::Handle::cast_dynamic(
                                                value_node->get_link(i)
                                        )
                                );
-                                                               
+
                                // Add the vertex duck
                                if(vertex_value_node)
                                {
@@ -1419,7 +1419,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                        )
                                                );
                                                duck->set_value_desc(synfigapp::ValueDesc(value_node,i));
-                       
+
                                                if(param_desc)
                                                {
                                                        if(!param_desc->get_origin().empty())
@@ -1445,7 +1445,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                first_duck=duck;
                                        duck->set_transform_stack(transform_stack);
                                        duck->set_editable(false);
-                                       //duck->set_name(strprintf("%x-vertex",value_node->get_link(i).get()));                 
+                                       //duck->set_name(strprintf("%x-vertex",value_node->get_link(i).get()));
                                        duck->set_name(guid_string(synfigapp::ValueDesc(value_node,i))+".v");
 
                                        duck->set_type(Duck::TYPE_VERTEX);
@@ -1465,7 +1465,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        }
                                        duck->set_guid(calc_duck_guid(synfigapp::ValueDesc(value_node,i),transform_stack)^GUID::hasher(".v"));
                                        duck=add_similar_duck(duck);
-//                                     add_duck(duck);                 
+//                                     add_duck(duck);
                                }
 
                                // Add the width duck only if we have a hint of scale
@@ -1487,7 +1487,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        else
                                                synfig::error("Unable to add width duck!");
                                }
-                               
+
                                if(bezier)
                                {
                                        // Add the tangent1 duck
@@ -1503,7 +1503,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                tduck->set_transform_stack(transform_stack);
                                                tduck->set_editable(false);
                                                tduck->set_name(guid_string(synfigapp::ValueDesc(value_node,i))+".t1");
-//                                             tduck->set_name(strprintf("%x-tangent1",value_node->get_link(i).get()));                        
+//                                             tduck->set_name(strprintf("%x-tangent1",value_node->get_link(i).get()));
                                                tduck->set_guid(calc_duck_guid(synfigapp::ValueDesc(value_node,i),transform_stack)^GUID::hasher(".t1"));
                                                tduck=add_similar_duck(tduck);
 //                                             add_duck(duck);
@@ -1512,7 +1512,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        tduck->set_origin(duck);
                                        tduck->set_scalar(-0.33333333333333333);
                                        tduck->set_tangent(true);
-                                       
+
                                        bezier->p2=duck;
                                        bezier->c2=tduck;
 
@@ -1544,12 +1544,12 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        add_bezier(bezier);
                                        bezier=0;
                                }
-                               
+
                                if(i+1>=value_node->link_count() && !value_node->get_loop())
                                        continue;
-                               
+
                                bezier=new Bezier();
-                               
+
                                // Add the tangent2 duck
                                if(vertex_value_node)
                                {
@@ -1564,7 +1564,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        {
                                                tduck=new Duck(bline_point.get_tangent2());
                                                tduck->set_transform_stack(transform_stack);
-                                               //tduck->set_name(strprintf("%x-tangent2",value_node->get_link(i).get()));                      
+                                               //tduck->set_name(strprintf("%x-tangent2",value_node->get_link(i).get()));
                                                tduck->set_name(guid_string(synfigapp::ValueDesc(value_node,i))+".t2");
                                                tduck->set_guid(calc_duck_guid(synfigapp::ValueDesc(value_node,i),transform_stack)^GUID::hasher(".t2"));
                                        }
@@ -1572,7 +1572,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        {
                                                tduck=new Duck(bline_point.get_tangent1());
                                                tduck->set_transform_stack(transform_stack);
-                                               //tduck->set_name(strprintf("%x-tangent1",value_node->get_link(i).get()));                      
+                                               //tduck->set_name(strprintf("%x-tangent1",value_node->get_link(i).get()));
                                                tduck->set_name(guid_string(synfigapp::ValueDesc(value_node,i))+".t1");
                                                tduck->set_guid(calc_duck_guid(synfigapp::ValueDesc(value_node,i),transform_stack)^GUID::hasher(".t1"));
                                        }
@@ -1612,22 +1612,22 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                tduck->set_origin(duck);
                                tduck->set_scalar(0.33333333333333333);
                                tduck->set_tangent(true);
-                               
+
                                bezier->p1=duck;
                                bezier->c1=tduck;
-                               
+
                        }
                        // Loop if necessary
                        if(bezier && value_node->get_loop())
                        {
                                BLinePoint bline_point((*value_node->get_link(first))(get_time()));
-                               
+
                                ValueNode_Composite::Handle vertex_value_node(
                                        ValueNode_Composite::Handle::cast_dynamic(
                                                value_node->get_link(first)
                                        )
                                );
-                               
+
                                // Add the vertex duck
                                duck=first_duck;
                                /*
@@ -1653,12 +1653,12 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                        duck->set_origin(value_desc.get_layer()->get_param(param_desc->get_origin()).get(synfig::Point()));
                                        }
                                        duck->set_editable(false);
-                                       duck->set_name(strprintf("%x-vertex",value_node->get_link(first).get()));                       
+                                       duck->set_name(strprintf("%x-vertex",value_node->get_link(first).get()));
                                        duck->set_type(Duck::TYPE_VERTEX);
                                        duck=add_similar_duck(duck);
                                }
                                */
-                               
+
                                        // Add the tangent1 duck
                                        if(vertex_value_node)
                                        {
@@ -1672,7 +1672,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                                tduck->set_transform_stack(transform_stack);
                                                tduck->set_editable(false);
                                                tduck->set_name(guid_string(synfigapp::ValueDesc(value_node,first))+".t1");
-                                               //tduck->set_name(strprintf("%x-tangent1",value_node->get_link(first).get()));                  
+                                               //tduck->set_name(strprintf("%x-tangent1",value_node->get_link(first).get()));
                                                tduck=add_similar_duck(tduck);
                                                tduck->set_guid(calc_duck_guid(synfigapp::ValueDesc(value_node,i),transform_stack)^GUID::hasher(".t1"));
                                                //add_duck(duck);
@@ -1681,7 +1681,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                                        tduck->set_origin(duck);
                                        tduck->set_scalar(-0.33333333333333333);
                                        tduck->set_tangent(true);
-                                       
+
                                        bezier->p2=duck;
                                        bezier->c2=tduck;
                                        bezier->signal_user_click(2).connect(
@@ -1710,11 +1710,11 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
 
                                        add_bezier(bezier);
                                        bezier=0;
-                               
+
                        }
                        return true;
                }
-               else // Check for DynamicList           
+               else // Check for DynamicList
                if(value_desc.is_value_node() &&
                        ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_value_node())
                )
@@ -1722,18 +1722,18 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                        ValueNode_DynamicList::Handle value_node;
                        value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_value_node());
                        int i;
-                       
+
                        if(value_node->get_contained_type()==ValueBase::TYPE_VECTOR)
                        {
                                Bezier bezier;
                                for(i=0;i<value_node->link_count();i++)
-                               {                                       
+                               {
                                        if(!value_node->list[i].status_at_time(get_time()))
                                                continue;
                                        if(!add_to_ducks(synfigapp::ValueDesc(value_node,i),canvas_view,transform_stack))
                                                return false;
                                        etl::handle<Duck> duck(last_duck());
-                                       
+
                                        if(param_desc)
                                        {
                                                                synfigapp::ValueDesc value_desc_origin(value_desc.get_layer(),param_desc->get_origin());
@@ -1789,7 +1789,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<Canva
                {
                        // WRITEME
                }
-               
+
                return true;
        }
 
index f7aa539..68cad61 100644 (file)
@@ -81,7 +81,7 @@ namespace studio
 
 class CanvasView;
 class Duckmatic;
-       
+
 class DuckDrag_Base : public etl::shared_object
 {
 public:
@@ -115,11 +115,11 @@ class Duckmatic
 {
        friend class DuckDrag_Base;
        friend class DuckDrag_Translate;
-       
+
        /*
  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
        */
-       
+
 public:
 
 #ifdef HASH_MAP_H
@@ -137,13 +137,13 @@ typedef std::map<synfig::GUID,etl::smart_ptr<synfig::Point> > DuckDataMap;
        struct Bezier;
 
        class Push;
-       
+
        friend class Push;
-               
+
        typedef Duck::Type Type;
-       
+
        typedef std::list<float> GuideList;
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -164,7 +164,7 @@ private:
 
        synfig::GUID last_duck_guid;
 
-       std::list<etl::handle<Bezier> > bezier_list_;   
+       std::list<etl::handle<Bezier> > bezier_list_;
 
        //! I cannot recall what this is for
        //synfig::Vector snap;
@@ -178,12 +178,12 @@ private:
        sigc::signal<void> signal_grid_changed_;
 
        mutable sigc::signal<void> signal_sketch_saved_;
-       
+
        GuideList guide_list_x_;
        GuideList guide_list_y_;
 
        mutable synfig::String sketch_filename_;
-       
+
        /*
  -- ** -- P R O T E C T E D   D A T A -----------------------------------------
        */
@@ -208,16 +208,16 @@ protected:
        bool show_persistant_strokes;
 
        bool axis_lock;
-       
+
        /*
  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
        */
 
 private:
-       
+
        synfig::Vector last_translate_;
        synfig::Vector drag_offset_;
-       
+
        //etl::handle<Duck> selected_duck;
 
 
@@ -226,7 +226,7 @@ private:
        */
 
 public:
-       
+
        Duckmatic();
        virtual ~Duckmatic();
 
@@ -243,13 +243,13 @@ public:
        void set_guide_snap(bool x=true);
        bool get_guide_snap()const { return guide_snap; }
        void toggle_guide_snap() { set_guide_snap(!get_guide_snap()); }
-       
+
        //! Sets the state of the grid snap flag
        void set_grid_snap(bool x=true);
-       
+
        //! Gets the state of the grid snap flag
        bool get_grid_snap()const { return grid_snap; }
-       
+
        void enable_grid_snap() { set_grid_snap(true); }
 
        void disable_grid_snap() { set_grid_snap(false); }
@@ -257,30 +257,30 @@ public:
        void toggle_grid_snap() { set_grid_snap(!grid_snap); }
 
        synfig::Point snap_point_to_grid(const synfig::Point& x, float radius=0.1)const;
-       
+
        bool get_show_persistant_strokes()const { return show_persistant_strokes; }
        void set_show_persistant_strokes(bool x);
 
        //! Sets the size of the grid
        void set_grid_size(const synfig::Vector &s);
-       
+
        //! Returns the size of the grid
        const synfig::Vector &get_grid_size()const { return grid_size; }
-       
-       
+
+
        const synfig::Time &get_time()const { return cur_time; }
 
        bool get_axis_lock()const { return axis_lock; }
        void set_axis_lock(bool x) { axis_lock=x; }
-       
+
        void set_time(synfig::Time x) { cur_time=x; }
 
        bool is_duck_group_selectable(const etl::handle<Duck>& x)const;
-       
-       //const DuckMap& duck_map()const { return duck_map; }   
+
+       //const DuckMap& duck_map()const { return duck_map; }
        DuckList get_duck_list()const;
-       
-       const std::list<etl::handle<Bezier> >& bezier_list()const { return bezier_list_; }      
+
+       const std::list<etl::handle<Bezier> >& bezier_list()const { return bezier_list_; }
 
        const std::list<etl::handle<Stroke> >& stroke_list()const { return stroke_list_; }
 
@@ -292,13 +292,13 @@ public:
        etl::handle<Duck> get_selected_duck()const;
 
        DuckList get_selected_ducks()const;
-       
+
        //! Returns \a true if the given duck is currently selected
        bool duck_is_selected(const etl::handle<Duck> &duck)const;
 
 
        void refresh_selected_ducks();
-       
+
        void clear_selected_ducks();
 
        int count_selected_ducks()const;
@@ -306,23 +306,23 @@ public:
        void toggle_select_duck(const etl::handle<Duck> &duck);
 
        void select_duck(const etl::handle<Duck> &duck);
-       
+
        void select_ducks_in_box(const synfig::Vector& tl,const synfig::Vector& br);
 
        void unselect_duck(const etl::handle<Duck> &duck);
 
        void start_duck_drag(const synfig::Vector& offset);
-       void translate_selected_ducks(const synfig::Vector& vector);    
+       void translate_selected_ducks(const synfig::Vector& vector);
        bool end_duck_drag();
 
-       void signal_edited_selected_ducks();    
+       void signal_edited_selected_ducks();
+
+       void signal_user_click_selected_ducks(int button);
 
-       void signal_user_click_selected_ducks(int button);      
 
-       
        etl::handle<Duck> find_similar_duck(etl::handle<Duck> duck);
        etl::handle<Duck> add_similar_duck(etl::handle<Duck> duck);
-       
+
        void add_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color=synfig::Color(0,0,0));
 
        void add_persistant_stroke(etl::smart_ptr<std::list<synfig::Point> > stroke_point_list, const synfig::Color& color=synfig::Color(0,0,0));
@@ -341,7 +341,7 @@ public:
        etl::handle<Duck> last_duck()const;
 
        etl::handle<Bezier> last_bezier()const;
-       
+
        //! \note parameter is in canvas coordinates
        /*!     A radius of "zero" will have an unlimited radius */
        etl::handle<Duck> find_duck(synfig::Point pos, synfig::Real radius=0, Duck::Type type=Duck::TYPE_DEFAULT);
@@ -350,7 +350,7 @@ public:
        GuideList::iterator find_guide_y(synfig::Point pos, float radius=0.1);
        GuideList::const_iterator find_guide_x(synfig::Point pos, float radius=0.1)const { return const_cast<Duckmatic*>(this)->find_guide_x(pos,radius); }
        GuideList::const_iterator find_guide_y(synfig::Point pos, float radius=0.1)const { return const_cast<Duckmatic*>(this)->find_guide_y(pos,radius); }
-       
+
        //! \note parameter is in canvas coordinates
        /*!     A radius of "zero" will have an unlimited radius */
        //etl::handle<Bezier> find_bezier(synfig::Point pos, synfig::Real radius=0);
@@ -358,9 +358,9 @@ public:
        //! \note parameter is in canvas coordinates
        /*!     A radius of "zero" will have an unlimited radius */
        etl::handle<Bezier> find_bezier(synfig::Point pos, synfig::Real radius=0, float* location=0);
-       
+
        etl::handle<Bezier> find_bezier(synfig::Point pos, synfig::Real scale, synfig::Real radius, float* location=0);
-       
+
        bool add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle<CanvasView> canvas_view, const synfig::TransformStack& transform_stack_, synfig::ParamDesc *param_desc=0, int multiple=0);
 
        //! \writeme
@@ -372,7 +372,7 @@ public:
        void select_all_ducks();
 
        void clear_ducks();
-       
+
        bool save_sketch(const synfig::String& filename)const;
        bool load_sketch(const synfig::String& filename);
        const synfig::String& get_sketch_filename()const { return sketch_filename_; }
@@ -388,14 +388,14 @@ public:
 class Duckmatic::Push
 {
        Duckmatic *duckmatic_;
-       DuckMap duck_map;       
+       DuckMap duck_map;
        std::list<etl::handle<Bezier> > bezier_list_;
        std::list<etl::handle<Stroke> > stroke_list_;
        DuckDataMap duck_data_share_map;
        etl::handle<DuckDrag_Base> duck_dragger_;
-       
+
        bool needs_restore;
-       
+
 public:
        Push(Duckmatic *duckmatic_);
        ~Push();
@@ -409,7 +409,7 @@ struct Duckmatic::Bezier : public etl::shared_object
 private:
        sigc::signal<void,float> signal_user_click_[5];
 public:
-       
+
        etl::handle<Duck> p1,p2,c1,c2;
        bool is_valid()const { return p1 && p2 && c1 && c2; }
 
@@ -423,7 +423,7 @@ struct Duckmatic::Stroke : public etl::shared_object
 private:
        sigc::signal<void,float> signal_user_click_[5];
 public:
-       
+
        etl::smart_ptr<std::list<synfig::Point> > stroke_data;
 
        synfig::Color color;
index 0bc10d8..ecd7411 100644 (file)
@@ -54,7 +54,7 @@ public:
                cos_val(synfig::Angle::cos(angle).get())
        {
        }
-       
+
        synfig::Vector perform(const synfig::Vector& x)const
        {
                synfig::Point pos(x-origin);
index 4dc9468..c42fb94 100644 (file)
@@ -36,7 +36,7 @@
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 class Transform_Translate : public synfig::Transform
 {
 private:
index 4b5f99f..02e0dbb 100644 (file)
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 struct EventLayerClick : public Smach::event
 {
        synfig::Point pos;
        MouseButton button;
        etl::loose_handle<synfig::Layer> layer;
        Gdk::ModifierType modifier;
-       
+
        EventLayerClick(etl::loose_handle<synfig::Layer> layer, MouseButton button, const synfig::Point& pos, Gdk::ModifierType modifier=Gdk::ModifierType(0)):
                Smach::event(EVENT_WORKAREA_LAYER_CLICKED),
                pos(pos),
index ea5d020..1ab2ff6 100644 (file)
@@ -47,7 +47,7 @@ enum MouseButton
        BUTTON_RIGHT,
        BUTTON_UP,
        BUTTON_DOWN,
-       
+
        BUTTON_END
 };
 
@@ -57,7 +57,7 @@ struct EventMouse : public Smach::event
        MouseButton button;
        float pressure;
        Gdk::ModifierType modifier;
-       
+
        EventMouse(EventKey id, MouseButton button, const synfig::Point& pos, Gdk::ModifierType modifier=Gdk::ModifierType(0)):
                Smach::event(id),
                pos(pos),
@@ -80,7 +80,7 @@ struct EventBox : public Smach::event
        synfig::Point p1,p2;
        MouseButton button;
        Gdk::ModifierType modifier;
-       
+
        EventBox(EventKey id, const synfig::Point& p1,const synfig::Point& p2,MouseButton button=BUTTON_NONE, Gdk::ModifierType modifier=Gdk::ModifierType(0)):
                Smach::event(id),
                p1(p1),
index a262791..e55a266 100644 (file)
@@ -50,8 +50,8 @@ enum EventKey
        EVENT_TABLES_HIDE,
        EVENT_LAYER_SELECTION_CHANGED,
        EVENT_TABLES_SHOW,
-       
-       
+
+
        EVENT_WORKAREA_START=1000,              //!< Not a valid event
        EVENT_WORKAREA_LAYER_CLICKED,
        EVENT_WORKAREA_MULTIPLE_DUCKS_CLICKED,
@@ -64,7 +64,7 @@ enum EventKey
 
        EVENT_WORKAREA_STROKE,
 
-       EVENT_END               //!< Not a valid event  
+       EVENT_END               //!< Not a valid event
 };
 
 };
index 5502416..252dac1 100644 (file)
@@ -127,7 +127,7 @@ GroupActionManager::queue_refresh()
 {
        if(queued)
                return;
-       
+
        //queue_refresh_connection.disconnect();
        queue_refresh_connection=Glib::signal_idle().connect(
                sigc::bind_return(
@@ -135,7 +135,7 @@ GroupActionManager::queue_refresh()
                        false
                )
        );
-       
+
        queued=true;
 }
 
@@ -151,19 +151,19 @@ GroupActionManager::refresh()
 
 
        clear();
-       
+
        // Make sure we are ready
        if(!ui_manager_ || !group_tree_ || !canvas_interface_)
        {
                synfig::error("GroupActionManager::refresh(): Not ready!");
                return;
        }
-       
+
        if(group_tree_->get_selection()->count_selected_rows()==0)
                return;
-       
+
        String ui_info;
-       
+
        {
                {
                        action_group_->add(
@@ -184,19 +184,19 @@ GroupActionManager::refresh()
 //             bool multiple_selected(group_tree_->get_selection()->count_selected_rows()>1);
                LayerGroupTree::LayerList selected_layers(group_tree_->get_selected_layers());
                std::list<synfig::String> selected_groups(group_tree_->get_selected_groups());
-               
+
                synfig::info("selected_layers.size()=%d",selected_layers.size());
                synfig::info("selected_groups.size()=%d",selected_groups.size());
-               
+
                {
                        bool canvas_set(false);
                        synfigapp::Action::ParamList param_list;
                        param_list.add("time",get_canvas_interface()->get_time());
                        param_list.add("canvas_interface",get_canvas_interface());
-                       
+
                        {
                                LayerGroupTree::LayerList::iterator iter;
-                       
+
                                for(iter=selected_layers.begin();iter!=selected_layers.end();++iter)
                                {
                                        if(!canvas_set)
@@ -210,7 +210,7 @@ GroupActionManager::refresh()
 
                        {
                                std::list<synfig::String>::iterator iter;
-                       
+
                                for(iter=selected_groups.begin();iter!=selected_groups.end();++iter)
                                {
                                        param_list.add("group",(synfig::String)*iter);
@@ -222,12 +222,12 @@ GroupActionManager::refresh()
                                param_list.add("canvas",Canvas::Handle(get_canvas_interface()->get_canvas()));
                                canvas_set=true;
                        }
-                       
+
                        handle<studio::Instance>::cast_static(get_canvas_interface()->get_instance())->
                                add_actions_to_group(action_group_, ui_info,   param_list, synfigapp::Action::CATEGORY_GROUP);
                        }
        }
-       
+
        if(true)
        {
                ui_info="<ui><menubar action='menu-main'><menu action='menu-group'>"+ui_info+"</menu></menubar></ui>";
@@ -250,9 +250,9 @@ GroupActionManager::on_action_add()
        LayerGroupTreeStore::Model model;
 
        String group_name;
-       
+
        Gtk::TreeIter selected_iter;
-       
+
        if(group_tree_->get_selection()->count_selected_rows())
        {
                selected_iter=(
@@ -263,11 +263,11 @@ GroupActionManager::on_action_add()
                if(selected_iter && selected_iter->parent())
                        group_name=(Glib::ustring)(*selected_iter->parent())[model.group_name]+'.';
        }
-       
+
        group_name+=_("UnnamedGroup");
-       
+
        Gtk::TreePath path(group_tree_->get_model()->on_group_added(group_name));
-       
+
        group_tree_->expand_to_path(path);
        group_tree_->set_cursor(path,true);
 }
index 6498cf0..e5bb601 100644 (file)
@@ -49,14 +49,14 @@ class GroupActionManager
 
        Glib::RefPtr<Gtk::ActionGroup>  action_group_;
        Gtk::UIManager::ui_merge_id     popup_id_;
-       
+
        sigc::connection selection_changed_connection;
 
        bool queued;
        sigc::connection queue_refresh_connection;
 
 private:
-       
+
        void on_action_add();
 
 public:
index ae6016a..460b100 100644 (file)
@@ -88,18 +88,18 @@ void
 HistoryTreeStore::rebuild()
 {
        synfigapp::Action::Stack::const_iterator iter;
-       
+
        clear();
-       
+
        for(iter=instance()->undo_action_stack().begin();iter!=instance()->undo_action_stack().end();++iter)
        {
-               insert_action(*(prepend()),*iter,true,true,false);      
+               insert_action(*(prepend()),*iter,true,true,false);
        }
        curr_row=*children().end();
        for(iter=instance()->redo_action_stack().begin();iter!=instance()->redo_action_stack().end();++iter)
        {
-               insert_action(*(append()),*iter,true,false,true);       
-       }               
+               insert_action(*(append()),*iter,true,false,true);
+       }
 }
 
 void
@@ -112,13 +112,13 @@ HistoryTreeStore::insert_action(Gtk::TreeRow row,etl::handle<synfigapp::Action::
        row[model.is_active] = action->is_active();
        row[model.is_undo] = is_undo;
        row[model.is_redo] = is_redo;
-       
+
        synfigapp::Action::CanvasSpecific *specific_action;
        specific_action=dynamic_cast<synfigapp::Action::CanvasSpecific*>(action.get());
        if(specific_action)
        {
                row[model.canvas] = specific_action->get_canvas();
-               row[model.canvas_id] = specific_action->get_canvas()->get_id();         
+               row[model.canvas_id] = specific_action->get_canvas()->get_id();
        }
 
        etl::handle<synfigapp::Action::Group> group;
@@ -132,8 +132,8 @@ HistoryTreeStore::insert_action(Gtk::TreeRow row,etl::handle<synfigapp::Action::
                        insert_action(child_row,*iter,true,is_undo,is_redo);
                }
        }
-       
-       //row[model.icon] = Gtk::Button().render_icon(Gtk::StockID("synfig-canvas"),Gtk::ICON_SIZE_SMALL_TOOLBAR);      
+
+       //row[model.icon] = Gtk::Button().render_icon(Gtk::StockID("synfig-canvas"),Gtk::ICON_SIZE_SMALL_TOOLBAR);
 }
 
 
@@ -154,7 +154,7 @@ HistoryTreeStore::on_undo_stack_cleared()
 {
        Gtk::TreeModel::Children::iterator iter,next;
        Gtk::TreeModel::Children children_(children());
-       
+
        for(next=children_.begin(),iter=next++; iter != children_.end(); iter=(next!=children_.end())?next++:next)
        {
                Gtk::TreeModel::Row row = *iter;
@@ -168,7 +168,7 @@ HistoryTreeStore::on_redo_stack_cleared()
 {
        Gtk::TreeModel::Children::iterator iter,next;
        Gtk::TreeModel::Children children_(children());
-       
+
        for(next=children_.begin(),iter=next++; iter != children_.end(); iter=(next!=children_.end())?next++:next)
        {
                Gtk::TreeModel::Row row = *iter;
@@ -202,7 +202,7 @@ HistoryTreeStore::on_action_status_changed(etl::handle<synfigapp::Action::Undoab
 {
        Gtk::TreeModel::Children::iterator iter;
        Gtk::TreeModel::Children children_(children());
-       
+
        for(iter=children_.begin(); iter != children_.end(); ++iter)
        {
                Gtk::TreeModel::Row row = *iter;
@@ -211,5 +211,5 @@ HistoryTreeStore::on_action_status_changed(etl::handle<synfigapp::Action::Undoab
                        row[model.is_active]=action->is_active();
                        return;
                }
-       }       
+       }
 }
index 3633568..4aa626f 100644 (file)
@@ -41,7 +41,7 @@
 namespace studio {
 
 class Instance;
-       
+
 class HistoryTreeStore : virtual public Gtk::TreeStore
 {
        /*
@@ -82,7 +82,7 @@ public:
        */
 
 public:
-       
+
        const Model model;
 
        /*
@@ -92,14 +92,14 @@ public:
 private:
 
        etl::loose_handle<studio::Instance> instance_;
-       Gtk::TreeIter curr_row; 
+       Gtk::TreeIter curr_row;
 
        /*
  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
        */
 
 private:
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -107,13 +107,13 @@ private:
 private:
 
        void on_undo();
-       
+
        void on_redo();
-       
+
        void on_undo_stack_cleared();
-       
+
        void on_redo_stack_cleared();
-       
+
        void on_new_action(etl::handle<synfigapp::Action::Undoable> action);
 
        void on_action_status_changed(etl::handle<synfigapp::Action::Undoable> action);
@@ -123,7 +123,7 @@ private:
        */
 
 public:
-       
+
        HistoryTreeStore(etl::loose_handle<studio::Instance> instance_);
        ~HistoryTreeStore();
 
@@ -143,7 +143,7 @@ public:
 public:
 
        static Glib::RefPtr<HistoryTreeStore> create(etl::loose_handle<studio::Instance> instance);
-       
+
 }; // END of class HistoryTreeStore
 
 }; // END of namespace studio
index 68a8190..ee131c1 100644 (file)
@@ -91,7 +91,7 @@ IconControler::IconControler(const synfig::String& basepath)
        if(synfig_root) {
                path_to_icons=synfig_root;
                path_to_icons+=ETL_DIRECTORY_SEPERATOR;
-               
+
                path_to_icons+="share/pixmaps";
        }
        path_to_icons+=ETL_DIRECTORY_SEPERATOR;
@@ -102,7 +102,7 @@ IconControler::IconControler(const synfig::String& basepath)
        {
                synfig::warning("Unable to open "+path_to_icons+"synfig_icon."+IMAGE_EXT);
        }
-       
+
 /*
 #define INIT_STOCK_ICON(name,iconfile,desc)                                                    \
        stock_##name=Gtk::StockItem(Gtk::StockID("synfig-" #name),desc);                        \
@@ -130,7 +130,7 @@ IconControler::IconControler(const synfig::String& basepath)
 
 #define INIT_STOCK_ITEM(name,desc)                                                     \
        stock_##name=Gtk::StockItem(Gtk::StockID("synfig-" #name),desc);                        \
-       Gtk::Stock::add(stock_##name);                                                          
+       Gtk::Stock::add(stock_##name);
 
        INIT_STOCK_ICON(swap_colors,"swap_colors_icon."IMAGE_EXT,_("Swap Colors"));
        INIT_STOCK_ICON(canvas,"canvas_icon."IMAGE_EXT,_("Canvas"));
@@ -198,7 +198,7 @@ IconControler::IconControler(const synfig::String& basepath)
        INIT_STOCK_ICON(mirror,"mirror_icon."IMAGE_EXT,_("Mirror Tool"));
 
        icon_factory->add_default();
-       
+
        Gtk::IconSize::register_new("synfig-small_icon",12,12);
        for(int i(0);i<(int)ValueBase::TYPE_END;i++)
                _tree_pixbuf_table_value_type[i]=Gtk::Button().render_icon(value_icon(ValueBase::Type(i)),Gtk::ICON_SIZE_SMALL_TOOLBAR);
@@ -256,10 +256,10 @@ IconControler::get_tool_cursor(const Glib::ustring& name,const Glib::RefPtr<Gdk:
        );
 */
        DEBUGPOINT();
-       
+
        Gdk::Color FG("#000000");
        Gdk::Color BG("#FF00FF");
-       
+
        DEBUGPOINT();
        return Gdk::Cursor(pixmap, pixmap, FG, BG, 0, 0);
 }
@@ -321,7 +321,7 @@ studio::valuenode_icon(etl::handle<synfig::ValueNode> value_node)
        }
        else
        {
-               return Gtk::StockID("synfig-value_node");               
+               return Gtk::StockID("synfig-value_node");
        }
 }
 
@@ -347,7 +347,7 @@ studio::get_action_stock_id(const synfigapp::Action::BookEntry& action)
        else if(action.task=="set_off")         stock_id=Gtk::Stock::NO;
        else if(action.task=="remove")          stock_id=Gtk::Stock::DELETE;
        else                                                            stock_id=Gtk::StockID("synfig-"+action.task);
-       
+
        return stock_id;
 }
 
index 1ec6903..3c10dae 100644 (file)
@@ -81,7 +81,7 @@ Instance::Instance(Canvas::Handle canvas):
        canvas_tree_store_=Gtk::TreeStore::create(model);
 
        id_=instance_count_++;
-       
+
        // Connect up all the signals
        signal_filename_changed().connect(sigc::mem_fun(*this,&studio::Instance::update_all_titles));
        signal_unsaved_status_changed().connect(sigc::hide(sigc::mem_fun(*this,&studio::Instance::update_all_titles)));
@@ -95,9 +95,9 @@ Instance::Instance(Canvas::Handle canvas):
                        )
                )
        );
-       
+
        canvas_tree_store_=Gtk::TreeStore::create(canvas_tree_model);
-       
+
        refresh_canvas_tree();
 }
 
@@ -124,20 +124,20 @@ Instance::create(Canvas::Handle canvas)
 
        // Add the new instance to the application's instance list
        App::instance_list.push_back(instance);
-       
+
        // Set up the instance with the default UI manager
        instance->synfigapp::Instance::set_ui_interface(App::get_ui_interface());
-       
+
        // Signal the new instance
        App::signal_instance_created()(instance);
-       
+
        // And then make sure that is has been selected
        App::set_selected_instance(instance);
-       
+
        // Create the initial window for the root canvas
        instance->focus(canvas);
-       
-       return instance;        
+
+       return instance;
 }
 
 handle<CanvasView>
@@ -150,11 +150,11 @@ Instance::find_canvas_view(Canvas::Handle canvas)
                canvas=canvas->parent();
 
        CanvasViewList::iterator iter;
-       
+
        for(iter=canvas_view_list().begin();iter!=canvas_view_list().end();iter++)
                if((*iter)->get_canvas()==canvas)
                        return *iter;
-       
+
        return CanvasView::create(this,canvas);
 }
 
@@ -214,16 +214,16 @@ studio::Instance::save()
        }
 
        return synfigapp::Instance::save();
-       
+
 }
 
 void
 studio::Instance::dialog_save_as()
 {
        string filename="*.sif";
-       
+
        Canvas::Handle canvas(get_canvas());
-       
+
        {
                OneMoment one_moment;
                std::set<Node*>::iterator iter;
@@ -241,7 +241,7 @@ studio::Instance::dialog_save_as()
                                                "files that are currently open. Close these\n"
                                                "other files first before trying to use \"SaveAs\"."
                                        );
-                                       
+
                                        return;
                                }
                                if(parent_layer)
@@ -249,7 +249,7 @@ studio::Instance::dialog_save_as()
                        }
                }
        }
-       
+
        while(App::dialog_saveas_file("SaveAs", filename))
        {
                // If the filename still has wildcards, then we should
@@ -273,14 +273,14 @@ studio::Instance::dialog_save_as()
                {
                        continue;
                }
-                       
+
                if(save_as(filename))
                        break;
-               
+
                App::dialog_error_blocking("SaveAs - Error","Unable to save file");
        }
 }
-       
+
 void
 Instance::update_all_titles()
 {
@@ -339,14 +339,14 @@ Instance::close()
        }
 }
 
-       
+
 void
 Instance::insert_canvas(Gtk::TreeRow row,Canvas::Handle canvas)
 {
        CanvasTreeModel canvas_tree_model;
        assert(canvas);
 
-       row[canvas_tree_model.icon] = Gtk::Button().render_icon(Gtk::StockID("synfig-canvas"),Gtk::ICON_SIZE_SMALL_TOOLBAR);    
+       row[canvas_tree_model.icon] = Gtk::Button().render_icon(Gtk::StockID("synfig-canvas"),Gtk::ICON_SIZE_SMALL_TOOLBAR);
        row[canvas_tree_model.id] = canvas->get_id();
        row[canvas_tree_model.name] = canvas->get_name();
        if(canvas->is_root())
@@ -356,10 +356,10 @@ Instance::insert_canvas(Gtk::TreeRow row,Canvas::Handle canvas)
                row[canvas_tree_model.label] = canvas->get_id();
        else
        if(!canvas->get_name().empty())
-               row[canvas_tree_model.label] = canvas->get_name();              
+               row[canvas_tree_model.label] = canvas->get_name();
        else
-               row[canvas_tree_model.label] = _("[Unnamed]");          
-               
+               row[canvas_tree_model.label] = _("[Unnamed]");
+
        row[canvas_tree_model.canvas] = canvas;
        row[canvas_tree_model.is_canvas] = true;
        row[canvas_tree_model.is_value_node] = false;
@@ -367,7 +367,7 @@ Instance::insert_canvas(Gtk::TreeRow row,Canvas::Handle canvas)
        {
                synfig::Canvas::Children::iterator iter;
                synfig::Canvas::Children &children(canvas->children());
-       
+
                for(iter=children.begin();iter!=children.end();iter++)
                        insert_canvas(*(canvas_tree_store()->append(row.children())),*iter);
        }
@@ -447,7 +447,7 @@ Instance::dialog_cvs_commit()
 
                if(!App::dialog_entry(_("CVS Commit"),_("Enter a log message describing the changes you have made"), message))
                        return;
-               
+
                OneMoment one_moment;
                cvs_commit(message);
        }
@@ -470,7 +470,7 @@ Instance::dialog_cvs_add()
        try
        {
                string message;
-               
+
                //if(!App::dialog_entry(_("CVS Add"),_("Enter a log message describing the file"), message))
                //      return;
                OneMoment one_moment;
@@ -497,7 +497,7 @@ Instance::dialog_cvs_update()
                App::dialog_error_blocking(_("Info"),_("This file is up-to-date"));
                return;
        }
-       
+
        try
        {
                String filename(get_file_name());
@@ -510,7 +510,7 @@ Instance::dialog_cvs_update()
                OneMoment one_moment;
                time_t oldtime=get_original_timestamp();
                cvs_update();
-               calc_repository_info();         
+               calc_repository_info();
                // If something has been updated...
                if(oldtime!=get_original_timestamp())
                {
@@ -568,7 +568,7 @@ Instance::_revert(Instance *instance)
        String filename(instance->get_file_name());
 
        Canvas::Handle canvas(instance->get_canvas());
-       
+
        instance->close();
 
        if(canvas->count()!=1)
@@ -578,7 +578,7 @@ Instance::_revert(Instance *instance)
                one_moment.show();
        }
        canvas=0;
-       
+
        App::open(filename);
 }
 
@@ -634,7 +634,7 @@ Instance::safe_close()
                if(answer==synfigapp::UIInterface::RESPONSE_CANCEL)
                        return false;
        }
-       
+
        close();
 
        return true;
@@ -646,18 +646,18 @@ Instance::add_actions_to_group(const Glib::RefPtr<Gtk::ActionGroup>& action_grou
 {
        synfigapp::Action::CandidateList candidate_list;
        synfigapp::Action::CandidateList::iterator iter;
-       
+
        candidate_list=compile_candidate_list(param_list,category);
-       
+
        candidate_list.sort();
 
        if(candidate_list.empty())
                synfig::warning("Action CandidateList is empty!");
-       
+
        for(iter=candidate_list.begin();iter!=candidate_list.end();++iter)
        {
                Gtk::StockID stock_id(get_action_stock_id(*iter));
-               
+
                if(!(iter->category&synfigapp::Action::CATEGORY_HIDDEN))
                {
                        action_group->add(Gtk::Action::create(
@@ -686,21 +686,21 @@ Instance::add_actions_to_menu(Gtk::Menu *menu, const synfigapp::Action::ParamLis
 {
        synfigapp::Action::CandidateList candidate_list;
        synfigapp::Action::CandidateList::iterator iter;
-       
+
        candidate_list=compile_candidate_list(param_list,category);
-       
+
        candidate_list.sort();
 
        if(candidate_list.empty())
                synfig::warning("Action CandidateList is empty!");
-       
+
        for(iter=candidate_list.begin();iter!=candidate_list.end();++iter)
        {
                if(!(iter->category&synfigapp::Action::CATEGORY_HIDDEN))
                {
                        Gtk::Image* image(manage(new Gtk::Image()));
                        Gtk::Stock::lookup(get_action_stock_id(*iter),Gtk::ICON_SIZE_MENU,*image);
-                       
+
                        /*
                        if(iter->task=="raise")
                                Gtk::Stock::lookup(Gtk::Stock::GO_UP,Gtk::ICON_SIZE_MENU,*image);
@@ -752,12 +752,12 @@ Instance::add_actions_to_menu(Gtk::Menu *menu, const synfigapp::Action::ParamLis
 {
        synfigapp::Action::CandidateList candidate_list;
        synfigapp::Action::CandidateList candidate_list2;
-       
+
        synfigapp::Action::CandidateList::iterator iter;
-       
+
        candidate_list=compile_candidate_list(param_list,category);
        candidate_list2=compile_candidate_list(param_list2,category);
-       
+
        candidate_list.sort();
 
        if(candidate_list.empty())
@@ -772,7 +772,7 @@ Instance::add_actions_to_menu(Gtk::Menu *menu, const synfigapp::Action::ParamLis
                if(iter2!=candidate_list2.end())
                        candidate_list2.erase(iter2);
        }
-               
+
        for(iter=candidate_list2.begin();iter!=candidate_list2.end();++iter)
        {
                if(!(iter->category&synfigapp::Action::CATEGORY_HIDDEN))
@@ -881,7 +881,7 @@ Instance::process_action(String name, synfigapp::Action::ParamList param_list)
        assert(synfigapp::Action::book().count(name));
 
        synfigapp::Action::BookEntry entry(synfigapp::Action::book().find(name)->second);
-       
+
        synfigapp::Action::Handle action(entry.factory());
 
        if(!action)
@@ -889,12 +889,12 @@ Instance::process_action(String name, synfigapp::Action::ParamList param_list)
                synfig::error("Bad Action");
                return;
        }
-       
+
        action->set_param_list(param_list);
 
        synfigapp::Action::ParamVocab param_vocab(entry.get_param_vocab());
        synfigapp::Action::ParamVocab::const_iterator iter;
-       
+
        for(iter=param_vocab.begin();iter!=param_vocab.end();++iter)
        {
                if(!iter->get_mutual_exclusion().empty() && param_list.count(iter->get_mutual_exclusion()))
@@ -923,7 +923,7 @@ Instance::process_action(String name, synfigapp::Action::ParamList param_list)
                        }
                }
        }
-               
+
        if(!action->is_ready())
        {
                synfig::error("Action not ready");
@@ -937,12 +937,12 @@ void
 Instance::make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfigapp::ValueDesc value_desc, float location)
 {
        Gtk::Menu& parammenu(*menu);
-       
+
        etl::handle<synfigapp::CanvasInterface> canvas_interface(find_canvas_interface(canvas));
-       
+
        if(!canvas_interface)
                return;
-       
+
        synfigapp::Action::ParamList param_list,param_list2;
        param_list=canvas_interface->generate_param_list(value_desc);
        param_list.add("origin",location);
@@ -958,7 +958,7 @@ Instance::make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfiga
                param_list2.add("origin",location);
        }
 
-       
+
        // Populate the convert menu by looping through
        // the ValueNode book and find the ones that are
        // relevant.
@@ -983,7 +983,7 @@ Instance::make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfiga
                        }
                }
 
-               parammenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::CONVERT,*convert_menu));                       
+               parammenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::CONVERT,*convert_menu));
        }
 
        if(param_list2.empty())
@@ -999,7 +999,7 @@ Instance::make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfiga
        if(value_desc.is_value_node() && ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node()))
        {
                ValueNode_Animated::Handle value_node(ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node()));
-               
+
                try
                {
                        WaypointList::iterator iter(value_node->find(canvas->get_time()));
@@ -1037,12 +1037,12 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
        widget_waypoint_model.show();
 
        dialog.get_vbox()->pack_start(widget_waypoint_model);
-       
-       
+
+
        dialog.add_button(Gtk::StockID("gtk-apply"),1);
        dialog.add_button(Gtk::StockID("gtk-cancel"),0);
        dialog.show();
-       
+
        DEBUGPOINT();
        if(dialog.run()==0 || widget_waypoint_model.get_waypoint_model().is_trivial())
                return;
@@ -1053,12 +1053,12 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
        for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)
        {
                synfigapp::ValueDesc value_desc(*iter);
-               
+
                if(!value_desc.is_valid())
                        continue;
 
                ValueNode_Animated::Handle value_node;
-               
+
                // If this value isn't a ValueNode_Animated, but
                // it is somewhat constant, then go ahead and convert
                // it to a ValueNode_Animated.
@@ -1069,11 +1069,11 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
                                value=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())->get_value();
                        else
                                value=value_desc.get_value();
-                       
+
                        value_node=ValueNode_Animated::create(value,canvas_interface->get_time());
-                       
+
                        synfigapp::Action::Handle action;
-                       
+
                        if(!value_desc.is_value_node())
                        {
                                action=synfigapp::Action::create("value_desc_connect");
@@ -1086,11 +1086,11 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
                                action->set_param("dest",value_desc.get_value_node());
                                action->set_param("src",ValueNode::Handle(value_node));
                        }
-                       
+
                        action->set_param("canvas",canvas_view->get_canvas());
                        action->set_param("canvas_interface",canvas_interface);
-                       
-       
+
+
                        if(!canvas_interface->get_instance()->perform_action(action))
                        {
                                canvas_view->get_ui_interface()->error(_("Unable to convert to animated waypoint"));
@@ -1103,11 +1103,11 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
                        if(value_desc.is_value_node())
                                value_node=ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node());
                }
-               
-               
+
+
                if(value_node)
                {
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("waypoint_set_smart"));
 
                        if(!action)
@@ -1116,14 +1116,14 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
                                group.cancel();
                                return;
                        }
-                               
+
 
                        action->set_param("canvas",canvas_view->get_canvas());
-                       action->set_param("canvas_interface",canvas_interface);                 
-                       action->set_param("value_node",ValueNode::Handle(value_node));                  
-                       action->set_param("time",canvas_interface->get_time());                                         
+                       action->set_param("canvas_interface",canvas_interface);
+                       action->set_param("value_node",ValueNode::Handle(value_node));
+                       action->set_param("time",canvas_interface->get_time());
                        action->set_param("model",widget_waypoint_model.get_waypoint_model());
-               
+
                        if(!canvas_interface->get_instance()->perform_action(action))
                        {
                                canvas_view->get_ui_interface()->error(_("Unable to set a specific waypoint"));
@@ -1137,7 +1137,7 @@ edit_several_waypoints(etl::handle<CanvasView> canvas_view, std::list<synfigapp:
                        //group.cancel();
                        //return;
                }
-                       
+
        }
 }
 
index ac9a763..40c26f2 100644 (file)
@@ -47,7 +47,7 @@ namespace Gtk { class Menu; class ActionGroup; };
 namespace studio {
 
 class CanvasView;
-       
+
 
 class Instance : public synfigapp::Instance
 {
@@ -75,7 +75,7 @@ public:
                Gtk::TreeModelColumn<bool> is_editable;
 
                Gtk::TreeModelColumn<synfigapp::ValueDesc> value_desc;
-       
+
                CanvasTreeModel()
                {
                        add(value);
@@ -95,12 +95,12 @@ public:
                        add(link_id);
                }
        } canvas_tree_model;
-       
+
 private:
 
        sigc::signal<void,CanvasView*> signal_canvas_view_created_;
        sigc::signal<void,CanvasView*> signal_canvas_view_deleted_;
-       
+
        sigc::signal<void> signal_undo_redo_status_changed_;
 
        //! Tree containing the canvases -- used for the "canvas browser"
@@ -117,7 +117,7 @@ private:
 
        //! List of canvas view windows
        CanvasViewList canvas_view_list_;
-       
+
        bool undo_status_;
        bool redo_status_;
 
@@ -144,7 +144,7 @@ public:
        bool get_redo_status()const { return redo_status_; }
 
        int get_visible_canvases()const;
-       
+
        Glib::RefPtr<Gtk::TreeStore> canvas_tree_store() { return canvas_tree_store_; }
 
        Glib::RefPtr<const Gtk::TreeStore> canvas_tree_store()const { return canvas_tree_store_; }
@@ -157,14 +157,14 @@ public:
        static int get_count() { return instance_count_; }
 
        //etl::handle<synfig::Canvas> get_canvas()const { return synfigapp::Instance::get_canvas(); }
-       
+
        etl::handle<CanvasView> find_canvas_view(etl::handle<synfig::Canvas> canvas);
 
        //! Sets the focus to a specific canvas
        void focus(etl::handle<synfig::Canvas> canvas);
 
        CanvasViewList & canvas_view_list() { return canvas_view_list_; }
-       
+
        const CanvasViewList & canvas_view_list()const { return canvas_view_list_; }
 
        bool save_as(const synfig::String &filename)const;
@@ -183,16 +183,16 @@ public:
        void dialog_cvs_update();
 
        void dialog_cvs_revert();
-       
+
        //! Closes the instance of this composition
        void close();
-       
+
        void revert();
-       
+
        void update_all_titles();
 
        void refresh_canvas_tree();
-       
+
        bool safe_revert();
        bool safe_close();
 
index d9e3f98..d8032d1 100644 (file)
@@ -105,7 +105,7 @@ pipe_listen_thread()
                        synfig::error("IPC(): Call to CreateNamedPipe failed. Ignore next error. GetLastError=%d",GetLastError());
                        return;
                }
-               
+
                bool connected;
                connected=ConnectNamedPipe(pipe_handle,NULL)?true:(GetLastError()==ERROR_PIPE_CONNECTED);
                DWORD read_bytes;
@@ -116,7 +116,7 @@ pipe_listen_thread()
                if(connected)
                do {
                        String data;
-                       char c;                 
+                       char c;
                        do
                        {
                                success= ReadFile(
@@ -133,7 +133,7 @@ pipe_listen_thread()
                        cmd_queue.push_back(data);
                        cmd_dispatcher->emit();
                } while(success && read_bytes);
-               
+
                CloseHandle(pipe_handle);
        }
 }
@@ -161,22 +161,22 @@ IPC::IPC()
 
        cmd_dispatcher=new Glib::Dispatcher;
        cmd_dispatcher->connect(sigc::ptr_fun(empty_cmd_queue));
-       
+
        Glib::Thread::create(
                sigc::ptr_fun(pipe_listen_thread),
                false
        );
-       
+
 #else
-       
+
        remove(fifo_path().c_str());
        fd=-1;
-       
+
        if(mkfifo(fifo_path().c_str(), S_IRWXU)!=0)
        {
                synfig::error("IPC(): mkfifo failed for "+fifo_path());
        }
-       
+
        {
                fd=open(fifo_path().c_str(),O_RDWR);
 
@@ -189,7 +189,7 @@ IPC::IPC()
                else
                {
                        file=SmartFILE(fdopen(fd,"r"));
-                       
+
                        Glib::signal_io().connect(
                                sigc::mem_fun(this,&IPC::fifo_activity),
                                fd,
@@ -206,7 +206,7 @@ IPC::~IPC()
        //      fclose(file.get());
 
        remove(fifo_path().c_str());
-       
+
        //if(fd>=0)
        //      close(fd);
 }
@@ -225,7 +225,7 @@ bool
 IPC::fifo_activity(Glib::IOCondition cond)
 {
        synfig::info(__FILE__":%d: fifo activity",__LINE__);
-       
+
        if(cond&(Glib::IO_ERR|Glib::IO_HUP|Glib::IO_NVAL))
        {
                if(cond&(Glib::IO_ERR))
@@ -248,7 +248,7 @@ IPC::fifo_activity(Glib::IOCondition cond)
                                command+=tmp;
                } while(tmp!='\n');
        }
-       
+
        process_command(command);
        return true;
 }
@@ -258,13 +258,13 @@ IPC::process_command(const synfig::String& command_line)
 {
        if(command_line.empty())
                return false;
-       
+
        char cmd=command_line[0];
-       
+
        String args(command_line.begin()+1,command_line.end());
        while(!args.empty() && args[0]==' ') args.erase(args.begin());
        while(!args.empty() && args[args.size()-1]=='\n' || args[args.size()-1]==' ') args.erase(args.end()-1);
-       
+
        switch(toupper(cmd))
        {
                case 'F': // Focus/Foreground
@@ -286,7 +286,7 @@ IPC::process_command(const synfig::String& command_line)
                        synfig::warning("Received unknown command '%c' with arg '%s'",cmd,args.c_str());
                        break;
        }
-       
+
        return true;
 }
 
@@ -303,7 +303,7 @@ IPC::make_connection()
                NULL, // security attributes
                OPEN_EXISTING, // creation disposition
                FILE_ATTRIBUTE_NORMAL, // flags and attributes
-               NULL  // template file 
+               NULL  // template file
        );
        if(pipe_handle==INVALID_HANDLE_VALUE)
        {
@@ -318,13 +318,13 @@ IPC::make_connection()
        struct stat file_stat;
        if(stat(fifo_path().c_str(),&file_stat)!=0)
                return ret;
-       
+
        if(!S_ISFIFO(file_stat.st_mode))
                return ret;
-       
+
        int fd=open(fifo_path().c_str(),O_WRONLY|O_NONBLOCK);
 #endif
-       
+
        if(fd>=0)
                ret=SmartFILE(fdopen(fd,"w"));
 
index f2c227c..df9beaf 100644 (file)
@@ -57,7 +57,7 @@ public:
 
        static bool process_command(const synfig::String& cmd);
 }; // END of class IPC
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index cb245dd..b25290d 100644 (file)
@@ -131,7 +131,7 @@ KeyframeActionManager::queue_refresh()
 {
        if(queued)
                return;
-       
+
        //queue_refresh_connection.disconnect();
        queue_refresh_connection=Glib::signal_idle().connect(
                sigc::bind_return(
@@ -139,7 +139,7 @@ KeyframeActionManager::queue_refresh()
                        false
                )
        );
-       
+
        queued=true;
 }
 
@@ -156,7 +156,7 @@ KeyframeActionManager::on_add_keyframe()
 
        if(!action)
                return;
-       
+
        action->set_param("canvas",canvas_interface_->get_canvas());
        action->set_param("canvas_interface",canvas_interface_);
        action->set_param("keyframe",Keyframe(canvas_interface_->get_time()));
@@ -168,7 +168,7 @@ void
 KeyframeActionManager::refresh()
 {
        KeyframeTreeStore::Model model;
-       
+
        if(queued)
        {
                queued=false;
@@ -177,16 +177,16 @@ KeyframeActionManager::refresh()
 
 
        clear();
-       
+
        // Make sure we are ready
        if(!ui_manager_ || !keyframe_tree_ || !canvas_interface_)
        {
                synfig::error("KeyframeActionManager::refresh(): Not ready!");
                return;
        }
-               
+
        String ui_info;
-       
+
        {
                synfigapp::Action::ParamList param_list;
                param_list.add("time",get_canvas_interface()->get_time());
@@ -211,7 +211,7 @@ KeyframeActionManager::refresh()
        {
                action_group_->remove(action_group_->get_action("action-keyframe_add"));
        }
-       
+
                action_group_->add(Gtk::Action::create(
                        "action-keyframe_add",
                        Gtk::StockID("gtk-add"),
@@ -219,7 +219,7 @@ KeyframeActionManager::refresh()
                ),
                        sigc::mem_fun(*this,&KeyframeActionManager::on_add_keyframe)
                );
-       
+
        try
        {
                canvas_interface_->get_canvas()->keyframe_list().find(canvas_interface_->get_time());
@@ -230,7 +230,7 @@ KeyframeActionManager::refresh()
        catch(...)
        {
        }
-       
+
        {
                Glib::RefPtr<Gtk::Action> action(Gtk::Action::create("keyframe-properties", Gtk::StockID("gtk-properties"), _("Keyframe Properties")));
                action_group_->add(action,sigc::mem_fun(*this,&KeyframeActionManager::on_keyframe_properties));
@@ -239,7 +239,7 @@ KeyframeActionManager::refresh()
        }
 
        ui_info="<ui><menubar action='menu-main'><menu action='menu-keyframe'>"+ui_info+"</menu></menubar></ui>";
-       popup_id_=get_ui_manager()->add_ui_from_string(ui_info);        
+       popup_id_=get_ui_manager()->add_ui_from_string(ui_info);
 #ifdef ONE_ACTION_GROUP
 #else
        get_ui_manager()->insert_action_group(action_group_);
index fe86cb4..ac9762a 100644 (file)
@@ -44,7 +44,7 @@ class KeyframeTree;
 class KeyframeActionManager
 {
        sigc::signal<void> signal_show_keyframe_properties_;
-               
+
        Glib::RefPtr<Gtk::UIManager> ui_manager_;
        //Glib::RefPtr<Gtk::TreeSelection> tree_selection_;
        KeyframeTree* keyframe_tree_;
@@ -52,17 +52,17 @@ class KeyframeActionManager
 
        Glib::RefPtr<Gtk::ActionGroup>  action_group_;
        Gtk::UIManager::ui_merge_id     popup_id_;
-       
-       
+
+
        sigc::connection selection_changed_connection;
 
        bool queued;
        sigc::connection queue_refresh_connection;
        sigc::connection time_changed_connection;
-       
+
        void on_add_keyframe();
        void on_keyframe_properties();
-       
+
 public:
        sigc::signal<void>& signal_show_keyframe_properties() { return signal_show_keyframe_properties_; }
 
index f4af223..644e642 100644 (file)
@@ -54,14 +54,14 @@ using namespace studio;
 KeyframeTree::KeyframeTree()
 {
        const KeyframeTreeStore::Model model;
-       
+
        {
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Time")) );
 
                cell_renderer_time = Gtk::manage( new CellRenderer_Time() );
                column->pack_start(*cell_renderer_time,true);
                column->add_attribute(cell_renderer_time->property_time(), model.time);
-               
+
                cell_renderer_time->signal_edited().connect(sigc::mem_fun(*this,&studio::KeyframeTree::on_edited_time));
 
                column->set_reorderable();
@@ -79,7 +79,7 @@ KeyframeTree::KeyframeTree()
                cell_renderer_time_delta = Gtk::manage( new CellRenderer_Time() );
                column->pack_start(*cell_renderer_time_delta,true);
                column->add_attribute(cell_renderer_time_delta->property_time(), model.time_delta);
-               
+
                cell_renderer_time_delta->signal_edited().connect(sigc::mem_fun(*this,&studio::KeyframeTree::on_edited_time_delta));
 
                column->set_reorderable();
@@ -97,13 +97,13 @@ KeyframeTree::KeyframeTree()
 
                Gtk::CellRendererText* cell_renderer_jump=Gtk::manage(new Gtk::CellRendererText());
                column->pack_start(*cell_renderer_jump,true);
-               
+
                cell_renderer_jump->property_text()="(JMP)";
                cell_renderer_jump->property_foreground()="#003a7f";
-               
+
                column->set_reorderable();
                column->set_resizable();
-               
+
                column->set_sort_column_id(COLUMNID_JUMP);
 
                column->set_clickable(false);
@@ -114,7 +114,7 @@ KeyframeTree::KeyframeTree()
        //append_column_editable(_("Description"),model.description);
        {
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Description")) );
-               
+
                cell_renderer_description=Gtk::manage(new Gtk::CellRendererText());
                column->pack_start(*cell_renderer_description,true);
                column->add_attribute(cell_renderer_description->property_text(), model.description);
@@ -134,7 +134,7 @@ KeyframeTree::KeyframeTree()
 
        // This makes things easier to read.
        set_rules_hint();
-               
+
        // Make us more sensitive to several events
        add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
 }
@@ -156,7 +156,7 @@ KeyframeTree::set_model(Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store)
 {
        keyframe_tree_store_=keyframe_tree_store;
        KeyframeTreeStore::Model model;
-       
+
        if(true)
        {
                Glib::RefPtr<Gtk::TreeModelSort> sorted_store(Gtk::TreeModelSort::create(keyframe_tree_store_));
@@ -167,7 +167,7 @@ KeyframeTree::set_model(Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store)
        }
        else
                Gtk::TreeView::set_model(keyframe_tree_store);
-       
+
        keyframe_tree_store_->canvas_interface()->signal_rend_desc_changed().connect(
                sigc::mem_fun(
                        *this,
@@ -182,7 +182,7 @@ void
 KeyframeTree::set_editable(bool x)
 {
        editable_=x;
-       
+
        if(editable_)
        {
                cell_renderer_time->property_editable()=true;
@@ -201,9 +201,9 @@ void
 KeyframeTree::on_edited_time(const Glib::ustring&path_string,synfig::Time time)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row(*(get_model()->get_iter(path)));
-       
+
        synfig::Keyframe keyframe(row[model.keyframe]);
        if(time!=keyframe.get_time())
        {
@@ -218,9 +218,9 @@ void
 KeyframeTree::on_edited_time_delta(const Glib::ustring&path_string,synfig::Time time)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row(*(get_model()->get_iter(path)));
-       
+
        if(row)row[model.time_delta]=time;
 }
 
@@ -228,9 +228,9 @@ void
 KeyframeTree::on_edited_description(const Glib::ustring&path_string,const Glib::ustring &desc)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(get_model()->get_iter(path));
-       
+
        const synfig::String description(desc);
        synfig::Keyframe keyframe(row[model.keyframe]);
        if(description!=keyframe.get_description())
@@ -262,7 +262,7 @@ KeyframeTree::on_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(get_model()->get_iter(path));
-                       
+
                        signal_user_click()(event->button.button,row,(ColumnID)column->get_sort_column_id());
                        if((ColumnID)column->get_sort_column_id()==COLUMNID_JUMP)
                        {
@@ -283,14 +283,14 @@ KeyframeTree::on_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(get_model()->get_iter(path));
-                       
+
                        {
                                keyframe_tree_store_->canvas_interface()->set_time(row[model.time]);
                                return true;
                        }
                }
                break;
-               
+
        case GDK_BUTTON_RELEASE:
                break;
        default:
index 060b8d4..8605958 100644 (file)
@@ -57,7 +57,7 @@ public:
                COLUMNID_TIME,
                COLUMNID_DESCRIPTION,
                COLUMNID_JUMP,
-               
+
                COLUMNID_END                    //!< \internal
        };
 
@@ -66,9 +66,9 @@ public:
        */
 
 public:
-       
+
        KeyframeTreeStore::Model model;
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -98,7 +98,7 @@ private:
        */
 
 private:
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -120,19 +120,19 @@ private:
        */
 
 public:
-       
+
        KeyframeTree();
        ~KeyframeTree();
 
        void set_model(Glib::RefPtr<KeyframeTreeStore> keyframe_tree_store_);
 
        void set_editable(bool x=true);
-       
+
        bool get_editable()const { return editable_; }
 
        //! Signal called when a keyframe has been edited in any way
        sigc::signal<void,synfig::Keyframe>& signal_edited() { return signal_edited_; }
-       
+
        //! Signal called when a time has been edited.
        sigc::signal<void,synfig::Keyframe,synfig::Time>& signal_edited_time() { return signal_edited_time_; }
 
index 24d980d..6bcf1db 100644 (file)
@@ -73,13 +73,13 @@ struct _keyframe_iterator
 Gtk::TreeModel::iterator keyframe_iter_2_model_iter(synfig::KeyframeList::iterator iter,int index)
 {
        Gtk::TreeModel::iterator ret;
-       
+
        _keyframe_iterator*& data(static_cast<_keyframe_iterator*&>(ret->gobj()->user_data));
        data=new _keyframe_iterator();
        data->ref_count=1;
        data->iter=iter;
        data->index=index;
-       
+
        return ret;
 }
 */
@@ -111,7 +111,7 @@ public:
                gobject_(0)
        {
        }
-       
+
        TreeRowReferenceHack(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path):
                gobject_ ( gtk_tree_row_reference_new(model->gobj(), const_cast<GtkTreePath*>(path.gobj())) )
        {
@@ -120,7 +120,7 @@ public:
        TreeRowReferenceHack(const TreeRowReferenceHack &x):
                gobject_ ( x.gobject_?gtk_tree_row_reference_copy(x.gobject_):0 )
        {
-               
+
        }
 
        void swap(TreeRowReferenceHack & other)
@@ -137,13 +137,13 @@ public:
                swap(temp);
                return *this;
        }
-       
+
        ~TreeRowReferenceHack()
        {
                if(gobject_)
                        gtk_tree_row_reference_free(gobject_);
        }
-       
+
        Gtk::TreeModel::Path get_path() { return Gtk::TreeModel::Path(gtk_tree_row_reference_get_path(gobject_),false); }
        GtkTreeRowReference *gobj() { return gobject_; }
 };
@@ -166,7 +166,7 @@ KeyframeTreeStore_Class::init()
        if(!gtype_)
        {
                class_init_func_ = &KeyframeTreeStore_Class::class_init_function;
-               
+
                const GTypeInfo derived_info =
                {
                        sizeof(GObjectClass),
@@ -180,7 +180,7 @@ KeyframeTreeStore_Class::init()
                        0,
                        NULL
                };
-               
+
                gtype_ = g_type_register_static(G_TYPE_OBJECT, "KeyframeTreeStore", &derived_info, GTypeFlags(0));
                Gtk::TreeModel::add_interface(get_type());
        }
@@ -232,7 +232,7 @@ KeyframeTreeStore::reset_path_table()
 {
        Gtk::TreeModel::Children::iterator iter;
        const Gtk::TreeModel::Children children(children());
-       path_table_.clear();    
+       path_table_.clear();
        for(iter = children.begin(); iter != children.end(); ++iter)
        {
                Gtk::TreeModel::Row row(*iter);
@@ -292,10 +292,10 @@ int
 KeyframeTreeStore::time_sorter(const Gtk::TreeModel::iterator &rhs,const Gtk::TreeModel::iterator &lhs)
 {
        const Model model;
-       
+
        _keyframe_iterator *rhs_iter(static_cast<_keyframe_iterator*>(rhs->gobj()->user_data));
        _keyframe_iterator *lhs_iter(static_cast<_keyframe_iterator*>(lhs->gobj()->user_data));
-       
+
        Time diff(rhs_iter->iter->get_time()-lhs_iter->iter->get_time());
        if(diff<0)
                return -1;
@@ -323,22 +323,22 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
        }
 
        _keyframe_iterator *iter(static_cast<_keyframe_iterator*>(row.gobj()->user_data));
-       
+
        try
        {
                if(column==model.time_delta.index())
-               {                       
+               {
                        Glib::Value<synfig::Time> x;
                        g_value_init(x.gobj(),model.time.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        Time new_delta(x.get());
                        if(new_delta<=Time::zero()+Time::epsilon())
                        {
                                // Bad value
                                return;
                        }
-                       
+
                        Time old_delta((*row)[model.time_delta]);
                        if(old_delta<=Time::zero()+Time::epsilon())
                        {
@@ -348,29 +348,29 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
                        //Gtk::TreeModel::iterator row(row);
                        //row++;
                        //if(!row)return;
-                       
+
                        Time change_delta(new_delta-old_delta);
-                       
+
                        if(change_delta<=Time::zero()+Time::epsilon() &&change_delta>=Time::zero()-Time::epsilon())
                        {
                                // Not an error, just no change
                                return;
                        }
-                       
+
                        {
                                Keyframe keyframe((*row)[model.keyframe]);
                                synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set_delta"));
-       
+
                                if(!action)return;
-                               
+
                                action->set_param("canvas",canvas_interface()->get_canvas());
                                action->set_param("canvas_interface",canvas_interface());
                                action->set_param("keyframe",keyframe);
                                action->set_param("delta",change_delta);
-                               
+
                                canvas_interface()->get_instance()->perform_action(action);
                        }
-                       
+
                        return;
                }
                else
@@ -386,16 +386,16 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
                        synfig::info("KeyframeTreeStore::set_value_impl():old_time=%s",keyframe.get_time().get_string().c_str());
                        keyframe.set_time(x.get());
                        synfig::info("KeyframeTreeStore::set_value_impl():new_time=%s",keyframe.get_time().get_string().c_str());
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set"));
-                       
+
                        if(!action)
                                return;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("keyframe",keyframe);
-                       
+
                        canvas_interface()->get_instance()->perform_action(action);
                }
                else if(column==model.description.index())
@@ -407,14 +407,14 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
                        keyframe.set_description(x.get());
 
                        synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set"));
-                       
+
                        if(!action)
                                return;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("keyframe",keyframe);
-                       
+
                        canvas_interface()->get_instance()->perform_action(action);
                }
                else if(column==model.keyframe.index())
@@ -429,7 +429,7 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
        catch(std::exception x)
        {
                g_warning(x.what());
-       }       
+       }
 }
 
 Gtk::TreeModelFlags
@@ -461,7 +461,7 @@ KeyframeTreeStore::iter_next_vfunc (const iterator& xiter, iterator& iter_next)
                return false;
 
        _keyframe_iterator *next(new _keyframe_iterator());
-       iter_next.gobj()->user_data=static_cast<gpointer>(next);        
+       iter_next.gobj()->user_data=static_cast<gpointer>(next);
        next->ref_count=1;
        next->index=iter->index+1;
        next->iter=iter->iter;
@@ -469,8 +469,8 @@ KeyframeTreeStore::iter_next_vfunc (const iterator& xiter, iterator& iter_next)
 
        if(next->iter==canvas_interface()->get_canvas()->keyframe_list().end())
                return false;
-       
-       iter_next.gobj()->stamp=stamp_;         
+
+       iter_next.gobj()->stamp=stamp_;
 
        return true;
 }
@@ -486,9 +486,9 @@ KeyframeTreeStore::iter_next_vfunc (GtkTreeIter* gtk_iter)
        // If we are already at the end, then we are very invalid
        if(iter->iter==canvas_interface()->get_canvas()->keyframe_list().end())
                return false;
-       
+
        ++(iter->iter);
-       
+
        if(iter->iter==canvas_interface()->get_canvas()->keyframe_list().end())
        {
                --(iter->iter);
@@ -509,16 +509,16 @@ KeyframeTreeStore::iter_children_vfunc (GtkTreeIter* gtk_iter, const GtkTreeIter
                clear_iterator(gtk_iter);
                return false;
        }
-       
+
        _keyframe_iterator *iter(new _keyframe_iterator());
        iter->ref_count=1;
        iter->index=0;
        iter->iter=canvas_interface()->get_canvas()->keyframe_list().begin();
-       
+
        gtk_iter->user_data=static_cast<gpointer>(iter);
-       gtk_iter->stamp=stamp_;         
+       gtk_iter->stamp=stamp_;
 
-       return true;    
+       return true;
 }
 
 bool
@@ -539,7 +539,7 @@ KeyframeTreeStore::iter_n_children_vfunc (const GtkTreeIter* parent)
 
        if(parent)
                return 0;
-       
+
        return canvas_interface()->get_canvas()->keyframe_list().size();
 }
 */
@@ -583,8 +583,8 @@ KeyframeTreeStore::iter_nth_root_child_vfunc (int n, iterator& xiter)const
                }
                ++iter->iter;
        }
-       xiter.gobj()->user_data=static_cast<gpointer>(iter);    
-       xiter.gobj()->stamp=stamp_;     
+       xiter.gobj()->user_data=static_cast<gpointer>(iter);
+       xiter.gobj()->stamp=stamp_;
        return true;
 }
 
@@ -602,7 +602,7 @@ KeyframeTreeStore::iter_nth_child_vfunc (GtkTreeIter* gtk_iter, const GtkTreeIte
        }
 
 
-       
+
        _keyframe_iterator *iter(new _keyframe_iterator());
        iter->ref_count=1;
        iter->index=n;
@@ -618,9 +618,9 @@ KeyframeTreeStore::iter_nth_child_vfunc (GtkTreeIter* gtk_iter, const GtkTreeIte
                }
                ++iter->iter;
        }
-       
+
        gtk_iter->user_data=static_cast<gpointer>(iter);
-       gtk_iter->stamp=stamp_;         
+       gtk_iter->stamp=stamp_;
        return true;
 }
 
@@ -655,7 +655,7 @@ KeyframeTreeStore::unref_node_vfunc (iterator& xiter)const
        if(!iter->ref_count)
        {
                delete iter;
-               
+
                // Make this iterator invalid
                gtk_iter->stamp=0;
        }
@@ -672,7 +672,7 @@ KeyframeTreeStore::get_path_vfunc (const TreeModel::iterator& gtk_iter)const
                return path;
 
        _keyframe_iterator *iter(static_cast<_keyframe_iterator*>(gtk_iter->gobj()->user_data));
-       
+
        path.append_index(iter->index);
 
        return path;
@@ -720,7 +720,7 @@ KeyframeTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& gtk_iter, in
        {
                Glib::Value<synfig::Time> x;
                g_value_init(x.gobj(),x.value_type());
-               
+
                synfig::Keyframe prev_keyframe(*iter->iter);
                synfig::Keyframe keyframe;
                {
@@ -735,7 +735,7 @@ KeyframeTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& gtk_iter, in
                        }
                        keyframe=*tmp;
                }
-               
+
                Time delta(0);
                try {
                        delta=keyframe.get_time()-prev_keyframe.get_time();
@@ -773,15 +773,15 @@ KeyframeTreeStore::find_row(const synfig::Keyframe &keyframe)
        const GtkTreeIter *gtk_iter(row.gobj());
        if(!iterator_sane(gtk_iter))
                throw std::runtime_error(_("Unable to find Keyframe in table"));
-               
+
        _keyframe_iterator *iter(static_cast<_keyframe_iterator*>(gtk_iter->user_data));
-       
+
        synfig::KeyframeList &keyframe_list(canvas_interface()->get_canvas()->keyframe_list());
        if(keyframe_list.empty())
                throw std::runtime_error(_("There are no keyframes n this canvas"));
 
        iter->index=0;
-               
+
        for(iter->iter=keyframe_list.begin();iter->iter!=keyframe_list.end() && *iter->iter!=keyframe;++iter->iter)
        {
                iter->index++;
@@ -799,7 +799,7 @@ KeyframeTreeStore::add_keyframe(Keyframe keyframe)
                Gtk::TreeRow row(find_row(keyframe));
                dump_iterator(row.gobj(),"add_keyframe,row");
                Gtk::TreePath path(get_path(row));
-               
+
                row_inserted(path,row);
 
                old_keyframe_list=get_canvas()->keyframe_list();
@@ -809,7 +809,7 @@ KeyframeTreeStore::add_keyframe(Keyframe keyframe)
        catch(std::exception x)
        {
                g_warning(x.what());
-       }       
+       }
 }
 
 void
@@ -818,7 +818,7 @@ KeyframeTreeStore::remove_keyframe(Keyframe keyframe)
        try
        {
                if(1)
-               {       
+               {
                        Gtk::TreeRow row(find_row(keyframe));
                        dump_iterator(row,"remove_keyframe,row");
                        Gtk::TreePath path(get_path(row));
@@ -835,7 +835,7 @@ KeyframeTreeStore::remove_keyframe(Keyframe keyframe)
        {
                DEBUGPOINT();
                g_warning(x.what());
-       }       
+       }
 }
 
 void
@@ -849,7 +849,7 @@ KeyframeTreeStore::change_keyframe(Keyframe keyframe)
                unsigned int old_index(0);
                synfig::KeyframeList::iterator iter;
                for(old_index=0,iter=old_keyframe_list.begin();iter!=old_keyframe_list.end() && (UniqueID)*iter!=(UniqueID)keyframe;++iter,old_index++);
-               
+
                if(iter!=old_keyframe_list.end() && new_index!=old_index)
                {
                        DEBUGPOINT();
@@ -862,22 +862,22 @@ KeyframeTreeStore::change_keyframe(Keyframe keyframe)
                        {
                                new_order.erase(new_order.begin()+new_index);
                                new_order.insert(new_order.begin()+old_index,new_index);
-                               
+
                                //new_order[old_index]=
-                               
+
                                rows_reordered (Path(), iterator(), &new_order[0]);
                        }
                        old_keyframe_list=get_canvas()->keyframe_list();
-                               
+
                        row=find_row(keyframe);
                }
 
                dump_iterator(row,"change_keyframe,row");
-               row_changed(get_path(row),row); 
+               row_changed(get_path(row),row);
        }
        catch(std::exception x)
        {
                DEBUGPOINT();
                g_warning(x.what());
-       }       
+       }
 }
index 5d4d9eb..c821eaa 100644 (file)
@@ -45,7 +45,7 @@
 namespace studio {
 
 class KeyframeTreeStore_Class;
-       
+
 class KeyframeTreeStore :
        public Glib::Object,
        public Gtk::TreeModel,
@@ -65,7 +65,7 @@ public:
                Gtk::TreeModelColumn<Glib::ustring> description;
                Gtk::TreeModelColumn<synfig::Keyframe> keyframe;
                Gtk::TreeModelColumn<synfig::Time> time_delta;
-       
+
                Model()
                {
                        add(time);
@@ -80,7 +80,7 @@ public:
        */
 
 public:
-       
+
        const Model model;
 
        /*
@@ -93,7 +93,7 @@ private:
 
        //! Unique stamp for this TreeModel.
        int stamp_;
-       
+
        static KeyframeTreeStore_Class keyframe_tree_store_class_;
 
        //std::map<synfig::Keyframe,TreeRowReferenceHack> path_table_;
@@ -127,7 +127,7 @@ private:
        **      constructed     or when large numbers of
        **      iterators become invalid. */
        void reset_stamp();
-       
+
        //void reset_path_table();
 
        /*
@@ -135,7 +135,7 @@ private:
        */
 
 protected:
-       
+
        virtual void set_value_impl (const Gtk::TreeModel::iterator& row, int column, const Glib::ValueBase& value);
        virtual Gtk::TreeModelFlags  get_flags_vfunc ();
        virtual int  get_n_columns_vfunc ();
@@ -163,7 +163,7 @@ protected:
        virtual void  set_default_sort_func_vfunc (GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy);
        virtual bool  has_default_sort_func_vfunc ();
        */
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -175,13 +175,13 @@ private:
        */
 
 public:
-       
+
        KeyframeTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
        ~KeyframeTreeStore();
 
        etl::loose_handle<synfigapp::CanvasInterface> canvas_interface() { return canvas_interface_; }
        etl::loose_handle<const synfigapp::CanvasInterface> canvas_interface()const { return canvas_interface_; }
-       
+
        synfig::Canvas::Handle get_canvas() { return canvas_interface()->get_canvas(); }
        synfig::Canvas::Handle get_canvas()const { return canvas_interface()->get_canvas(); }
 
@@ -207,11 +207,11 @@ public:
        {
                GObjectClass parent_class;
        };
-       
+
        friend class KeyframeTreeStore;
-       
+
        const Glib::Class& init();
-       
+
        static void class_init_function(gpointer g_blass, gpointer class_data);
 }; // END of CustomTreeStore_Class
 
index b294759..de124bd 100644 (file)
@@ -86,7 +86,7 @@ bool KeyMapSettings::get_key(const char *path, AccelKey *key)
                *key = AccelKey(ac.accel_key,(Gdk::ModifierType)ac.accel_mods,string(path));
                return true;
        }
-       
+
        return false;
 }
 
@@ -94,18 +94,18 @@ bool KeyMapSettings::load(const char *filename)
 {
        string n(filename);
        n += ".skm";
-       
+
        AccelMap::load(filename);
-       
-       return true;    
+
+       return true;
 }
 
 bool KeyMapSettings::save(const char *filename)
 {
        string n(filename);
        n += ".skm";
-       
+
        AccelMap::save(filename);
-       
+
        return true;
 }
index 2e37612..61334f4 100644 (file)
@@ -49,25 +49,25 @@ class KeyMapSettings : public Gtk::Dialog
        {
                guint                           key;
                Gdk::ModifierType       mod;
-               
+
                bool                            on;
-               
+
                AcKeyInfo(guint k = 0, Gdk::ModifierType m = Gdk::ModifierType())
                :key(k),mod(m) {}
        };
-       
+
        //std::map<const char *,AcKeyInfo>      pathmap; //uses string info from paths set
        //std::set<std::string>                         accelpaths;
-       
+
        bool unsaved; //Assume as such...
-               
+
 public:
 
        KeyMapSettings();
        ~KeyMapSettings();
 
        //void add_path(const char *path);
-       
+
        bool set_key(const char *path, guint key, Gdk::ModifierType mod, bool replace = true);
        bool get_key(const char *path, Gtk::AccelKey *key);
 
index 6d14b73..cc9177c 100644 (file)
@@ -92,8 +92,8 @@ LayerActionManager::LayerActionManager():
                        &LayerActionManager::paste
                )
        );
-       
-       
+
+
        action_amount_inc_=Gtk::Action::create(
                "amount-inc",
                Gtk::StockID("gtk-add"),
@@ -196,7 +196,7 @@ LayerActionManager::queue_refresh()
 {
        if(queued)
                return;
-               
+
        //queue_refresh_connection.disconnect();
        queue_refresh_connection=Glib::signal_idle().connect(
                sigc::bind_return(
@@ -204,7 +204,7 @@ LayerActionManager::queue_refresh()
                        false
                )
        );
-       
+
        queued=true;
 }
 
@@ -219,25 +219,25 @@ LayerActionManager::refresh()
 
 
        clear();
-       
+
        // Make sure we are ready
        if(!ui_manager_ || !layer_tree_ || !canvas_interface_)
        {
                synfig::error("LayerActionManager::refresh(): Not ready!");
                return;
        }
-       
-       
+
+
        String ui_info;
 
        action_paste_->set_sensitive(!clipboard_.empty());
        action_group_->add(action_paste_);
-       
+
        if(layer_tree_->get_selection()->count_selected_rows()!=0)
        {
                bool multiple_selected(layer_tree_->get_selection()->count_selected_rows()>1);
                Layer::Handle layer(layer_tree_->get_selected_layer());
-               
+
                {
                        bool canvas_set(false);
                        synfigapp::Action::ParamList param_list;
@@ -257,7 +257,7 @@ LayerActionManager::refresh()
                                action_group_->add(action_amount_inc_);
                                action_group_->add(action_amount_dec_);
                                action_group_->add(action_amount_);
-                               
+
                                for(iter=layer_list.begin();iter!=layer_list.end();++iter)
                                {
                                        update_connection_list.push_back(
@@ -265,7 +265,7 @@ LayerActionManager::refresh()
                                                        sigc::mem_fun(*this, &LayerActionManager::queue_refresh)
                                                )
                                        );
-                                       
+
                                        if(!canvas_set)
                                        {
                                                param_list.add("canvas",Canvas::Handle((*iter)->get_canvas()));
@@ -279,7 +279,7 @@ LayerActionManager::refresh()
                                        param_list.add("layer",Layer::Handle(*iter));
                                }
                        }
-                       
+
                        if(!multiple_selected && layer->get_name()=="PasteCanvas")
                        {
                                action_group_->add(Gtk::Action::create(
@@ -300,9 +300,9 @@ LayerActionManager::refresh()
                                add_actions_to_group(action_group_, ui_info,   param_list, synfigapp::Action::CATEGORY_LAYER);
                }
        }
-       
+
        ui_info="<ui><menubar action='menu-main'><menu action='menu-layer'>"+ui_info+"<separator/><menuitem action='cut' /><menuitem action='copy' /><menuitem action='paste' /><separator/></menu></menubar></ui>";
-       popup_id_=get_ui_manager()->add_ui_from_string(ui_info);        
+       popup_id_=get_ui_manager()->add_ui_from_string(ui_info);
 #ifdef ONE_ACTION_GROUP
 #else
        get_ui_manager()->insert_action_group(action_group_);
@@ -324,7 +324,7 @@ LayerActionManager::copy()
        synfigapp::SelectionManager::LayerList layer_list(layer_tree_->get_selected_layers());
        clipboard_.clear();
        synfig::GUID guid;
-       
+
        while(!layer_list.empty())
        {
                clipboard_.push_back(layer_list.front()->clone(guid));
@@ -332,7 +332,7 @@ LayerActionManager::copy()
        }
 
        action_paste_->set_sensitive(!clipboard_.empty());
-       
+
        //queue_refresh();
 }
 
@@ -346,7 +346,7 @@ LayerActionManager::paste()
 
        Canvas::Handle canvas(get_canvas_interface()->get_canvas());
        int depth(0);
-       
+
        // we are temporarily using the layer to hold something
        Layer::Handle layer(layer_tree_->get_selected_layer());
        if(layer)
@@ -354,62 +354,62 @@ LayerActionManager::paste()
                depth=layer->get_depth();
                canvas=layer->get_canvas();
        }
-       
+
        synfigapp::SelectionManager::LayerList layer_selection;
-       
+
        for(std::list<synfig::Layer::Handle>::iterator iter=clipboard_.begin();iter!=clipboard_.end();++iter)
        {
                layer=(*iter)->clone(guid);
                layer_selection.push_back(layer);
                synfigapp::Action::Handle       action(synfigapp::Action::create("layer_add"));
-       
+
                assert(action);
                if(!action)
                        return;
-               
+
                action->set_param("canvas",canvas);
                action->set_param("canvas_interface",etl::loose_handle<synfigapp::CanvasInterface>(get_canvas_interface()));
                action->set_param("new",layer);
-               
+
                if(!action->is_ready())
                {
                        return;
                }
-               
+
                if(!get_instance()->perform_action(action))
                {
                        return;
                }
-       
+
                synfig::info("DEPTH=%d",depth);
                // Action to move the layer (if necessary)
                if(depth>0)
                {
                        synfigapp::Action::Handle       action(synfigapp::Action::create("layer_move"));
-               
+
                        assert(action);
                        if(!action)
                                return;
-                       
+
                        action->set_param("canvas",canvas);
                        action->set_param("canvas_interface",etl::loose_handle<synfigapp::CanvasInterface>(get_canvas_interface()));
                        action->set_param("layer",layer);
                        action->set_param("new_index",depth);
-                       
+
                        if(!action->is_ready())
                        {
-                               //get_ui_interface()->error(_("Move Action Not Ready"));                        
+                               //get_ui_interface()->error(_("Move Action Not Ready"));
                                //return 0;
                                return;
                        }
-                       
+
                        if(!get_instance()->perform_action(action))
                        {
-                               //get_ui_interface()->error(_("Move Action Not Ready"));                        
+                               //get_ui_interface()->error(_("Move Action Not Ready"));
                                //return 0;
                                return;
                        }
-               }       
+               }
                depth++;
        }
        get_canvas_interface()->get_selection_manager()->clear_selected_layers();
@@ -420,10 +420,10 @@ void
 LayerActionManager::amount_inc()
 {
        float adjust(0.1);
-       
+
        // Create the action group
        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Decrease Amount"));
-       
+
        if(adjust>0)
                group.set_name(_("Increase Amount"));
 
@@ -444,10 +444,10 @@ void
 LayerActionManager::amount_dec()
 {
        float adjust(-0.1);
-       
+
        // Create the action group
        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Decrease Amount"));
-       
+
        if(adjust>0)
                group.set_name(_("Increase Amount"));
 
index 515241f..44b1449 100644 (file)
@@ -50,7 +50,7 @@ class LayerActionManager
 
        Glib::RefPtr<Gtk::ActionGroup>  action_group_;
        Gtk::UIManager::ui_merge_id     popup_id_;
-       
+
 
        Glib::RefPtr<Gtk::ActionGroup> action_group_copy_paste;
 
@@ -65,7 +65,7 @@ class LayerActionManager
 
        std::list<synfig::Layer::Handle> clipboard_;
 
-       
+
        sigc::connection selection_changed_connection;
 
        bool queued;
index e4615fa..fd4cb05 100644 (file)
@@ -55,7 +55,7 @@ LayerGroupTree::LayerGroupTree()
 {
        const LayerGroupTreeStore::Model model;
 
-       
+
        {       // --- O N / O F F ----------------------------------------------------
                int index;
                index=append_column_editable(_(" "),model.active);
@@ -78,7 +78,7 @@ LayerGroupTree::LayerGroupTree()
                //column->set_reorderable();
                //column->set_resizable();
                //column->set_clickable(false);
-               
+
                //Gtk::CellRendererPixbuf* icon_cellrenderer = Gtk::manage( new Gtk::CellRendererPixbuf() );
                //column->pack_start(*icon_cellrenderer,false);
                //column->add_attribute(icon_cellrenderer->property_pixbuf(), layer_model.icon);
@@ -90,7 +90,7 @@ LayerGroupTree::LayerGroupTree()
 
        // This makes things easier to read.
        set_rules_hint();
-               
+
        // Make us more sensitive to several events
        add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK|Gdk::POINTER_MOTION_MASK);
 
@@ -116,7 +116,7 @@ LayerGroupTree::set_model(Glib::RefPtr<LayerGroupTreeStore> layer_group_tree_sto
 {
        layer_group_tree_store_=layer_group_tree_store;
        LayerGroupTreeStore::Model model;
-       
+
 #if 0
        {
                Glib::RefPtr<Gtk::TreeModelSort> sorted_store(Gtk::TreeModelSort::create(layer_group_tree_store_));
@@ -134,7 +134,7 @@ void
 LayerGroupTree::set_editable(bool x)
 {
        editable_=x;
-/*     
+/*
        if(editable_)
        {
                cell_renderer_time->property_editable()=true;
@@ -154,9 +154,9 @@ void
 LayerGroupTree::on_edited_time(const Glib::ustring&path_string,synfig::Time time)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row(*(get_model()->get_iter(path)));
-       
+
        synfig::Keyframe keyframe(row[model.keyframe]);
        if(time!=keyframe.get_time())
        {
@@ -171,9 +171,9 @@ void
 LayerGroupTree::on_edited_time_delta(const Glib::ustring&path_string,synfig::Time time)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row(*(get_model()->get_iter(path)));
-       
+
        if(row)row[model.time_delta]=time;
 }
 
@@ -181,9 +181,9 @@ void
 LayerGroupTree::on_edited_description(const Glib::ustring&path_string,const Glib::ustring &desc)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(get_model()->get_iter(path));
-       
+
        const synfig::String description(desc);
        synfig::Keyframe keyframe(row[model.keyframe]);
        if(description!=keyframe.get_description())
@@ -222,7 +222,7 @@ LayerGroupTree::on_event(GdkEvent *event)
                                signal_popup_layer_menu()((Layer::Handle)row[model.layer]);
                                return true;
                        }
-                       
+
                        /*signal_user_click()(event->button.button,row,(ColumnID)column->get_sort_column_id());
                        if((ColumnID)column->get_sort_column_id()==COLUMNID_JUMP)
                        {
@@ -243,7 +243,7 @@ LayerGroupTree::on_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(get_model()->get_iter(path));
-                       
+
                        LayerList layer_list(row[model.all_layers]);
                        if(!layer_list.empty())
                        {
index 514102a..39bd1db 100644 (file)
@@ -58,9 +58,9 @@ public:
        */
 
 public:
-       
+
        LayerGroupTreeStore::Model model;
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -84,7 +84,7 @@ private:
        */
 
 private:
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -98,7 +98,7 @@ private:
        */
 
 public:
-       
+
        LayerGroupTree();
        ~LayerGroupTree();
        void set_cursor(const Gtk::TreeModel::Path& path, bool start_editing=false);
@@ -112,12 +112,12 @@ public:
        void set_model(Glib::RefPtr<LayerGroupTreeStore> layer_group_tree_store_);
 
        void set_editable(bool x=true);
-       
+
        bool get_editable()const { return editable_; }
-       
+
        std::list<synfig::String> get_selected_groups()const;
 
-       LayerList get_selected_layers()const;   
+       LayerList get_selected_layers()const;
 }; // END of LayerGroupTree
 
 }; // END of namespace studio
index c20ddf6..c90f13d 100644 (file)
@@ -105,7 +105,7 @@ LayerGroupTreeStore::search_func(const Glib::RefPtr<TreeModel>&,int,const Glib::
        Glib::ustring substr(x.uppercase());
        Glib::ustring label((*iter)[model.label]);
        label=label.uppercase();
-               
+
        return label.find(substr)==Glib::ustring::npos;
 }
 
@@ -123,11 +123,11 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
        {
                Glib::Value<LayerList> x;
                g_value_init(x.gobj(),x.value_type());
-               
+
                if((bool)(*iter)[model.is_group])
                {
                        set<Layer::Handle> layer_set(canvas_interface()->get_canvas()->get_layers_in_group((Glib::ustring)(*iter)[model.group_name]));
-               
+
                        x.set(LayerList(layer_set.begin(),layer_set.end()));
                }
                else if((bool)(*iter)[model.is_layer])
@@ -136,7 +136,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                        layer_list.push_back((Layer::Handle)(*iter)[model.layer]);
                        x.set(layer_list);
                }
-               
+
                g_value_init(value.gobj(),x.value_type());
                value=x;
        }
@@ -144,7 +144,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
        {
                Glib::Value<LayerList> x;
                g_value_init(x.gobj(),x.value_type());
-               
+
                if((bool)(*iter)[model.is_group])
                {
                        LayerList layer_list;
@@ -163,7 +163,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                        layer_list.push_back((Layer::Handle)(*iter)[model.layer]);
                        x.set(layer_list);
                }
-               
+
                g_value_init(value.gobj(),x.value_type());
                value=x;
        }
@@ -189,15 +189,15 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                {
                        Glib::Value<Glib::ustring> x;
                        g_value_init(x.gobj(),x.value_type());
-       
+
                        Glib::ustring group_name((*iter)[model.group_name]);
-                       
+
                        // Get rid of any parent group crap
                        while(group_name.find(GROUP_NEST_CHAR)!=Glib::ustring::npos)
                                group_name=Glib::ustring(group_name,group_name.find(GROUP_NEST_CHAR)+1,Glib::ustring::npos);
-                       
+
                        x.set(group_name);
-                       
+
                        g_value_init(value.gobj(),x.value_type());
 
                        value=x;
@@ -205,18 +205,18 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                else if((bool)(*iter)[model.is_layer])
                {
                        synfig::Layer::Handle layer((*iter)[model.layer]);
-       
+
                        if(!layer)return;
-       
+
                        Glib::Value<Glib::ustring> x;
                        g_value_init(x.gobj(),x.value_type());
-       
-       
+
+
                        if(!layer->get_description().empty())
                                x.set(layer->get_description());
                        else
                                x.set(layer->get_local_name());
-                       
+
                        g_value_init(value.gobj(),x.value_type());
                        //g_value_copy(x.gobj(),value.gobj());
                        value=x;
@@ -234,7 +234,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
 
 
                x.set(layer->get_local_name());
-               
+
                g_value_init(value.gobj(),x.value_type());
                //g_value_copy(x.gobj(),value.gobj());
                value=x;
@@ -251,7 +251,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
 
 
                x.set(layer->get_canvas());
-               
+
                g_value_init(value.gobj(),x.value_type());
                //g_value_copy(x.gobj(),value.gobj());
                value=x;
@@ -281,7 +281,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                }
                else
                        x.set(false);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -300,7 +300,7 @@ LayerGroupTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                }
                if((bool)(*iter)[model.is_group])
                        x.set(group_icon);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -333,30 +333,30 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                        Glib::Value<Glib::ustring> x;
                        g_value_init(x.gobj(),model.label.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        if((bool)(*iter)[model.is_layer])
                        {
                                synfig::Layer::Handle layer((*iter)[model.layer]);
                                if(!layer)
                                        return;
                                synfig::String new_desc(x.get());
-                               
+
                                if(new_desc==layer->get_local_name())
                                        new_desc=synfig::String();
-       
+
                                if(new_desc==layer->get_description())
                                        return;
-                               
+
                                synfigapp::Action::Handle action(synfigapp::Action::create("layer_set_desc"));
-                               
+
                                if(!action)
                                        return;
-                               
+
                                action->set_param("canvas",canvas_interface()->get_canvas());
                                action->set_param("canvas_interface",canvas_interface());
                                action->set_param("layer",layer);
                                action->set_param("new_description",synfig::String(x.get()));
-                               
+
                                canvas_interface()->get_instance()->perform_action(action);
                                return;
                        }
@@ -364,14 +364,14 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                        {
                                synfig::String group((Glib::ustring)(*iter)[model.label]);
                                synfig::String new_group(x.get());
-                               
+
                                if(x.get()==group)
                                        return;
 
                                Glib::ustring group_name((*iter)[model.group_name]);
                                group=group_name;
                                new_group.clear();
-                               
+
                                // Get rid of any parent group crap
                                while(group_name.find(GROUP_NEST_CHAR)!=Glib::ustring::npos)
                                {
@@ -379,9 +379,9 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                                        group_name=Glib::ustring(group_name,group_name.find(GROUP_NEST_CHAR)+1,Glib::ustring::npos);
                                }
                                new_group+=x.get();
-                               
+
                                synfig::info("Renaming group \"%s\" to \"%s\"...",group.c_str(),new_group.c_str());
-                               
+
                                // Check to see if this group is real or not.
                                // If it isn't real, then renaming it is a cinch.
                                // We know it isn't real if it doesn't have any
@@ -393,15 +393,15 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                                else
                                {
                                        synfigapp::Action::Handle action(synfigapp::Action::create("group_rename"));
-                                       
+
                                        if(!action)
                                                return;
-                                       
+
                                        action->set_param("canvas",canvas_interface()->get_canvas());
                                        action->set_param("canvas_interface",canvas_interface());
                                        action->set_param("group",group);
                                        action->set_param("new_group",new_group);
-                                       
+
                                        canvas_interface()->get_instance()->perform_action(action);
                                }
                                return;
@@ -414,23 +414,23 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                        Glib::Value<bool> x;
                        g_value_init(x.gobj(),model.active.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        if((bool)(*iter)[model.is_layer])
-                       {                       
+                       {
                                synfig::Layer::Handle layer((*iter)[model.layer]);
                                if(!layer)return;
-                                       
+
                                synfigapp::Action::Handle action(synfigapp::Action::create("layer_activate"));
-                               
+
                                if(!action)
                                        return;
-                               
+
                                action->set_param("canvas",canvas_interface()->get_canvas());
                                action->set_param("canvas_interface",canvas_interface());
                                action->set_param("layer",layer);
                                action->set_param("new_status",bool(x.get()));
 
-                               
+
                                canvas_interface()->get_instance()->perform_action(action);
                                return;
                        }
@@ -442,12 +442,12 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                                                x.get()?_("Activate "):_("Deactivate ")
                                        )+(Glib::ustring)(*iter)[model.label]
                                );
-                               
+
                                Gtk::TreeModel::iterator child_iter(iter->children().begin());
-                               
+
                                for(;child_iter;++child_iter)
                                        (*child_iter)[model.active]=x.get();
-                               
+
                                Gtk::TreeStore::set_value_impl(iter,column, value);
                        }
                }
@@ -458,7 +458,7 @@ LayerGroupTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
        catch(std::exception x)
        {
                g_warning(x.what());
-       }       
+       }
 }
 
 
@@ -469,7 +469,7 @@ LayerGroupTreeStore::row_draggable_vfunc (const TreeModel::Path& path)const
 {
        //if(!get_iter(path)) return false;
 //     Gtk::TreeModel::Row row(*get_iter(path));
-       
+
        return true;
 //     return (bool)true;
 }
@@ -492,7 +492,7 @@ LayerGroupTreeStore::drag_data_get_vfunc (const TreeModel::Path& path, Gtk::Sele
                std::vector<Layer*> layers;
 
                layers.push_back(layer);
-               
+
                selection_data.set("LAYER", 8, reinterpret_cast<const guchar*>(&layers.front()), sizeof(void*)*layers.size());
 
                return true;
@@ -502,12 +502,12 @@ LayerGroupTreeStore::drag_data_get_vfunc (const TreeModel::Path& path, Gtk::Sele
                synfig::String group((Glib::ustring)row[model.group_name]);
                if(group.empty())
                        return false;
-               
+
                selection_data.set("GROUP", 8, reinterpret_cast<const guchar*>(&*group.begin()), sizeof(void*)*group.size());
 
-               return true;            
+               return true;
        }
-               
+
        return false;
 }
 
@@ -531,18 +531,18 @@ LayerGroupTreeStore::row_drop_possible_vfunc (const TreeModel::Path& dest, const
                synfig::String dest_group((Glib::ustring)(*iter)[model.group_name]);
                synfig::String src_group(reinterpret_cast<const gchar*>(selection_data.get_data()));
                //synfig::String src_group(const_cast<gchar*>(selection_data.get_data()));
-               
+
                // Avoid putting a group inside of itself
                if(dest_group.size()>src_group.size() && src_group==String(dest_group,0,src_group.size()))
                        return false;
                return true;
        }
-       
+
        return false;
        //synfig::info("possible_drop -- data of type \"%s\"",selection_data.get_data_type());
        //synfig::info("possible_drop -- data of target \"%s\"",gdk_atom_name(selection_data->target));
        //synfig::info("possible_drop -- selection=\"%s\"",gdk_atom_name(selection_data->selection));
-       
+
        //Gtk::TreeModel::Row row(*get_iter(dest));
 
 /*     if(synfig::String(selection_data.get_data_type())=="LAYER" && (bool)true)
@@ -557,7 +557,7 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
        if(!get_iter(dest)) return false;
 //     bool ret=false;
        //int i(0);
-       
+
        Gtk::TreeModel::Row row(*get_iter(dest));
 
        //synfig::info("Dropped data of type \"%s\"",selection_data.get_data_type());
@@ -568,19 +568,19 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
        if ((selection_data.get_length() >= 0) && (selection_data.get_format() == 8))
        {
                synfig::String dest_group;
-               
+
                dest_group=(Glib::ustring)row[model.group_name];
-               
+
                if(dest_group.empty())
                        return false;
 
                if(synfig::String(selection_data.get_data_type())=="LAYER")
                {
                        synfigapp::Action::Handle action(synfigapp::Action::create("group_add_layers"));
-                       
+
                        if(!action)
                                return false;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("group",dest_group);
@@ -589,7 +589,7 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
                        {
                                Layer::Handle layer(reinterpret_cast<Layer**>(const_cast<guint8*>(selection_data.get_data()))[i]);
                                assert(layer);
-       
+
                                action->set_param("layer",layer);
                        }
                        if(!canvas_interface()->get_instance()->perform_action(action))
@@ -603,23 +603,23 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
                {
                        synfig::String src_group(reinterpret_cast<const gchar*>(selection_data.get_data()));
                        synfig::String group(src_group);
-                       
+
                        // Get rid of any parent group crap
                        while(group.find(GROUP_NEST_CHAR)!=Glib::ustring::npos)
                                group=Glib::ustring(group,group.find(GROUP_NEST_CHAR)+1,Glib::ustring::npos);
-                       
+
                        group=dest_group+GROUP_NEST_CHAR+group;
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("group_rename"));
-                       
+
                        if(!action)
                                return false;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("group",src_group);
                        action->set_param("new_group",group);
-                       
+
                        if(!canvas_interface()->get_instance()->perform_action(action))
                        {
                                passive_grouper.cancel();
@@ -635,7 +635,7 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
        {
                Canvas::Handle dest_canvas;
                Layer::Handle dest_layer;
-               
+
                dest_canvas=(Canvas::Handle)(row[model.canvas]);
                dest_layer=(Layer::Handle)(row[model.layer]);
                assert(dest_canvas);
@@ -644,16 +644,16 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
                        return false;
 
                int dest_layer_depth=dest_layer->get_depth();
-               
+
                if(synfig::String(selection_data.get_data_type())=="LAYER")for(i=0;i<selection_data.get_length()/sizeof(void*);i++)
                {
                        //synfig::info("dest_layer_depth=%d",dest_layer_depth);
-                       
+
                        Layer::Handle src(reinterpret_cast<Layer**>(const_cast<guint8*>(selection_data.get_data()))[i]);
                        assert(src);
                        if(dest_layer==src)
                                continue;
-                       
+
                        // In this case, we are just moving.
 //                     if(dest_canvas==src->get_canvas())
                        {
@@ -661,7 +661,7 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
                                        dest_layer_depth--;
                                if(dest_canvas==src->get_canvas() && dest_layer_depth==src->get_depth())
                                        continue;
-                               
+
                                synfigapp::Action::Handle action(synfigapp::Action::create("layer_move"));
                                action->set_param("canvas",dest_canvas);
                                action->set_param("canvas_interface",canvas_interface());
@@ -687,7 +687,7 @@ LayerGroupTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, cons
 
        // Reselect the previously selected layers
        canvas_interface()->get_selection_manager()->set_selected_layers(selected_layer_list);
-       
+
        return ret;
        */
        return false;
@@ -705,7 +705,7 @@ LayerGroupTreeStore::rebuild()
        rebuilding=true;
                etl::clock timer;timer.reset();
        try {
-       
+
                // Clear out the current list
                clear();
                Canvas::Handle canvas(canvas_interface()->get_canvas());
@@ -715,15 +715,15 @@ LayerGroupTreeStore::rebuild()
                        String group(*groups.begin());
                        Gtk::TreeRow row(on_group_added(group));
                        std::set<Layer::Handle> layers(canvas->get_layers_in_group(group));
-                       
+
                        for(;layers.size();layers.erase(layers.begin()))
                        {
                                Gtk::TreeRow layer_row(*(prepend(row.children())));
                                Layer::Handle layer(*layers.begin());
                                set_row_layer(layer_row,layer);
-                       }               
+                       }
                }
-               
+
                // Go ahead and and add all the layers
                /*std::for_each(
                        canvas_interface()->get_canvas()->rbegin(), canvas_interface()->get_canvas()->rend(),
@@ -751,8 +751,8 @@ LayerGroupTreeStore::refresh_row(Gtk::TreeModel::Row &row)
        if((bool)row[model.is_layer])
        {
                Layer::Handle layer=row[model.layer];
-       
-               
+
+
                //if(layer->dynamic_param_list().count("z_depth"))
                //      row[model.z_depth]=Time::begin();
        }
@@ -787,7 +787,7 @@ LayerGroupTreeStore::on_group_added(synfig::String group)
                if(find_group_row(group,  iter))
                        return *iter;
        }
-       
+
        if(group.find(GROUP_NEST_CHAR)!=String::npos)
        {
                Gtk::TreeModel::Children::iterator iter;
@@ -797,17 +797,17 @@ LayerGroupTreeStore::on_group_added(synfig::String group)
                        if(parent_name.size())
                                parent_name+=GROUP_NEST_CHAR;
                        parent_name+=string(group,0,group.find(GROUP_NEST_CHAR));
-                               
+
                        if(!find_group_row(parent_name, iter))
                                iter=on_group_added(parent_name);
-                       
+
                        group=String(group,group.find(GROUP_NEST_CHAR)+1,String::npos);
                }while(group.find(GROUP_NEST_CHAR)!=String::npos);
 
                if(parent_name.size())
                        parent_name+=GROUP_NEST_CHAR;
                parent_name+=group;
-               
+
                if(iter)
                {
                        Gtk::TreeRow row(*(prepend(iter->children())));
@@ -831,13 +831,13 @@ bool
 LayerGroupTreeStore::on_group_removed(synfig::String group)
 {
        //DEBUGPOINT();
-       
+
        Gtk::TreeModel::Children::iterator iter;
        if(find_group_row(group,iter) && iter->children().size()==0)
                erase(iter);
        else
                return false;
-       
+
        return true;
 }
 
@@ -874,12 +874,12 @@ LayerGroupTreeStore::on_group_pair_removed(String group, etl::handle<Layer> laye
                return;
 
        Gtk::TreeModel::Children::iterator prev,layer_iter;
-       
+
        if(!find_layer_row_(layer, layer->get_canvas(), iter->children(), layer_iter, prev))
                return;
-       
+
        erase(layer_iter);
-       
+
        on_activity();
 }
 
@@ -918,9 +918,9 @@ LayerGroupTreeStore::on_layer_new_description(synfig::Layer::Handle handle,synfi
        if(find_layer_row(handle,iter))
        {
                Gtk::TreeRow row(*iter);
-               
-               Layer::Handle layer(row[model.layer]);          
-               
+
+               Layer::Handle layer(row[model.layer]);
+
                if(desc.empty())
                {
                        //row[model.label]=layer->get_local_name();
@@ -930,7 +930,7 @@ LayerGroupTreeStore::on_layer_new_description(synfig::Layer::Handle handle,synfi
                        //row[model.label]=layer->get_description();
                        row[model.tooltip]=layer->get_local_name();
        }
-       else    
+       else
        {
                rebuild();
        }
@@ -940,7 +940,7 @@ bool
 LayerGroupTreeStore::find_layer_row_(const synfig::Layer::Handle &layer, synfig::Canvas::Handle canvas, Gtk::TreeModel::Children layers, Gtk::TreeModel::Children::iterator &iter, Gtk::TreeModel::Children::iterator &prev)
 {
        assert(layer);
-       
+
        //if(layer->get_canvas()==canvas)
        {
                for(iter=prev=layers.begin(); iter && iter != layers.end(); prev=iter++)
@@ -949,31 +949,31 @@ LayerGroupTreeStore::find_layer_row_(const synfig::Layer::Handle &layer, synfig:
                        if((bool)row[model.is_layer] && layer==(synfig::Layer::Handle)row[model.layer])
                                return true;
                }
-               
+
                iter=children().end();
                //DEBUGPOINT();
                //return false;
        }
 
        Gtk::TreeModel::Children::iterator iter2;
-       
+
        for(iter2 = layers.begin(); iter2 && iter2 != layers.end(); ++iter2)
        {
                Gtk::TreeModel::Row row = *iter2;
                assert((bool)true);
-               
+
                if(row.children().empty())
                        continue;
-               
+
                /*Canvas::Handle canvas((*row.children().begin())[model.canvas]);
                if(!canvas)
                        continue;
                */
-               
+
                if(find_layer_row_(layer,canvas,iter2->children(),iter,prev))
                        return true;
        }
-       
+
        iter=children().end();
        return false;
 }
@@ -1003,26 +1003,26 @@ LayerGroupTreeStore::find_group_row_(const synfig::String &group, Gtk::TreeModel
                        if((bool)row[model.is_group] && group==(Glib::ustring)row[model.group_name])
                                return true;
                }
-               
+
                iter=children().end();
                //DEBUGPOINT();
                //return false;
        }
 
        Gtk::TreeModel::Children::iterator iter2;
-       
+
        for(iter2 = layers.begin(); iter2 && iter2 != layers.end(); ++iter2)
        {
                Gtk::TreeModel::Row row = *iter2;
                assert((bool)true);
-               
+
                if(row.children().empty())
                        continue;
-                               
+
                if(find_group_row_(group,iter2->children(),iter,prev))
                        return true;
        }
-       
+
        iter=children().end();
        return false;
 }
index 36ac9d6..deef700 100644 (file)
@@ -56,7 +56,7 @@ public:
                Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > icon;
                Gtk::TreeModelColumn<Glib::ustring> label;
                Gtk::TreeModelColumn<Glib::ustring> tooltip;
-               
+
                Gtk::TreeModelColumn<Glib::ustring> group_name;
                Gtk::TreeModelColumn<Glib::ustring> parent_group_name;
 
@@ -66,10 +66,10 @@ public:
                Gtk::TreeModelColumn<bool>                                              is_layer;
                Gtk::TreeModelColumn<bool>                                              is_group;
                Gtk::TreeModelColumn<synfig::Layer::Handle>             layer;
-               
+
                Gtk::TreeModelColumn<LayerList>         all_layers;
                Gtk::TreeModelColumn<LayerList>         child_layers;
-               
+
                Model()
                {
                        add(icon);
@@ -92,10 +92,10 @@ public:
        */
 
 public:
-       
+
        //! TreeModel for the layers
        const Model model;
-       
+
        bool rebuilding;
 
        /*
@@ -160,7 +160,7 @@ private:
        */
 
 public:
-       
+
        LayerGroupTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
        ~LayerGroupTreeStore();
 
@@ -190,7 +190,7 @@ public:
        */
 
 public:
-       
+
        static Glib::RefPtr<LayerGroupTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
 
 }; // END of class LayerGroupTreeStore
index 0403160..f52e098 100644 (file)
@@ -86,10 +86,10 @@ LayerParamTreeStore::LayerParamTreeStore(etl::loose_handle<synfigapp::CanvasInte
 
        canvas_interface()->signal_value_node_child_added().connect(sigc::mem_fun(*this,&studio::LayerParamTreeStore::on_value_node_child_added));
        canvas_interface()->signal_value_node_child_removed().connect(sigc::mem_fun(*this,&studio::LayerParamTreeStore::on_value_node_child_removed));
-       
-       
+
+
        layer_tree->get_selection()->signal_changed().connect(sigc::mem_fun(*this,&LayerParamTreeStore::queue_rebuild));
-       
+
        signal_changed().connect(sigc::mem_fun(*this,&LayerParamTreeStore::queue_refresh));
        rebuild();
 }
@@ -120,7 +120,7 @@ LayerParamTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                synfig::error("LayerParamTreeStore::get_value_vfunc(): Bad column!");
                return;
        }
-       
+
 /*     if(column==model.label.index())
        {
                synfig::Layer::Handle layer((*iter)[model.layer]);
@@ -135,7 +135,7 @@ LayerParamTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                        x.set(layer->get_description());
                else
                        x.set(layer->get_local_name());
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -145,23 +145,23 @@ LayerParamTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
        {
                synfigapp::ValueDesc value_desc((*iter)[model.value_desc]);
                Glib::ustring label;
-               
+
                if(!(*iter)[model.is_toplevel])
                        return CanvasTreeStore::get_value_vfunc(iter,column,value);
                synfig::ParamDesc param_desc((*iter)[model.param_desc]);
                label=param_desc.get_local_name();
-               
+
                if(!(*iter)[model.is_inconsistent])
                if(value_desc.is_value_node() && value_desc.get_value_node()->is_exported())
                {
                        label+=strprintf(" (%s)",value_desc.get_value_node()->get_id().c_str());
                }
-               
+
                Glib::Value<Glib::ustring> x;
                g_value_init(x.gobj(),x.value_type());
 
                x.set(label);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -172,9 +172,9 @@ LayerParamTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                g_value_init(x.gobj(),x.value_type());
 
                TreeModel::Path path(get_path(iter));
-               
+
                x.set(path.get_depth()<=1);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -186,12 +186,12 @@ LayerParamTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int
                        CanvasTreeStore::get_value_vfunc(iter,column,value);
                        return;
                }
-               
+
                Glib::Value<bool> x;
                g_value_init(x.gobj(),x.value_type());
 
                x.set(false);
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -226,7 +226,7 @@ LayerParamTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                        Glib::Value<synfig::ValueBase> x;
                        g_value_init(x.gobj(),model.value.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        if((bool)(*iter)[model.is_toplevel])
                        {
                                synfigapp::Action::PassiveGrouper group(canvas_interface()->get_instance().get(),_("Set Layer Params"));
@@ -234,7 +234,7 @@ LayerParamTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                                synfig::ParamDesc param_desc((*iter)[model.param_desc]);
 
                                LayerList::iterator iter2(layer_list.begin());
-                               
+
                                for(;iter2!=layer_list.end();++iter2)
                                {
                                        if(!canvas_interface()->change_value(synfigapp::ValueDesc(*iter2,param_desc.get_name()),x.get()))
@@ -242,7 +242,7 @@ LayerParamTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                                                // ERROR!
                                                group.cancel();
                                                App::dialog_error_blocking(_("Error"),_("Unable to set all layer parameters."));
-                                               
+
                                                return;
                                        }
                                }
@@ -258,23 +258,23 @@ LayerParamTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
                if(column==model.active.index())
                {
                        synfig::Layer::Handle layer((*iter)[model.layer]);
-                       
+
                        if(!layer)return;
 
                        Glib::Value<bool> x;
                        g_value_init(x.gobj(),model.active.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("layer_activate"));
-                       
+
                        if(!action)
                                return;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("layer",layer);
                        action->set_param("new_status",bool(x.get()));
-                       
+
                        canvas_interface()->get_instance()->perform_action(action);
                        return;
                }
@@ -285,7 +285,7 @@ LayerParamTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int co
        catch(std::exception x)
        {
                g_warning(x.what());
-       }       
+       }
 }
 
 
@@ -304,10 +304,10 @@ LayerParamTreeStore::rebuild()
        if(queued)queued=false;
        clear();
        layer_list=layer_tree->get_selected_layers();
-       
+
        if(layer_list.size()<=0)
                return;
-       
+
        // Get rid of all the connections,
        // and clear the connection map.
        //while(!connection_map.empty())connection_map.begin()->second.disconnect(),connection_map.erase(connection_map.begin());
@@ -324,17 +324,17 @@ LayerParamTreeStore::rebuild()
                static ParamVocab::iterator find_param_desc(ParamVocab& vocab, const synfig::String& x)
                {
                        ParamVocab::iterator iter;
-       
+
                        for(iter=vocab.begin();iter!=vocab.end();++iter)
                                if(iter->get_name()==x)
                                        break;
                        return iter;
                }
-               
+
                void process_vocab(ParamVocab x)
                {
                        ParamVocab::iterator iter;
-       
+
                        for(iter=vocab.begin();iter!=vocab.end();++iter)
                        {
                                ParamVocab::iterator iter2(find_param_desc(x,iter->get_name()));
@@ -348,14 +348,14 @@ LayerParamTreeStore::rebuild()
                                }
                        }
                }
-               
+
        } rebuild_helper;
 
-       
+
        {
                LayerList::iterator iter(layer_list.begin());
                rebuild_helper.vocab=(*iter)->get_param_vocab();
-               
+
                for(++iter;iter!=layer_list.end();++iter)
                {
                        rebuild_helper.process_vocab((*iter)->get_param_vocab());
@@ -369,13 +369,13 @@ LayerParamTreeStore::rebuild()
                        );
                }
        }
-       
+
        ParamVocab::iterator iter;
        for(iter=rebuild_helper.vocab.begin();iter!=rebuild_helper.vocab.end();++iter)
        {
                if(iter->get_hidden())
                        continue;
-               
+
                /*
                if(iter->get_animation_only())
                {
@@ -425,9 +425,9 @@ LayerParamTreeStore::rebuild()
                                row[model.is_inconsistent] = true;
                                while(!row.children().empty() && erase(row.children().begin()));
                                break;
-                       }       
+                       }
                }
-       }       
+       }
 }
 
 void
@@ -466,11 +466,11 @@ void
 LayerParamTreeStore::refresh()
 {
        if(queued)queued=false;
-       
+
        Gtk::TreeModel::Children children_(children());
-       
+
        Gtk::TreeModel::Children::iterator iter;
-       
+
        if(!children_.empty())
                for(iter = children_.begin(); iter && iter != children_.end(); ++iter)
                {
@@ -486,7 +486,7 @@ LayerParamTreeStore::refresh_row(Gtk::TreeModel::Row &row)
        {
                row[model.is_inconsistent] = false;
                ParamDesc param_desc(row[model.param_desc]);
-               
+
                LayerList::iterator iter2(layer_list.begin());
                ValueBase value((*iter2)->get_param(param_desc.get_name()));
                for(++iter2;iter2!=layer_list.end();++iter2)
@@ -496,7 +496,7 @@ LayerParamTreeStore::refresh_row(Gtk::TreeModel::Row &row)
                                row[model.is_inconsistent] = true;
                                while(!row.children().empty() && erase(row.children().begin()));
                                return;
-                       }       
+                       }
                }
        }
 
index d35a7fd..c381c84 100644 (file)
@@ -43,7 +43,7 @@
 namespace studio {
 
 class LayerTree;
-       
+
 class LayerParamTreeStore : public CanvasTreeStore
 {
        /*
@@ -58,7 +58,7 @@ public:
        */
 
 public:
-       
+
        //! TreeModel for the layer parameters
        class Model : public CanvasTreeStore::Model
        {
@@ -76,10 +76,10 @@ public:
                        add(is_toplevel);
                }
        };
-       
+
        Model model;
 
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -87,13 +87,13 @@ public:
 private:
 
        int queued;
-       
+
        LayerTree* layer_tree;
-       
+
        LayerList layer_list;
 
        sigc::connection queue_connection;
-       
+
        std::list<sigc::connection> changed_connection_list;
 
        sigc::signal<void> signal_changed_;
@@ -129,7 +129,7 @@ private:
        */
 
 public:
-       
+
        LayerParamTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_,
                LayerTree* layer_tree);
        ~LayerParamTreeStore();
@@ -147,13 +147,13 @@ public:
        sigc::signal<void>& signal_changed() { return signal_changed_; }
 
        void changed() { signal_changed_(); }
-       
+
        /*
  -- ** -- S T A T I C   P U B L I C   M E T H O D S ---------------------------
        */
 
 public:
-       
+
        static Glib::RefPtr<LayerParamTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_, LayerTree*layer_tree);
 }; // END of class LayerParamTreeStore
 
index 9f84d8d..1317124 100644 (file)
@@ -88,23 +88,23 @@ using namespace studio;
 
 LayerTree::LayerTree():
        layer_amount_adjustment_(1,0,1,0.01,0.01,0)
-{      
+{
        param_tree_view_=new Gtk::TreeView;
        layer_tree_view_=new Gtk::TreeView;
-       
+
        //Gtk::HPaned* hpaned(manage(new Gtk::HPaned()));
        //hpaned->show();
        //attach(*hpaned, 0, 3, 0, 1, Gtk::EXPAND|Gtk::FILL,Gtk::EXPAND|Gtk::FILL, 0, 0);
        //attach(*create_layer_tree(), 0, 3, 0, 1, Gtk::EXPAND|Gtk::FILL,Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        create_layer_tree();
        create_param_tree();
-       
+
        //hpaned->pack1(*create_layer_tree(),false,false);
        //hpaned->pack2(*create_param_tree(),true,false);
        //hpaned->set_position(200);
        hbox=manage(new Gtk::HBox());
-       
+
        attach(*hbox, 0, 1, 1, 2, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 0, 0);
        attach(blend_method_widget, 2, 3, 1, 2,Gtk::SHRINK, Gtk::SHRINK, 0, 0);
 
@@ -112,13 +112,13 @@ LayerTree::LayerTree():
        layer_amount_hscale->set_digits(2);
        layer_amount_hscale->set_value_pos(Gtk::POS_LEFT);
        layer_amount_hscale->set_sensitive(false);
-       layer_amount_hscale->set_update_policy( Gtk::UPDATE_DISCONTINUOUS);     
+       layer_amount_hscale->set_update_policy( Gtk::UPDATE_DISCONTINUOUS);
        attach(*layer_amount_hscale, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 1, 1);
        layer_amount_adjustment_.signal_value_changed().connect(sigc::mem_fun(*this, &studio::LayerTree::on_amount_value_changed));
-       
-       
-       
-       
+
+
+
+
        Gtk::Image *icon;
        //Gtk::IconSize iconsize(Gtk::IconSize::from_name("synfig-small_icon"));
        Gtk::IconSize iconsize(Gtk::ICON_SIZE_SMALL_TOOLBAR);
@@ -127,7 +127,7 @@ LayerTree::LayerTree():
        SMALL_BUTTON(button_lower,"gtk-go-down","Lower");
        SMALL_BUTTON(button_duplicate,"synfig-duplicate","Duplicate");
        SMALL_BUTTON(button_delete,"gtk-delete","Delete");
-       
+
        hbox->pack_start(*button_raise,Gtk::PACK_SHRINK);
        hbox->pack_start(*button_lower,Gtk::PACK_SHRINK);
        hbox->pack_start(*button_duplicate,Gtk::PACK_SHRINK);
@@ -186,7 +186,7 @@ LayerTree::create_layer_tree()
 {
        const LayerTreeStore::Model model;
 
-       
+
        {       // --- O N / O F F ----------------------------------------------------
                //int index;
                //index=get_layer_tree_view().append_column_editable(_(" "),layer_model.active);
@@ -196,12 +196,12 @@ LayerTree::create_layer_tree()
 
                // Set up the icon cell-renderer
                Gtk::CellRendererToggle* cellrenderer = Gtk::manage( new Gtk::CellRendererToggle() );
-               cellrenderer->signal_toggled().connect(sigc::mem_fun(*this, &studio::LayerTree::on_layer_toggle));              
+               cellrenderer->signal_toggled().connect(sigc::mem_fun(*this, &studio::LayerTree::on_layer_toggle));
 
                column->pack_start(*cellrenderer,false);
                column->add_attribute(cellrenderer->property_active(), layer_model.active);
                get_layer_tree_view().append_column(*column);
-       }       
+       }
 
        {       // --- I C O N --------------------------------------------------------
                int index;
@@ -214,7 +214,7 @@ LayerTree::create_layer_tree()
                //column->set_reorderable();
                //column->set_resizable();
                //column->set_clickable();
-               
+
                //Gtk::CellRendererPixbuf* icon_cellrenderer = Gtk::manage( new Gtk::CellRendererPixbuf() );
                //column->pack_start(*icon_cellrenderer,false);
                //column->add_attribute(icon_cellrenderer->property_pixbuf(), layer_model.icon);
@@ -225,9 +225,9 @@ LayerTree::create_layer_tree()
 
                // Set up the icon cell-renderer
                Gtk::CellRendererText* cellrenderer = Gtk::manage( new Gtk::CellRendererText() );
-               cellrenderer->signal_edited().connect(sigc::mem_fun(*this, &studio::LayerTree::on_layer_renamed));              
+               cellrenderer->signal_edited().connect(sigc::mem_fun(*this, &studio::LayerTree::on_layer_renamed));
                cellrenderer->property_editable()=true;
-               
+
                column->pack_start(*cellrenderer,false);
                column->add_attribute(cellrenderer->property_text(), layer_model.label);
                get_layer_tree_view().append_column(*column);
@@ -242,7 +242,7 @@ LayerTree::create_layer_tree()
                //column->set_reorderable();
                //column->set_resizable();
                //column->set_clickable(false);
-               
+
                //Gtk::CellRendererPixbuf* icon_cellrenderer = Gtk::manage( new Gtk::CellRendererPixbuf() );
                //column->pack_start(*icon_cellrenderer,false);
                //column->add_attribute(icon_cellrenderer->property_pixbuf(), layer_model.icon);
@@ -270,10 +270,10 @@ LayerTree::create_layer_tree()
 
        // This makes things easier to read.
        get_layer_tree_view().set_rules_hint();
-               
+
        // Make us more sensitive to several events
        //get_layer_tree_view().add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK|Gdk::POINTER_MOTION_MASK);
-       
+
        get_layer_tree_view().signal_event().connect(sigc::mem_fun(*this, &studio::LayerTree::on_layer_tree_event));
        get_layer_tree_view().show();
 
@@ -285,7 +285,7 @@ LayerTree::create_layer_tree()
        //scroll->add(get_layer_tree_view());
        scroll->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
        scroll->show();
-       
+
        return scroll;
 }
 
@@ -299,9 +299,9 @@ LayerTree::create_param_tree()
                pango_size.set_end_index(64);
                attr_list.change(pango_size);
        }
-       
+
        Gtk::IconSize icon_size(Gtk::ICON_SIZE_SMALL_TOOLBAR);
-       
+
        {       // --- N A M E --------------------------------------------------------
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Param")) );
 
@@ -309,7 +309,7 @@ LayerTree::create_param_tree()
                Gtk::CellRendererPixbuf* icon_cellrenderer = Gtk::manage( new Gtk::CellRendererPixbuf() );
                column->pack_start(*icon_cellrenderer,false);
                column->add_attribute(icon_cellrenderer->property_pixbuf(), param_model.icon);
-               
+
                // Pack the label into the column
                //column->pack_start(layer_model.label,true);
                Gtk::CellRendererText* text_cellrenderer = Gtk::manage( new Gtk::CellRendererText() );
@@ -329,16 +329,16 @@ LayerTree::create_param_tree()
                valuenode_icon_cellrenderer->property_pixbuf()=Gtk::Button().render_icon(Gtk::StockID("synfig-value_node"),icon_size);
                column->add_attribute(valuenode_icon_cellrenderer->property_visible(), param_model.is_shared);
 
-               // Finish setting up the column         
+               // Finish setting up the column
                column->set_reorderable();
                column->set_resizable();
                column->set_clickable();
-               
+
                param_tree_view().append_column(*column);
        }
        {       // --- V A L U E  -----------------------------------------------------
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("ValueBase")) );
-               
+
                // Set up the value cell-renderer
                cellrenderer_value=LayerParamTreeStore::add_cell_renderer_value(column);
                cellrenderer_value->signal_edited().connect(sigc::mem_fun(*this, &studio::LayerTree::on_edited_value));
@@ -359,7 +359,7 @@ LayerTree::create_param_tree()
        /*{     // --- T I M E   T R A C K --------------------------------------------
                Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Time Track")) );
                column_time_track=column;
-               
+
                // Set up the value-node cell-renderer
                cellrenderer_time_track=LayerParamTreeStore::add_cell_renderer_value_node(column);
                cellrenderer_time_track->property_mode()=Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
@@ -370,7 +370,7 @@ LayerTree::create_param_tree()
                //column->add_attribute(cellrenderer_time_track->property_visible(), model.is_value_node);
 
                //column->pack_start(*cellrenderer_time_track);
-                               
+
                // Finish setting up the column
                column->set_reorderable();
                column->set_resizable();
@@ -379,16 +379,16 @@ LayerTree::create_param_tree()
        }*/
 
 
-       
+
        // This makes things easier to read.
        param_tree_view().set_rules_hint();
-               
+
        // Make us more sensitive to several events
        param_tree_view().add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK|Gdk::POINTER_MOTION_MASK);
-       
+
        param_tree_view().signal_event().connect(sigc::mem_fun(*this, &studio::LayerTree::on_param_tree_event));
        param_tree_view().show();
-       
+
        Gtk::ScrolledWindow *scroll = manage(new class Gtk::ScrolledWindow());
        scroll->set_flags(Gtk::CAN_FOCUS);
        scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -397,7 +397,7 @@ LayerTree::create_param_tree()
        scroll->show();
 
        //column_time_track->set_visible(false);
-       
+
        return scroll;
 }
 
@@ -422,7 +422,7 @@ LayerTree::select_layer(Layer::Handle layer)
        {
                if(sorted_layer_tree_store_)
                        iter=sorted_layer_tree_store_->convert_child_iter_to_iter(iter);
-               
+
                Gtk::TreePath path(iter);
                for(int i=path.get_depth();i;i--)
                {
@@ -534,26 +534,26 @@ void
 LayerTree::set_model(Glib::RefPtr<LayerTreeStore> layer_tree_store)
 {
        layer_tree_store_=layer_tree_store;
-       
+
 
        if(false)
        {
-               sorted_layer_tree_store_=Gtk::TreeModelSort::create(layer_tree_store);  
-       
+               sorted_layer_tree_store_=Gtk::TreeModelSort::create(layer_tree_store);
+
                sorted_layer_tree_store_->set_default_sort_func(sigc::ptr_fun(&studio::LayerTreeStore::z_sorter));
-       
+
                //sorted_store->set_sort_func(model.time.index(),sigc::mem_fun(&studio::KeyframeTreeStore::time_sorter));
                //sorted_store->set_sort_column_id(model.time.index(), Gtk::SORT_ASCENDING);
-               
+
                get_layer_tree_view().set_model(sorted_layer_tree_store_);
        }
        else
                get_layer_tree_view().set_model(layer_tree_store_);
-       
+
        layer_tree_store_->canvas_interface()->signal_dirty_preview().connect(sigc::mem_fun(*this,&studio::LayerTree::on_dirty_preview));
 
        //layer_tree_store_->canvas_interface()->signal_dirty_preview().connect(sigc::mem_fun(*this,&studio::LayerTree::on_dirty_preview));
-       
+
        layer_tree_store_->canvas_interface()->signal_time_changed().connect(
                sigc::mem_fun(
                        &param_tree_view(),
@@ -565,7 +565,7 @@ LayerTree::set_model(Glib::RefPtr<LayerTreeStore> layer_tree_store)
                param_tree_store_=LayerParamTreeStore::create(layer_tree_store_->canvas_interface(), this);
                param_tree_view().set_model(param_tree_store_);
        }
-       
+
 /*     if(cellrenderer_time_track && layer_tree_store_ && layer_tree_store_->canvas_interface())
        {
                cellrenderer_time_track->set_canvas_interface(layer_tree_store_->canvas_interface());
@@ -606,7 +606,7 @@ void
 LayerTree::on_selection_changed()
 {
        synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
-       
+
        Gtk::TreeIter iter;
        if(last_top_selected_layer && !layer_tree_store_->find_layer_row(last_top_selected_layer,iter))
        {
@@ -630,8 +630,8 @@ LayerTree::on_selection_changed()
                        last_top_selected_layer=0;
                }
        }
-       
-       
+
+
        if(layer_list.empty())
        {
                button_raise->set_sensitive(false);
@@ -647,14 +647,14 @@ LayerTree::on_selection_changed()
        button_lower->set_sensitive(true);
        button_duplicate->set_sensitive(true);
        button_delete->set_sensitive(true);
-       
+
        if(layer_list.size()==1 && (*layer_list.begin())->get_param("amount").is_valid()&& (*layer_list.begin())->get_param("amount").same_as(Real()))
        {
                quick_layer=*layer_list.begin();
        }
        else
                quick_layer=0;
-       
+
        if(quick_layer)
        {
                layer_amount_hscale->set_sensitive(true);
@@ -669,11 +669,11 @@ LayerTree::on_selection_changed()
                        disable_amount_changed_signal=false;
                }
                else
-                       blend_method_widget.set_sensitive(false);               
+                       blend_method_widget.set_sensitive(false);
        }
        else
        {
-               layer_amount_hscale->set_sensitive(false);      
+               layer_amount_hscale->set_sensitive(false);
                blend_method_widget.set_sensitive(false);
        }
 }
@@ -686,7 +686,7 @@ LayerTree::on_blend_method_changed()
                return;
        if(!quick_layer)
                return;
-       
+
        if(quick_layer->get_param("blend_method").is_valid())
        {
                disable_amount_changed_signal=true;
@@ -702,7 +702,7 @@ LayerTree::on_amount_value_changed()
                return;
        if(!quick_layer)
                return;
-       
+
        disable_amount_changed_signal=true;
        signal_edited_value()(synfigapp::ValueDesc(quick_layer,"amount"),synfig::ValueBase(layer_amount_adjustment_.get_value()));
        disable_amount_changed_signal=false;
@@ -713,7 +713,7 @@ void
 LayerTree::on_edited_value(const Glib::ustring&path_string,synfig::ValueBase value)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
        if(!row)
                return;
@@ -725,7 +725,7 @@ void
 LayerTree::on_layer_renamed(const Glib::ustring&path_string,const Glib::ustring& value)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(get_layer_tree_view().get_model()->get_iter(path));
        if(!row)
                return;
@@ -739,18 +739,18 @@ LayerTree::on_layer_toggle(const Glib::ustring& path_string)
 
        const Gtk::TreeRow row = *(get_layer_tree_view().get_model()->get_iter(path));
        bool active=static_cast<bool>(row[layer_model.active]);
-       row[layer_model.active]=!active;        
+       row[layer_model.active]=!active;
 }
 
 void
 LayerTree::on_waypoint_clicked(const Glib::ustring &path_string, synfig::Waypoint waypoint,int button)
 {
        Gtk::TreePath path(path_string);
-       
+
        const Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
        if(!row)
                return;
-       
+
        signal_waypoint_clicked()(static_cast<synfigapp::ValueDesc>(row[param_model.value_desc]),waypoint,button);
 }
 
@@ -772,7 +772,7 @@ LayerTree::on_layer_tree_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(get_layer_tree_view().get_model()->get_iter(path));
-                       
+
                        //if(column->get_first_cell_renderer()==cellrenderer_time_track)
                        //      return signal_layer_user_click()(event->button.button,row,COLUMNID_TIME_TRACK);
                        //else
@@ -780,10 +780,10 @@ LayerTree::on_layer_tree_event(GdkEvent *event)
                                return signal_layer_user_click()(event->button.button,row,COLUMNID_VALUE);
                        else
                                return signal_layer_user_click()(event->button.button,row,COLUMNID_NAME);
-                       
+
                }
                break;
-               
+
        case GDK_MOTION_NOTIFY:
                {
                        Gtk::TreeModel::Path path;
@@ -796,12 +796,12 @@ LayerTree::on_layer_tree_event(GdkEvent *event)
                                cell_x,cell_y //int&cell_x,int&cell_y
                                )
                        ) break;
-                       
+
                        if(!get_layer_tree_view().get_model()->get_iter(path))
                                break;
-                       
+
                        Gtk::TreeRow row = *(get_layer_tree_view().get_model()->get_iter(path));
-                       
+
                        /*
                        if(cellrenderer_time_track==column->get_first_cell_renderer())
                        {
@@ -850,7 +850,7 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                                )
                        ) break;
                        const Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
-                       
+
 /*                     if(column && column->get_first_cell_renderer()==cellrenderer_time_track)
                        {
                                Gdk::Rectangle rect;
@@ -862,7 +862,7 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                                return true;
                                //return signal_param_user_click()(event->button.button,row,COLUMNID_TIME_TRACK);
                        }
-                       else 
+                       else
 */                     {
                                if(event->button.button==3)
                                {
@@ -870,12 +870,12 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                                        if(layer_list.size()<=1)
                                        {
                                                synfigapp::ValueDesc value_desc(row[param_model.value_desc]);
-                                               Gtk::Menu* menu(manage(new Gtk::Menu()));                                       
+                                               Gtk::Menu* menu(manage(new Gtk::Menu()));
                                                App::get_instance(param_tree_store_->canvas_interface()->get_canvas())->make_param_menu(menu,param_tree_store_->canvas_interface()->get_canvas(),value_desc,0.5f);
                                                menu->popup(event->button.button,gtk_get_current_event_time());
                                                return true;
                                        }
-                                       Gtk::Menu* menu(manage(new Gtk::Menu()));                                       
+                                       Gtk::Menu* menu(manage(new Gtk::Menu()));
                                        std::list<synfigapp::ValueDesc> value_desc_list;
                                        ParamDesc param_desc(row[param_model.param_desc]);
                                        for(;!layer_list.empty();layer_list.pop_back())
@@ -894,7 +894,7 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                        }
                }
                break;
-               
+
        case GDK_MOTION_NOTIFY:
                {
                        Gtk::TreeModel::Path path;
@@ -907,12 +907,12 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                                cell_x,cell_y //int&cell_x,int&cell_y
                                )
                        ) break;
-                       
+
                        if(!param_tree_view().get_model()->get_iter(path))
                                break;
-                       
+
                        Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
-                       
+
 /*                     if((event->motion.state&GDK_BUTTON1_MASK ||event->motion.state&GDK_BUTTON3_MASK) && column && cellrenderer_time_track==column->get_first_cell_renderer())
                        {
                                Gdk::Rectangle rect;
@@ -950,12 +950,12 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                                cell_x,cell_y //int&cell_x,int&cell_y
                                )
                        ) break;
-                       
+
                        if(!param_tree_view().get_model()->get_iter(path))
                                break;
-                       
+
                        Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
-                       
+
 /*                     if(column && cellrenderer_time_track==column->get_first_cell_renderer())
                        {
                                Gdk::Rectangle rect;
@@ -966,7 +966,7 @@ LayerTree::on_param_tree_event(GdkEvent *event)
                                param_tree_view().queue_draw();
                                param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
                                return true;
-               
+
                        }
 */
                }
@@ -984,11 +984,11 @@ LayerTree::on_raise_pressed()
        param_list.add("time",layer_tree_store_->canvas_interface()->get_time());
        param_list.add("canvas",layer_tree_store_->canvas_interface()->get_canvas());
        param_list.add("canvas_interface",layer_tree_store_->canvas_interface());
-       
+
        {
                synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
                synfigapp::SelectionManager::LayerList::iterator iter;
-       
+
                for(iter=layer_list.begin();iter!=layer_list.end();++iter)
                        param_list.add("layer",Layer::Handle(*iter));
        }
@@ -1004,15 +1004,15 @@ LayerTree::on_lower_pressed()
        param_list.add("time",layer_tree_store_->canvas_interface()->get_time());
        param_list.add("canvas",layer_tree_store_->canvas_interface()->get_canvas());
        param_list.add("canvas_interface",layer_tree_store_->canvas_interface());
-       
+
        {
                synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
                synfigapp::SelectionManager::LayerList::iterator iter;
-       
+
                for(iter=layer_list.begin();iter!=layer_list.end();++iter)
                        param_list.add("layer",Layer::Handle(*iter));
        }
-       
+
        synfigapp::Action::Handle action(synfigapp::Action::create("layer_lower"));
        action->set_param_list(param_list);
        layer_tree_store_->canvas_interface()->get_instance()->perform_action(action);
@@ -1025,15 +1025,15 @@ LayerTree::on_duplicate_pressed()
        param_list.add("time",layer_tree_store_->canvas_interface()->get_time());
        param_list.add("canvas",layer_tree_store_->canvas_interface()->get_canvas());
        param_list.add("canvas_interface",layer_tree_store_->canvas_interface());
-       
+
        {
                synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
                synfigapp::SelectionManager::LayerList::iterator iter;
-       
+
                for(iter=layer_list.begin();iter!=layer_list.end();++iter)
                        param_list.add("layer",Layer::Handle(*iter));
        }
-       
+
        synfigapp::Action::Handle action(synfigapp::Action::create("layer_duplicate"));
        action->set_param_list(param_list);
        layer_tree_store_->canvas_interface()->get_instance()->perform_action(action);
@@ -1046,15 +1046,15 @@ LayerTree::on_delete_pressed()
        param_list.add("time",layer_tree_store_->canvas_interface()->get_time());
        param_list.add("canvas",layer_tree_store_->canvas_interface()->get_canvas());
        param_list.add("canvas_interface",layer_tree_store_->canvas_interface());
-       
+
        {
                synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers());
                synfigapp::SelectionManager::LayerList::iterator iter;
-       
+
                for(iter=layer_list.begin();iter!=layer_list.end();++iter)
                        param_list.add("layer",Layer::Handle(*iter));
        }
-       
+
        synfigapp::Action::Handle action(synfigapp::Action::create("layer_remove"));
        action->set_param_list(param_list);
        layer_tree_store_->canvas_interface()->get_instance()->perform_action(action);
@@ -1116,7 +1116,7 @@ LayerTree::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& cont
        synfig::info("Dropped x=%d, y=%d",x,y);
        bool success=false;
        bool dropped_on_specific_row=false;
-       
+
        Gtk::TreeModel::Path path;
        Gtk::TreeViewColumn *column;
        int cell_x, cell_y;
@@ -1132,20 +1132,20 @@ LayerTree::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& cont
        }
        else
                dropped_on_specific_row=true;
-       
+
        Gtk::TreeRow row = *(get_model()->get_iter(path));
 
-       
+
        if ((selection_data.get_length() >= 0) && (selection_data.get_format() == 8))
        {
                if(synfig::String(selection_data.get_data_type())=="LAYER")do
                {
                        Layer::Handle src(*reinterpret_cast<Layer**>(selection_data.get_data()));
                        assert(src);
-                       
+
                        Canvas::Handle dest_canvas;
                        Layer::Handle dest_layer;
-                       
+
                        if(dropped_on_specific_row)
                        {
                                dest_canvas=(Canvas::Handle)(row[model.canvas]);
@@ -1154,13 +1154,13 @@ LayerTree::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& cont
                        }
                        else
                                dest_canvas=layer_tree_store_->canvas_interface()->get_canvas();
-                       
+
                        // In this case, we are just moving.
                        if(dest_canvas==src->get_canvas())
                        {
                                if(!dest_layer || dest_layer==src)
                                        break;
-                               
+
                                synfigapp::Action::Handle action(synfigapp::Action::create("layer_move"));
                                action->set_param("canvas",dest_canvas);
                                action->set_param("canvas_interface",layer_tree_store_->canvas_interface());
@@ -1174,7 +1174,7 @@ LayerTree::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& cont
                        }
                }while(0);
        }
-       
+
        // Finish the drag
        context->drag_finish(success, false, time);
 }
@@ -1211,7 +1211,7 @@ LayerTree::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context,
        {
                context->drag_finish(false, false, time);
        }
-       
+
        if(layer_tree_store_->row_drop_possible(path,selection_data))
        {
                if(layer_tree_store_->drag_data_received(path,selection_data))
index 884cb36..b277fdc 100644 (file)
@@ -50,7 +50,7 @@
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
-namespace Gtk { class TreeModelSort; }; 
+namespace Gtk { class TreeModelSort; };
 
 namespace studio {
 
@@ -71,18 +71,18 @@ public:
                COLUMNID_NAME,
                COLUMNID_VALUE,
                COLUMNID_TIME_TRACK,
-               
+
                COLUMNID_END                    //!< \internal
        };
 */
        typedef std::list<synfig::Layer::Handle> LayerList;
-       
+
        /*
  -- ** -- P U B L I C  D A T A ------------------------------------------------
        */
 
 public:
-       
+
        //LayerTreeStore::Model model;
 
        LayerTreeStore::Model layer_model;
@@ -106,7 +106,7 @@ private:
 
        Gtk::TreeView* param_tree_view_;
 
-       
+
 
        Gtk::HBox *hbox;
 
@@ -119,7 +119,7 @@ private:
        Glib::RefPtr<LayerTreeStore> layer_tree_store_;
 
        Glib::RefPtr<LayerParamTreeStore> param_tree_store_;
-       
+
        Glib::RefPtr<Gtk::TreeModelSort> sorted_layer_tree_store_;
 
 //     CellRenderer_TimeTrack *cellrenderer_time_track;
@@ -148,16 +148,16 @@ private:
        Gtk::Button *button_delete;
 
        Widget_ValueBase blend_method_widget;
-       
+
        /*
  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
        */
 
 private:
-       
+
        Gtk::Widget* create_layer_tree();
        Gtk::Widget* create_param_tree();
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -187,7 +187,7 @@ private:
        void on_blend_method_changed();
 
 public:
-       
+
        void on_raise_pressed();
 
        void on_lower_pressed();
@@ -211,10 +211,10 @@ public:
 
        const Gtk::TreeView& get_layer_tree_view()const { return *layer_tree_view_; }
        const Gtk::TreeView& get_param_tree_view()const { return *param_tree_view_; }
-       
+
        Glib::RefPtr<Gtk::TreeSelection> get_selection() { return get_layer_tree_view().get_selection(); }
        Glib::SignalProxy1< bool,GdkEvent* >  signal_event () { return get_layer_tree_view().signal_event(); }
-       
+
        LayerTree();
        ~LayerTree();
 
@@ -237,9 +237,9 @@ public:
        sigc::signal<void,synfigapp::ValueDesc,synfig::Waypoint,int>& signal_waypoint_clicked() { return signal_waypoint_clicked_; }
 
        etl::handle<synfigapp::SelectionManager> get_selection_manager() { return layer_tree_store_->canvas_interface()->get_selection_manager(); }
-       
-       
-       
+
+
+
        void select_layer(synfig::Layer::Handle layer);
        void select_layers(const LayerList& layer_list);
        void select_all_children_layers(synfig::Layer::Handle layer);
index 65be4ad..e71417a 100644 (file)
@@ -90,7 +90,7 @@ LayerTreeStore::LayerTreeStore(etl::loose_handle<synfigapp::CanvasInterface> can
        //canvas_interface()->signal_value_node_replaced().connect(sigc::mem_fun(*this,&studio::LayerTreeStore::on_value_node_replaced));
 
        set_default_sort_func(sigc::ptr_fun(index_sorter));
-       
+
 //     rebuild();
 }
 
@@ -104,7 +104,7 @@ int
 LayerTreeStore::z_sorter(const Gtk::TreeModel::iterator &rhs,const Gtk::TreeModel::iterator &lhs)
 {
        const Model model;
-       
+
        float diff((float)(*rhs)[model.z_depth]-(float)(*lhs)[model.z_depth]);
 
        if(diff<0)
@@ -118,7 +118,7 @@ int
 LayerTreeStore::index_sorter(const Gtk::TreeModel::iterator &rhs,const Gtk::TreeModel::iterator &lhs)
 {
        const Model model;
-       
+
        return ((int)(*rhs)[model.index]-(int)(*lhs)[model.index]);
 }
 
@@ -130,7 +130,7 @@ LayerTreeStore::search_func(const Glib::RefPtr<TreeModel>&,int,const Glib::ustri
        Glib::ustring substr(x.uppercase());
        Glib::ustring label((*iter)[model.label]);
        label=label.uppercase();
-               
+
        return label.find(substr)==Glib::ustring::npos;
 }
 
@@ -152,9 +152,9 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
 
                Glib::Value<int> x;
                g_value_init(x.gobj(),x.value_type());
-               
+
                x.set(layer->get_depth());
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -167,9 +167,9 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
 
                Glib::Value<float> x;
                g_value_init(x.gobj(),x.value_type());
-               
+
                x.set(layer->get_z_depth(canvas_interface()->get_time())*1.0001+layer->get_depth());
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -183,11 +183,11 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
                Glib::Value<bool> x;
                g_value_init(x.gobj(),x.value_type());
                x.set(false);
-               
+
                ValueBase v(layer->get_param("children_lock"));
                if(v.same_as(bool()))
                        x.set(v.get(bool()));
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -206,7 +206,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
                        x.set(layer->get_description());
                else
                        x.set(layer->get_local_name());
-               
+
                g_value_init(value.gobj(),x.value_type());
                //g_value_copy(x.gobj(),value.gobj());
                value=x;
@@ -223,7 +223,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
 
 
                x.set(layer->get_local_name());
-               
+
                g_value_init(value.gobj(),x.value_type());
                //g_value_copy(x.gobj(),value.gobj());
                value=x;
@@ -240,7 +240,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
 
 
                x.set(layer->get_canvas());
-               
+
                g_value_init(value.gobj(),x.value_type());
                //g_value_copy(x.gobj(),value.gobj());
                value=x;
@@ -256,7 +256,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
                g_value_init(x.gobj(),x.value_type());
 
                x.set(layer->active());
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -271,7 +271,7 @@ LayerTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int colum
 
                //x.set(layer_icon);
                x.set(get_tree_pixbuf_layer(layer->get_name()));
-               
+
                g_value_init(value.gobj(),x.value_type());
                g_value_copy(x.gobj(),value.gobj());
        }
@@ -304,28 +304,28 @@ LayerTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int column,
                        Glib::Value<Glib::ustring> x;
                        g_value_init(x.gobj(),model.label.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        synfig::Layer::Handle layer((*iter)[model.layer]);
                        if(!layer)
                                return;
                        synfig::String new_desc(x.get());
-                       
+
                        if(new_desc==layer->get_local_name())
                                new_desc=synfig::String();
 
                        if(new_desc==layer->get_description())
                                return;
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("layer_set_desc"));
-                       
+
                        if(!action)
                                return;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("layer",layer);
                        action->set_param("new_description",synfig::String(x.get()));
-                       
+
                        canvas_interface()->get_instance()->perform_action(action);
                        return;
                }
@@ -333,23 +333,23 @@ LayerTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int column,
                if(column==model.active.index())
                {
                        synfig::Layer::Handle layer((*iter)[model.layer]);
-                       
+
                        if(!layer)return;
 
                        Glib::Value<bool> x;
                        g_value_init(x.gobj(),model.active.type());
                        g_value_copy(value.gobj(),x.gobj());
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("layer_activate"));
-                       
+
                        if(!action)
                                return;
-                       
+
                        action->set_param("canvas",canvas_interface()->get_canvas());
                        action->set_param("canvas_interface",canvas_interface());
                        action->set_param("layer",layer);
                        action->set_param("new_status",bool(x.get()));
-                       
+
                        canvas_interface()->get_instance()->perform_action(action);
                        return;
                }
@@ -360,7 +360,7 @@ LayerTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int column,
        catch(std::exception x)
        {
                g_warning(x.what());
-       }       
+       }
 }
 
 
@@ -371,7 +371,7 @@ LayerTreeStore::row_draggable_vfunc (const TreeModel::Path& path)const
 {
        //if(!get_iter(path)) return false;
 //     Gtk::TreeModel::Row row(*get_iter(path));
-       
+
        return true;
 //     return (bool)true;
 }
@@ -391,7 +391,7 @@ LayerTreeStore::drag_data_get_vfunc (const TreeModel::Path& path, Gtk::Selection
                Layer* layer(((Layer::Handle)row[model.layer]).get());
                assert(layer);
                bool included(false);
-               
+
                //gtk_selection_data_set (selection_data, gdk_atom_intern("LAYER",false), 8, reinterpret_cast<const guchar*>(&layer), sizeof(layer));
 
                std::vector<Layer*> layers;
@@ -414,7 +414,7 @@ LayerTreeStore::drag_data_get_vfunc (const TreeModel::Path& path, Gtk::Selection
                if(!included)
                        layers.push_back(layer);
                selection_data.set("LAYER", 8, reinterpret_cast<const guchar*>(&layers.front()), sizeof(void*)*layers.size());
-               
+
                return true;
        }
        return false;
@@ -434,7 +434,7 @@ LayerTreeStore::row_drop_possible_vfunc (const TreeModel::Path& dest, const Gtk:
        //synfig::info("possible_drop -- data of type \"%s\"",selection_data.get_data_type());
        //synfig::info("possible_drop -- data of target \"%s\"",gdk_atom_name(selection_data->target));
        //synfig::info("possible_drop -- selection=\"%s\"",gdk_atom_name(selection_data->selection));
-       
+
        //Gtk::TreeModel::Row row(*get_iter(dest));
 
        if(synfig::String(selection_data.get_data_type())=="LAYER" && (bool)true)
@@ -464,18 +464,18 @@ LayerTreeStore::row_drop_possible_vfunc (const TreeModel::Path& dest, const Gtk:
 bool
 LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk::SelectionData& selection_data)
 {
-       
+
        //if(!dest_parent.up() || !get_iter(dest)) return false;
-               
+
        bool ret=false;
        int i(0);
-       
+
 
        //synfig::info("Dropped data of type \"%s\"",selection_data.get_data_type());
        //synfig::info("Dropped data of target \"%s\"",gdk_atom_name(selection_data->target));
        //synfig::info("Dropped selection=\"%s\"",gdk_atom_name(selection_data->selection));
        synfigapp::Action::PassiveGrouper passive_grouper(canvas_interface()->get_instance().get(),_("Move Layers"));
-       
+
        // Save the selection data
        synfigapp::SelectionManager::LayerList selected_layer_list=canvas_interface()->get_selection_manager()->get_selected_layers();
 
@@ -483,9 +483,9 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk
        {
                Gtk::TreeModel::Row row;
                Canvas::Handle dest_canvas;
-               
+
                int dest_layer_depth=dest.back();
-               
+
                TreeModel::Path dest_parent(dest);
                if(!dest_parent.up() || !get_iter(dest_parent))
                {
@@ -506,25 +506,25 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk
                        row=(*get_iter(dest_parent));
                        dest_canvas=row[model.contained_canvas];
                }
-               
+
                assert(dest_canvas);
-               
+
                Layer::Handle dest_layer(row[model.layer]);
 
                if(synfig::String(selection_data.get_data_type())=="LAYER")for(unsigned int i=0;i<selection_data.get_length()/sizeof(void*);i++)
                {
                        //synfig::info("dest_layer_depth=%d",dest_layer_depth);
-                       
+
                        Layer::Handle src(reinterpret_cast<Layer**>(const_cast<guint8*>(selection_data.get_data()))[i]);
                        assert(src);
                        if(dest_layer==src)
                                continue;
-                       
+
                        if(dest_canvas==src->get_canvas() && src->get_depth()<dest_layer_depth)
                        {
                                dest_layer_depth--;
                        }
-                       
+
                        // In this case, we are just moving.
 //                     if(dest_canvas==src->get_canvas())
                        {
@@ -532,7 +532,7 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk
                                //      dest_layer_depth--;
                                if(dest_canvas==src->get_canvas() && dest_layer_depth==src->get_depth())
                                        continue;
-                               
+
                                synfigapp::Action::Handle action(synfigapp::Action::create("layer_move"));
                                action->set_param("canvas",dest_canvas);
                                action->set_param("canvas_interface",canvas_interface());
@@ -553,8 +553,8 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk
                                continue;
                        }
                        /*else // In this case we need to remove and then add
-                       {                               
-                               
+                       {
+
                                synfigapp::Action::Handle action;
                                action=synfigapp::Action::create("layer_remove");
                                action->set_param("canvas",Canvas::Handle(src->get_canvas()));
@@ -592,7 +592,7 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk
                                                ret=false;
                                                return false;
                                        }
-                               }                               
+                               }
                                ret=true;
                        }
                        */
@@ -602,7 +602,7 @@ LayerTreeStore::drag_data_received_vfunc (const TreeModel::Path& dest, const Gtk
 
        // Reselect the previously selected layers
        canvas_interface()->get_selection_manager()->set_selected_layers(selected_layer_list);
-       
+
        return ret;
 }
 
@@ -623,7 +623,7 @@ LayerTreeStore::rebuild()
 
        // Clear out the current list
        clear();
-               
+
        // Go ahead and and add all the layers
        std::for_each(
                canvas_interface()->get_canvas()->rbegin(), canvas_interface()->get_canvas()->rend(),
@@ -643,9 +643,9 @@ LayerTreeStore::refresh()
        etl::clock timer;timer.reset();
 
        Gtk::TreeModel::Children children_(children());
-       
+
        Gtk::TreeModel::Children::iterator iter;
-       
+
        if(!children_.empty())
                for(iter = children_.begin(); iter && iter != children_.end(); ++iter)
                {
@@ -661,7 +661,7 @@ LayerTreeStore::refresh_row(Gtk::TreeModel::Row &row)
        Layer::Handle layer=row[model.layer];
        /*
        {
-               row[model.name] = layer->get_local_name();      
+               row[model.name] = layer->get_local_name();
                if(layer->get_description().empty())
                {
                        row[model.label] = layer->get_local_name();
@@ -669,16 +669,16 @@ LayerTreeStore::refresh_row(Gtk::TreeModel::Row &row)
                }
                else
                {
-                       row[model.label] = layer->get_description();    
+                       row[model.label] = layer->get_description();
                        row[model.tooltip] = layer->get_local_name();
                }
        }
        */
-       
+
        if(layer->dynamic_param_list().count("z_depth"))
                row[model.z_depth]=Time::begin();
-       //      row_changed(get_path(row),row);                 
-       
+       //      row_changed(get_path(row),row);
+
        Gtk::TreeModel::Children children = row.children();
        Gtk::TreeModel::Children::iterator iter;
 
@@ -695,7 +695,7 @@ void
 LayerTreeStore::set_row_layer(Gtk::TreeRow &row,synfig::Layer::Handle &handle)
 {
        //row[model.id] = handle->get_name();
-       //row[model.name] = handle->get_local_name();   
+       //row[model.name] = handle->get_local_name();
        /*if(handle->get_description().empty())
        {
                //row[model.label] = handle->get_local_name();
@@ -703,45 +703,45 @@ LayerTreeStore::set_row_layer(Gtk::TreeRow &row,synfig::Layer::Handle &handle)
        }
        else
        {
-               //row[model.label] = handle->get_description(); 
+               //row[model.label] = handle->get_description();
                row[model.tooltip] = handle->get_local_name();
        }*/
-       
+
        //row[model.active] = handle->active();
        row[model.layer] = handle;
        //row[model.canvas] = handle->get_canvas();
-       //row[model.icon] = layer_icon; 
+       //row[model.icon] = layer_icon;
 
        synfig::Layer::ParamList paramlist=handle->get_param_list();
 
        synfig::Layer::Vocab vocab=handle->get_param_vocab();
        synfig::Layer::Vocab::iterator iter;
-       
+
        for(iter=vocab.begin();iter!=vocab.end();++iter)
        {
                if(iter->get_hidden())
                        continue;
                if(handle->get_param(iter->get_name()).get_type()!=ValueBase::TYPE_CANVAS)
                        continue;
-               
+
                {
                        Canvas::Handle canvas;
                        canvas=handle->get_param(iter->get_name()).get(canvas);
                        if(!canvas)
                                continue;
-               
+
                        Canvas::reverse_iterator iter;
                        row[model.contained_canvas]=canvas;
-                       
+
                        for(iter=canvas->rbegin();iter!=canvas->rend();++iter)
                        {
                                Gtk::TreeRow row_(*(prepend(row.children())));
                                set_row_layer(row_,*iter);
-                       }                       
+                       }
                        continue;
                }
-               
-               
+
+
                /*
                etl::handle<ValueNode> value_node;
                if(handle.constant()->dynamic_param_list().count(iter->get_name()))
@@ -798,7 +798,7 @@ LayerTreeStore::on_layer_removed(synfig::Layer::Handle handle)
 
 void
 LayerTreeStore::on_layer_inserted(synfig::Layer::Handle handle,int depth)
-{              
+{
        if(depth==0)
        {
                on_layer_added(handle);
@@ -818,7 +818,7 @@ LayerTreeStore::on_layer_inserted(synfig::Layer::Handle handle,int depth)
                }
                children_=iter->children();
        }
-       
+
        Gtk::TreeModel::Children::iterator iter(children_.begin());
        while(depth-- && iter)
        {
@@ -830,10 +830,10 @@ LayerTreeStore::on_layer_inserted(synfig::Layer::Handle handle,int depth)
                        return;
                }
        }
-       
+
        Gtk::TreeModel::Row row(*insert(iter));
        set_row_layer(row,handle);
-       
+
 }
 
 void
@@ -851,7 +851,7 @@ LayerTreeStore::on_layer_status_changed(synfig::Layer::Handle handle,bool x)
 
 void
 LayerTreeStore::on_layer_lowered(synfig::Layer::Handle layer)
-{      
+{
        Gtk::TreeModel::Children::iterator iter, iter2;
        if(find_layer_row(layer,iter))
        {
@@ -864,15 +864,15 @@ LayerTreeStore::on_layer_lowered(synfig::Layer::Handle layer)
                        rebuild();
                        return;
                }
-               
+
                //Gtk::TreeModel::Row row(*iter);
                Gtk::TreeModel::Row row2 = *iter2;
                synfig::Layer::Handle layer2=row2[model.layer];
-               
+
                erase(iter2);
                row2=*insert(iter);
-               set_row_layer(row2,layer2);             
-               
+               set_row_layer(row2,layer2);
+
        }
        else
                rebuild();
@@ -888,20 +888,20 @@ LayerTreeStore::on_layer_raised(synfig::Layer::Handle layer)
        if(find_layer_row_(layer, canvas_interface()->get_canvas(), children_, iter,iter2))
        {
                if(iter!=iter2)
-               {       
+               {
                        //Gtk::TreeModel::Row row = *iter;
                        Gtk::TreeModel::Row row2 = *iter2;
                        synfig::Layer::Handle layer2=row2[model.layer];
-               
+
                        erase(iter2);
                        iter++;
                        row2=*insert(iter);
                        set_row_layer(row2,layer2);
-                       
+
                        return;
                }
        }
-       
+
        rebuild();
 }
 
@@ -931,7 +931,7 @@ LayerTreeStore::on_layer_param_changed(synfig::Layer::Handle handle,synfig::Stri
        {
                //DEBUGPOINT();
                Gtk::TreeModel::Children children(iter->children());
-               
+
                for(iter = children.begin(); iter && iter != children.end(); ++iter)
                {
                        if((Glib::ustring)(*iter)[model.param_name]==param_name)
@@ -939,7 +939,7 @@ LayerTreeStore::on_layer_param_changed(synfig::Layer::Handle handle,synfig::Stri
                                //DEBUGPOINT();
                                Gtk::TreeRow row=*iter;
                                refresh_row(row);
-                               return;                         
+                               return;
                        }
                }
        }
@@ -955,9 +955,9 @@ LayerTreeStore::on_layer_new_description(synfig::Layer::Handle handle,synfig::St
        if(find_layer_row(handle,iter))
        {
                Gtk::TreeRow row(*iter);
-               
-               Layer::Handle layer(row[model.layer]);          
-               
+
+               Layer::Handle layer(row[model.layer]);
+
                if(desc.empty())
                {
                        //row[model.label]=layer->get_local_name();
@@ -967,7 +967,7 @@ LayerTreeStore::on_layer_new_description(synfig::Layer::Handle handle,synfig::St
                        //row[model.label]=layer->get_description();
                        row[model.tooltip]=layer->get_local_name();
        }
-       else    
+       else
        {
                rebuild();
        }
@@ -975,7 +975,7 @@ LayerTreeStore::on_layer_new_description(synfig::Layer::Handle handle,synfig::St
 
 bool
 LayerTreeStore::find_canvas_row_(synfig::Canvas::Handle canvas, synfig::Canvas::Handle parent, Gtk::TreeModel::Children layers, Gtk::TreeModel::Children::iterator &iter)
-{      
+{
        if(canvas==parent)
                return false;
 
@@ -986,22 +986,22 @@ LayerTreeStore::find_canvas_row_(synfig::Canvas::Handle canvas, synfig::Canvas::
                        if(canvas==(synfig::Canvas::Handle)row[model.contained_canvas])
                                return true;
                }
-               
+
                iter=children().end();
                //return false;
        }
 
        Gtk::TreeModel::Children::iterator iter2;
        //Gtk::TreeModel::Children::iterator iter3;
-       
+
        for(iter2 = layers.begin(); iter2 && iter2 != layers.end(); ++iter2)
        {
                Gtk::TreeModel::Row row = *iter2;
                assert((bool)true);
-               
+
                if(row.children().empty())
                        continue;
-               
+
                Canvas::Handle sub_canvas((*row.children().begin())[model.canvas]);
                if(!sub_canvas)
                        continue;
@@ -1009,7 +1009,7 @@ LayerTreeStore::find_canvas_row_(synfig::Canvas::Handle canvas, synfig::Canvas::
                if(find_canvas_row_(canvas,sub_canvas,iter2->children(),iter))
                        return true;
        }
-       
+
        iter=children().end();
        return false;
 }
@@ -1025,7 +1025,7 @@ bool
 LayerTreeStore::find_layer_row_(const synfig::Layer::Handle &layer, synfig::Canvas::Handle canvas, Gtk::TreeModel::Children layers, Gtk::TreeModel::Children::iterator &iter, Gtk::TreeModel::Children::iterator &prev)
 {
        assert(layer);
-       
+
        //if(layer->get_canvas()==canvas)
        {
                for(iter=prev=layers.begin(); iter && iter != layers.end(); prev=iter++)
@@ -1034,30 +1034,30 @@ LayerTreeStore::find_layer_row_(const synfig::Layer::Handle &layer, synfig::Canv
                        if(layer==(synfig::Layer::Handle)row[model.layer])
                                return true;
                }
-               
+
                iter=children().end();
                //DEBUGPOINT();
                //return false;
        }
 
        Gtk::TreeModel::Children::iterator iter2;
-       
+
        for(iter2 = layers.begin(); iter2 && iter2 != layers.end(); ++iter2)
        {
                Gtk::TreeModel::Row row = *iter2;
                assert((bool)true);
-               
+
                if(row.children().empty())
                        continue;
-               
+
                Canvas::Handle canvas((*row.children().begin())[model.canvas]);
                if(!canvas)
                        continue;
-               
+
                if(find_layer_row_(layer,canvas,iter2->children(),iter,prev))
                        return true;
        }
-       
+
        iter=children().end();
        return false;
 }
index 56537b9..24df433 100644 (file)
@@ -93,7 +93,7 @@ public:
        */
 
 public:
-       
+
        //! TreeModel for the layers
        const Model model;
 
@@ -170,7 +170,7 @@ private:
        */
 
 public:
-       
+
        LayerTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
        ~LayerTreeStore();
 
@@ -205,7 +205,7 @@ public:
        */
 
 public:
-       
+
        static Glib::RefPtr<LayerTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_);
 
 
index eefb139..3b48cf6 100644 (file)
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
                                                fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str());
                                        }
                        }
-                       
+
                        fprintf(file.get(),"F\n");
 
                        return 0;
@@ -117,6 +117,6 @@ int main(int argc, char **argv)
        }
 
        std::cerr<<"Application appears to have terminated successfuly"<<std::endl;
-       
+
        return 0;
 }
index 9cd4f89..cc22eed 100644 (file)
@@ -62,7 +62,7 @@ MetaDataTreeStore::MetaDataTreeStore(etl::loose_handle<synfigapp::CanvasInterfac
 {
        // Connect the signal
        get_canvas()->signal_meta_data_changed().connect(sigc::mem_fun(*this,&MetaDataTreeStore::meta_data_changed));
-       
+
        rebuild();
 }
 
@@ -88,9 +88,9 @@ void
 MetaDataTreeStore::rebuild()
 {
        clear();
-       
+
        std::list<String> keys(get_canvas()->get_meta_data_keys());
-       
+
        for(;!keys.empty();keys.pop_front())
        {
                Gtk::TreeRow row(*append());
@@ -138,10 +138,10 @@ MetaDataTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int colu
                Glib::Value<Glib::ustring> x;
                g_value_init(x.gobj(),model.data.type());
                g_value_copy(value.gobj(),x.gobj());
-               
+
                synfig::String key((Glib::ustring)(*iter)[model.key]);
                synfig::String new_data(x.get());
-               
+
                get_canvas_interface()->set_meta_data(key,new_data);
        }
        else
index 9331c15..b46814c 100644 (file)
@@ -41,7 +41,7 @@
 namespace synfigapp { class CanvasInterface; }
 
 namespace studio {
-       
+
 class MetaDataTreeStore : virtual public Gtk::TreeStore
 {
        /*
@@ -69,7 +69,7 @@ public:
        */
 
 public:
-       
+
        const Model model;
 
        /*
@@ -85,7 +85,7 @@ private:
        */
 
 private:
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
@@ -99,7 +99,7 @@ private:
        */
 
 public:
-       
+
        ~MetaDataTreeStore();
 
        etl::loose_handle<synfigapp::CanvasInterface> get_canvas_interface() { return canvas_interface_; }
@@ -123,7 +123,7 @@ protected:
 public:
 
        static Glib::RefPtr<MetaDataTreeStore> create(etl::loose_handle<synfigapp::CanvasInterface>);
-       
+
 }; // END of class MetaDataTreeStore
 
 }; // END of namespace studio
index acc7a7a..3b43dd7 100644 (file)
 namespace studio {
 
 class State_Mirror;
-       
+
 class ModMirror : public Module
 {
        friend class State_Mirror;
-                       
+
 protected:
        virtual bool start_vfunc();
        virtual bool stop_vfunc();
@@ -51,7 +51,7 @@ protected:
 public:
        virtual ~ModMirror() { stop(); }
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index fde9912..d022bc0 100644 (file)
@@ -76,8 +76,8 @@ class DuckDrag_Mirror : public DuckDrag_Base
        synfig::Vector center;
 
        std::vector<synfig::Vector> positions;
-       
-       
+
+
 public:
        Axis axis;
 
@@ -91,17 +91,17 @@ public:
 class studio::StateMirror_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
-               
+
        synfigapp::Settings& settings;
 
        etl::handle<DuckDrag_Mirror> duck_dragger_;
 
        Gtk::Table options_table;
-       
-       
+
+
        Gtk::CheckButton checkbutton_axis_x;
        Gtk::CheckButton checkbutton_axis_y;
-       
+
 public:
 
        Axis get_axis()const { return checkbutton_axis_x.get_active()?AXIS_X:AXIS_Y; }
@@ -117,10 +117,10 @@ public:
                        checkbutton_axis_y.set_active(true);
                        checkbutton_axis_x.set_active(false);
                }
-                       
+
                duck_dragger_->axis=get_axis();
        }
-       
+
        void update_axis_y()
        {
                checkbutton_axis_x.set_active(!checkbutton_axis_y.get_active());
@@ -143,7 +143,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        void load_settings();
        void save_settings();
 };     // END of class StateMirror_Context
@@ -154,7 +154,7 @@ StateMirror::StateMirror():
        Smach::state<StateMirror_Context>("mirror")
 {
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateMirror_Context::event_refresh_tool_options));
-}      
+}
 
 StateMirror::~StateMirror()
 {
@@ -162,7 +162,7 @@ StateMirror::~StateMirror()
 
 void
 StateMirror_Context::load_settings()
-{      
+{
        String value;
 
        settings.get_value("mirror.axis",value);
@@ -171,7 +171,7 @@ StateMirror_Context::load_settings()
 
 void
 StateMirror_Context::save_settings()
-{      
+{
        settings.set_value("mirror.lock_aspect",strprintf("%d",(int)get_axis()));
 }
 
@@ -181,19 +181,19 @@ StateMirror_Context::StateMirror_Context(CanvasView* canvas_view):
        duck_dragger_(new DuckDrag_Mirror()),
        checkbutton_axis_x(_("Horizontal")),
        checkbutton_axis_y(_("Vertical"))
-{      
+{
        // Set up the tool options dialog
-       options_table.attach(*manage(new Gtk::Label(_("Mirror Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);        
+       options_table.attach(*manage(new Gtk::Label(_("Mirror Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(checkbutton_axis_x, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(checkbutton_axis_y, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        checkbutton_axis_x.signal_toggled().connect(sigc::mem_fun(*this,&StateMirror_Context::update_axis_x));
        checkbutton_axis_y.signal_toggled().connect(sigc::mem_fun(*this,&StateMirror_Context::update_axis_y));
-               
+
        options_table.show_all();
        refresh_tool_options();
        App::dialog_tool_options->present();
-       
+
        get_work_area()->allow_layer_clicks=true;
        get_work_area()->set_duck_dragger(duck_dragger_);
 
@@ -270,7 +270,7 @@ DuckDrag_Mirror::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
 {
        center=vector;
        int i;
-       
+
                const DuckList selected_ducks(duckmatic->get_selected_ducks());
                DuckList::const_iterator iter;
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
@@ -279,12 +279,12 @@ DuckDrag_Mirror::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
 
                Vector p(positions[i]);
                //Point p((*iter)->get_trans_point());
-               
+
                if(axis==AXIS_X)
                        p[0]=-(p[0]-center[0])+center[0];
                if(axis==AXIS_Y)
                        p[1]=-(p[1]-center[1])+center[1];
-               
+
                (*iter)->set_trans_point(p);
        }
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
@@ -293,12 +293,12 @@ DuckDrag_Mirror::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
 
                Vector p(positions[i]);
                //Point p((*iter)->get_trans_point());
-               
+
                if(axis==AXIS_X)
                        p[0]=-(p[0]-center[0])+center[0];
                if(axis==AXIS_Y)
                        p[1]=-(p[1]-center[1])+center[1];
-               
+
                (*iter)->set_trans_point(p);
        }
 }
index 4f8c4dd..2c870aa 100644 (file)
@@ -52,7 +52,7 @@ using namespace studio;
 
 Dock_PalBrowse::Dock_PalBrowse():
        Dockable("pal_browse",_("Palette Browser")/*,Gtk::StockID("gtk-select-color")*/)
-{      
+{
 }
 
 Dock_PalBrowse::~Dock_PalBrowse()
index 94a3dcb..fa1efc5 100644 (file)
@@ -68,7 +68,7 @@ public:
        {
                dialog_palette->dialog_settings.add_domain(this,name);
        }
-       
+
        virtual ~PaletteSettings()
        {
                dialog_palette->dialog_settings.remove_domain(name);
@@ -83,7 +83,7 @@ public:
                value=strprintf("%f %f %f %f",c.get_r(),c.get_g(),c.get_b(),c.get_a());
                return true;
        }
-       
+
        virtual bool set_value(const synfig::String& key,const synfig::String& value)
        {
                int i(atoi(key.c_str()));
@@ -97,11 +97,11 @@ public:
                dialog_palette->set_color(Color(r,g,b,a),i);
                return true;
        }
-       
+
        virtual KeyList get_key_list()const
        {
                synfigapp::Settings::KeyList ret(synfigapp::Settings::get_key_list());
-       
+
                int i;
                for(i=0;i<dialog_palette->size();i++)
                        ret.push_back(strprintf("%03d",i));
@@ -117,7 +117,7 @@ Dock_PalEdit::Dock_PalEdit():
        Dockable("pal_edit",_("Palette Editor"),Gtk::StockID("gtk-select-color")),
        //palette_settings(new PaletteSettings(this,"colors")),
        table(2,2,false)
-{      
+{
        action_group=Gtk::ActionGroup::create();
        DEBUGPOINT();
        action_group->add(Gtk::Action::create(
@@ -131,7 +131,7 @@ Dock_PalEdit::Dock_PalEdit():
                        &Dock_PalEdit::on_add_pressed
                )
        );
-               
+
        App::ui_manager()->insert_action_group(action_group);
 
     Glib::ustring ui_info =
@@ -145,7 +145,7 @@ Dock_PalEdit::Dock_PalEdit():
        App::ui_manager()->add_ui_from_string(ui_info);
 
        set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-palette")));
-       
+
        /*
        add_button(
                Gtk::StockID("gtk-add"),
@@ -157,12 +157,12 @@ Dock_PalEdit::Dock_PalEdit():
                )
        );
        */
-       
+
        add(table);
        table.set_homogeneous(true);
-       
+
        set_default_palette();
-       
+
        show_all_children();
 }
 
@@ -247,10 +247,10 @@ void
 Dock_PalEdit::refresh()
 {
        const int width(12);
-       
+
        // Clear the table
        table.foreach(sigc::mem_fun(table,&Gtk::Table::remove));
-       
+
        for(int i=0;i<size();i++)
        {
                Widget_Color* widget_color(manage(new Widget_Color()));
@@ -269,7 +269,7 @@ Dock_PalEdit::refresh()
                        )
                );
                int c(i%width),r(i/width);
-               table.attach(*widget_color, c, c+1, r, r+1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);        
+               table.attach(*widget_color, c, c+1, r, r+1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        }
        table.show_all();
        queue_draw();
@@ -295,12 +295,12 @@ Dock_PalEdit::select_color(int i)
 {
        synfigapp::Main::set_foreground_color(get_color(i));
 }
-               
+
 void
 Dock_PalEdit::set_default_palette()
 {
        int width=12;
-       
+
        palette_.clear();
 
        // Greys
@@ -321,7 +321,7 @@ Dock_PalEdit::set_default_palette()
                float x(float(i)/(float)(width-1));
                const Color tan1(0.2,0.05,0);
                const Color tan2(0.85,0.64,0.20);
-               
+
                palette_.push_back(Color::blend(tan2,tan1,x));
        }
 
@@ -339,7 +339,7 @@ Dock_PalEdit::set_default_palette()
        palette_.push_back(Color::magenta());
        palette_.push_back(Color(1.0f,0.0f,0.25f));
 
-       
+
        const int levels(3);
 
        // Colors
@@ -357,10 +357,10 @@ Dock_PalEdit::set_default_palette()
                palette_.push_back(c);
        }
 
-       
+
        /*
        const int levels(3);
-       
+
        for(int i=0;i<levels*levels*levels;i++)
        {
                Color c(
index 2caa7ad..8a9c795 100644 (file)
@@ -64,7 +64,7 @@ namespace studio {
 
 class Widget_Color;
 class PaletteSettings;
-       
+
 class Dock_PalEdit : public Dockable
 {
        friend class PaletteSettings;
@@ -72,11 +72,11 @@ class Dock_PalEdit : public Dockable
        Glib::RefPtr<Gtk::ActionGroup> action_group;
 
        synfig::Palette palette_;
-       
+
        Gtk::Table table;
-       
+
        void on_add_pressed();
-       
+
        void show_menu(int i);
 
        sigc::signal<void> signal_changed_;
@@ -97,11 +97,11 @@ public:
        int size()const;
 
        void set_default_palette();
-       
+
        void refresh();
 
        const sigc::signal<void>& signal_changed() { return signal_changed_; }
-               
+
        Dock_PalEdit();
        ~Dock_PalEdit();
 }; // END of Dock_PalEdit
index 51d4cf5..026342c 100644 (file)
@@ -61,7 +61,7 @@ studio::ModPalette::start_vfunc()
 
        dock_pal_browse=new Dock_PalBrowse();
        App::get_dock_manager()->register_dockable(*dock_pal_browse);
-       
+
        return true;
 }
 
index 85897ab..48ec9bd 100644 (file)
@@ -40,15 +40,15 @@ namespace studio {
 
 class Dock_PalEdit;
 class Dock_PalBrowse;
-       
+
 class ModPalette : public Module
 {
        friend class Dock_PalEdit;
        friend class Dock_PalBrowse;
-               
+
        Dock_PalEdit*   dock_pal_edit;
        Dock_PalBrowse* dock_pal_browse;
-       
+
 protected:
        virtual bool start_vfunc();
        virtual bool stop_vfunc();
@@ -56,7 +56,7 @@ protected:
 public:
        virtual ~ModPalette() { stop(); }
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 7156453..83d544d 100644 (file)
@@ -51,7 +51,7 @@ using namespace studio;
 Module::Module():status_(false)
 {
 }
-       
+
 Module::~Module()
 {
        stop();
index e0c205a..b65611d 100644 (file)
@@ -40,7 +40,7 @@ namespace studio {
 class Module : public etl::shared_object
 {
        bool status_;
-       
+
 protected:
        Module();
 
@@ -48,18 +48,18 @@ public:
        virtual ~Module();
 
        bool start();
-       
+
        bool stop();
-       
+
        bool get_status()const;
 
 protected:
-       
+
        virtual bool start_vfunc()=0;
        virtual bool stop_vfunc()=0;
 };
 
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index cd79071..84328ac 100644 (file)
@@ -80,7 +80,7 @@ using namespace studio;
 
 OneMoment::OneMoment():        Gtk::Window(Gtk::WINDOW_POPUP)
 {
-       
+
        // Create the Copyright Label
        Gtk::Label *label = manage(new class Gtk::Label(_("One Moment, Please...")));
 
@@ -104,7 +104,7 @@ OneMoment::OneMoment():     Gtk::Window(Gtk::WINDOW_POPUP)
 
        // show everything off
        show_all();
-       
+
        present();
        while(studio::App::events_pending())studio::App::iteration(false);
 }
index 65f773b..51f8fd2 100644 (file)
@@ -41,7 +41,7 @@ namespace studio {
 class OneMoment : public Gtk::Window
 {
 public:
-       
+
        OneMoment();
        ~OneMoment();
 };
index 69d9bf8..b8f5949 100644 (file)
@@ -62,15 +62,15 @@ using namespace studio;
 class studio::Preview::Preview_Target : public Target_Scanline
 {
        Surface surface;
-       
+
        sigc::signal<void, const Preview_Target *>              signal_frame_done_;
-       
+
        int scanline;
-       
+
        double  tbegin,tend;
-       
+
        int             nframes,curframe;
-       
+
 public:
 
        Preview_Target()
@@ -90,25 +90,25 @@ public:
                        /*synfig::warning("Succeeded in setting the desc to new one: %d x %d, %.2f fps [%.2f,%.2f]",
                                                        desc.get_w(),desc.get_h(),desc.get_frame_rate(),
                                        (float)desc.get_time_start(),(float)desc.get_time_end());*/
-                       
+
                        surface.set_wh(desc.get_w(),desc.get_h());
-                       
-                       curframe = 0;                   
+
+                       curframe = 0;
                        nframes = (int)floor((desc.get_time_end() - desc.get_time_start())*desc.get_frame_rate());
-                       
+
                        tbegin = desc.get_time_start();
                        tend = tbegin + nframes/desc.get_frame_rate();
-                               
-                       return true;            
+
+                       return true;
                }
                return false;
        }
-       
+
        virtual bool start_frame(ProgressCallback *cb=NULL)
        {
-               return true;            
+               return true;
        }
-       
+
        virtual void end_frame()
        {
                //ok... notify our subscribers...
@@ -116,19 +116,19 @@ public:
                curframe += 1;
                //synfig::warning("Finished the frame stuff, and changed time to %.3f",t);
        }
-       
+
        virtual Color * start_scanline(int scanline)
        {
                return surface[scanline];
        }
-       
+
        virtual bool end_scanline() {return true;}
-       
+
        sigc::signal<void, const Preview_Target *>      &signal_frame_done() {return signal_frame_done_;}
-       
+
        const Surface &get_surface() const {return surface;}
-       
-       float get_time() const 
+
+       float get_time() const
        {
                double time = ((nframes-curframe)/(double)nframes)*tbegin
                                        + ((curframe)/(double)nframes)*tend;
@@ -146,7 +146,7 @@ studio::Preview::Preview(const studio::CanvasView::LooseHandle &h, float zoom, f
 void studio::Preview::set_canvasview(const studio::CanvasView::LooseHandle &h)
 {
        canvasview = h;
-       
+
        if(canvasview)
        {
                //perhaps reset override values...
@@ -171,36 +171,36 @@ void studio::Preview::render()
        {
                //render using the preview target
                etl::handle<Preview_Target>     target = new Preview_Target;
-               
+
                //connect our information to his...
                //synfig::warning("Connecting to the end frame function...");
                target->signal_frame_done().connect(sigc::mem_fun(*this,&Preview::frame_finish));
-               
+
                //set the options
                //synfig::warning("Setting Canvas");
                target->set_canvas(get_canvas());
                target->set_quality(quality);
-               
+
                //render description
                RendDesc desc = get_canvas()->rend_desc();
-               
+
                //set the global fps of the preview
                set_global_fps(desc.get_frame_rate());
-               
+
                desc.clear_flags();
-               
+
                int neww = (int)floor(desc.get_w()*zoom+0.5),
                        newh = (int)floor(desc.get_h()*zoom+0.5);
                float newfps = fps;
-               
+
                /*synfig::warning("Setting the render description: %d x %d, %f fps, [%f,%f]",
                                                neww,newh,newfps, overbegin?begintime:(float)desc.get_time_start(),
                                                overend?endtime:(float)desc.get_time_end());*/
-               
+
                desc.set_w(neww);
                desc.set_h(newh);
                desc.set_frame_rate(newfps);
-               
+
                if(overbegin)
                {
                        desc.set_time_start(std::max(begintime,(float)desc.get_time_start()));
@@ -211,17 +211,17 @@ void studio::Preview::render()
                        desc.set_time_end(std::min(endtime,(float)desc.get_time_end()));
                        //synfig::warning("Set end time to %.2f...",(float)desc.get_time_end());
                }
-                       
+
                //setting the description
-               
+
                //HACK - BECAUSE THE RENDERER CAN'T RENDER INCLUDING THE LAST FRAME
                desc.set_time_end(desc.get_time_end() + 1.3/fps);
-               
+
                target->set_rend_desc(&desc);
-               
+
                //... first we must clear our current selves of space
                frames.resize(0);
-               
+
                //now tell it to go... with inherited prog. reporting...
                //synfig::info("Rendering Asynchronously...");
                if(renderer) renderer->stop();
@@ -242,13 +242,13 @@ void studio::Preview::frame_finish(const Preview_Target *targ)
        float time = targ->get_time();
        const Surface &surf = targ->get_surface();
        const RendDesc& r = targ->get_rend_desc();
-       
+
        //synfig::warning("Finished a frame at %f s",time);
-       
+
        //copy EVERYTHING!
        PixelFormat pf(PF_RGB);
        const int total_bytes(r.get_w()*r.get_h()*synfig::channels(pf));
-       
+
        //synfig::warning("Creating a buffer");
        unsigned char *buffer((unsigned char*)malloc(total_bytes));
 
@@ -256,14 +256,14 @@ void studio::Preview::frame_finish(const Preview_Target *targ)
                return;
 
        //convert all the pixles to the pixbuf... buffer... thing...
-       //synfig::warning("Converting...");     
+       //synfig::warning("Converting...");
        convert_color_format(buffer, surf[0], surf.get_w()*surf.get_h(), pf, App::gamma);
-       
+
        //load time
-       fe.t = time;    
+       fe.t = time;
        //uses and manages the memory for the buffer...
        //synfig::warning("Create a pixmap...");
-       fe.buf = 
+       fe.buf =
        Gdk::Pixbuf::create_from_data(
                buffer, // pointer to the data
                Gdk::COLORSPACE_RGB, // the colorspace
@@ -274,11 +274,11 @@ void studio::Preview::frame_finish(const Preview_Target *targ)
                surf.get_w()*synfig::channels(pf), // stride (pitch)
                sigc::ptr_fun(free_guint8)
        );
-       
+
        //add the flipbook element to the list (assume time is correct)
        //synfig::info("Prev: Adding %f s to the list", time);
        frames.push_back(fe);
-       
+
        signal_changed()();
 }
 
@@ -287,7 +287,7 @@ void studio::Preview::frame_finish(const Preview_Target *targ)
        button->add(*icon);     \
        tooltips.set_tip(*button,tooltip);      \
        icon->set_padding(0,0);\
-       icon->show();   
+       icon->show();
 
 Widget_Preview::Widget_Preview()
 :Gtk::Table(5,5,false),
@@ -302,19 +302,19 @@ playing(false)
 {
        //connect to expose events
        //signal_expose_event().connect(sigc::mem_fun(*this, &studio::Widget_Preview::redraw));
-       
+
        //manage all the change in values etc...
        adj_time_scrub.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_Preview::slider_move));
        scr_time_scrub.signal_event().connect(sigc::mem_fun(*this,&Widget_Preview::scroll_move_event));
        draw_area.signal_expose_event().connect(sigc::mem_fun(*this,&Widget_Preview::redraw));
-       
+
        disp_sound.set_time_adjustment(&adj_sound);
        timedisp = -1;
-       
+
        //Set up signals to modify time value as it should be...
        disp_sound.signal_start_scrubbing().connect(sigc::mem_fun(*this,&Widget_Preview::scrub_updated));
        disp_sound.signal_scrub().connect(sigc::mem_fun(*this,&Widget_Preview::scrub_updated));
-               
+
        /*
        ---------------------------------
        |                                                               |
@@ -327,67 +327,67 @@ playing(false)
        ---------------------------------
        |loop|play|stop                                 | hbox
        |lastl|lastt|rerender|haltrend  | hbox
-       |       
+       |
        |sound                                                  |
        */
-       
+
        Gtk::HBox *hbox = 0;
        Gtk::Button *button = 0;
        Gtk::Image *icon = 0;
-       
-       //should set up the dialog using attach etc.    
+
+       //should set up the dialog using attach etc.
        attach(draw_area, 0, 1, 0, 1);
        attach(scr_time_scrub, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
-       
+
        #if 1
-       
+
        //2nd row
        hbox = manage(new Gtk::HBox);
-       
+
        button = &b_loop;
        IMAGIFY_BUTTON(button,Gtk::Stock::REFRESH,"Toggle Looping");
        hbox->pack_start(b_loop,Gtk::PACK_SHRINK,0);
        //attach(b_loop,0,1,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        button = manage(new Gtk::Button(/*_("Play")*/));
        button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::play));
        IMAGIFY_BUTTON(button,Gtk::Stock::GO_FORWARD,"Play");
        hbox->pack_start(*button,Gtk::PACK_SHRINK,0);
        //attach(*button,1,2,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        button = manage(new Gtk::Button(/*_("Stop")*/));
        button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::stop));
        IMAGIFY_BUTTON(button,Gtk::Stock::NO,"Stop");
        hbox->pack_start(*button,Gtk::PACK_SHRINK,0);
        //attach(*button,2,3,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        //attack the stop render and erase all buttons to same line...
        {
                Gtk::VSeparator *vsep = manage(new Gtk::VSeparator);
                hbox->pack_start(*vsep,Gtk::PACK_SHRINK,0);
        }
-       
+
        button = manage(new Gtk::Button(/*_("Halt Render")*/));
        button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::stoprender));
        IMAGIFY_BUTTON(button,Gtk::Stock::STOP,"Halt Render");
        hbox->pack_start(*button,Gtk::PACK_SHRINK,0);
        //attach(*button,2,3,3,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        button = manage(new Gtk::Button(/*_("Re-Preview")*/));
        button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::repreview));
        IMAGIFY_BUTTON(button,Gtk::Stock::CONVERT,"Re-Preview");
        hbox->pack_start(*button,Gtk::PACK_SHRINK,0);
        //attach(*button,0,2,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        button = manage(new Gtk::Button(/*_("Erase All")*/));
        button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::eraseall));
        IMAGIFY_BUTTON(button,Gtk::Stock::DELETE,"Erase All");
        hbox->pack_start(*button,Gtk::PACK_SHRINK,0);
        //attach(*button,2,3,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        hbox->show_all();
        attach(*hbox,0,1,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK|Gtk::FILL);
-       
+
        //3rd row
        hbox = manage(new Gtk::HBox);
        {
@@ -401,13 +401,13 @@ playing(false)
        hbox->show_all();
        attach(*hbox,0,1,3,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
        //attach(l_lasttime,0,1,3,4,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-               
+
        //5th row
        disp_sound.set_size_request(-1,32);
        attach(disp_sound,0,1,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK);
-       
+
        show_all();
-       
+
        //if(draw_area.get_window()) gc_area = Gdk::GC::create(draw_area.get_window());
        #endif
 }
@@ -420,32 +420,32 @@ void studio::Widget_Preview::update()
 {
        //the meat goes in this locker...
        double time = adj_time_scrub.get_value();
-       
+
        //find the frame and display it...
        if(preview)
        {
-               //synfig::warning("Updating at %.3f s",time);           
-               
+               //synfig::warning("Updating at %.3f s",time);
+
                //use time to find closest frame...
                studio::Preview::FlipBook::const_iterator       beg = preview->begin(),end = preview->end();
                studio::Preview::FlipBook::const_iterator       i;
-               
+
                i = beg;
-               
+
                //go to current hint if need be...
                if(currentindex >= 0 && currentindex < (int)preview->numframes())
                {
                        i = beg+currentindex;
                }
-               
+
                //we can't have a picture if there are none to get
                if(beg != end)
-               {                       
+               {
                        //don't bother with binary search it will just be slower...
-                       
+
                        //synfig::info("Search for time %f",time);
-                       
-                       //incrementally go in either direction 
+
+                       //incrementally go in either direction
                        //(bias downward towards beg, because that's what we want)
                        for(;i != end;++i)
                        {
@@ -453,10 +453,10 @@ void studio::Widget_Preview::update()
                                if(i->t > time) break;
                                //synfig::info("Go past...");
                        }
-                       
-                       //if(i!=beg)--i; 
-                       
-                       //bias down, so we can't be at end... and it still is valid...          
+
+                       //if(i!=beg)--i;
+
+                       //bias down, so we can't be at end... and it still is valid...
                        for(;i != beg;)
                        {
                                --i;
@@ -464,18 +464,18 @@ void studio::Widget_Preview::update()
                                if(i->t <= time) break;
                                //synfig::info("Go past...");
                        }
-                       
+
                        /*i = preview->begin(); end = preview->end();
                        if(i == end) return;
-                       
+
                        j = i;
                        for(;i != end; j = i++)
                        {
                                if(i->t > time) break;
                        }*/
-                       
+
                        //we should be at a valid edge since we biased downward
-                       
+
                        //don't get the closest, round down... (if we can)
                        if(i == end)
                        {
@@ -493,18 +493,18 @@ void studio::Widget_Preview::update()
                                        timedisp = i->t;
                                        //synfig::warning("Update at: %f seconds (%f s)",time,timedisp);
                                        preview_draw();
-                                       //synfig::warning("success!");                  
+                                       //synfig::warning("success!");
                                }
                        }
                }
        }
-       
+
        if(disp_sound.get_profile() && adj_sound.get_value() != time)
        {
                //timeupdate = time;
-               
+
                //Set the position of the sound (short circuited for sound modifying the time)
-               
+
                disp_sound.set_position(time);
                disp_sound.queue_draw();
        }
@@ -515,35 +515,35 @@ void studio::Widget_Preview::preview_draw()
 }
 
 bool studio::Widget_Preview::redraw(GdkEventExpose *heh)
-{      
+{
        //And render the drawing area
        Glib::RefPtr<Gdk::Pixbuf> pxnew, px = currentbuf;
-       
-       if(!px || draw_area.get_height() == 0 
+
+       if(!px || draw_area.get_height() == 0
                || px->get_height() == 0 || px->get_width() == 0 /*|| is_visible()*/) //made not need this line
                return true;
-       
+
        //figure out the scaling factors...
        float sx, sy;
        int nw,nh;
 
        sx = draw_area.get_width() / (float)px->get_width();
        sy = draw_area.get_height() / (float)px->get_height();
-       
+
        //synfig::info("widget_preview redraw: now to scale the bitmap: %.3f x %.3f",sx,sy);
-       
+
        //round to smallest scale (fit entire thing in window without distortion)
        if(sx > sy) sx = sy;
        //else sy = sx;
-       
+
        //scale to a new pixmap and then copy over to the window
        nw = (int)(px->get_width()*sx);
        nh = (int)(px->get_height()*sx);
-       
+
        if(nw == 0 || nh == 0)return true;
-               
+
        pxnew = px->scale_simple(nw,nh,Gdk::INTERP_NEAREST);
-               
+
        //synfig::info("Now to draw to the window...");
        //copy to window
        Glib::RefPtr<Gdk::Window>       wind = draw_area.get_window();
@@ -557,7 +557,7 @@ bool studio::Widget_Preview::redraw(GdkEventExpose *heh)
 
        if(!wind) synfig::warning("The destination window is broken...");
        if(!surf) synfig::warning("The destination is not drawable...");
-       
+
        if(surf)
        {
                /* Options for drawing...
@@ -570,7 +570,7 @@ bool studio::Widget_Preview::redraw(GdkEventExpose *heh)
                                + better memory footprint
                */
                //px->composite(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha) const
-               
+
                surf->draw_pixbuf(
                        gc, //GC
                        pxnew, //pixbuf
@@ -580,15 +580,15 @@ bool studio::Widget_Preview::redraw(GdkEventExpose *heh)
                        Gdk::RGB_DITHER_NONE, // RgbDither
                        0, 0 // Dither offset X and Y
                );
-               
+
                if(timedisp >= 0)
                {
-                       Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));         
+                       Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
                        Glib::ustring timecode(Time((double)timedisp).round(preview->get_global_fps())
                                                                                                                        .get_string(preview->get_global_fps(),
                                                                                                                                                        App::get_time_format()));
                        //synfig::info("Time for preview draw is: %s for time %g", timecode.c_str(), adj_time_scrub.get_value());
-                                                                                                                                               
+
                        gc->set_rgb_fg_color(Gdk::Color("#FF0000"));
                        layout->set_text(timecode);
                        surf->draw_layout(gc,4,4,layout);
@@ -596,10 +596,10 @@ bool studio::Widget_Preview::redraw(GdkEventExpose *heh)
        }
 
        draw_area.get_window()->end_paint();
-       
+
        //synfig::warning("Refresh the draw area");
        //make sure the widget refreshes
-       
+
        return false;
 }
 
@@ -607,24 +607,24 @@ bool studio::Widget_Preview::play_update()
 {
        float diff = timer.pop_time();
        //synfig::info("Play update: diff = %.2f",diff);
-       
+
        if(playing)
        {
                //we go to the next one...
                double time = adj_time_scrub.get_value() + diff;
-               
+
                //adjust it to be synced with the audio if it can...
                {
                        double newtime = audiotime;
                        if(audio && audio->is_playing()) audio->get_current_time(newtime);
-                               
+
                        if(newtime != audiotime)
                        {
                                //synfig::info("Adjusted time from %.3lf to %.3lf", time,newtime);
                                time = audiotime = newtime;
                        }
                }
-               
+
                //Looping conditions...
                if(time >= adj_time_scrub.get_upper())
                {
@@ -638,16 +638,16 @@ bool studio::Widget_Preview::play_update()
                                adj_time_scrub.set_value(time);
                                play_stop();
                                update();
-                               
+
                                //synfig::info("Play Stopped: time set to %f",adj_time_scrub.get_value());
                                return false;
                        }
                }
-               
+
                //set the new time...
                adj_time_scrub.set_value(time);
                adj_time_scrub.value_changed();
-               
+
                //update the window to the correct image we might want to do this later...
                //update();
                //synfig::warning("Did update pu");
@@ -668,26 +668,26 @@ void studio::Widget_Preview::slider_move()
 void studio::Widget_Preview::scrub_updated(double t)
 {
        stop();
-       
+
        //Attempt at being more accurate... the time is adjusted to be exactly where the sound says it is
        //double oldt = t;
        if(audio)
        {
-               if(!audio->isPaused()) 
+               if(!audio->isPaused())
                {
                        audio->get_current_time(t);
                }
        }
-       
+
        //synfig::info("Scrubbing to %.3f, setting adj to %.3f",oldt,t);
-                       
+
        if(adj_time_scrub.get_value() != t)
        {
                adj_time_scrub.set_value(t);
                adj_time_scrub.value_changed();
        }
 }
-       
+
 void studio::Widget_Preview::disconnect_preview(Preview *prev)
 {
        if(prev == preview)
@@ -700,12 +700,12 @@ void studio::Widget_Preview::disconnect_preview(Preview *prev)
 void studio::Widget_Preview::set_preview(handle<Preview>       prev)
 {
        preview = prev;
-       
+
        synfig::info("Setting preview");
-       
+
        //stop playing the mini animation...
        stop();
-       
+
        if(preview)
        {
                //set the internal values
@@ -715,15 +715,15 @@ void studio::Widget_Preview::set_preview(handle<Preview>  prev)
                {
                        float start = preview->get_begintime();
                        float end = preview->get_endtime();
-                       
+
                        rate = 1/rate;
-                       
+
                        adj_time_scrub.set_lower(start);
                        adj_time_scrub.set_upper(end);
                        adj_time_scrub.set_value(start);
                        adj_time_scrub.set_step_increment(rate);
                        adj_time_scrub.set_page_increment(10*rate);
-                       
+
                        //if the begin time and the end time are the same there is only a single frame
                        singleframe = end==start;
                }else
@@ -732,10 +732,10 @@ void studio::Widget_Preview::set_preview(handle<Preview>  prev)
                        adj_time_scrub.set_upper(0);
                        adj_time_scrub.set_value(0);
                        adj_time_scrub.set_step_increment(0);
-                       adj_time_scrub.set_page_increment(0);                   
+                       adj_time_scrub.set_page_increment(0);
                        singleframe = true;
                }
-               
+
                //connect so future information will be found...
                prevchanged = prev->signal_changed().connect(sigc::mem_fun(*this,&Widget_Preview::whenupdated));
                prev->signal_destroyed().connect(sigc::mem_fun(*this,&Widget_Preview::disconnect_preview));
@@ -767,25 +767,25 @@ void studio::Widget_Preview::play()
                //audiotime = adj_time_scrub.get_value();
                playing = true;
 
-               //adj_time_scrub.set_value(adj_time_scrub.get_lower());         
+               //adj_time_scrub.set_value(adj_time_scrub.get_lower());
                update(); //we don't want to call play update because that will try to advance the timer
                //synfig::warning("Did update p");
-               
+
                //approximate length of time in seconds, right?
                double rate = /*std::min(*/adj_time_scrub.get_step_increment()/*,1/30.0)*/;
                int timeout = (int)floor(1000*rate);
-               
+
                //synfig::info("        rate = %.3lfs = %d ms",rate,timeout);
-               
+
                signal_play_(adj_time_scrub.get_value());
-               
+
                //play the audio...
                if(audio) audio->play(adj_time_scrub.get_value());
-                               
-               timecon = Glib::signal_timeout().connect(sigc::mem_fun(*this,&Widget_Preview::play_update),timeout);            
-               timer.reset();          
+
+               timecon = Glib::signal_timeout().connect(sigc::mem_fun(*this,&Widget_Preview::play_update),timeout);
+               timer.reset();
        }
-       
+
 }
 
 void studio::Widget_Preview::play_stop()
@@ -814,10 +814,10 @@ bool studio::Widget_Preview::scroll_move_event(GdkEvent *event)
                                stop();
                        }
                }
-               
+
                default: break;
        }
-       
+
        return false;
 }
 
@@ -829,10 +829,10 @@ void studio::Widget_Preview::set_audioprofile(etl::handle<AudioProfile> p)
 void studio::Widget_Preview::set_audio(etl::handle<AudioContainer> a)
 {
        audio = a;
-       
+
        //disconnect any previous signals
        scrstartcon.disconnect(); scrstopcon.disconnect(); scrubcon.disconnect();
-               
+
        //connect the new signals
        scrstartcon = disp_sound.signal_start_scrubbing().connect(sigc::mem_fun(*a,&AudioContainer::start_scrubbing));
        scrstopcon = disp_sound.signal_stop_scrubbing().connect(sigc::mem_fun(*a,&AudioContainer::stop_scrubbing));
@@ -862,17 +862,17 @@ void studio::Widget_Preview::stoprender()
                preview->renderer.detach();
        }
 }
-       
+
 void studio::Widget_Preview::eraseall()
 {
        stop();
        stoprender();
-       
+
        currentbuf.clear();
        currentindex = 0;
        timedisp = 0;
        queue_draw();
-       
+
        if(preview)
        {
                preview->clear();
index a8077ea..6018ff0 100644 (file)
@@ -58,7 +58,7 @@
 
 namespace studio {
 class AsyncRenderer;
-       
+
 class Preview : public sigc::trackable, public etl::shared_object
 {
 public:
@@ -69,14 +69,14 @@ public:
        };
 
        etl::handle<studio::AsyncRenderer>      renderer;
-       
+
        sigc::signal<void, Preview *>   signal_destroyed_;      //so things can reference us without fear
-       
+
        typedef std::vector<FlipbookElem>        FlipBook;
 private:
-       
+
        FlipBook                        frames;
-       
+
        studio::CanvasView::LooseHandle canvasview;
 
        //synfig::RendDesc              description; //for rendering the preview...
@@ -90,25 +90,25 @@ private:
        //expose the frame information etc.
        class Preview_Target;
        void frame_finish(const Preview_Target *);
-       
+
        sigc::signal0<void>     sig_changed;
-       
+
 public:
-               
-       Preview(const studio::CanvasView::LooseHandle &h = studio::CanvasView::LooseHandle(), 
+
+       Preview(const studio::CanvasView::LooseHandle &h = studio::CanvasView::LooseHandle(),
                                float zoom = 0.5f, float fps = 15);
        ~Preview();
-       
+
        float   get_zoom() const {return zoom;}
        void    set_zoom(float z){zoom = z;}
-       
+
        float   get_fps() const {return fps;}
        void    set_fps(float f){fps = f;}
-       
+
        float   get_global_fps() const {return global_fps;}
        void    set_global_fps(float f){global_fps = f;}
-       
-       float   get_begintime() const   
+
+       float   get_begintime() const
        {
                if(overbegin)
                        return begintime;
@@ -116,7 +116,7 @@ public:
                        return get_canvas()->rend_desc().get_time_start();
                else return -1;
        }
-       
+
        float   get_endtime() const
        {
                if(overend)
@@ -125,41 +125,41 @@ public:
                        return get_canvas()->rend_desc().get_time_end();
                else return -1;
        }
-       
+
        void    set_begintime(float t)  {begintime = t;}
        void    set_endtime(float t)    {endtime = t;}
-       
+
        bool get_overbegin() const {return overbegin;}
        void set_overbegin(bool b) {overbegin = b;}
-       
+
        bool get_overend() const {return overend;}
        void set_overend(bool b) {overend = b;}
-       
+
        int             get_quality() const {return quality;}
        void    set_quality(int i)      {quality = i;}
-       
+
        synfig::Canvas::Handle  get_canvas() const {return canvasview->get_canvas();}
        studio::CanvasView::Handle      get_canvasview() const {return canvasview;}
-       
+
        void set_canvasview(const studio::CanvasView::LooseHandle &h);
-       
+
        //signal interface
        sigc::signal<void, Preview *> & signal_destroyed() { return signal_destroyed_; }
        //sigc::signal<void, const synfig::RendDesc &>  &signal_desc_change() {return signal_desc_change_;}
-       
+
        //functions for exposing iterators through the preview
        FlipBook::iterator      begin()         {return frames.begin();}
        FlipBook::iterator      end()           {return frames.end();}
-       
+
        FlipBook::const_iterator        begin() const {return frames.begin();}
        FlipBook::const_iterator        end() const       {return frames.end();}
-       
+
        void clear() {frames.clear();}
-       
+
        unsigned int                            numframes() const  {return frames.size();}
-       
+
        void render();
-       
+
        sigc::signal0<void>     &signal_changed() { return sig_changed; }
 };
 
@@ -170,68 +170,68 @@ class Widget_Preview : public Gtk::Table
        Gtk::HScrollbar         scr_time_scrub;
        Gtk::ToggleButton       b_loop;
        Gtk::Tooltips           tooltips;
-               
+
        //Glib::RefPtr<Gdk::GC>         gc_area;
        Glib::RefPtr<Gdk::Pixbuf>       currentbuf;
        int                                                     currentindex;
        //double                                                timeupdate;
        double                                          timedisp;
        double                                          audiotime;
-       
+
        //sound stuff
        etl::handle<AudioContainer>     audio;
        sigc::connection        scrstartcon;
        sigc::connection        scrstopcon;
        sigc::connection        scrubcon;
-       
+
        //preview encapsulation
        etl::handle<Preview>    preview;
        sigc::connection                prevchanged;
-       
+
        Widget_Sound                    disp_sound;
        Gtk::Adjustment                 adj_sound;
-       
+
        Gtk::Label                              l_lasttime;
-       
+
        //only for internal stuff, doesn't set anything
        bool    playing;
        bool    singleframe;
-       
+
        //for accurate time tracking
        etl::clock      timer;
-       
-       //int           curindex; //for later   
+
+       //int           curindex; //for later
        SigC::Connection        timecon;
-       
+
        void slider_move(); //later to be a time_slider that's cooler
        bool play_update();
        void play_stop();
        //bool play_frameupdate();
        void update();
-               
+
        void scrub_updated(double t);
-       
+
        void repreview();
-       
+
        void whenupdated();
-       
+
        void eraseall();
-       
+
        bool scroll_move_event(GdkEvent *);
        void disconnect_preview(Preview *);
-       
+
        bool redraw(GdkEventExpose *heh = 0);
        void preview_draw();
-       
+
        sigc::signal<void,float>        signal_play_;
        sigc::signal<void>                      signal_stop_;
        sigc::signal<void,float>        signal_seek_;
-       
+
 public:
-       
+
        Widget_Preview();
        ~Widget_Preview();
-       
+
        //sets a signal to identify disconnection (so we don't hold onto it)...
        void set_preview(etl::handle<Preview> prev);
        void set_audioprofile(etl::handle<AudioProfile> p);
@@ -252,7 +252,7 @@ public:
        bool get_loop_flag() const {return b_loop.get_active();}
        void set_loop_flag(bool b) {return b_loop.set_active(b);}
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index a6c688d..dfb428d 100644 (file)
@@ -61,19 +61,19 @@ class Widget_RendDesc : public Gtk::Notebook
        //Gtk::Adjustment adjustment_start_frame;
        //Gtk::Adjustment adjustment_end_frame;
        Gtk::Adjustment adjustment_span;
-       
-       Gtk::SpinButton *entry_width;   
-       Gtk::SpinButton *entry_height;  
-       Gtk::SpinButton *entry_xres;    
-       Gtk::SpinButton *entry_yres;    
-       Gtk::SpinButton *entry_phy_width;       
-       Gtk::SpinButton *entry_phy_height;      
-       Gtk::SpinButton *entry_fps;     
-//     Gtk::SpinButton *entry_start_time;      
-//     Gtk::SpinButton *entry_end_time;        
-//     Gtk::SpinButton *entry_start_frame;     
-//     Gtk::SpinButton *entry_end_frame;       
-       Gtk::SpinButton *entry_span;    
+
+       Gtk::SpinButton *entry_width;
+       Gtk::SpinButton *entry_height;
+       Gtk::SpinButton *entry_xres;
+       Gtk::SpinButton *entry_yres;
+       Gtk::SpinButton *entry_phy_width;
+       Gtk::SpinButton *entry_phy_height;
+       Gtk::SpinButton *entry_fps;
+//     Gtk::SpinButton *entry_start_time;
+//     Gtk::SpinButton *entry_end_time;
+//     Gtk::SpinButton *entry_start_frame;
+//     Gtk::SpinButton *entry_end_frame;
+       Gtk::SpinButton *entry_span;
 
        Gtk::CheckButton *toggle_px_aspect;
        Gtk::CheckButton *toggle_px_width;
@@ -103,14 +103,14 @@ class Widget_RendDesc : public Gtk::Notebook
                UpdateLock(int &locked):locked(locked){locked++;}
                ~UpdateLock(){locked--;}
        };
-       
+
 public:
 
        sigc::signal<void> &signal_changed() { return signal_changed_; }
 
        Widget_RendDesc();
        ~Widget_RendDesc();
-       
+
        //! Sets the RendDesc
        void set_rend_desc(const synfig::RendDesc &rend_desc);
 
@@ -121,12 +121,12 @@ public:
        const synfig::RendDesc &get_rend_desc();
 
        void disable_time_section();
-       
+
        void enable_time_section();
-       
+
        void refresh();
 private:
-       
+
        void on_width_changed();
        void on_height_changed();
        void on_xres_changed();
@@ -150,7 +150,7 @@ private:
        Gtk::Widget *create_time_tab();
        Gtk::Widget *create_other_tab();
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index bc1c9cf..0ee1423 100644 (file)
@@ -66,9 +66,9 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handle<synfigapp::CanvasInter
        widget_rend_desc.show();
        widget_rend_desc.signal_changed().connect(sigc::mem_fun(*this,&studio::RenderSettings::on_rend_desc_changed));
        widget_rend_desc.set_rend_desc(canvas_interface_->get_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,handle<synfigapp::CanvasInter
 
        synfig::Target::Book::iterator iter;
        synfig::Target::Book book(synfig::Target::book());
-       
+
        for(iter=book.begin();iter!=book.end();iter++)
        {
                menu_target->items().push_back(Gtk::Menu_Helpers::MenuElem(iter->first,
@@ -98,7 +98,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handle<synfigapp::CanvasInter
        Gtk::Button *choose_button(manage(new class Gtk::Button(Gtk::StockID(_("Choose...")))));
        choose_button->show();
        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(_("<b>Target</b>"));
@@ -106,7 +106,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handle<synfigapp::CanvasInter
        Gtk::Alignment *targetPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
        targetPadding->set_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,handle<synfigapp::CanvasInter
        filenameLabel->set_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,handle<synfigapp::CanvasInter
        Gtk::Alignment *settingsPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
        settingsPadding->set_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,handle<synfigapp::CanvasInter
        Gtk::Label *qualityLabel = manage(new Gtk::Label(_("_Quality"), true));
        qualityLabel->set_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,13 +170,13 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handle<synfigapp::CanvasInter
        cancel_button->signal_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
        {
@@ -187,7 +187,7 @@ RenderSettings::RenderSettings(Gtk::Window& parent,handle<synfigapp::CanvasInter
                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 sucessfuly"));
        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 sucessfuly"));
        canvas_interface_->get_ui_interface()->amount_complete(0,10000);
 }
-       
+
 void
 RenderSettings::on_cancel_pressed()
 {
index 73f4cd5..366f87d 100644 (file)
@@ -52,7 +52,7 @@
 namespace studio
 {
 class AsyncRenderer;
-       
+
 class RenderSettings : public Gtk::Dialog
 {
        Gtk::Tooltips tooltips;
@@ -63,10 +63,10 @@ class RenderSettings : public Gtk::Dialog
        Gtk::Entry entry_filename;
 
        Gtk::Adjustment adjustment_quality;
-       Gtk::SpinButton entry_quality;  
+       Gtk::SpinButton entry_quality;
 
        Gtk::Adjustment adjustment_antialias;
-       Gtk::SpinButton entry_antialias;        
+       Gtk::SpinButton entry_antialias;
 
        Gtk::CheckButton toggle_single_frame;
 
@@ -74,7 +74,7 @@ class RenderSettings : public Gtk::Dialog
        Gtk::Menu *menu_target;
 
        synfig::String target_name;
-       
+
        void set_target(synfig::String name);
 
        etl::handle<AsyncRenderer> async_renderer;
@@ -90,10 +90,10 @@ private:
        void on_choose_pressed();
        void on_render_pressed();
        void on_cancel_pressed();
-       
+
        void on_finished();
 }; // END of class RenderSettings
-       
+
 }; // END of namespace studio
 
 
index b5aab93..4dcc6db 100644 (file)
@@ -72,16 +72,16 @@ Renderer_BBox::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
 //     const synfig::RendDesc &rend_desc(get_work_area()->get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
 //     std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& tile_book(get_tile_book());
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
 //     const synfig::Vector::value_type
@@ -100,9 +100,9 @@ Renderer_BBox::render_vfunc(
 //     const int
 //             w(get_w()),
 //             h(get_h());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
        //const synfig::Vector grid_size(get_grid_size());
 
        const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
@@ -110,7 +110,7 @@ Renderer_BBox::render_vfunc(
        const synfig::Vector::value_type window_starty(get_work_area()->get_window_tl()[1]);
 //     const synfig::Vector::value_type window_endy(get_work_area()->get_window_br()[1]);
        const float pw(get_pw()),ph(get_ph());
-       
+
        const synfig::Point curr_point(get_bbox().get_min());
        const synfig::Point drag_point(get_bbox().get_max());
        if(get_bbox().area()<10000000000000000.0)
@@ -131,7 +131,7 @@ Renderer_BBox::render_vfunc(
                        swap(tl[0],br[0]);
                if(tl[1]>br[1])
                        swap(tl[1],br[1]);
-               
+
                drawable->draw_rectangle(gc,false,
                        round_to_int(tl[0]),
                        round_to_int(tl[1]),
index a59b729..9dcf105 100644 (file)
@@ -43,7 +43,7 @@ namespace studio {
 class Renderer_BBox : public studio::WorkAreaRenderer
 {
        synfig::Rect bbox;
-       
+
 public:
        Renderer_BBox();
        ~Renderer_BBox();
index d533fbd..3fc8999 100644 (file)
@@ -97,16 +97,16 @@ Renderer_Canvas::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
 //     const synfig::RendDesc &rend_desc(get_work_area()->get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
        std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& tile_book(get_tile_book());
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
        const synfig::Vector::value_type
@@ -125,9 +125,9 @@ Renderer_Canvas::render_vfunc(
        const int
                w(get_w()),
                h(get_h());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
        if(!tile_book.empty())
        if(get_full_frame())
        {
@@ -150,12 +150,12 @@ Renderer_Canvas::render_vfunc(
        {
                const int width_in_tiles(w/tile_w+(w%tile_w?1:0));
                const int height_in_tiles(h/tile_h+(h%tile_h?1:0));
-                               
+
                int u(0),v(0),tx,ty;
                int u1(0),v1(0),u2(width_in_tiles), v2(height_in_tiles);
 
                bool needs_refresh(false);
-               
+
                u1=int(-x/tile_w);
                v1=int(-y/tile_h);
                u2=int((-x+drawable_w)/tile_w+1);
@@ -164,7 +164,7 @@ Renderer_Canvas::render_vfunc(
                if(v2>height_in_tiles)v2=height_in_tiles;
                if(u1<0)u1=0;
                if(v1<0)v1=0;
-                       
+
                for(v=v1;v<v2;v++)
                {
                        for(u=u1;u<u2;u++)
@@ -202,7 +202,7 @@ Renderer_Canvas::render_vfunc(
        // Draw the border around the rendered region
        {
                gc->set_rgb_fg_color(Gdk::Color("#000000"));
-               gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);       
+               gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                drawable->draw_rectangle(
                        gc,
                        false,  // Fill?
index a29d8d1..b9092ec 100644 (file)
@@ -40,14 +40,14 @@ namespace studio {
 
 class Renderer_Canvas : public studio::WorkAreaRenderer
 {
-       
+
 public:
        ~Renderer_Canvas();
 
        std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& get_tile_book();
 
        bool get_full_frame()const;
-       
+
        int get_refreshes()const;
        bool get_canceled()const;
        bool get_queued()const;
index 34152e4..5f1f4b1 100644 (file)
@@ -82,16 +82,16 @@ Renderer_Dragbox::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
        // const synfig::RendDesc &rend_desc(get_work_area()->get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
 //     std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& tile_book(get_tile_book());
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
        // const synfig::Vector::value_type
@@ -110,9 +110,9 @@ Renderer_Dragbox::render_vfunc(
        // const int
        //      w(get_w()),
        //      h(get_h());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
        //const synfig::Vector grid_size(get_grid_size());
 
        const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
@@ -120,10 +120,10 @@ Renderer_Dragbox::render_vfunc(
        const synfig::Vector::value_type window_starty(get_work_area()->get_window_tl()[1]);
        // const synfig::Vector::value_type window_endy(get_work_area()->get_window_br()[1]);
        const float pw(get_pw()),ph(get_ph());
-       
+
        const synfig::Point& curr_point(get_curr_point());
        const synfig::Point& drag_point(get_drag_point());
-       
+
        {
                gc->set_function(Gdk::COPY);
                gc->set_rgb_fg_color(Gdk::Color("#000000"));
@@ -141,7 +141,7 @@ Renderer_Dragbox::render_vfunc(
                        swap(tl[0],br[0]);
                if(tl[1]>br[1])
                        swap(tl[1],br[1]);
-               
+
                drawable->draw_rectangle(gc,false,
                        round_to_int(tl[0]),
                        round_to_int(tl[1]),
index cf87f1a..4fd7b12 100644 (file)
@@ -41,10 +41,10 @@ namespace studio {
 
 class Renderer_Dragbox : public studio::WorkAreaRenderer
 {
-       
+
 public:
        ~Renderer_Dragbox();
-       
+
        void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable,const Gdk::Rectangle& expose_area );
 
        const synfig::Point& get_drag_point()const;
index 3df2afe..669cd12 100644 (file)
@@ -87,15 +87,15 @@ Renderer_Ducks::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
 
        const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
        const synfig::Vector::value_type window_starty(get_work_area()->get_window_tl()[1]);
@@ -116,20 +116,20 @@ Renderer_Ducks::render_vfunc(
                vector<Gdk::Point> points;
                std::list<synfig::Point>::iterator iter2;
                Point holder;
-               
+
                for(iter2=(*iter)->stroke_data->begin();iter2!=(*iter)->stroke_data->end();++iter2)
                {
                        holder=*iter2-window_start;
                        holder[0]/=pw;holder[1]/=ph;
                        points.push_back(Gdk::Point(round_to_int(holder[0]),round_to_int(holder[1])));
                }
-               
+
                gc->set_rgb_fg_color(colorconv_synfig2gdk((*iter)->color));
                gc->set_function(Gdk::COPY);
                gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
 
                // Draw the stroke
-               drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));                
+               drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));
        }
 
 
@@ -148,7 +148,7 @@ Renderer_Ducks::render_vfunc(
                c2[0]/=pw;c2[1]/=ph;
                bezier<Point> curve(p1,c1,c2,p2);
                vector<Gdk::Point> points;
-               
+
                float f;
                Point pt;
                for(f=0;f<1.0;f+=1.0/17.0)
@@ -157,17 +157,17 @@ Renderer_Ducks::render_vfunc(
                        points.push_back(Gdk::Point(round_to_int(pt[0]),round_to_int(pt[1])));
                }
                points.push_back(Gdk::Point(round_to_int(p2[0]),round_to_int(p2[1])));
-               
+
                // Draw the curve
 /*             if(solid_lines)
                {
                        gc->set_rgb_fg_color(Gdk::Color("#000000"));
                        gc->set_function(Gdk::COPY);
                        gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));                
+                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));
                        gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
                        gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));                
+                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));
                }
                else
 */
@@ -175,14 +175,14 @@ Renderer_Ducks::render_vfunc(
 //                     gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
 //                     gc->set_function(Gdk::INVERT);
 //                     gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-//                     drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));                
+//                     drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));
                        gc->set_rgb_fg_color(Gdk::Color("#000000"));
                        gc->set_function(Gdk::COPY);
                        gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));                
+                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));
                        gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
                        gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));                
+                       drawable->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points));
 
                }
        }
@@ -199,11 +199,11 @@ Renderer_Ducks::render_vfunc(
        // Render the ducks
        for(std::list<handle<Duck> >::const_iterator iter=duck_list.begin();iter!=duck_list.end();++iter)
        {
-               
+
                // If this type of duck has been masked, then skip it
                if((*iter)->get_type() && (!(get_work_area()->get_type_mask() & (*iter)->get_type())))
                        continue;
-                               
+
 //             Real x,y;
        //      Gdk::Rectangle area;
                Point point((*iter)->get_trans_point());
@@ -220,18 +220,18 @@ Renderer_Ducks::render_vfunc(
                if((*iter)->get_connect_duck())
                {
                        has_connect=true;
-                       origin=(*iter)->get_connect_duck()->get_trans_point();                  
+                       origin=(*iter)->get_connect_duck()->get_trans_point();
                }
 
                origin[0]=(origin[0]-window_startx)/pw;
                origin[1]=(origin[1]-window_starty)/ph;
 
-               
+
                bool selected(get_work_area()->duck_is_selected(*iter));
                bool hover(*iter==hover_duck);
-               
+
                shadow = selected?Gtk::SHADOW_IN:Gtk::SHADOW_OUT;
-                                               
+
                if(get_work_area()->get_selected_value_node())
                {
                        synfigapp::ValueDesc value_desc((*iter)->get_value_desc());
@@ -241,7 +241,7 @@ Renderer_Ducks::render_vfunc(
                                gc->set_rgb_fg_color(Gdk::Color("#FF0000"));
                                //gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                                gc->set_line_attributes(2,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-               
+
                                drawable->draw_rectangle(gc,false,
                                        round_to_int(point[0]-5),
                                        round_to_int(point[1]-5),
@@ -249,7 +249,7 @@ Renderer_Ducks::render_vfunc(
                                        10
                                );
                        }
-                               
+
                }
 
                if((*iter)->get_box_duck())
@@ -267,7 +267,7 @@ Renderer_Ducks::render_vfunc(
                                round_to_int(tl[1]),
                                round_to_int(abs(boxpoint[0]-point[0])),
                                round_to_int(abs(boxpoint[1]-point[1]))
-                       );                      
+                       );
                        gc->set_function(Gdk::COPY);
                        gc->set_rgb_fg_color(Gdk::Color("#000000"));
                        gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
@@ -276,7 +276,7 @@ Renderer_Ducks::render_vfunc(
                                round_to_int(tl[1]),
                                round_to_int(abs(boxpoint[0]-point[0])),
                                round_to_int(abs(boxpoint[1]-point[1]))
-                       );                      
+                       );
                }
 
                ScreenDuck screen_duck;
@@ -295,10 +295,10 @@ Renderer_Ducks::render_vfunc(
                else if((*iter)->get_type()&Duck::TYPE_WIDTH)
                        screen_duck.color=Gdk::Color("#ff00ff");
                else if((*iter)->get_type()&Duck::TYPE_ANGLE)
-                       screen_duck.color=(Gdk::Color("#0000ff"));                              
+                       screen_duck.color=(Gdk::Color("#0000ff"));
                else
-                       screen_duck.color=Gdk::Color("#00ff00");                                
-               
+                       screen_duck.color=Gdk::Color("#00ff00");
+
                screen_duck_list.push_front(screen_duck);
 
                if(has_connect)
@@ -308,23 +308,23 @@ Renderer_Ducks::render_vfunc(
                                gc->set_line_attributes(3,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                                gc->set_rgb_fg_color(Gdk::Color("#000000"));
                                gc->set_function(Gdk::COPY);
-                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));                                         
+                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
                                gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                                gc->set_rgb_fg_color(Gdk::Color("#9fefef"));
-                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));                                         
+                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
                        }
                        else
                        {
 //                             gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
 //                             gc->set_function(Gdk::INVERT);
-//                             drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));                                         
+//                             drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
                                gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                                gc->set_rgb_fg_color(Gdk::Color("#000000"));
                                gc->set_function(Gdk::COPY);
-                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));                                         
+                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
                                gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                                gc->set_rgb_fg_color(Gdk::Color("#9fefef"));
-                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));                                         
+                               drawable->draw_line(gc, (int)origin[0],(int)origin[1],(int)(point[0]),(int)(point[1]));
                        }
                }
 
@@ -349,7 +349,7 @@ Renderer_Ducks::render_vfunc(
                                        d,
                                        0,
                                        360*64
-                               );  
+                               );
                                gc->set_rgb_fg_color(Gdk::Color("#afafaf"));
                        }
                        else
@@ -358,7 +358,7 @@ Renderer_Ducks::render_vfunc(
                                gc->set_function(Gdk::INVERT);
                        }
                        gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-                       
+
                        drawable->draw_arc(
                                gc,
                                false,
@@ -368,13 +368,13 @@ Renderer_Ducks::render_vfunc(
                                d,
                                0,
                                360*64
-                       );  
+                       );
 
                        if(hover)
                        {
                                Distance real_mag(((*iter)->get_trans_point()-(*iter)->get_trans_origin()).mag(),Distance::SYSTEM_UNITS);
                                real_mag.convert(App::distance_system,get_work_area()->get_rend_desc());
-                               layout->set_text(real_mag.get_string());                                        
+                               layout->set_text(real_mag.get_string());
 
                                gc->set_rgb_fg_color(Gdk::Color("#000000"));
                                drawable->draw_layout(
@@ -395,33 +395,33 @@ Renderer_Ducks::render_vfunc(
                }
 
        }
-       
+
 
        for(;screen_duck_list.size();screen_duck_list.pop_front())
        {
                int radius=4;
                int outline=1;
                Gdk::Color color(screen_duck_list.front().color);
-               
+
                if(!screen_duck_list.front().selected)
                {
                        color.set_red(color.get_red()*2/3);
                        color.set_green(color.get_green()*2/3);
                        color.set_blue(color.get_blue()*2/3);
                }
-               
+
                if(screen_duck_list.front().hover && !screen_duck_list.back().hover && screen_duck_list.size()>1)
                {
                        screen_duck_list.push_back(screen_duck_list.front());
                        continue;
                }
-               
+
                if(screen_duck_list.front().hover)
                {
                        radius+=2;
                        outline++;
                }
-               
+
                gc->set_function(Gdk::COPY);
                gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                gc->set_rgb_fg_color(Gdk::Color("#000000"));
@@ -434,7 +434,7 @@ Renderer_Ducks::render_vfunc(
                        radius*2,
                        0,
                        360*64
-               );  
+               );
 
 
                gc->set_rgb_fg_color(color);
@@ -448,6 +448,6 @@ Renderer_Ducks::render_vfunc(
                        radius*2-outline*2,
                        0,
                        360*64
-               );  
+               );
        }
 }
index 49c9800..649a330 100644 (file)
@@ -40,10 +40,10 @@ namespace studio {
 
 class Renderer_Ducks : public studio::WorkAreaRenderer
 {
-       
+
 public:
        ~Renderer_Ducks();
-       
+
        void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable,const Gdk::Rectangle& expose_area );
 
 protected:
index da50438..4b91577 100644 (file)
@@ -75,16 +75,16 @@ Renderer_Grid::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
 //     const synfig::RendDesc &rend_desc(get_work_area()->get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
 //     std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& tile_book(get_tile_book());
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
 //     const synfig::Vector::value_type
@@ -103,9 +103,9 @@ Renderer_Grid::render_vfunc(
 //     const int
 //             w(get_w()),
 //             h(get_h());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
        const synfig::Vector grid_size(get_grid_size());
 
        const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
@@ -113,7 +113,7 @@ Renderer_Grid::render_vfunc(
        const synfig::Vector::value_type window_starty(get_work_area()->get_window_tl()[1]);
        const synfig::Vector::value_type window_endy(get_work_area()->get_window_br()[1]);
        const float pw(get_pw()),ph(get_ph());
-       
+
        // Draw out the grid
        if(grid_size[0]>pw*3.5 && grid_size[1]>ph*3.5)
        {
@@ -121,7 +121,7 @@ Renderer_Grid::render_vfunc(
 
                x=floor(window_startx/grid_size[0])*grid_size[0];
                y=floor(window_starty/grid_size[1])*grid_size[1];
-               
+
                gc->set_function(Gdk::COPY);
                gc->set_rgb_fg_color(Gdk::Color("#9f9f9f"));
                gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
index d7f26dd..f253b51 100644 (file)
@@ -40,10 +40,10 @@ namespace studio {
 
 class Renderer_Grid : public studio::WorkAreaRenderer
 {
-       
+
 public:
        ~Renderer_Grid();
-       
+
        synfig::Vector get_grid_size()const;
 
        void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable,const Gdk::Rectangle& expose_area );
index f8c409c..38745a8 100644 (file)
@@ -53,7 +53,7 @@ using namespace studio;
 Renderer_Guides::Renderer_Guides():
        dragging(false)
 {
-       
+
 }
 
 Renderer_Guides::~Renderer_Guides()
@@ -88,7 +88,7 @@ Renderer_Guides::event_vfunc(GdkEvent* event)
        float pressure(0);
        bool is_mouse(false);
        Gdk::ModifierType modifier(Gdk::ModifierType(0));
-       
+
        // Handle input stuff
        if(
                event->any.type==GDK_MOTION_NOTIFY ||
@@ -109,7 +109,7 @@ Renderer_Guides::event_vfunc(GdkEvent* event)
                        device=event->button.device;
                        modifier=Gdk::ModifierType(event->button.state);
                }
-                       
+
                // Make sure we recognise the device
                /*if(curr_input_device)
                {
@@ -119,15 +119,15 @@ Renderer_Guides::event_vfunc(GdkEvent* event)
                                curr_input_device=device;
                                signal_input_device_changed()(curr_input_device);
                        }
-               }               
+               }
                else*/ if(device)
                {
                        //curr_input_device=device;
                        //signal_input_device_changed()(curr_input_device);
-               }                       
+               }
 
                //assert(curr_input_device);
-               
+
                // Calculate the position of the
                // input device in canvas coordinates
                // and the buttons
@@ -151,14 +151,14 @@ Renderer_Guides::event_vfunc(GdkEvent* event)
                        //synfig::info("pressure=%f",pressure);
                        pressure-=0.04f;
                        pressure/=1.0f-0.04f;
-                       
-                       
+
+
                        assert(!isnan(pressure));
-                       
+
                        mouse_pos=synfig::Point(screen_to_comp_coords(synfig::Point(x,y)));
-                       
+
                        button_pressed=event->button.button;
-                       
+
                        if(button_pressed==1 && pressure<0 && (event->any.type!=GDK_BUTTON_RELEASE && event->any.type!=GDK_BUTTON_PRESS))
                                button_pressed=0;
                        if(pressure<0)
@@ -166,11 +166,11 @@ Renderer_Guides::event_vfunc(GdkEvent* event)
 
                        //if(event->any.type==GDK_BUTTON_PRESS && button_pressed)
                        //      synfig::info("Button pressed on input device = %d",event->button.button);
-                       
+
                        //if(event->button.axes[2]>0.1)
                        //      button_pressed=1;
                        //else
-                       //      button_pressed=0;                               
+                       //      button_pressed=0;
                }
        }
        switch(event->type)
@@ -184,7 +184,7 @@ Renderer_Guides::event_vfunc(GdkEvent* event)
        default:
                break;
        }
-       
+
        return false;
 }
 
@@ -197,16 +197,16 @@ Renderer_Guides::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
        // const synfig::RendDesc &rend_desc(get_work_area()->get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
        //std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& tile_book(get_tile_book());
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
        // const synfig::Vector::value_type
@@ -225,9 +225,9 @@ Renderer_Guides::render_vfunc(
        // const int
        //      w(get_w()),
        //      h(get_h());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
        //const synfig::Vector grid_size(get_grid_size());
 
        const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
@@ -241,19 +241,19 @@ Renderer_Guides::render_vfunc(
                gc->set_function(Gdk::COPY);
                gc->set_rgb_fg_color(Gdk::Color("#9f9fff"));
                gc->set_line_attributes(1,Gdk::LINE_ON_OFF_DASH,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
-               
+
                Duckmatic::GuideList::const_iterator iter;
-               
+
                // vertical
                for(iter=get_guide_list_x().begin();iter!=get_guide_list_x().end();++iter)
                {
                        const float x((*iter-window_startx)/pw);
-                       
+
                        if(iter==get_work_area()->curr_guide)
                                gc->set_rgb_fg_color(Gdk::Color("#ff6f6f"));
                        else
                                gc->set_rgb_fg_color(Gdk::Color("#6f6fff"));
-                               
+
                        drawable->draw_line(gc,
                                round_to_int(x),
                                0,
index 21fcbaa..15a15b4 100644 (file)
@@ -81,16 +81,16 @@ Renderer_Timecode::render_vfunc(
        assert(get_work_area());
        if(!get_work_area())
                return;
-       
+
        //const synfig::RendDesc &rend_desc(get_work_area()->get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_work_area()->get_focus_point());
 
        //std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> >& tile_book(get_tile_book());
-       
+
        int drawable_w,drawable_h;
        drawable->get_size(drawable_w,drawable_h);
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
 //     const synfig::Vector::value_type
@@ -109,9 +109,9 @@ Renderer_Timecode::render_vfunc(
 //     const int
 //             w(get_w()),
 //             h(get_h());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(drawable));
-       
+
        //const synfig::Vector grid_size(get_grid_size());
 
 //     const synfig::Vector::value_type window_startx(get_work_area()->get_window_tl()[0]);
@@ -122,11 +122,11 @@ Renderer_Timecode::render_vfunc(
 
        Canvas::Handle canvas(get_work_area()->get_canvas());
        synfig::Time cur_time(canvas->get_time());
-       
+
        // Print out the timecode
        {
                Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_work_area()->get_pango_context()));
-               
+
 /*             Glib::ustring timecode(cur_time.get_string(rend_desc.get_frame_rate(),App::get_time_format()));
 
                try
@@ -139,14 +139,14 @@ Renderer_Timecode::render_vfunc(
                        return;
                        gc->set_rgb_fg_color(Gdk::Color("#000000"));
                }
-               
-               layout->set_text(timecode);             
+
+               layout->set_text(timecode);
 */
 
                gc->set_rgb_fg_color(Gdk::Color("#5f0000"));
                try
                {
-                       layout->set_text(canvas->keyframe_list().find(cur_time)->get_description());            
+                       layout->set_text(canvas->keyframe_list().find(cur_time)->get_description());
                }
                catch(synfig::Exception::NotFound)
                {
@@ -155,7 +155,7 @@ Renderer_Timecode::render_vfunc(
                catch(...) {
                        assert(0);
                }
-               
+
                drawable->draw_layout(gc, 4, 4, layout);
-       }       
+       }
 }
index 5043306..a5e4b96 100644 (file)
@@ -40,10 +40,10 @@ namespace studio {
 
 class Renderer_Timecode : public studio::WorkAreaRenderer
 {
-       
+
 public:
        ~Renderer_Timecode();
-       
+
        synfig::Vector get_grid_size()const;
 
        void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable,const Gdk::Rectangle& expose_area );
index 2c7444b..848a60a 100644 (file)
@@ -39,7 +39,7 @@
 namespace studio {
 
 class CanvasView;
-       
+
 typedef etl::smach<CanvasView,EventKey> Smach;
 
 }; // END of namespace studio
index d21ad9e..7c950e6 100644 (file)
@@ -71,7 +71,7 @@ class studio::StateBLine_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        bool prev_table_status;
        bool loop_;
        bool prev_workarea_layer_status_;
@@ -82,14 +82,14 @@ class studio::StateBLine_Context : public sigc::trackable
        Gtk::Menu menu;
 
        Duckmatic::Push duckmatic_push;
-       
+
        etl::handle<Duck> curr_duck;
 
        etl::handle<Duck> next_duck;
-       
+
        std::list<synfig::ValueNode_Const::Handle> bline_point_list;
        synfigapp::Settings& settings;
-       
+
        bool on_vertex_change(const synfig::Point &point, synfig::ValueNode_Const::Handle value_node);
        bool on_tangent1_change(const synfig::Point &point, synfig::ValueNode_Const::Handle value_node);
        bool on_tangent2_change(const synfig::Point &point, synfig::ValueNode_Const::Handle value_node);
@@ -107,7 +107,7 @@ class studio::StateBLine_Context : public sigc::trackable
        void unloop_bline();
 
        void refresh_ducks(bool x=true);
-       
+
        Gtk::Table options_table;
        Gtk::Entry entry_id;
        Gtk::CheckButton checkbutton_layer_region;
@@ -118,9 +118,9 @@ class studio::StateBLine_Context : public sigc::trackable
        Gtk::Button button_clear;
        Gtk::Adjustment  adj_feather;
        Gtk::SpinButton  spin_feather;
-       
-       
-       
+
+
+
 public:
 
        int layers_to_create()const
@@ -130,7 +130,7 @@ public:
                        get_layer_bline_flag()+
                        get_layer_curve_gradient_flag();
        }
-       
+
        void sanity_check()
        {
                if(layers_to_create()==0)
@@ -139,13 +139,13 @@ public:
 
        bool get_auto_export_flag()const { return checkbutton_auto_export.get_active(); }
        void set_auto_export_flag(bool x) { return checkbutton_auto_export.set_active(x); }
-       
+
        bool get_layer_region_flag()const { return checkbutton_layer_region.get_active(); }
        void set_layer_region_flag(bool x) { return checkbutton_layer_region.set_active(x); }
-       
+
        bool get_layer_bline_flag()const { return checkbutton_layer_bline.get_active(); }
        void set_layer_bline_flag(bool x) { return checkbutton_layer_bline.set_active(x); }
-       
+
        bool get_layer_curve_gradient_flag()const { return checkbutton_layer_curve_gradient.get_active(); }
        void set_layer_curve_gradient_flag(bool x) { return checkbutton_layer_curve_gradient.set_active(x); }
 
@@ -164,7 +164,7 @@ public:
        Smach::event_result event_refresh_tool_options(const Smach::event& x);
 
        Smach::event_result event_hijack(const Smach::event& x) { return Smach::RESULT_ACCEPT; }
-       
+
        void refresh_tool_options();
 
        StateBLine_Context(CanvasView* canvas_view);
@@ -176,7 +176,7 @@ public:
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
        const synfig::TransformStack& get_transform_stack()const { return canvas_view_->get_curr_transform_stack(); }
-       
+
        void load_settings();
        void save_settings();
        void reset();
@@ -185,7 +185,7 @@ public:
 
        bool run_();
        bool run();
-       
+
        bool no_egress_on_selection_change;
        Smach::event_result event_layer_selection_changed_handler(const Smach::event& x)
        {
@@ -193,7 +193,7 @@ public:
                        throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
-       
+
 };     // END of class StateBLine_Context
 
 
@@ -211,7 +211,7 @@ StateBLine::StateBLine():
        insert(event_def(EVENT_WORKAREA_MOUSE_MOTION,&StateBLine_Context::event_mouse_motion_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DRAG,&StateBLine_Context::event_mouse_motion_handler));
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateBLine_Context::event_refresh_tool_options));
-}      
+}
 
 StateBLine::~StateBLine()
 {
@@ -219,7 +219,7 @@ StateBLine::~StateBLine()
 
 void
 StateBLine_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("bline.layer_region",value) && value=="0")
@@ -258,7 +258,7 @@ StateBLine_Context::load_settings()
 
 void
 StateBLine_Context::save_settings()
-{      
+{
        sanity_check();
        settings.set_value("bline.layer_bline",get_layer_bline_flag()?"1":"0");
        settings.set_value("bline.layer_region",get_layer_region_flag()?"1":"0");
@@ -282,10 +282,10 @@ StateBLine_Context::increment_id()
        String id(get_id());
        int number=1;
        int digits=0;
-       
+
        if(id.empty())
                id="NewBLine";
-       
+
        // If there is a number
        // already at the end of the
        // id, then remove it.
@@ -293,12 +293,12 @@ StateBLine_Context::increment_id()
        {
                // figure out how many digits it is
                for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
-               
+
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
                id=String(id,0,id.size()-digits);
                synfig::info("---------------- \"%s\"",str_number.c_str());
-               
+
                number=atoi(str_number.c_str());
        }
        else
@@ -306,15 +306,15 @@ StateBLine_Context::increment_id()
                number=1;
                digits=3;
        }
-       
+
        number++;
-       
+
        // Add the number back onto the id
        {
                const String format(strprintf("%%0%dd",digits));
                id+=strprintf(format.c_str(),number);
        }
-       
+
        // Set the ID
        set_id(id);
 }
@@ -340,38 +340,38 @@ StateBLine_Context::StateBLine_Context(CanvasView* canvas_view):
        depth=-1;
        no_egress_on_selection_change=false;
        load_settings();
-               
+
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("BLine Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);       
+       //options_table.attach(*manage(new Gtk::Label(_("BLine Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       options_table.attach(checkbutton_layer_region, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); 
-       options_table.attach(checkbutton_layer_bline, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);  
-       options_table.attach(checkbutton_layer_curve_gradient, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); 
-       options_table.attach(*manage(new Gtk::Label(_("Feather"))), 0, 1, 10, 11, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);  
+       options_table.attach(checkbutton_layer_region, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(checkbutton_layer_bline, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(checkbutton_layer_curve_gradient, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(*manage(new Gtk::Label(_("Feather"))), 0, 1, 10, 11, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_feather, 1, 2, 10, 11, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       options_table.attach(checkbutton_auto_export, 0, 2, 11, 12, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);        
-       //options_table.attach(button_make, 0, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
+       options_table.attach(checkbutton_auto_export, 0, 2, 11, 12, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       //options_table.attach(button_make, 0, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        //button_make.signal_pressed().connect(sigc::mem_fun(*this,&StateBLine_Context::run));
        options_table.show_all();
        refresh_tool_options();
        App::dialog_tool_options->present();
-       
+
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
-       
+
        // clear out the ducks
        get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
-       
+
        // Hide the tables if they are showing
        prev_table_status=get_canvas_view()->tables_are_visible();
        if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateBLine_Context::on_user_click));
        get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
@@ -435,7 +435,7 @@ StateBLine_Context::~StateBLine_Context()
        if(prev_table_status)get_canvas_view()->show_tables();
 
 //     get_canvas_view()->get_smach().process_event(EVENT_REFRESH_DUCKS);
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -490,7 +490,7 @@ StateBLine_Context::run_()
        next_duck=0;
 
        // Now we need to generate it
-       
+
        if(bline_point_list.empty())
        {
                return false;
@@ -500,22 +500,22 @@ StateBLine_Context::run_()
                //get_canvas_view()->get_ui_interface()->error(_("You need at least two (2) points to create a BLine"));
                return false;
        }
-       
+
        do
-       {                       
-               
+       {
+
                // Create the action group
                synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("New BLine"));
 
                std::vector<BLinePoint> new_list;
                std::list<synfig::ValueNode_Const::Handle>::iterator iter;
                const synfig::TransformStack& transform(get_transform_stack());
-               
+
                for(iter=bline_point_list.begin();iter!=bline_point_list.end();++iter)
                {
                        BLinePoint bline_point((*iter)->get_value().get(BLinePoint()));
                        Point new_vertex(transform.unperform(bline_point.get_vertex()));
-                       
+
                        bline_point.set_tangent1(
                                transform.unperform(
                                        bline_point.get_tangent1()+bline_point.get_vertex()
@@ -527,19 +527,19 @@ StateBLine_Context::run_()
                                        bline_point.get_tangent2()+bline_point.get_vertex()
                                ) -new_vertex
                        );
-                       
+
                        bline_point.set_vertex(new_vertex);
-                       
+
                        new_list.push_back(bline_point);
                }
-                       
+
                ValueNode_BLine::Handle value_node_bline(ValueNode_BLine::create(new_list));
-               
+
                assert(value_node_bline);
-               
+
                // Set the looping flag
                value_node_bline->set_loop(loop_);
-               
+
                // Add the BLine to the canvas
                if(get_auto_export_flag() && !get_canvas_interface()->add_value_node(value_node_bline,get_id()))
                {
@@ -549,9 +549,9 @@ StateBLine_Context::run_()
                        throw String(_("Unable to add value node"));
                        return false;
                }
-               
+
                Layer::Handle layer;
-                               
+
                // we are temporarily using the layer to hold something
                layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
 
@@ -564,12 +564,12 @@ StateBLine_Context::run_()
                }
                else
                        depth=0;
-               
+
                if(!canvas)
                        canvas=get_canvas_view()->get_canvas();
 
                synfigapp::SelectionManager::LayerList layer_selection;
-               
+
                // If we were asked to create a region layer, go ahead and do so
                if(get_layer_region_flag())
                {
@@ -586,16 +586,16 @@ StateBLine_Context::run_()
                                layer->set_param("feather",get_feather());
                                get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
                        }
-                       
+
                        if(get_layer_bline_flag())
                                layer->set_param("color",synfigapp::Main::get_background_color());
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
-                       
+
                        assert(action);
-                       
-                       action->set_param("canvas",get_canvas());                       
-                       action->set_param("canvas_interface",get_canvas_interface());                   
+
+                       action->set_param("canvas",get_canvas());
+                       action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("layer",layer);
                        if(!action->set_param("param",String("bline")))
                                synfig::error("LayerParamConnect didn't like \"param\"");
@@ -625,17 +625,17 @@ StateBLine_Context::run_()
                                layer->set_param("feather",get_feather());
                                get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
                        }
-                       
+
                        assert(layer);
 
 
                        synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
 
                        assert(action);
-                       
-                       action->set_param("canvas",get_canvas());                       
-                       action->set_param("canvas_interface",get_canvas_interface());                   
-                       action->set_param("layer",layer);                       
+
+                       action->set_param("canvas",get_canvas());
+                       action->set_param("canvas_interface",get_canvas_interface());
+                       action->set_param("layer",layer);
                        if(!action->set_param("param",String("bline")))
                                synfig::error("LayerParamConnect didn't like \"param\"");
                        if(!action->set_param("value_node",ValueNode::Handle(value_node_bline)))
@@ -647,7 +647,7 @@ StateBLine_Context::run_()
                                group.cancel();
                                throw String(_("Unable to create Outline layer"));
                                return false;
-                       }                       
+                       }
 
                        /*if(get_layer_region_flag() && !get_auto_export_flag())
                        {
@@ -656,7 +656,7 @@ StateBLine_Context::run_()
                }
 
 
-               
+
                // If we were asked to create a CurveGradient layer, go ahead and do so
                if(get_layer_curve_gradient_flag())
                {
@@ -666,17 +666,17 @@ StateBLine_Context::run_()
                        layer_selection.push_back(layer);
                        layer->set_description(get_id()+_(" Gradient"));
                        get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
-                       
+
                        assert(layer);
 
 
                        synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
 
                        assert(action);
-                       
-                       action->set_param("canvas",get_canvas());                       
-                       action->set_param("canvas_interface",get_canvas_interface());                   
-                       action->set_param("layer",layer);                       
+
+                       action->set_param("canvas",get_canvas());
+                       action->set_param("canvas_interface",get_canvas_interface());
+                       action->set_param("layer",layer);
                        if(!action->set_param("param",String("bline")))
                                synfig::error("LayerParamConnect didn't like \"param\"");
                        if(!action->set_param("value_node",ValueNode::Handle(value_node_bline)))
@@ -688,7 +688,7 @@ StateBLine_Context::run_()
                                group.cancel();
                                throw String(_("Unable to create Gradient layer"));
                                return false;
-                       }                       
+                       }
 
                        /*if(get_layer_region_flag() && !get_auto_export_flag())
                        {
@@ -700,10 +700,10 @@ StateBLine_Context::run_()
                get_canvas_interface()->get_selection_manager()->clear_selected_layers();
                get_canvas_interface()->get_selection_manager()->set_selected_layers(layer_selection);
                no_egress_on_selection_change=false;
-               
+
                //if(finish_bline_dialog.get_region_flag() || finish_bline_dialog.get_bline_flag())
                //      get_canvas_interface()->signal_dirty_preview()();
-                       
+
        } while(0);
 
        reset();
@@ -715,7 +715,7 @@ Smach::event_result
 StateBLine_Context::event_mouse_motion_handler(const Smach::event& x)
 {
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
-       
+
        if(curr_duck)
        {
                //synfig::info("Moved Duck");
@@ -726,7 +726,7 @@ StateBLine_Context::event_mouse_motion_handler(const Smach::event& x)
                get_work_area()->queue_draw();
                return Smach::RESULT_ACCEPT;
        }
-       
+
        return Smach::RESULT_OK;
 }
 
@@ -760,16 +760,16 @@ StateBLine_Context::event_mouse_click_handler(const Smach::event& x)
                        // If we are already looped up, then don't try to add anything else
                        if(loop_)
                                return Smach::RESULT_OK;
-       
+
                        BLinePoint bline_point;
-                       
+
                        bline_point.set_vertex(get_work_area()->snap_point_to_grid(event.pos));
                        //bline_point.set_width(synfigapp::Main::get_bline_width());
                        bline_point.set_width(1.0f);
                        bline_point.set_origin(0.5f);
                        bline_point.set_split_tangent_flag(false);
                        bline_point.set_tangent1(Vector(0,0));
-                       
+
                        // set the tangent
                        /*
                        if(bline_point_list.empty())
@@ -781,7 +781,7 @@ StateBLine_Context::event_mouse_click_handler(const Smach::event& x)
                                const Vector t(event.pos-bline_point_list.back()->get_value().get(BLinePoint()).get_vertex());
                                bline_point.set_tangent1(t);
                        }
-                       
+
                        if(bline_point_list.size()>1)
                        {
                                std::list<synfig::ValueNode_Const::Handle>::iterator iter;
@@ -792,17 +792,17 @@ StateBLine_Context::event_mouse_click_handler(const Smach::event& x)
                                bline_point_list.back()->set_value(prev);
                        };
                        */
-                       
+
                        bline_point_list.push_back(ValueNode_Const::create(bline_point));
-               
+
                        refresh_ducks();
                        return Smach::RESULT_ACCEPT;
                }
-       
+
        case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
                return Smach::RESULT_ACCEPT;
-       
-       default:        
+
+       default:
                return Smach::RESULT_OK;
        }
 }
@@ -812,7 +812,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
 {
        get_work_area()->clear_ducks();
        get_work_area()->queue_draw();
-       
+
        if(bline_point_list.empty())
                return;
 
@@ -821,7 +821,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
        handle<WorkArea::Bezier> bezier;
        handle<WorkArea::Duck> duck,tduck;
        BLinePoint bline_point;
-       
+
        for(iter=bline_point_list.begin();iter!=bline_point_list.end();++iter)
        {
                ValueNode_Const::Handle value_node(*iter);
@@ -829,7 +829,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
                assert(value_node);
 
 
-               // First add the duck associated with this vertex               
+               // First add the duck associated with this vertex
                duck=new WorkArea::Duck(bline_point.get_vertex());
                duck->set_editable(true);
                duck->set_type(Duck::TYPE_VERTEX);
@@ -842,7 +842,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
                );
                duck->set_guid(value_node->get_guid()^GUID::hasher(0));
 
-               get_work_area()->add_duck(duck);                        
+               get_work_area()->add_duck(duck);
 
                // Add the tangent1 duck
                tduck=new WorkArea::Duck(bline_point.get_tangent1());
@@ -858,11 +858,11 @@ StateBLine_Context::refresh_ducks(bool button_down)
                tduck->signal_user_click(2).connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::popup_handle_menu),value_node)
                );
-               
+
                // See if we need to add that duck to the previous bezier
                if(bezier)
                {
-                       get_work_area()->add_duck(tduck);                       
+                       get_work_area()->add_duck(tduck);
                        bezier->p2=duck;
                        bezier->c2=tduck;
 
@@ -876,22 +876,22 @@ StateBLine_Context::refresh_ducks(bool button_down)
                                )
                        );
 
-                       //get_work_area()->add_duck(bezier->c1);                        
-                       //get_work_area()->add_duck(bezier->c2);                        
+                       //get_work_area()->add_duck(bezier->c1);
+                       //get_work_area()->add_duck(bezier->c2);
                        get_work_area()->add_bezier(bezier);
 
                        bezier=0;
                }
-               
+
                // Now we see if we need to create a bezier
                list<ValueNode_Const::Handle>::iterator next(iter);
                next++;
-               
+
                // If our next iterator is the end, then we don't need
                // to add a bezier.
                //if(next==bline_point_list.end() && !loop_)
                //      continue;
-               
+
                bezier=new WorkArea::Bezier();
 
                // Add the tangent2 duck
@@ -918,15 +918,15 @@ StateBLine_Context::refresh_ducks(bool button_down)
                tduck->signal_user_click(2).connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::popup_handle_menu),value_node)
                );
-               
+
                // Setup the next bezier
                bezier->p1=duck;
                bezier->c1=tduck;
 
-               get_work_area()->add_duck(tduck);                       
+               get_work_area()->add_duck(tduck);
                curr_duck=tduck;
        }
-       
+
        // Add the loop, if requested
        if(bezier && loop_)
        {
@@ -942,7 +942,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
                duck->signal_user_click(2).connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::popup_vertex_menu),bline_point_list.front())
                );
-               get_work_area()->add_duck(duck);                        
+               get_work_area()->add_duck(duck);
 
                // Add the tangent1 duck
                tduck=new WorkArea::Duck(bline_point.get_tangent1());
@@ -957,8 +957,8 @@ StateBLine_Context::refresh_ducks(bool button_down)
                tduck->signal_user_click(2).connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::popup_handle_menu),bline_point_list.front())
                );
-               get_work_area()->add_duck(tduck);                       
-               
+               get_work_area()->add_duck(tduck);
+
                bezier->p2=duck;
                bezier->c2=tduck;
 
@@ -972,7 +972,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
                        )
                );
 
-               //get_work_area()->add_duck(bezier->c1);                        
+               //get_work_area()->add_duck(bezier->c1);
                get_work_area()->add_bezier(bezier);
        }
        if(bezier && !loop_)
@@ -992,16 +992,16 @@ StateBLine_Context::refresh_ducks(bool button_down)
                bezier->p2=duck;
                bezier->c2=tduck;
 
-               get_work_area()->add_duck(bezier->p2);                  
-               //get_work_area()->add_duck(bezier->c2);                        
+               get_work_area()->add_duck(bezier->p2);
+               //get_work_area()->add_duck(bezier->c2);
                get_work_area()->add_bezier(bezier);
 
                duck->set_guid(GUID());
                tduck->set_guid(GUID());
-               
+
                next_duck=duck;
        }
-       
+
        if(!button_down)
        {
                if(curr_duck)
@@ -1013,7 +1013,7 @@ StateBLine_Context::refresh_ducks(bool button_down)
                        }
                }
        }
-       get_work_area()->queue_draw();                  
+       get_work_area()->queue_draw();
 }
 
 
@@ -1078,7 +1078,7 @@ StateBLine_Context::popup_vertex_menu(synfig::ValueNode_Const::Handle value_node
                                sigc::mem_fun(*this,&studio::StateBLine_Context::loop_bline)
                ));
        }
-       
+
        menu.items().push_back(Gtk::Menu_Helpers::MenuElem("Delete Vertex",
                sigc::bind(
                        sigc::mem_fun(*this,&studio::StateBLine_Context::bline_delete_vertex),
@@ -1111,7 +1111,7 @@ void
 StateBLine_Context::bline_insert_vertex(synfig::ValueNode_Const::Handle value_node, float origin)
 {
        list<ValueNode_Const::Handle>::iterator iter;
-       
+
        for(iter=bline_point_list.begin();iter!=bline_point_list.end();++iter)
                if(*iter==value_node)
                {
@@ -1119,10 +1119,10 @@ StateBLine_Context::bline_insert_vertex(synfig::ValueNode_Const::Handle value_no
                        --prev;
 
                        BLinePoint bline_point;
-                       
+
                        BLinePoint next_bline_point((*iter)->get_value().get(BLinePoint()));
                        BLinePoint prev_bline_point;
-                       
+
                        if(iter!=bline_point_list.begin())
                        {
                                prev_bline_point=(*prev)->get_value().get(BLinePoint());
@@ -1148,7 +1148,7 @@ StateBLine_Context::bline_insert_vertex(synfig::ValueNode_Const::Handle value_no
                        bline_point.set_tangent2(bline_point.get_tangent1());
                        bline_point.set_split_tangent_flag(false);
                        bline_point.set_origin(origin);
-                       
+
 /*
                        bline_point.set_vertex((next_bline_point.get_vertex()+prev_bline_point.get_vertex())*0.5);
                        bline_point.set_width((next_bline_point.get_width()+prev_bline_point.get_width())*0.5);
@@ -1166,14 +1166,14 @@ StateBLine_Context::bline_insert_vertex(synfig::ValueNode_Const::Handle value_no
                get_canvas_view()->get_ui_interface()->error("Unable to find where to insert vertex, internal error, please report this bug");
        }
 
-       refresh_ducks(false);   
+       refresh_ducks(false);
 }
 
 void
 StateBLine_Context::bline_delete_vertex(synfig::ValueNode_Const::Handle value_node)
 {
        list<ValueNode_Const::Handle>::iterator iter;
-       
+
        for(iter=bline_point_list.begin();iter!=bline_point_list.end();++iter)
                if(*iter==value_node)
                {
@@ -1185,7 +1185,7 @@ StateBLine_Context::bline_delete_vertex(synfig::ValueNode_Const::Handle value_no
                get_canvas_view()->get_ui_interface()->error("Unable to remove vertex, internal error, please report this bug");
        }
 
-       refresh_ducks(false);   
+       refresh_ducks(false);
 }
 
 void
index 27b2ae8..732722a 100644 (file)
@@ -47,7 +47,7 @@ public:
 }; // END of class StateBLine
 
 extern StateBLine state_bline;
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 2975edf..63ea3bb 100644 (file)
@@ -80,33 +80,33 @@ class studio::StateCircle_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        Duckmatic::Push duckmatic_push;
-       
+
        Point point_holder;
-       
+
        etl::handle<Duck> point2_duck;
 
        void refresh_ducks();
-       
+
        bool prev_workarea_layer_status_;
-               
+
        //Toolbox settings
        synfigapp::Settings& settings;
-       
+
        //Toolbox display
        Gtk::Table options_table;
-       
+
        Gtk::Entry              entry_id; //what to name the layer
-       
+
        Widget_Enum             enum_falloff;
        Widget_Enum             enum_blend;
-       
+
        Gtk::Adjustment adj_feather;
        Gtk::SpinButton spin_feather;
-       
+
        Gtk::CheckButton check_invert;
-       
+
 public:
 
        synfig::String get_id()const { return entry_id.get_text(); }
@@ -114,17 +114,17 @@ public:
 
        int get_falloff()const { return enum_falloff.get_value(); }
        void set_falloff(int x) { return enum_falloff.set_value(x); }
-       
+
        int get_blend()const { return enum_blend.get_value(); }
        void set_blend(int x) { return enum_blend.set_value(x); }
-       
+
        Real get_feather()const { return adj_feather.get_value(); }
        void set_feather(Real f) { adj_feather.set_value(f); }
-       
+
        bool get_invert()const { return check_invert.get_active(); }
        void set_invert(bool i) { check_invert.set_active(i); }
-       
-       void refresh_tool_options(); //to refresh the toolbox   
+
+       void refresh_tool_options(); //to refresh the toolbox
 
        //events
        Smach::event_result event_stop_handler(const Smach::event& x);
@@ -141,7 +141,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //Modifying settings etc.
        void load_settings();
        void save_settings();
@@ -156,7 +156,7 @@ public:
        }
 
        void make_circle(const Point& p1, const Point& p2);
-       
+
 };     // END of class StateGradient_Context
 
 /* === M E T H O D S ======================================================= */
@@ -172,7 +172,7 @@ StateCircle::StateCircle():
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DRAG,&StateCircle_Context::event_mouse_click_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_UP,&StateCircle_Context::event_mouse_click_handler));
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateCircle_Context::event_refresh_tool_options));
-}      
+}
 
 StateCircle::~StateCircle()
 {
@@ -180,9 +180,9 @@ StateCircle::~StateCircle()
 
 void
 StateCircle_Context::load_settings()
-{      
+{
        String value;
-       
+
        //parse the arguments yargh!
        if(settings.get_value("circle.id",value))
                set_id(value);
@@ -193,17 +193,17 @@ StateCircle_Context::load_settings()
                set_falloff(atoi(value.c_str()));
        else
                set_falloff(2);
-       
+
        if(settings.get_value("circle.blend",value) && value != "")
                set_blend(atoi(value.c_str()));
        else
                set_blend(0);//(int)Color::BLEND_COMPOSITE); //0 should be blend composites value
-       
+
        if(settings.get_value("circle.feather",value))
                set_feather(atof(value.c_str()));
        else
                set_feather(0);
-       
+
        if(settings.get_value("circle.invert",value) && value != "0")
                set_invert(true);
        else
@@ -212,7 +212,7 @@ StateCircle_Context::load_settings()
 
 void
 StateCircle_Context::save_settings()
-{      
+{
        settings.set_value("circle.id",get_id());
        settings.set_value("circle.fallofftype",strprintf("%d",get_falloff()));
        settings.set_value("circle.blend",strprintf("%d",get_blend()));
@@ -232,10 +232,10 @@ StateCircle_Context::increment_id()
        String id(get_id());
        int number=1;
        int digits=0;
-       
+
        if(id.empty())
                id="Circle";
-       
+
        // If there is a number
        // already at the end of the
        // id, then remove it.
@@ -243,11 +243,11 @@ StateCircle_Context::increment_id()
        {
                // figure out how many digits it is
                for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
-               
+
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
                id=String(id,0,id.size()-digits);
-               
+
                number=atoi(str_number.c_str());
        }
        else
@@ -255,15 +255,15 @@ StateCircle_Context::increment_id()
                number=1;
                digits=3;
        }
-       
+
        number++;
-       
+
        // Add the number back onto the id
        {
                const String format(strprintf("%%0%dd",digits));
                id+=strprintf(format.c_str(),number);
        }
-       
+
        // Set the ID
        set_id(id);
 }
@@ -281,7 +281,7 @@ StateCircle_Context::StateCircle_Context(CanvasView* canvas_view):
 {
        no_egress_on_selection_change=false;
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Circle Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);      
+       //options_table.attach(*manage(new Gtk::Label(_("Circle Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        enum_falloff.set_param_desc(ParamDesc("falloff")
@@ -293,11 +293,11 @@ StateCircle_Context::StateCircle_Context(CanvasView* canvas_view):
                .add_enum_value(CIRCLE_SQRT,"sqrt",_("Square Root"))
                .add_enum_value(CIRCLE_SIGMOND,"sigmond",_("Sigmond"))
                .add_enum_value(CIRCLE_COSINE,"cosine",_("Cosine")));
-       
+
        enum_blend.set_param_desc(ParamDesc(Color::BLEND_COMPOSITE,"blend_method")
                .set_local_name(_("Blend Method"))
                .set_description(_("Defines the blend method to be used for circles")));
-       
+
        load_settings();
 
        //feather stuff
@@ -305,31 +305,31 @@ StateCircle_Context::StateCircle_Context(CanvasView* canvas_view):
        options_table.attach(spin_feather, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(enum_falloff, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(enum_blend, 0, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        //invert flag
        options_table.attach(check_invert, 0, 2, 6, 7, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        options_table.show_all();
-       
+
        refresh_tool_options();
        App::dialog_tool_options->present();
 
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
-       
+
        // clear out the ducks
        get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
-       
+
        // Hide the tables if they are showing
        //prev_table_status=get_canvas_view()->tables_are_visible();
        //if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        //get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateCircle_Context::on_user_click));
        get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
@@ -369,7 +369,7 @@ StateCircle_Context::~StateCircle_Context()
 
        // Bring back the tables if they were out before
        //if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -396,10 +396,10 @@ StateCircle_Context::make_circle(const Point& _p1, const Point& _p2)
        synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
 
        Layer::Handle layer;
-       
+
        Canvas::Handle canvas(get_canvas_view()->get_canvas());
        int depth(0);
-       
+
        // we are temporarily using the layer to hold something
        layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
        if(layer)
@@ -411,30 +411,30 @@ StateCircle_Context::make_circle(const Point& _p1, const Point& _p2)
        const synfig::TransformStack& transform(get_canvas_view()->get_curr_transform_stack());
        const Point p1(transform.unperform(_p1));
        const Point p2(transform.unperform(_p2));
-       
+
        if(get_falloff() >= 0 && get_falloff() < CIRCLE_NUM_FALLOFF)
        {
-               
+
                layer=get_canvas_interface()->add_layer_to("circle",canvas,depth);
-               
+
                layer->set_param("pos",p1);
                get_canvas_interface()->signal_layer_param_changed()(layer,"pos");
-               
+
                layer->set_param("radius",(p2-p1).mag());
                get_canvas_interface()->signal_layer_param_changed()(layer,"radius");
-               
+
                layer->set_param("falloff",get_falloff());
                get_canvas_interface()->signal_layer_param_changed()(layer,"falloff");
-               
+
                layer->set_param("feather",get_feather());
                get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
 
                layer->set_param("invert",get_invert());
                get_canvas_interface()->signal_layer_param_changed()(layer,"invert");
-               
+
                layer->set_param("blend_method",get_blend());
                get_canvas_interface()->signal_layer_param_changed()(layer,"blend_method");
-               
+
                layer->set_description(get_id());
                get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
 
@@ -443,7 +443,7 @@ StateCircle_Context::make_circle(const Point& _p1, const Point& _p2)
                get_canvas_interface()->get_selection_manager()->set_selected_layer(layer);
                no_egress_on_selection_change=false;
        }
-       
+
        reset();
        increment_id();
 }
@@ -452,7 +452,7 @@ Smach::event_result
 StateCircle_Context::event_mouse_click_handler(const Smach::event& x)
 {
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
-       
+
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DOWN && event.button==BUTTON_LEFT)
        {
                point_holder=get_work_area()->snap_point_to_grid(event.pos);
@@ -478,7 +478,7 @@ StateCircle_Context::event_mouse_click_handler(const Smach::event& x)
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT)
        {
                point2_duck->set_point(point_holder-get_work_area()->snap_point_to_grid(event.pos));
-               get_work_area()->queue_draw();                  
+               get_work_area()->queue_draw();
                return Smach::RESULT_ACCEPT;
        }
 
index 6df08ab..0265452 100644 (file)
@@ -48,7 +48,7 @@ public:
 }; // END of class StateCircle
 
 extern StateCircle state_circle;
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index f643359..76be3dc 100644 (file)
@@ -82,36 +82,36 @@ class studio::StateDraw_Context : public sigc::trackable
 {
        typedef etl::smart_ptr<std::list<synfig::Point> > StrokeData;
        typedef etl::smart_ptr<std::list<synfig::Real> > WidthData;
-       
+
        typedef list< pair<StrokeData,WidthData> > StrokeQueue;
-       
+
        StrokeQueue stroke_queue;
-       
-       
+
+
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        bool prev_table_status;
        bool loop_;
        bool prev_workarea_layer_status_;
 
        int nested;
        SigC::Connection process_queue_connection;
-       
+
        ValueNode_BLine::Handle last_stroke;
-       
+
        Gtk::Menu menu;
 
        //Duckmatic::Push duckmatic_push;
-       
+
        std::list< etl::smart_ptr<std::list<synfig::Point> > > stroke_list;
 
        void refresh_ducks();
-       
+
        Duckmatic::Type old_duckmask;
 
        void fill_last_stroke();
-       
+
        Smach::event_result new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline_flag,float radius);
 
        Smach::event_result new_region(std::list<synfig::BLinePoint> bline,synfig::Real radius);
@@ -129,7 +129,7 @@ class studio::StateDraw_Context : public sigc::trackable
        Gtk::CheckButton checkbutton_auto_connect;
        Gtk::CheckButton checkbutton_region_only;
        Gtk::Button button_fill_last_stroke;
-       
+
        //pressure spinner and such
        Gtk::Adjustment  adj_min_pressure;
        Gtk::SpinButton  spin_min_pressure;
@@ -137,10 +137,10 @@ class studio::StateDraw_Context : public sigc::trackable
 
        Gtk::Adjustment  adj_feather;
        Gtk::SpinButton  spin_feather;
-       
+
        Gtk::Adjustment  adj_globalthres;
        Gtk::SpinButton  spin_globalthres;
-       
+
        Gtk::Adjustment  adj_localthres;
        Gtk::CheckButton check_localerror;
        void UpdateErrorBox();  //switches the stuff if need be :)
@@ -160,28 +160,28 @@ public:
 
        bool get_region_only_flag()const { return checkbutton_region_only.get_active(); }
        void set_region_only_flag(bool x) { return checkbutton_region_only.set_active(x); }
-       
+
        Real get_min_pressure() const { return adj_min_pressure.get_value(); }
        void set_min_pressure(Real x) { return adj_min_pressure.set_value(x); }
 
        Real get_feather() const { return adj_feather.get_value(); }
        void set_feather(Real x) { return adj_feather.set_value(x); }
-       
+
        Real get_gthres() const { return adj_globalthres.get_value(); }
        void set_gthres(Real x) { return adj_globalthres.set_value(x); }
-       
+
        Real get_lthres() const { return adj_localthres.get_value(); }
        void set_lthres(Real x) { return adj_localthres.set_value(x); }
-       
+
        bool get_local_error_flag() const { return check_localerror.get_active(); }
        void set_local_error_flag(bool x) { check_localerror.set_active(x); }
-       
+
        bool get_min_pressure_flag()const { return check_min_pressure.get_active(); }
        void set_min_pressure_flag(bool x) { check_min_pressure.set_active(x); }
 
        void load_settings();
        void save_settings();
-       
+
        Smach::event_result event_stop_handler(const Smach::event& x);
 
        Smach::event_result event_refresh_handler(const Smach::event& x);
@@ -195,7 +195,7 @@ public:
        Smach::event_result process_stroke(StrokeData stroke_data, WidthData width_data, bool region_flag=false);
 
        bool process_queue();
-       
+
 
        StateDraw_Context(CanvasView* canvas_view);
 
@@ -206,7 +206,7 @@ public:
        synfig::Time get_time()const { return get_canvas_interface()->get_time(); }
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //void on_user_click(synfig::Point point);
 
 //     bool run();
@@ -217,7 +217,7 @@ public:
 
 StateDraw::StateDraw():
        Smach::state<StateDraw_Context>("draw")
-{      
+{
        insert(event_def(EVENT_STOP,&StateDraw_Context::event_stop_handler));
        insert(event_def(EVENT_REFRESH,&StateDraw_Context::event_refresh_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateDraw_Context::event_mouse_down_handler));
@@ -232,7 +232,7 @@ StateDraw::~StateDraw()
 
 void
 StateDraw_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("draw.pressure_width",value) && value=="0")
@@ -254,12 +254,12 @@ StateDraw_Context::load_settings()
                set_region_only_flag(true);
        else
                set_region_only_flag(false);
-       
+
        if(settings.get_value("draw.min_pressure_on",value) && value=="0")
                set_min_pressure_flag(false);
        else
                set_min_pressure_flag(true);
-       
+
        if(settings.get_value("draw.min_pressure",value))
        {
                Real n = atof(value.c_str());
@@ -272,20 +272,20 @@ StateDraw_Context::load_settings()
                Real n = atof(value.c_str());
                set_feather(n);
        }else
-               set_feather(0); 
-       
+               set_feather(0);
+
        if(settings.get_value("draw.gthreshold",value))
        {
                Real n = atof(value.c_str());
                set_gthres(n);
        }
-       
+
        if(settings.get_value("draw.lthreshold",value))
        {
                Real n = atof(value.c_str());
                set_lthres(n);
        }
-       
+
        if(settings.get_value("draw.localize",value) && value == "1")
                set_local_error_flag(true);
        else
@@ -294,7 +294,7 @@ StateDraw_Context::load_settings()
 
 void
 StateDraw_Context::save_settings()
-{      
+{
        settings.set_value("draw.pressure_width",get_pressure_width_flag()?"1":"0");
        settings.set_value("draw.auto_loop",get_auto_loop_flag()?"1":"0");
        settings.set_value("draw.auto_connect",get_auto_connect_flag()?"1":"0");
@@ -303,7 +303,7 @@ StateDraw_Context::save_settings()
        settings.set_value("draw.feather",strprintf("%f",get_feather()));
        settings.set_value("draw.min_pressure_on",get_min_pressure_flag()?"1":"0");
        settings.set_value("draw.gthreshold",strprintf("%f",get_gthres()));
-       settings.set_value("draw.lthreshold",strprintf("%f",get_lthres()));     
+       settings.set_value("draw.lthreshold",strprintf("%f",get_lthres()));
        settings.set_value("draw.localize",get_local_error_flag()?"1":"0");
 }
 
@@ -325,73 +325,73 @@ StateDraw_Context::StateDraw_Context(CanvasView* canvas_view):
        spin_feather(adj_feather,0.01,4),
        adj_globalthres(.70f,0.01,10000,0.01,0.1),
        spin_globalthres(adj_globalthres,0.01,3),
-       adj_localthres(20,1,100000,0.1,1),      
+       adj_localthres(20,1,100000,0.1,1),
        check_localerror(_("LocalError"))
-       
+
 {
        synfig::info("STATE SKETCH: entering state");
 
        nested=0;
        load_settings();
-       
+
        UpdateErrorBox();
-       
-       //options_table.attach(*manage(new Gtk::Label(_("Draw Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);        
+
+       //options_table.attach(*manage(new Gtk::Label(_("Draw Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(checkbutton_pressure_width, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       options_table.attach(checkbutton_auto_loop, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
-       options_table.attach(checkbutton_auto_connect, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); 
-       options_table.attach(checkbutton_region_only, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);  
-       
+       options_table.attach(checkbutton_auto_loop, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(checkbutton_auto_connect, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(checkbutton_region_only, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+
        options_table.attach(check_min_pressure, 0, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_min_pressure, 0, 2, 6, 7, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
-       options_table.attach(*manage(new Gtk::Label(_("Feather"))), 0, 1, 7, 8, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
+       options_table.attach(*manage(new Gtk::Label(_("Feather"))), 0, 1, 7, 8, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_feather, 1, 2, 7, 8, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
-       options_table.attach(check_localerror, 0, 2, 8, 9, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); 
-       options_table.attach(*manage(new Gtk::Label(_("Smooth"))), 0, 1, 9, 10, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
+
+       options_table.attach(check_localerror, 0, 2, 8, 9, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(*manage(new Gtk::Label(_("Smooth"))), 0, 1, 9, 10, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_globalthres, 1, 2, 9, 10, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
-       //options_table.attach(button_fill_last_stroke, 0, 2, 10, 11, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);      
-       
+       //options_table.attach(button_fill_last_stroke, 0, 2, 10, 11, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+
        button_fill_last_stroke.signal_pressed().connect(sigc::mem_fun(*this,&StateDraw_Context::fill_last_stroke));
        check_localerror.signal_toggled().connect(sigc::mem_fun(*this,&StateDraw_Context::UpdateErrorBox));
-       
+
        options_table.show_all();
        refresh_tool_options();
        //App::dialog_tool_options->set_widget(options_table);
        App::dialog_tool_options->present();
-       
-       
+
+
        old_duckmask=get_work_area()->get_type_mask();
        get_work_area()->set_type_mask(Duck::TYPE_ALL-Duck::TYPE_TANGENT-Duck::TYPE_WIDTH);
-       
+
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
 
        // Turn off duck clicking
        get_work_area()->allow_duck_clicks=false;
-       
+
        // clear out the ducks
        //get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        //get_work_area()->queue_draw();
-       
+
        // Hide the tables if they are showing
        prev_table_status=get_canvas_view()->tables_are_visible();
        //if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateDraw_Context::on_user_click));
 
        get_canvas_view()->work_area->set_cursor(Gdk::PENCIL);
 
        App::toolbox->refresh();
-       
+
        refresh_ducks();
 }
 
@@ -409,7 +409,7 @@ void StateDraw_Context::UpdateErrorBox()
                spin_globalthres.set_value(adj_globalthres.get_value());
                spin_globalthres.set_increments(0.01,.1);
        }
-       
+
        spin_globalthres.update();
 }
 
@@ -420,7 +420,7 @@ StateDraw_Context::refresh_tool_options()
        App::dialog_tool_options->set_widget(options_table);
        App::dialog_tool_options->set_local_name(_("Draw Tool"));
        App::dialog_tool_options->set_name("draw");
-       
+
        App::dialog_tool_options->add_button(
                Gtk::StockID("synfig-fill"),
                _("Fill Last Stroke")
@@ -447,7 +447,7 @@ StateDraw_Context::~StateDraw_Context()
        App::dialog_tool_options->clear();
 
        get_work_area()->set_type_mask(old_duckmask);
-       
+
        get_canvas_view()->work_area->reset_cursor();
 
        // Restore layer clicking
@@ -462,7 +462,7 @@ StateDraw_Context::~StateDraw_Context()
 
        // Bring back the tables if they were out before
        if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -494,11 +494,11 @@ StateDraw_Context::event_mouse_down_handler(const Smach::event& x)
                        get_canvas_view()->get_smach().push_state(&state_stroke);
                        return Smach::RESULT_ACCEPT;
                }
-       
+
        case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
                return Smach::RESULT_ACCEPT;
-       
-       default:        
+
+       default:
                return Smach::RESULT_OK;
        }
 }
@@ -522,20 +522,20 @@ struct DepthCounter
 {
        int &i;
        DepthCounter(int &i):i(i) { i++; }
-       ~DepthCounter() { i--; }        
+       ~DepthCounter() { i--; }
 };
 
 Smach::event_result
 StateDraw_Context::event_stroke(const Smach::event& x)
 {
 //     debugclass debugger("StateDraw_Context::event_stroke(const Smach::event& x)");
-               
+
        const EventStroke& event(*reinterpret_cast<const EventStroke*>(&x));
 
        assert(event.stroke_data);
 
        get_work_area()->add_stroke(event.stroke_data,synfigapp::Main::get_foreground_color());
-       
+
        if(nested==0)
        {
                DirtyTrap dirty_trap(get_work_area());
@@ -544,10 +544,10 @@ StateDraw_Context::event_stroke(const Smach::event& x)
                process_queue();
                return result;
        }
-       
+
        stroke_queue.push_back(pair<StrokeData,WidthData>(event.stroke_data,event.width_data));
 
-       return Smach::RESULT_ACCEPT;    
+       return Smach::RESULT_ACCEPT;
 }
 
 bool
@@ -571,7 +571,7 @@ StateDraw_Context::process_stroke(StrokeData stroke_data, WidthData width_data,
 {
 //     debugclass debugger("StateDraw_Context::process_stroke");
        DepthCounter depth_counter(nested);
-       
+
        const float radius(synfigapp::Main::get_bline_width().units(get_canvas()->rend_desc())+(abs(get_work_area()->get_pw())+abs(get_work_area()->get_ph()))*5);
 
 
@@ -585,39 +585,39 @@ StateDraw_Context::process_stroke(StrokeData stroke_data, WidthData width_data,
                        *iter=1.0;
                }
        }
-       
+
        //get_work_area()->add_stroke(event.stroke_data,synfigapp::Main::get_foreground_color());
        //stroke_list.push_back(event.stroke_data);
        //refresh_ducks();
-               
+
        std::list<synfig::BLinePoint> bline;
        bool loop_bline_flag(false);
-       
+
        //Changed by Adrian - use resident class :)
        //synfigapp::convert_stroke_to_bline(bline, *event.stroke_data,*event.width_data, synfigapp::Main::get_bline_width());
        blineconv.width = synfigapp::Main::get_bline_width().units(get_canvas()->rend_desc());
-       
+
        if(get_local_error_flag())
        {
                float pw = get_work_area()->get_pw();
                float ph = get_work_area()->get_ph();
-               
+
                blineconv.pixelwidth = sqrt(pw*pw+ph*ph);
                blineconv.smoothness = get_lthres();
        }else
        {
                blineconv.pixelwidth = 1;
-               blineconv.smoothness = get_gthres();            
+               blineconv.smoothness = get_gthres();
        }
-       
+
        blineconv(bline,*stroke_data,*width_data);
-       
+
        //Postprocess to require minimum pressure
        if(get_min_pressure_flag())
        {
                synfigapp::BLineConverter::EnforceMinWidth(bline,get_min_pressure());
        }
-       
+
        // If the start and end points are similar, then make then the same point
        if(get_auto_loop_flag())
        if(bline.size()>2&&(bline.front().get_vertex()-bline.back().get_vertex()).mag()<=radius)
@@ -632,7 +632,7 @@ StateDraw_Context::process_stroke(StrokeData stroke_data, WidthData width_data,
                        width=bline.back().get_width();
                        bline.pop_back();
                }
-               
+
                if(abs(bline.front().get_tangent1().norm()*tangent.norm().perp())>SIMILAR_TANGENT_THRESHOLD)
                {
                        // If the tangents are not similar, then
@@ -646,9 +646,9 @@ StateDraw_Context::process_stroke(StrokeData stroke_data, WidthData width_data,
                        // to the average of the two
                        bline.front().set_tangent((tangent+bline.front().get_tangent1())*0.5f);
                }
-               
+
                // Add the widths of the two points
-               {       
+               {
                        Real width(bline.front().get_width()+width);
                        width=width<=1?width:1;
                        bline.front().set_width(width);
@@ -678,12 +678,12 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                std::list<synfig::BLinePoint> trans_bline;
                std::list<synfig::BLinePoint>::iterator iter;
                const synfig::TransformStack& transform(get_canvas_view()->get_curr_transform_stack());
-               
+
                for(iter=bline.begin();iter!=bline.end();++iter)
                {
                        BLinePoint bline_point(*iter);
                        Point new_vertex(transform.unperform(bline_point.get_vertex()));
-                       
+
                        bline_point.set_tangent1(
                                transform.unperform(
                                        bline_point.get_tangent1()+bline_point.get_vertex()
@@ -695,9 +695,9 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                                        bline_point.get_tangent2()+bline_point.get_vertex()
                                ) -new_vertex
                        );
-                       
+
                        bline_point.set_vertex(new_vertex);
-                       
+
                        trans_bline.push_back(bline_point);
                }
                value_node=ValueNode_BLine::create(synfig::ValueBase(trans_bline,loop_bline_flag));
@@ -711,10 +711,10 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                bool extend_start=false,extend_finish=false,complete_loop=false;
                bool extend_start_join_same=false,extend_start_join_different=false,extend_finish_join_same=false,extend_finish_join_different=false;
                int start_duck_index,finish_duck_index;
-               
+
                etl::handle<Duck> start_duck(get_work_area()->find_duck(bline.front().get_vertex(),radius,Duck::TYPE_VERTEX));
                etl::handle<Duck> finish_duck(get_work_area()->find_duck(bline.back().get_vertex(),radius,Duck::TYPE_VERTEX));
-               
+
                synfigapp::ValueDesc start_duck_value_desc,finish_duck_value_desc;
                ValueNode_BLine::Handle start_duck_value_node_bline=NULL,finish_duck_value_node_bline=NULL;
 
@@ -783,7 +783,7 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                                // fall through
                        default:break;
                        }
-               }               
+               }
 
                // if the new line's end didn't extend an existing line,
                // check whether it needs to be linked to an existing duck
@@ -868,13 +868,13 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                        return result;
                }
        }
-       
+
        // Create the layer
        {
                Layer::Handle layer;
                Canvas::Handle canvas(get_canvas_view()->get_canvas());
                int depth(0);
-               
+
                // we are temporarily using the layer to hold something
                layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
                if(layer)
@@ -882,16 +882,16 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                        depth=layer->get_depth();
                        canvas=layer->get_canvas();
                }
-               
+
                //int number(synfig::UniqueID().get_uid());
-               
+
                synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
-               
+
                if(get_region_only_flag())
                        layer=get_canvas_interface()->add_layer_to("region",canvas,depth);
                else
                        layer=get_canvas_interface()->add_layer_to("outline",canvas,depth);
-                       
+
                if(get_feather())
                {
                        layer->set_param("feather",get_feather());
@@ -900,21 +900,21 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                assert(layer);
                //layer->set_description(strprintf("Stroke %d",number));
                //get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
-               
-               
-               
+
+
+
                synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
-               
+
                assert(action);
-               
-               action->set_param("canvas",get_canvas());                       
-               action->set_param("canvas_interface",get_canvas_interface());                   
-               action->set_param("layer",layer);                       
+
+               action->set_param("canvas",get_canvas());
+               action->set_param("canvas_interface",get_canvas_interface());
+               action->set_param("layer",layer);
                if(!action->set_param("param",String("bline")))
                        synfig::error("LayerParamConnect didn't like \"param\"");
                if(!action->set_param("value_node",ValueNode::Handle(value_node)))
                        synfig::error("LayerParamConnect didn't like \"value_node\"");
-               
+
                if(!get_canvas_interface()->get_instance()->perform_action(action))
                {
                        get_canvas_view()->get_ui_interface()->error(_("Unable to create layer"));
@@ -925,7 +925,7 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                get_canvas_view()->get_selection_manager()->set_selected_layer(layer);
                //refresh_ducks();
        }
-       
+
        last_stroke=value_node;
        return Smach::RESULT_ACCEPT;
 }
@@ -935,61 +935,61 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
 {
        // Create the action group
        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Define Region"));
-       
+
        std::list<synfigapp::ValueDesc> vertex_list;
-       
+
        // First we need to come up with a rough list of
        // BLinePoints that we are going to be using to
-       // define our region. 
+       // define our region.
        {
                std::list<synfig::BLinePoint>::iterator iter;
                for(iter=bline.begin();iter!=bline.end();++iter)
                {
                        etl::handle<Duck> duck(get_work_area()->find_duck(iter->get_vertex(),0,Duck::TYPE_VERTEX));
-                       
+
                        if(!duck)
                        {
-                               synfig::info(__FILE__":%d: Nothing to enclose!",__LINE__);                              
-                               return Smach::RESULT_OK;                
+                               synfig::info(__FILE__":%d: Nothing to enclose!",__LINE__);
+                               return Smach::RESULT_OK;
                        }
-                       
-                       
+
+
                        assert(duck->get_type()==Duck::TYPE_VERTEX);
-                       
+
                        synfigapp::ValueDesc value_desc(duck->get_value_desc());
-                       
+
                        if(!value_desc)
                        {
-                               synfig::info(__FILE__":%d: Got a hit, but no ValueDesc on this duck",__LINE__);                         
+                               synfig::info(__FILE__":%d: Got a hit, but no ValueDesc on this duck",__LINE__);
                                continue;
                        }
-                       
+
                        switch(value_desc.get_value_type())
                        {
                        case synfig::ValueBase::TYPE_BLINEPOINT:
                                //if(vertex_list.empty() || value_desc!=vertex_list.back())
                                vertex_list.push_back(value_desc);
                                assert(vertex_list.back().is_valid());
-                       
+
                                break;
                        default:
                                break;
                        }
                }
        }
-       
+
        if(vertex_list.size()<=2)
        {
                synfig::info(__FILE__":%d: Vertex list too small to make region.",__LINE__);
-               return Smach::RESULT_OK;                
+               return Smach::RESULT_OK;
        }
 
        assert(vertex_list.back().is_valid());
-       
+
        // Remove any duplicates
        {
        }
-       
+
        // Now we need to clean the list of vertices up
        // a bit. This includes inserting missing vertices
        // and removing extraneous ones.
@@ -1001,22 +1001,22 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                // any updates are performed, we will
                // change it back to false.
                done=true;
-               
+
                std::list<synfigapp::ValueDesc>::iterator prev,iter,next;
                prev=vertex_list.end();prev--;  // Set prev to the last ValueDesc
                next=vertex_list.begin();
                iter=next++; // Set iter to the first value desc, and next to the second
-               
+
                for(;iter!=vertex_list.end();prev=iter,iter=next++)
                {
                        synfigapp::ValueDesc value_prev(*prev);
                        synfigapp::ValueDesc value_desc(*iter);
                        synfigapp::ValueDesc value_next((next==vertex_list.end())?vertex_list.front():*next);
-                       
+
                        assert(value_desc.is_valid());
                        assert(value_next.is_valid());
                        assert(value_prev.is_valid());
-                       
+
                        //synfig::info("-------");
                        //synfig::info(__FILE__":%d: value_prev 0x%08X:%d",__LINE__,value_prev.get_parent_value_node().get(),value_prev.get_index());
                        //synfig::info(__FILE__":%d: value_desc 0x%08X:%d",__LINE__,value_desc.get_parent_value_node().get(),value_desc.get_index());
@@ -1034,9 +1034,9 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                                        done=false;
                                        break;
                                }
-                       }       
+                       }
                        */
-                       
+
                        // Remove duplicate vertices
                        if(value_prev.get_value_node()==value_desc.get_value_node()
                                || value_desc.get_value_node()==value_next.get_value_node())
@@ -1053,7 +1053,7 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                                done=false;
                                break;
                        }
-                       
+
                        if(value_desc.parent_is_value_node() && value_next.parent_is_value_node())
                        if(value_desc.get_parent_value_node()==value_next.get_parent_value_node() && (next!=vertex_list.end()))
                        {
@@ -1073,7 +1073,7 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                                        break;
                                }
                        }
-                       
+
                        // Ensure that connections
                        // between blines are properly
                        // connected
@@ -1087,7 +1087,7 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                                //synfig::info("--------");
                                //synfig::info(__FILE__":%d: vertex: [%f, %f]",__LINE__,vertex.get_vertex()[0],vertex.get_vertex()[1]);
                                //synfig::info(__FILE__":%d: vertex_next: [%f, %f]",__LINE__,vertex_next.get_vertex()[0],vertex_next.get_vertex()[1]);
-                               
+
                                if((vertex.get_vertex()-vertex_next.get_vertex()).mag_squared()<radius*radius)
                                {
                                        DEBUGPOINT();
@@ -1109,29 +1109,29 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                                        *iter=synfigapp::ValueDesc(get_canvas(),value_node->get_id());
                                        vertex_list.erase(next);
                                        done=false;
-                                       break;                                  
+                                       break;
                                }
                                else
                                {
                                        DEBUGPOINT();
                                        bool positive_trend(value_desc.get_index()>value_prev.get_index());
-                                       
+
                                        if(!positive_trend && value_desc.get_index()>0)
                                        {
                                                DEBUGPOINT();
                                                vertex_list.insert(next,synfigapp::ValueDesc(value_desc.get_parent_value_node(),value_desc.get_index()-1));
                                                done=false;
-                                               break;                                  
+                                               break;
                                        }
                                        if(positive_trend && value_desc.get_index()<LinkableValueNode::Handle::cast_static(value_desc.get_value_node())->link_count()-1)
                                        {
                                                DEBUGPOINT();
                                                vertex_list.insert(next,synfigapp::ValueDesc(value_desc.get_parent_value_node(),value_desc.get_index()+1));
                                                done=false;
-                                               break;                                  
+                                               break;
                                        }
                                }
-                               
+
                        }
                }
        }
@@ -1139,21 +1139,21 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
        if(vertex_list.size()<=2)
        {
                synfig::info(__FILE__":%d: Vertex list too small to make region.",__LINE__);
-               return Smach::RESULT_OK;                
+               return Smach::RESULT_OK;
        }
-       
+
        ValueNode_BLine::Handle value_node_bline;
 
        // Now we need to test for the trivial case,
        // which is where all of the vertices
-       // come from one BLine. 
+       // come from one BLine.
        if(vertex_list.front().parent_is_linkable_value_node())
        {
                bool trivial_case(true);
                ValueNode::Handle trivial_case_value_node;
-               
+
                trivial_case_value_node=vertex_list.front().get_parent_value_node();
-               
+
                std::list<synfigapp::ValueDesc>::iterator iter;
                for(iter=vertex_list.begin();iter!=vertex_list.end();++iter)
                {
@@ -1166,7 +1166,7 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                if(trivial_case)
                        value_node_bline=ValueNode_BLine::Handle::cast_dynamic(trivial_case_value_node);
        }
-       
+
        // If we aren't the trivial case,
        // then go ahead and create the new
        // BLine value node
@@ -1174,20 +1174,20 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
        {
                value_node_bline=ValueNode_BLine::create();
 
-               std::list<synfigapp::ValueDesc>::iterator iter;         
+               std::list<synfigapp::ValueDesc>::iterator iter;
                for(iter=vertex_list.begin();iter!=vertex_list.end();++iter)
                {
                        // Ensure that the vertex is exported.
-                       get_canvas_interface()->auto_export(*iter);     
-                       
-                       value_node_bline->add(iter->get_value_node());  
-                       //value_node_bline->add(ValueNode_BLine::ListEntry(iter->get_value_node()));    
+                       get_canvas_interface()->auto_export(*iter);
+
+                       value_node_bline->add(iter->get_value_node());
+                       //value_node_bline->add(ValueNode_BLine::ListEntry(iter->get_value_node()));
                }
-               
+
                value_node_bline->set_loop(true);
        }
 
-       get_canvas_interface()->auto_export(value_node_bline);                  
+       get_canvas_interface()->auto_export(value_node_bline);
 
        // Now we create the region layer
        // Create the layer
@@ -1195,7 +1195,7 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                Layer::Handle layer;
                Canvas::Handle canvas(get_canvas_view()->get_canvas());
                int depth(0);
-               
+
                // we are temporarily using the layer to hold something
                layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
                if(layer)
@@ -1203,9 +1203,9 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                        depth=layer->get_depth();
                        canvas=layer->get_canvas();
                }
-               
+
                synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
-               
+
                layer=get_canvas_interface()->add_layer_to("region",canvas,depth);
                assert(layer);
                layer->set_param("color",synfigapp::Main::get_background_color());
@@ -1217,17 +1217,17 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                get_canvas_interface()->signal_layer_param_changed()(layer,"color");
 
                synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
-               
+
                assert(action);
-               
-               action->set_param("canvas",get_canvas());                       
-               action->set_param("canvas_interface",get_canvas_interface());                   
-               action->set_param("layer",layer);                       
+
+               action->set_param("canvas",get_canvas());
+               action->set_param("canvas_interface",get_canvas_interface());
+               action->set_param("layer",layer);
                if(!action->set_param("param",String("bline")))
                        synfig::error("LayerParamConnect didn't like \"param\"");
                if(!action->set_param("value_node",ValueNode::Handle(value_node_bline)))
                        synfig::error("LayerParamConnect didn't like \"value_node\"");
-               
+
                if(!get_canvas_interface()->get_instance()->perform_action(action))
                {
                        get_canvas_view()->get_ui_interface()->error(_("Unable to create Region layer"));
@@ -1236,7 +1236,7 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                }
                get_canvas_view()->get_selection_manager()->set_selected_layer(layer);
        }
-       
+
        return Smach::RESULT_ACCEPT;
 }
 
@@ -1246,16 +1246,16 @@ StateDraw_Context::refresh_ducks()
        get_canvas_view()->queue_rebuild_ducks();
 /*
        get_work_area()->clear_ducks();
-       
-       
+
+
        std::list< etl::smart_ptr<std::list<synfig::Point> > >::iterator iter;
-       
+
        for(iter=stroke_list.begin();iter!=stroke_list.end();++iter)
        {
                get_work_area()->add_stroke(*iter);
        }
-       
-       get_work_area()->queue_draw();                  
+
+       get_work_area()->queue_draw();
 */
 }
 
@@ -1265,22 +1265,22 @@ StateDraw_Context::extend_bline_from_begin(ValueNode_BLine::Handle value_node,st
 {
        // Create the action group
        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Extend BLine"));
-       
+
        if (complete_loop)
        {
                synfigapp::Action::Handle action(synfigapp::Action::create("value_node_dynamic_list_loop"));
                assert(action);
 
-               action->set_param("canvas",get_canvas());                       
-               action->set_param("canvas_interface",get_canvas_interface());                   
+               action->set_param("canvas",get_canvas());
+               action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle(value_node));
-               
+
                if(!get_canvas_interface()->get_instance()->perform_action(action))
                {
                        get_canvas_view()->get_ui_interface()->error(_("Unable to set loop for bline"));
                        group.cancel();
                        return Smach::RESULT_ERROR;
-               }               
+               }
        }
 
        std::list<synfig::BLinePoint>::reverse_iterator iter;
@@ -1291,23 +1291,23 @@ StateDraw_Context::extend_bline_from_begin(ValueNode_BLine::Handle value_node,st
                ValueNode_Composite::Handle composite(ValueNode_Composite::create(*iter));
 
                synfigapp::Action::Handle action(synfigapp::Action::create("value_node_dynamic_list_insert"));
-               
+
                assert(action);
                synfigapp::ValueDesc value_desc(value_node,0);
-               
-               action->set_param("canvas",get_canvas());                       
-               action->set_param("canvas_interface",get_canvas_interface());                   
+
+               action->set_param("canvas",get_canvas());
+               action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",value_desc);
                if(!action->set_param("item",ValueNode::Handle(composite)))
                        synfig::error("ACTION didn't like \"item\"");
-               
+
                if(!get_canvas_interface()->get_instance()->perform_action(action))
                {
                        get_canvas_view()->get_ui_interface()->error(_("Unable to insert item"));
                        group.cancel();
                        //refresh_ducks();
                        return Smach::RESULT_ERROR;
-               }               
+               }
        }
        last_stroke=value_node;
        return Smach::RESULT_ACCEPT;
@@ -1324,16 +1324,16 @@ StateDraw_Context::extend_bline_from_end(ValueNode_BLine::Handle value_node,std:
                synfigapp::Action::Handle action(synfigapp::Action::create("value_node_dynamic_list_loop"));
                assert(action);
 
-               action->set_param("canvas",get_canvas());                       
-               action->set_param("canvas_interface",get_canvas_interface());                   
+               action->set_param("canvas",get_canvas());
+               action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle(value_node));
-               
+
                if(!get_canvas_interface()->get_instance()->perform_action(action))
                {
                        get_canvas_view()->get_ui_interface()->error(_("Unable to set loop for bline"));
                        group.cancel();
                        return Smach::RESULT_ERROR;
-               }               
+               }
        }
 
        std::list<synfig::BLinePoint>::iterator iter;
@@ -1343,23 +1343,23 @@ StateDraw_Context::extend_bline_from_end(ValueNode_BLine::Handle value_node,std:
                ValueNode_Composite::Handle composite(ValueNode_Composite::create(*iter));
 
                synfigapp::Action::Handle action(synfigapp::Action::create("value_node_dynamic_list_insert"));
-               
+
                assert(action);
                synfigapp::ValueDesc value_desc(value_node,value_node->link_count());
-               
-               action->set_param("canvas",get_canvas());                       
-               action->set_param("canvas_interface",get_canvas_interface());                   
+
+               action->set_param("canvas",get_canvas());
+               action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",value_desc);
                if(!action->set_param("item",ValueNode::Handle(composite)))
                        synfig::error("ACTION didn't like \"item\"");
-               
+
                if(!get_canvas_interface()->get_instance()->perform_action(action))
                {
                        get_canvas_view()->get_ui_interface()->error(_("Unable to insert item"));
                        group.cancel();
                        //refresh_ducks();
                        return Smach::RESULT_ERROR;
-               }               
+               }
        }
        last_stroke=value_node;
        return Smach::RESULT_ACCEPT;
@@ -1369,7 +1369,7 @@ void
 StateDraw_Context::reverse_bline(std::list<synfig::BLinePoint> &bline)
 {
        int i;
-       
+
        std::list<synfig::BLinePoint>::iterator iter,eiter;
        iter=bline.begin();
        eiter=bline.end();
@@ -1387,31 +1387,31 @@ StateDraw_Context::fill_last_stroke()
 {
        if(!last_stroke)
                return;
-       
+
        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Fill Stroke"));
 
        Layer::Handle layer;
-       
-       get_canvas_interface()->auto_export(last_stroke);                       
+
+       get_canvas_interface()->auto_export(last_stroke);
 
        synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
-       
+
        layer=get_canvas_interface()->add_layer("region");
        assert(layer);
        layer->set_param("color",synfigapp::Main::get_background_color());
 
        synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
-       
+
        assert(action);
-       
-       action->set_param("canvas",get_canvas());                       
-       action->set_param("canvas_interface",get_canvas_interface());                   
-       action->set_param("layer",layer);                       
+
+       action->set_param("canvas",get_canvas());
+       action->set_param("canvas_interface",get_canvas_interface());
+       action->set_param("layer",layer);
        if(!action->set_param("param",String("segment_list")))
                synfig::error("LayerParamConnect didn't like \"param\"");
        if(!action->set_param("value_node",ValueNode::Handle(last_stroke)))
                synfig::error("LayerParamConnect didn't like \"value_node\"");
-       
+
        if(!get_canvas_interface()->get_instance()->perform_action(action))
        {
                get_canvas_view()->get_ui_interface()->error(_("Unable to create Region layer"));
index ce0c15d..9e59337 100644 (file)
@@ -48,7 +48,7 @@ public:
 }; // END of class StateDraw
 
 extern StateDraw state_draw;
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index e32f494..154289d 100644 (file)
@@ -61,7 +61,7 @@ class studio::StateEyedrop_Context
 public:
        StateEyedrop_Context(CanvasView *canvas_view);
        ~StateEyedrop_Context();
-       
+
        Smach::event_result event_stop_handler(const Smach::event& x);
 
        Smach::event_result event_refresh_handler(const Smach::event& x);
@@ -85,7 +85,7 @@ StateEyedrop::StateEyedrop():
        insert(event_def(EVENT_STOP,&StateEyedrop_Context::event_stop_handler));
        insert(event_def(EVENT_REFRESH,&StateEyedrop_Context::event_refresh_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateEyedrop_Context::event_workarea_mouse_button_down_handler));
-}      
+}
 
 StateEyedrop::~StateEyedrop()
 {
@@ -97,7 +97,7 @@ StateEyedrop_Context::StateEyedrop_Context(CanvasView *canvas_view):
 {
        synfig::info("Enterted Eyedrop State");
        canvas_view->work_area->set_cursor(Gdk::Cursor(Gdk::CROSSHAIR));
-       
+
        App::toolbox->refresh();
 }
 
index 4b7b4bb..246e18b 100644 (file)
@@ -36,8 +36,8 @@
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
-namespace studio { 
-       
+namespace studio {
+
 class StateEyedrop_Context;
 
 class StateEyedrop : public Smach::state<StateEyedrop_Context>
index 5da8db2..fead029 100644 (file)
@@ -61,7 +61,7 @@ class studio::StateFill_Context
 public:
        StateFill_Context(CanvasView *canvas_view);
        ~StateFill_Context();
-       
+
        Smach::event_result event_stop_handler(const Smach::event& x);
 
        Smach::event_result event_refresh_handler(const Smach::event& x);
@@ -92,7 +92,7 @@ StateFill::StateFill():
        insert(event_def(EVENT_STOP,&StateFill_Context::event_stop_handler));
        insert(event_def(EVENT_REFRESH,&StateFill_Context::event_refresh_handler));
        insert(event_def(EVENT_WORKAREA_LAYER_CLICKED,&StateFill_Context::event_workarea_layer_clicked_handler));
-}      
+}
 
 StateFill::~StateFill()
 {
@@ -104,7 +104,7 @@ StateFill_Context::StateFill_Context(CanvasView *canvas_view):
 {
        synfig::info("Enterted Fill State");
        canvas_view->work_area->set_cursor(Gdk::CROSSHAIR);
-       
+
        App::toolbox->refresh();
 }
 
@@ -144,7 +144,7 @@ StateFill_Context::event_workarea_layer_clicked_handler(const Smach::event& x)
                return Smach::RESULT_ACCEPT;
        }
 
-       
+
        //synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_set"));
        synfigapp::ValueDesc value_desc(event.layer,"color");
 
@@ -155,17 +155,17 @@ StateFill_Context::event_workarea_layer_clicked_handler(const Smach::event& x)
        }
        /*
        assert(action);
-       
-       action->set_param("canvas",get_canvas());                       
-       action->set_param("canvas_interface",get_canvas_interface());                   
+
+       action->set_param("canvas",get_canvas());
+       action->set_param("canvas_interface",get_canvas_interface());
        action->set_param("value_desc",value_desc);
        action->set_param("time",get_canvas_interface()->get_time());
-       //action->set_param("layer",event.layer);                       
+       //action->set_param("layer",event.layer);
        //if(!action->set_param("param",String("color")))
        //      synfig::error("LayerParamConnect didn't like \"param\"");
        if(!action->set_param("new_value",ValueBase(synfigapp::Main::get_foreground_color())))
                synfig::error("LayerParamConnect didn't like \"foreground_color\"");
-       
+
        if(!get_canvas_interface()->get_instance()->perform_action(action))
        {
                get_canvas_view()->get_ui_interface()->warning(_("Unable to set layer color"));
index 7273c80..a086e10 100644 (file)
@@ -36,8 +36,8 @@
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
-namespace studio { 
-       
+namespace studio {
+
 class StateFill_Context;
 
 class StateFill : public Smach::state<StateFill_Context>
index 960f1a1..6863bd9 100644 (file)
@@ -80,31 +80,31 @@ class studio::StateGradient_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        Duckmatic::Push duckmatic_push;
-       
+
        synfigapp::Settings& settings;
 
        Point point_holder;
-       
+
        etl::handle<Duck> point2_duck;
 
        void refresh_ducks();
 
        bool prev_workarea_layer_status_;
-       
+
        Gtk::Table options_table;
        Gtk::Entry entry_id;
        Widget_Enum enum_type;
        Widget_Enum     enum_blend;
-       
+
 public:
        synfig::String get_id()const { return entry_id.get_text(); }
        void set_id(const synfig::String& x) { return entry_id.set_text(x); }
 
        int get_type()const { return enum_type.get_value(); }
        void set_type(int x) { return enum_type.set_value(x); }
-       
+
        int get_blend()const { return enum_blend.get_value(); }
        void set_blend(int x) { return enum_blend.set_value(x); }
 
@@ -125,13 +125,13 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //void on_user_click(synfig::Point point);
        void load_settings();
        void save_settings();
        void reset();
        void increment_id();
-       
+
        void make_gradient(const Point& p1, const Point& p2);
        bool no_egress_on_selection_change;
        Smach::event_result event_layer_selection_changed_handler(const Smach::event& x)
@@ -157,7 +157,7 @@ StateGradient::StateGradient():
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DRAG,&StateGradient_Context::event_mouse_click_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_UP,&StateGradient_Context::event_mouse_click_handler));
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateGradient_Context::event_refresh_tool_options));
-}      
+}
 
 StateGradient::~StateGradient()
 {
@@ -165,19 +165,19 @@ StateGradient::~StateGradient()
 
 void
 StateGradient_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("gradient.id",value))
                set_id(value);
        else
                set_id("Gradient");
-       
+
        if(settings.get_value("gradient.type",value))
                set_type(atoi(value.c_str()));
        else
                set_type(GRADIENT_INTERPOLATION_LINEAR);
-       
+
        if(settings.get_value("gradient.blend",value))
                set_blend(atoi(value.c_str()));
        else
@@ -186,7 +186,7 @@ StateGradient_Context::load_settings()
 
 void
 StateGradient_Context::save_settings()
-{      
+{
        settings.set_value("gradient.id",get_id().c_str());
        settings.set_value("gradient.type",strprintf("%d",get_type()));
        settings.set_value("gradient.blend",strprintf("%d",get_blend()));
@@ -204,10 +204,10 @@ StateGradient_Context::increment_id()
        String id(get_id());
        int number=1;
        int digits=0;
-       
+
        if(id.empty())
                id="Gradient";
-       
+
        // If there is a number
        // already at the end of the
        // id, then remove it.
@@ -215,11 +215,11 @@ StateGradient_Context::increment_id()
        {
                // figure out how many digits it is
                for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
-               
+
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
                id=String(id,0,id.size()-digits);
-               
+
                number=atoi(str_number.c_str());
        }
        else
@@ -227,15 +227,15 @@ StateGradient_Context::increment_id()
                number=1;
                digits=3;
        }
-       
+
        number++;
-       
+
        // Add the number back onto the id
        {
                const String format(strprintf("%%0%dd",digits));
                id+=strprintf(format.c_str(),number);
        }
-       
+
        // Set the ID
        set_id(id);
 }
@@ -250,7 +250,7 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view):
 {
        no_egress_on_selection_change=false;
        // Set up the tool options dialog
-       ///options_table.attach(*manage(new Gtk::Label(_("Gradient Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);   
+       ///options_table.attach(*manage(new Gtk::Label(_("Gradient Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        enum_type.set_param_desc(ParamDesc("type")
@@ -261,11 +261,11 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view):
                .add_enum_value(GRADIENT_RADIAL,"radial",_("Radial"))
                .add_enum_value(GRADIENT_CONICAL,"conical",_("Conical"))
                .add_enum_value(GRADIENT_SPIRAL,"spiral",_("Spiral")));
-       
+
        enum_blend.set_param_desc(ParamDesc(Color::BLEND_COMPOSITE,"blend_method")
                .set_local_name(_("Blend Method"))
                .set_description(_("The blend method the gradient will use")));
-       
+
        load_settings();
 
        options_table.attach(enum_type, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
@@ -280,21 +280,21 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view):
        get_work_area()->allow_layer_clicks=false;
 
        get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
-       
+
        // clear out the ducks
        get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
-       
+
        get_work_area()->refresh_cursor();
-       
+
        // Hide the tables if they are showing
        get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        //get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateGradient_Context::on_user_click));
 
@@ -334,7 +334,7 @@ StateGradient_Context::~StateGradient_Context()
 
        // Bring back the tables if they were out before
        //if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -365,10 +365,10 @@ StateGradient_Context::make_gradient(const Point& _p1, const Point& _p2)
        synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
 
        Layer::Handle layer;
-       
+
        Canvas::Handle canvas(get_canvas_view()->get_canvas());
        int depth(0);
-       
+
        // we are temporarily using the layer to hold something
        layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
        if(layer)
@@ -383,7 +383,7 @@ StateGradient_Context::make_gradient(const Point& _p1, const Point& _p2)
        switch(get_type())
        {
        case GRADIENT_INTERPOLATION_LINEAR:
-               
+
                layer=get_canvas_interface()->add_layer_to("linear_gradient",canvas,depth);
                layer->set_param("p1",p1);
                get_canvas_interface()->signal_layer_param_changed()(layer,"p1");
@@ -423,13 +423,13 @@ StateGradient_Context::make_gradient(const Point& _p1, const Point& _p2)
        default:
                return;
        }
-       
+
        layer->set_param("blend_method",get_blend());
        get_canvas_interface()->signal_layer_param_changed()(layer,"blend_method");
-       
+
        layer->set_description(get_id());
        get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
-       
+
        no_egress_on_selection_change=true;
        get_canvas_interface()->get_selection_manager()->clear_selected_layers();
        get_canvas_interface()->get_selection_manager()->set_selected_layer(layer);
@@ -443,7 +443,7 @@ Smach::event_result
 StateGradient_Context::event_mouse_click_handler(const Smach::event& x)
 {
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
-       
+
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DOWN && event.button==BUTTON_LEFT)
        {
                point_holder=get_work_area()->snap_point_to_grid(event.pos);
@@ -457,7 +457,7 @@ StateGradient_Context::event_mouse_click_handler(const Smach::event& x)
                point2_duck->set_point(point_holder);
                point2_duck->set_name("p2");
                point2_duck->set_type(Duck::TYPE_POSITION);
-               get_work_area()->add_duck(point2_duck);         
+               get_work_area()->add_duck(point2_duck);
 
                handle<Duckmatic::Bezier> bezier(new Duckmatic::Bezier());
                bezier->p1=bezier->c1=duck;
@@ -470,7 +470,7 @@ StateGradient_Context::event_mouse_click_handler(const Smach::event& x)
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT)
        {
                point2_duck->set_point(get_work_area()->snap_point_to_grid(event.pos));
-               get_work_area()->queue_draw();                  
+               get_work_area()->queue_draw();
                return Smach::RESULT_ACCEPT;
        }
 
@@ -489,5 +489,5 @@ void
 StateGradient_Context::refresh_ducks()
 {
        get_work_area()->clear_ducks();
-       get_work_area()->queue_draw();                  
+       get_work_area()->queue_draw();
 }
index 0072e55..baacc72 100644 (file)
@@ -57,16 +57,16 @@ using namespace studio;
 class studio::StateNormal_Context : public sigc::trackable
 {
        CanvasView *canvas_view;
-       
+
        CanvasView* get_canvas_view() { return canvas_view; }
        Canvas::Handle get_canvas() { return canvas_view->get_canvas(); }
        WorkArea* get_work_area() { return canvas_view->get_work_area(); }
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface() { return canvas_view->canvas_interface(); }
-       
+
 public:
        StateNormal_Context(CanvasView *canvas_view);
        ~StateNormal_Context();
-       
+
        Smach::event_result event_stop_handler(const Smach::event& x);
 
        Smach::event_result event_refresh_handler(const Smach::event& x);
@@ -108,9 +108,9 @@ StateNormal::StateNormal():
        insert(event_def(EVENT_REDO,&StateNormal_Context::event_redo_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateNormal_Context::event_mouse_button_down_handler));
        insert(event_def(EVENT_WORKAREA_MULTIPLE_DUCKS_CLICKED,&StateNormal_Context::event_multiple_ducks_clicked_handler));
-       insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateNormal_Context::event_refresh_tool_options)); 
-       insert(event_def(EVENT_WORKAREA_LAYER_CLICKED,&StateNormal_Context::event_layer_click));        
-}      
+       insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateNormal_Context::event_refresh_tool_options));
+       insert(event_def(EVENT_WORKAREA_LAYER_CLICKED,&StateNormal_Context::event_layer_click));
+}
 
 StateNormal::~StateNormal()
 {
@@ -203,7 +203,7 @@ Smach::event_result
 StateNormal_Context::event_layer_click(const Smach::event& x)
 {
        const EventLayerClick& event(*reinterpret_cast<const EventLayerClick*>(&x));
-       
+
        if(event.layer)
        {
                synfig::info("STATE NORMAL: Received layer click Event, \"%s\"",event.layer->get_name().c_str());
@@ -212,7 +212,7 @@ StateNormal_Context::event_layer_click(const Smach::event& x)
        {
                synfig::info("STATE NORMAL: Received layer click Event with an empty layer.");
        }
-       
+
        switch(event.button)
        {
        case BUTTON_LEFT:
@@ -257,12 +257,12 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
        widget_waypoint_model.show();
 
        dialog.get_vbox()->pack_start(widget_waypoint_model);
-       
-       
+
+
        dialog.add_button(Gtk::StockID("gtk-apply"),1);
        dialog.add_button(Gtk::StockID("gtk-cancel"),0);
        dialog.show();
-       
+
        DEBUGPOINT();
        if(dialog.run()==0)
                return;
@@ -273,12 +273,12 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
        for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)
        {
                synfigapp::ValueDesc value_desc(*iter);
-               
+
                if(!value_desc.is_valid())
                        continue;
 
                ValueNode_Animated::Handle value_node;
-               
+
                // If this value isn't a ValueNode_Animated, but
                // it is somewhat constant, then go ahead and convert
                // it to a ValueNode_Animated.
@@ -289,11 +289,11 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
                                value=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())->get_value();
                        else
                                value=value_desc.get_value();
-                       
+
                        value_node=ValueNode_Animated::create(value,get_canvas()->get_time());
-                       
+
                        synfigapp::Action::Handle action;
-                       
+
                        if(!value_desc.is_value_node())
                        {
                                action=synfigapp::Action::create("value_desc_connect");
@@ -306,11 +306,11 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
                                action->set_param("dest",value_desc.get_value_node());
                                action->set_param("src",ValueNode::Handle(value_node));
                        }
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
-                       
-       
+
+
                        if(!get_canvas_interface()->get_instance()->perform_action(action))
                        {
                                get_canvas_view()->get_ui_interface()->error(_("Unable to convert to animated waypoint"));
@@ -323,11 +323,11 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
                        if(value_desc.is_value_node())
                                value_node=ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node());
                }
-               
-               
+
+
                if(value_node)
                {
-                       
+
                        synfigapp::Action::Handle action(synfigapp::Action::create("waypoint_set_smart"));
 
                        if(!action)
@@ -336,14 +336,14 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
                                group.cancel();
                                return;
                        }
-                               
 
-                       action->set_param("canvas",get_canvas());                       
-                       action->set_param("canvas_interface",get_canvas_interface());                   
-                       action->set_param("value_node",ValueNode::Handle(value_node));                  
-                       action->set_param("time",get_canvas()->get_time());                                             
+
+                       action->set_param("canvas",get_canvas());
+                       action->set_param("canvas_interface",get_canvas_interface());
+                       action->set_param("value_node",ValueNode::Handle(value_node));
+                       action->set_param("time",get_canvas()->get_time());
                        action->set_param("model",widget_waypoint_model.get_waypoint_model());
-               
+
                        if(!get_canvas_interface()->get_instance()->perform_action(action))
                        {
                                get_canvas_view()->get_ui_interface()->error(_("Unable to set a specific waypoint"));
@@ -357,7 +357,7 @@ StateNormal_Context::edit_several_waypoints(std::list<synfigapp::ValueDesc> valu
                        //group.cancel();
                        //return;
                }
-                       
+
        }
 }
 */
@@ -370,17 +370,17 @@ StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x)
        //const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
 
        std::list<synfigapp::ValueDesc> value_desc_list;
-       
+
        // Create a list of value_descs associated with selection
        const DuckList selected_ducks(get_work_area()->get_selected_ducks());
        DuckList::const_iterator iter;
        for(iter=selected_ducks.begin();iter!=selected_ducks.end();++iter)
        {
                synfigapp::ValueDesc value_desc((*iter)->get_value_desc());
-               
+
                if(!value_desc.is_valid())
                        continue;
-               
+
                if(value_desc.get_value_type()==ValueBase::TYPE_BLINEPOINT && value_desc.is_value_node() && ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node()))
                {
                        value_desc_list.push_back(
@@ -395,9 +395,9 @@ StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x)
        }
 
        Gtk::Menu *menu=manage(new Gtk::Menu());
-       
+
        canvas_view->get_instance()->make_param_menu(menu,canvas_view->get_canvas(),value_desc_list);
-       
+
        /*
        synfigapp::Action::ParamList param_list;
        param_list=get_canvas_interface()->generate_param_list(value_desc_list);
index 9b89f1b..dea92d4 100644 (file)
@@ -36,8 +36,8 @@
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
-namespace studio { 
-       
+namespace studio {
+
 class StateNormal_Context;
 
 class StateNormal : public Smach::state<StateNormal_Context>
index 19b26cd..7d2883b 100644 (file)
@@ -68,18 +68,18 @@ class studio::StatePolygon_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        bool prev_table_status;
        bool prev_workarea_layer_status_;
 
        Gtk::Menu menu;
 
        Duckmatic::Push duckmatic_push;
-       
+
        std::list<synfig::Point> polygon_point_list;
        synfigapp::Settings& settings;
 
-       
+
        bool on_polygon_duck_change(const synfig::Point &point, std::list<synfig::Point>::iterator iter);
 
 
@@ -87,7 +87,7 @@ class studio::StatePolygon_Context : public sigc::trackable
 
 
        void refresh_ducks();
-       
+
        Gtk::Table options_table;
        Gtk::Entry entry_id;
        Gtk::Button button_make;
@@ -112,7 +112,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //void on_user_click(synfig::Point point);
        void load_settings();
        void save_settings();
@@ -140,7 +140,7 @@ StatePolygon::StatePolygon():
        insert(event_def(EVENT_REFRESH_DUCKS,&StatePolygon_Context::event_refresh_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StatePolygon_Context::event_mouse_click_handler));
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StatePolygon_Context::event_refresh_tool_options));
-}      
+}
 
 StatePolygon::~StatePolygon()
 {
@@ -148,7 +148,7 @@ StatePolygon::~StatePolygon()
 
 void
 StatePolygon_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("polygon.id",value))
@@ -159,7 +159,7 @@ StatePolygon_Context::load_settings()
 
 void
 StatePolygon_Context::save_settings()
-{      
+{
        settings.set_value("polygon.id",get_id().c_str());
 }
 
@@ -176,10 +176,10 @@ StatePolygon_Context::increment_id()
        String id(get_id());
        int number=1;
        int digits=0;
-       
+
        if(id.empty())
                id="Polygon";
-       
+
        // If there is a number
        // already at the end of the
        // id, then remove it.
@@ -187,11 +187,11 @@ StatePolygon_Context::increment_id()
        {
                // figure out how many digits it is
                for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
-               
+
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
                id=String(id,0,id.size()-digits);
-               
+
                number=atoi(str_number.c_str());
        }
        else
@@ -199,15 +199,15 @@ StatePolygon_Context::increment_id()
                number=1;
                digits=3;
        }
-       
+
        number++;
-       
+
        // Add the number back onto the id
        {
                const String format(strprintf("%%0%dd",digits));
                id+=strprintf(format.c_str(),number);
        }
-       
+
        // Set the ID
        set_id(id);
 }
@@ -223,11 +223,11 @@ StatePolygon_Context::StatePolygon_Context(CanvasView* canvas_view):
 {
        no_egress_on_selection_change=false;
        load_settings();
-       
+
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Polygon Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);     
+       //options_table.attach(*manage(new Gtk::Label(_("Polygon Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       //options_table.attach(button_make, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
+       //options_table.attach(button_make, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        button_make.signal_pressed().connect(sigc::mem_fun(*this,&StatePolygon_Context::run));
        options_table.show_all();
        refresh_tool_options();
@@ -236,22 +236,22 @@ StatePolygon_Context::StatePolygon_Context(CanvasView* canvas_view):
 
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
-       
+
        // clear out the ducks
        get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
        get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
-       
+
        // Hide the tables if they are showing
        prev_table_status=get_canvas_view()->tables_are_visible();
        if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StatePolygon_Context::on_user_click));
 
@@ -313,7 +313,7 @@ StatePolygon_Context::~StatePolygon_Context()
 
        // Bring back the tables if they were out before
        if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -327,7 +327,7 @@ StatePolygon_Context::event_stop_handler(const Smach::event& x)
        //throw Smach::egress_exception();
        reset();
        return Smach::RESULT_ACCEPT;
-       
+
 }
 
 Smach::event_result
@@ -343,7 +343,7 @@ StatePolygon_Context::run()
 {
        if(polygon_point_list.empty())
                return;
-       
+
        if(polygon_point_list.size()<3)
        {
                get_canvas_view()->get_ui_interface()->error("You need at least 3 points to create a polygon");
@@ -352,7 +352,7 @@ StatePolygon_Context::run()
                Layer::Handle layer;
                Canvas::Handle canvas(get_canvas_view()->get_canvas());
                int depth(0);
-               
+
                // we are temporarily using the layer to hold something
                layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
                if(layer)
@@ -364,11 +364,11 @@ StatePolygon_Context::run()
                {
                        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("New Polygon"));
                        synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
-       
+
                        Layer::Handle layer(get_canvas_interface()->add_layer_to("polygon",canvas,depth));
                        layer->set_description(get_id());
                        get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
-                       
+
                        layer->disconnect_dynamic_param("vector_list");
                        if(!layer->set_param("vector_list",polygon_point_list))
                        {
@@ -376,13 +376,13 @@ StatePolygon_Context::run()
                                get_canvas_view()->get_ui_interface()->error("Unable to set layer parameter");
                                return;
                        }
-                       
+
                        {
                                synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_convert"));
                                synfigapp::ValueDesc value_desc(layer,"vector_list");
-                               action->set_param("canvas",get_canvas());                       
-                               action->set_param("canvas_interface",get_canvas_interface());                   
-                               action->set_param("value_desc",value_desc);                     
+                               action->set_param("canvas",get_canvas());
+                               action->set_param("canvas_interface",get_canvas_interface());
+                               action->set_param("value_desc",value_desc);
                                action->set_param("type","dynamic_list");
                                if(!get_canvas_interface()->get_instance()->perform_action(action))
                                {
@@ -390,7 +390,7 @@ StatePolygon_Context::run()
                                        get_canvas_view()->get_ui_interface()->error("Unable to execute action \"value_desc_convert\"");
                                        return;
                                }
-                       }                       
+                       }
                        no_egress_on_selection_change=true;
                        get_canvas_interface()->get_selection_manager()->clear_selected_layers();
                        get_canvas_interface()->get_selection_manager()->set_selected_layer(layer);
@@ -422,11 +422,11 @@ StatePolygon_Context::event_mouse_click_handler(const Smach::event& x)
                polygon_point_list.push_back(get_work_area()->snap_point_to_grid(event.pos));
                refresh_ducks();
                return Smach::RESULT_ACCEPT;
-       
+
        case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
                return Smach::RESULT_ACCEPT;
-       
-       default:        
+
+       default:
                return Smach::RESULT_OK;
        }
 }
@@ -436,11 +436,11 @@ void
 StatePolygon_Context::refresh_ducks()
 {
        get_work_area()->clear_ducks();
-       
+
        if(polygon_point_list.empty()) return;
 
        std::list<synfig::Point>::iterator iter=polygon_point_list.begin();
-       
+
        etl::handle<WorkArea::Duck> duck;
        duck=new WorkArea::Duck(*iter);
        duck->set_editable(true);
@@ -448,7 +448,7 @@ StatePolygon_Context::refresh_ducks()
                sigc::bind(sigc::mem_fun(*this,&studio::StatePolygon_Context::on_polygon_duck_change),iter)
        );
        duck->signal_user_click(0).connect(sigc::mem_fun(*this,&StatePolygon_Context::run));
-       
+
        get_work_area()->add_duck(duck);
 
        for(++iter;iter!=polygon_point_list.end();++iter)
@@ -461,14 +461,14 @@ StatePolygon_Context::refresh_ducks()
                duck->set_name(strprintf("%x",&*iter));
                duck->signal_edited().connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StatePolygon_Context::on_polygon_duck_change),iter)
-               );              
+               );
 
-               get_work_area()->add_duck(duck);                        
+               get_work_area()->add_duck(duck);
 
                bezier->p2=bezier->c2=duck;
-               get_work_area()->add_bezier(bezier);                    
+               get_work_area()->add_bezier(bezier);
        }
-       get_work_area()->queue_draw();                  
+       get_work_area()->queue_draw();
 }
 
 
index efb10c5..b0a32e2 100644 (file)
@@ -70,30 +70,30 @@ class studio::StateRectangle_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        Duckmatic::Push duckmatic_push;
-       
+
        Point point_holder;
-       
+
        etl::handle<Duck> point2_duck;
 
        void refresh_ducks();
-       
+
        bool prev_workarea_layer_status_;
-               
+
        //Toolbox settings
        synfigapp::Settings& settings;
-       
+
        //Toolbox display
        Gtk::Table options_table;
-       
+
        Gtk::Entry              entry_id; //what to name the layer
-               
+
        Gtk::Adjustment adj_expand;
        Gtk::SpinButton spin_expand;
-       
+
        Gtk::CheckButton check_invert;
-       
+
 public:
 
        synfig::String get_id()const { return entry_id.get_text(); }
@@ -101,11 +101,11 @@ public:
 
        Real get_expand()const { return adj_expand.get_value(); }
        void set_expand(Real f) { adj_expand.set_value(f); }
-       
+
        bool get_invert()const { return check_invert.get_active(); }
        void set_invert(bool i) { check_invert.set_active(i); }
-       
-       void refresh_tool_options(); //to refresh the toolbox   
+
+       void refresh_tool_options(); //to refresh the toolbox
 
        //events
        Smach::event_result event_stop_handler(const Smach::event& x);
@@ -122,7 +122,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //Modifying settings etc.
        void load_settings();
        void save_settings();
@@ -137,7 +137,7 @@ public:
        }
 
        void make_rectangle(const Point& p1, const Point& p2);
-       
+
 };     // END of class StateGradient_Context
 
 /* === M E T H O D S ======================================================= */
@@ -161,9 +161,9 @@ StateRectangle::~StateRectangle()
 
 void
 StateRectangle_Context::load_settings()
-{      
+{
        String value;
-       
+
        //parse the arguments yargh!
        if(settings.get_value("rectangle.id",value))
                set_id(value);
@@ -174,7 +174,7 @@ StateRectangle_Context::load_settings()
                set_expand(atof(value.c_str()));
        else
                set_expand(0);
-       
+
        if(settings.get_value("rectangle.invert",value) && value != "0")
                set_invert(true);
        else
@@ -183,7 +183,7 @@ StateRectangle_Context::load_settings()
 
 void
 StateRectangle_Context::save_settings()
-{      
+{
        settings.set_value("rectangle.id",get_id().c_str());
        settings.set_value("rectangle.expand",strprintf("%f",get_expand()));
        settings.set_value("rectangle.invert",get_invert()?"1":"0");
@@ -201,10 +201,10 @@ StateRectangle_Context::increment_id()
        String id(get_id());
        int number=1;
        int digits=0;
-       
+
        if(id.empty())
                id="Circle";
-       
+
        // If there is a number
        // already at the end of the
        // id, then remove it.
@@ -212,11 +212,11 @@ StateRectangle_Context::increment_id()
        {
                // figure out how many digits it is
                for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
-               
+
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
                id=String(id,0,id.size()-digits);
-               
+
                number=atoi(str_number.c_str());
        }
        else
@@ -224,15 +224,15 @@ StateRectangle_Context::increment_id()
                number=1;
                digits=3;
        }
-       
+
        number++;
-       
+
        // Add the number back onto the id
        {
                const String format(strprintf("%%0%dd",digits));
                id+=strprintf(format.c_str(),number);
        }
-       
+
        // Set the ID
        set_id(id);
 }
@@ -250,30 +250,30 @@ StateRectangle_Context::StateRectangle_Context(CanvasView* canvas_view):
 {
        no_egress_on_selection_change=false;
        load_settings();
-       
+
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Circle Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);      
+       //options_table.attach(*manage(new Gtk::Label(_("Circle Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        //expand stuff
        options_table.attach(*manage(new Gtk::Label(_("Expansion:"))), 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_expand, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-               
+
        //invert flag
        options_table.attach(check_invert, 1, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        options_table.show_all();
-       
+
        //App::dialog_tool_options->set_widget(options_table);
        refresh_tool_options();
        App::dialog_tool_options->present();
 
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
-       
+
        // clear out the ducks
        get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -282,10 +282,10 @@ StateRectangle_Context::StateRectangle_Context(CanvasView* canvas_view):
        // Hide the tables if they are showing
        //prev_table_status=get_canvas_view()->tables_are_visible();
        //if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        //get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateRectangle_Context::on_user_click));
 
@@ -325,7 +325,7 @@ StateRectangle_Context::~StateRectangle_Context()
 
        // Bring back the tables if they were out before
        //if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -352,10 +352,10 @@ StateRectangle_Context::make_rectangle(const Point& _p1, const Point& _p2)
        synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
 
        Layer::Handle layer;
-       
+
        Canvas::Handle canvas(get_canvas_view()->get_canvas());
        int depth(0);
-       
+
        // we are temporarily using the layer to hold something
        layer=get_canvas_view()->get_selection_manager()->get_selected_layer();
        if(layer)
@@ -370,19 +370,19 @@ StateRectangle_Context::make_rectangle(const Point& _p1, const Point& _p2)
        const synfig::TransformStack& transform(get_canvas_view()->get_curr_transform_stack());
        const Point p1(transform.unperform(_p1));
        const Point p2(transform.unperform(_p2));
-       
+
        //set all the parameters
        layer->set_param("point1",p1);
        get_canvas_interface()->signal_layer_param_changed()(layer,"point1");
        layer->set_param("point2",p2);
        get_canvas_interface()->signal_layer_param_changed()(layer,"point2");
-       
+
        layer->set_param("expand",get_expand());
        get_canvas_interface()->signal_layer_param_changed()(layer,"expand");
 
        layer->set_param("invert",get_invert());
        get_canvas_interface()->signal_layer_param_changed()(layer,"invert");
-       
+
        //name
        layer->set_description(get_id());
        get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
@@ -401,7 +401,7 @@ Smach::event_result
 StateRectangle_Context::event_mouse_click_handler(const Smach::event& x)
 {
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
-       
+
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DOWN && event.button==BUTTON_LEFT)
        {
                point_holder=get_work_area()->snap_point_to_grid(event.pos);
@@ -424,7 +424,7 @@ StateRectangle_Context::event_mouse_click_handler(const Smach::event& x)
        if(event.key==EVENT_WORKAREA_MOUSE_BUTTON_DRAG && event.button==BUTTON_LEFT)
        {
                point2_duck->set_point(get_work_area()->snap_point_to_grid(event.pos));
-               get_work_area()->queue_draw();                  
+               get_work_area()->queue_draw();
                return Smach::RESULT_ACCEPT;
        }
 
index 63302ef..a5cc74c 100644 (file)
@@ -48,7 +48,7 @@ public:
 }; // END of class StateRectangle
 
 extern StateRectangle state_rectangle;
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 4d96ed7..3f84b4e 100644 (file)
@@ -83,11 +83,11 @@ class DuckDrag_Rotate : public DuckDrag_Base
        Real original_mag;
 
        std::vector<synfig::Vector> positions;
-       
-       
+
+
        bool bad_drag;
        bool move_only;
-       
+
 public:
        etl::handle<CanvasView> canvas_view_;
        bool use_magnitude;
@@ -103,20 +103,20 @@ public:
 class studio::StateRotate_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
-               
+
        synfigapp::Settings& settings;
 
        etl::handle<DuckDrag_Rotate> duck_dragger_;
 
        Gtk::Table options_table;
-       
+
        Gtk::CheckButton checkbutton_scale;
-       
+
 public:
 
        bool get_scale_flag()const { return checkbutton_scale.get_active(); }
        void set_scale_flag(bool x) { return checkbutton_scale.set_active(x); refresh_scale_flag(); }
-       
+
 
        Smach::event_result event_refresh_tool_options(const Smach::event& x);
 
@@ -132,7 +132,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        void load_settings();
        void save_settings();
 };     // END of class StateRotate_Context
@@ -143,7 +143,7 @@ StateRotate::StateRotate():
        Smach::state<StateRotate_Context>("rotate")
 {
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateRotate_Context::event_refresh_tool_options));
-}      
+}
 
 StateRotate::~StateRotate()
 {
@@ -151,7 +151,7 @@ StateRotate::~StateRotate()
 
 void
 StateRotate_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("rotate.scale",value) && value=="0")
@@ -162,7 +162,7 @@ StateRotate_Context::load_settings()
 
 void
 StateRotate_Context::save_settings()
-{      
+{
        settings.set_value("rotate.scale",get_scale_flag()?"1":"0");
 }
 
@@ -171,20 +171,20 @@ StateRotate_Context::StateRotate_Context(CanvasView* canvas_view):
        settings(synfigapp::Main::get_selected_input_device()->settings()),
        duck_dragger_(new DuckDrag_Rotate()),
        checkbutton_scale(_("Allow Scale"))
-{      
+{
        duck_dragger_->canvas_view_=get_canvas_view();
-       
+
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Rotate Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);      
+       //options_table.attach(*manage(new Gtk::Label(_("Rotate Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(checkbutton_scale, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        checkbutton_scale.signal_toggled().connect(sigc::mem_fun(*this,&StateRotate_Context::refresh_scale_flag));
-       
+
        options_table.show_all();
        refresh_tool_options();
        //App::dialog_tool_options->set_widget(options_table);
        App::dialog_tool_options->present();
-       
+
        get_work_area()->allow_layer_clicks=true;
        get_work_area()->set_duck_dragger(duck_dragger_);
 
@@ -240,7 +240,7 @@ DuckDrag_Rotate::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& off
 
        const DuckList selected_ducks(duckmatic->get_selected_ducks());
        DuckList::const_iterator iter;
-       
+
 /*
        if(duckmatic->get_selected_ducks().size()<2)
        {
@@ -249,7 +249,7 @@ DuckDrag_Rotate::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& off
        }
 */
        bad_drag=false;
-       
+
                drag_offset=duckmatic->find_duck(offset)->get_trans_point();
 
                //snap=drag_offset-duckmatic->snap_point_to_grid(drag_offset);
@@ -277,7 +277,7 @@ DuckDrag_Rotate::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& off
        else
                move_only=false;
 
-       
+
        synfig::Vector vect(offset-center);
        original_angle=Angle::tan(vect[1],vect[0]);
        original_mag=vect.mag();
@@ -289,7 +289,7 @@ DuckDrag_Rotate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
 {
        if(bad_drag)
                return;
-       
+
        //std::set<etl::handle<Duck> >::iterator iter;
        synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-center+snap);
 
@@ -302,9 +302,9 @@ DuckDrag_Rotate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
                {
                        if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)continue;
-                       
+
                        Vector p(positions[i]);
-       
+
                        p[0]+=vect[0];
                        p[1]+=vect[1];
                        (*iter)->set_trans_point(p);
@@ -312,27 +312,27 @@ DuckDrag_Rotate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
                {
                        if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-                       
+
                        Vector p(positions[i]);
-       
+
                        p[0]+=vect[0];
                        p[1]+=vect[1];
                        (*iter)->set_trans_point(p);
                }
                return;
        }
-       
+
        Angle::tan angle(vect[1],vect[0]);
        angle=original_angle-angle;
        Real mag(vect.mag()/original_mag);
        Real sine(Angle::sin(angle).get());
        Real cosine(Angle::cos(angle).get());
-       
+
        int i;
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
        {
                if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)continue;
-               
+
                Vector x(positions[i]-center),p;
 
                p[0]=cosine*x[0]+sine*x[1];
@@ -344,7 +344,7 @@ DuckDrag_Rotate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
        {
                if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-               
+
                Vector x(positions[i]-center),p;
 
                p[0]=cosine*x[0]+sine*x[1];
@@ -353,7 +353,7 @@ DuckDrag_Rotate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                p+=center;
                (*iter)->set_trans_point(p);
        }
-       
+
        last_rotate=vect;
        //snap=Vector(0,0);
 }
@@ -368,9 +368,9 @@ DuckDrag_Rotate::end_duck_drag(Duckmatic* duckmatic)
                duckmatic->signal_edited_selected_ducks();
                return true;
        }
-       
+
        synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Rotate Ducks"));
-               
+
        if((last_rotate-Vector(1,1)).mag()>0.0001)
        {
                duckmatic->signal_edited_selected_ducks();
index 35aca82..2a71e15 100644 (file)
@@ -77,7 +77,7 @@ class DuckDrag_Scale : public DuckDrag_Base
        std::vector<synfig::Vector> positions;
 
        bool move_only;
-       
+
        bool bad_drag;
 public:
        bool lock_aspect;
@@ -91,16 +91,16 @@ public:
 class studio::StateScale_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
-               
+
        synfigapp::Settings& settings;
 
        etl::handle<DuckDrag_Scale> duck_dragger_;
 
        Gtk::Table options_table;
-       
-       
+
+
        Gtk::CheckButton checkbutton_aspect_lock;
-       
+
 public:
 
        bool get_aspect_lock_flag()const { return checkbutton_aspect_lock.get_active(); }
@@ -120,7 +120,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        void load_settings();
        void save_settings();
 };     // END of class StateScale_Context
@@ -131,7 +131,7 @@ StateScale::StateScale():
        Smach::state<StateScale_Context>("scale")
 {
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateScale_Context::event_refresh_tool_options));
-}      
+}
 
 StateScale::~StateScale()
 {
@@ -139,7 +139,7 @@ StateScale::~StateScale()
 
 void
 StateScale_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("scale.lock_aspect",value) && value=="0")
@@ -150,7 +150,7 @@ StateScale_Context::load_settings()
 
 void
 StateScale_Context::save_settings()
-{      
+{
        settings.set_value("scale.lock_aspect",get_aspect_lock_flag()?"1":"0");
 }
 
@@ -159,17 +159,17 @@ StateScale_Context::StateScale_Context(CanvasView* canvas_view):
        settings(synfigapp::Main::get_selected_input_device()->settings()),
        duck_dragger_(new DuckDrag_Scale()),
        checkbutton_aspect_lock(_("Lock Aspect Ratio"))
-{      
+{
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Scale Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);       
+       //options_table.attach(*manage(new Gtk::Label(_("Scale Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(checkbutton_aspect_lock, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        checkbutton_aspect_lock.signal_toggled().connect(sigc::mem_fun(*this,&StateScale_Context::refresh_aspect_lock_flag));
-               
+
        options_table.show_all();
        refresh_tool_options();
        App::dialog_tool_options->present();
-       
+
        get_work_area()->allow_layer_clicks=true;
        get_work_area()->set_duck_dragger(duck_dragger_);
 
@@ -228,14 +228,14 @@ DuckDrag_Scale::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& offs
        last_scale=Vector(1,1);
        const DuckList selected_ducks(duckmatic->get_selected_ducks());
        DuckList::const_iterator iter;
-       
+
        //if(duckmatic->get_selected_ducks().size()<2)
        //{
        //      bad_drag=true;
 //             return;
 //     }
        bad_drag=false;
-       
+
                drag_offset=duckmatic->find_duck(offset)->get_trans_point();
 
                //snap=drag_offset-duckmatic->snap_point_to_grid(drag_offset);
@@ -261,7 +261,7 @@ DuckDrag_Scale::begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& offs
                move_only=true;
        else
                move_only=false;
-       
+
        center=(vmin+vmax)*0.5;
 }
 
@@ -274,7 +274,7 @@ DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
 
        if(bad_drag)
                return;
-       
+
        //std::set<etl::handle<Duck> >::iterator iter;
        synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-center);
        last_scale=vect;
@@ -285,9 +285,9 @@ DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
                {
                        if(((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-                       
+
                        Vector p(positions[i]);
-       
+
                        p[0]+=vect[0];
                        p[1]+=vect[1];
                        (*iter)->set_trans_point(p);
@@ -295,16 +295,16 @@ DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
                {
                        if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-                       
+
                        Vector p(positions[i]);
-       
+
                        p[0]+=vect[0];
                        p[1]+=vect[1];
                        (*iter)->set_trans_point(p);
                }
                return;
        }
-               
+
        if(!lock_aspect)
        {
                if(abs(drag_offset[0]-center[0])>EPSILON)
@@ -327,12 +327,12 @@ DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                vect[0]=1;
        if(vect[1]<EPSILON && vect[1]>-EPSILON)
                vect[1]=1;
-       
+
        int i;
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
        {
                if(((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-               
+
                Vector p(positions[i]-center);
 
                p[0]*=vect[0];
@@ -343,7 +343,7 @@ DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
        {
                if(!((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
-               
+
                Vector p(positions[i]-center);
 
                p[0]*=vect[0];
@@ -351,7 +351,7 @@ DuckDrag_Scale::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                p+=center;
                (*iter)->set_trans_point(p);
        }
-       
+
        last_scale=vect;
        //snap=Vector(0,0);
 }
@@ -360,7 +360,7 @@ bool
 DuckDrag_Scale::end_duck_drag(Duckmatic* duckmatic)
 {
        if(bad_drag)return false;
-               
+
        if((last_scale-Vector(1,1)).mag()>0.0001)
        {
                duckmatic->signal_edited_selected_ducks();
index 9142d9a..46aafb6 100644 (file)
@@ -86,7 +86,7 @@ class studio::StateSketch_Context : public sigc::trackable
 
        bool prev_table_status;
        bool prev_workarea_layer_status_;
-       
+
        Gtk::Table options_table;
        Gtk::Button button_clear_sketch;
        Gtk::Button button_undo_stroke;
@@ -99,7 +99,7 @@ class studio::StateSketch_Context : public sigc::trackable
        void load_sketch();
        void undo_stroke();
        void toggle_show_sketch();
-       
+
 public:
 
        Smach::event_result event_stop_handler(const Smach::event& x);
@@ -125,7 +125,7 @@ public:
        synfig::Time get_time()const { return get_canvas_interface()->get_time(); }
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
 };     // END of class StateSketch_Context
 
 
@@ -139,9 +139,9 @@ StateSketch::StateSketch():
        insert(event_def(EVENT_REFRESH_DUCKS,&StateSketch_Context::event_refresh_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,&StateSketch_Context::event_mouse_down_handler));
        insert(event_def(EVENT_WORKAREA_STROKE,&StateSketch_Context::event_stroke));
-       insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateSketch_Context::event_refresh_tool_options)); 
-       insert(event_def(EVENT_YIELD_TOOL_OPTIONS,&StateSketch_Context::event_yield_tool_options));     
-}      
+       insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateSketch_Context::event_refresh_tool_options));
+       insert(event_def(EVENT_YIELD_TOOL_OPTIONS,&StateSketch_Context::event_yield_tool_options));
+}
 
 StateSketch::~StateSketch()
 {
@@ -151,7 +151,7 @@ void
 StateSketch_Context::save_sketch()
 {
        synfig::String filename(basename(get_canvas()->get_file_name())+".sketch");
-       
+
        while(App::dialog_save_file(_("Save Sketch"), filename))
        {
                // If the filename still has wildcards, then we should
@@ -170,7 +170,7 @@ void
 StateSketch_Context::load_sketch()
 {
        synfig::String filename(basename(get_canvas()->get_file_name())+".sketch");
-       
+
        while(App::dialog_open_file(_("Load Sketch"), filename))
        {
                // If the filename still has wildcards, then we should
@@ -296,26 +296,26 @@ StateSketch_Context::StateSketch_Context(CanvasView* canvas_view):
 
        App::ui_manager()->add_ui_from_string(ui_info);
 
-       
+
        checkbutton_show_sketch.set_active(get_work_area()->get_show_persistant_strokes());
-       
+
        button_clear_sketch.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::clear_sketch));
        button_undo_stroke.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::undo_stroke));
        button_save_sketch.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::save_sketch));
        button_load_sketch.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::load_sketch));
        checkbutton_show_sketch.signal_clicked().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::toggle_show_sketch));
-       //options_table.attach(*manage(new Gtk::Label(_("Sketch Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);      
-       options_table.attach(checkbutton_show_sketch, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);  
-       //options_table.attach(button_undo_stroke, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);     
-       //options_table.attach(button_clear_sketch, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
-       //options_table.attach(button_save_sketch, 0, 1, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);     
-       //options_table.attach(button_load_sketch, 1, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);     
-
-       
+       //options_table.attach(*manage(new Gtk::Label(_("Sketch Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       options_table.attach(checkbutton_show_sketch, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       //options_table.attach(button_undo_stroke, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       //options_table.attach(button_clear_sketch, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       //options_table.attach(button_save_sketch, 0, 1, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+       //options_table.attach(button_load_sketch, 1, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+
+
        options_table.show_all();
        refresh_tool_options();
        App::dialog_tool_options->present();
-       
+
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
 
@@ -323,20 +323,20 @@ StateSketch_Context::StateSketch_Context(CanvasView* canvas_view):
 
        // Turn off duck clicking
        get_work_area()->allow_duck_clicks=false;
-       
+
        // clear out the ducks
        //get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        //get_work_area()->queue_draw();
-       
+
        // Hide the tables if they are showing
        prev_table_status=get_canvas_view()->tables_are_visible();
        //if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        //get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateSketch_Context::on_user_click));
 
@@ -348,7 +348,7 @@ StateSketch_Context::~StateSketch_Context()
        get_canvas_view()->work_area->reset_cursor();
 
        App::dialog_tool_options->clear();
-       
+
        // Restore layer clicking
        get_work_area()->allow_layer_clicks=prev_workarea_layer_status_;
 
@@ -361,7 +361,7 @@ StateSketch_Context::~StateSketch_Context()
 
        // Bring back the tables if they were out before
        if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        //get_work_area()->queue_draw();
 
@@ -384,7 +384,7 @@ StateSketch_Context::refresh_tool_options()
        App::dialog_tool_options->set_name("sketch");
 
        App::ui_manager()->insert_action_group(action_group);
-       App::dialog_tool_options->set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-sketch")));  
+       App::dialog_tool_options->set_toolbar(*dynamic_cast<Gtk::Toolbar*>(App::ui_manager()->get_widget("/toolbar-sketch")));
 
        /*
        App::dialog_tool_options->add_button(
@@ -470,11 +470,11 @@ StateSketch_Context::event_mouse_down_handler(const Smach::event& x)
                        get_canvas_view()->get_smach().push_state(&state_stroke);
                        return Smach::RESULT_ACCEPT;
                }
-       
+
        case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
                return Smach::RESULT_ACCEPT;
-       
-       default:        
+
+       default:
                return Smach::RESULT_OK;
        }
 }
@@ -485,7 +485,7 @@ StateSketch_Context::event_stroke(const Smach::event& x)
        const EventStroke& event(*reinterpret_cast<const EventStroke*>(&x));
 
        assert(event.stroke_data);
-               
+
        get_work_area()->add_persistant_stroke(event.stroke_data,synfigapp::Main::get_foreground_color());
 
        return Smach::RESULT_ACCEPT;
index 448b51d..a880711 100644 (file)
@@ -47,7 +47,7 @@ public:
 }; // END of class StateSketch
 
 extern StateSketch state_sketch;
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index f1f3fdb..edd51ff 100644 (file)
@@ -74,10 +74,10 @@ class DuckDrag_SmoothMove : public DuckDrag_Base
        synfig::Vector last_translate_;
        synfig::Vector drag_offset_;
        synfig::Vector snap;
-       
+
        std::vector<synfig::Vector> last_;
        std::vector<synfig::Vector> positions;
-       
+
 public:
        DuckDrag_SmoothMove();
        void begin_duck_drag(Duckmatic* duckmatic, const synfig::Vector& begin);
@@ -85,16 +85,16 @@ public:
        void duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector);
 
        void set_radius(float x) { radius=x; }
-       float get_radius()const { return radius; }      
+       float get_radius()const { return radius; }
 };
 
 
 class studio::StateSmoothMove_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
-       
+
        //Duckmatic::Push duckmatic_push;
-       
+
        synfigapp::Settings& settings;
 
        etl::handle<DuckDrag_SmoothMove> duck_dragger_;
@@ -103,15 +103,15 @@ class studio::StateSmoothMove_Context : public sigc::trackable
 
        Gtk::Adjustment  adj_radius;
        Gtk::SpinButton  spin_radius;
-       
+
        float pressure;
-       
+
 public:
        float get_radius()const { return adj_radius.get_value(); }
        void set_radius(float x) { return adj_radius.set_value(x); }
-       
+
        void refresh_radius() { duck_dragger_->set_radius(get_radius()*pressure); }
-       
+
        Smach::event_result event_stop_handler(const Smach::event& x);
 
        Smach::event_result event_refresh_tool_options(const Smach::event& x);
@@ -126,7 +126,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        void load_settings();
        void save_settings();
 };     // END of class StateSmoothMove_Context
@@ -137,7 +137,7 @@ StateSmoothMove::StateSmoothMove():
        Smach::state<StateSmoothMove_Context>("smooth_move")
 {
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateSmoothMove_Context::event_refresh_tool_options));
-}      
+}
 
 StateSmoothMove::~StateSmoothMove()
 {
@@ -145,7 +145,7 @@ StateSmoothMove::~StateSmoothMove()
 
 void
 StateSmoothMove_Context::load_settings()
-{      
+{
        String value;
 
        if(settings.get_value("smooth_move.radius",value))
@@ -156,7 +156,7 @@ StateSmoothMove_Context::load_settings()
 
 void
 StateSmoothMove_Context::save_settings()
-{      
+{
        settings.set_value("smooth_move.radius",strprintf("%f",get_radius()));
 }
 
@@ -169,20 +169,20 @@ StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view):
        spin_radius(adj_radius,0.1,3)
 {
        pressure=1.0f;
-       
+
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("SmoothMove Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);  
-       
-       options_table.attach(*manage(new Gtk::Label(_("Radius"))), 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);     
+       //options_table.attach(*manage(new Gtk::Label(_("SmoothMove Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+
+       options_table.attach(*manage(new Gtk::Label(_("Radius"))), 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_radius, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        spin_radius.signal_value_changed().connect(sigc::mem_fun(*this,&StateSmoothMove_Context::refresh_radius));
-       
+
        options_table.show_all();
        refresh_tool_options();
        //App::dialog_tool_options->set_widget(options_table);
        App::dialog_tool_options->present();
-       
+
        get_work_area()->allow_layer_clicks=true;
        get_work_area()->set_duck_dragger(duck_dragger_);
 
@@ -257,9 +257,9 @@ DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vecto
        const DuckList selected_ducks(duckmatic->get_selected_ducks());
        DuckList::const_iterator iter;
        synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_+snap);
-       
+
        int i;
-       
+
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
        {
                if(((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION))continue;
@@ -268,7 +268,7 @@ DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vecto
                float dist(1.0f-(p-drag_offset_).mag()/get_radius());
                if(dist<0)
                        dist=0;
-               
+
                last_[i]=vect*dist;
                (*iter)->set_trans_point(p+last_[i]);
        }
@@ -281,11 +281,11 @@ DuckDrag_SmoothMove::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vecto
                float dist(1.0f-(p-drag_offset_).mag()/get_radius());
                if(dist<0)
                        dist=0;
-               
+
                last_[i]=vect*dist;
                (*iter)->set_trans_point(p+last_[i]);
        }
-       
+
        last_translate_=vect;
        //snap=Vector(0,0);
 }
@@ -300,9 +300,9 @@ DuckDrag_SmoothMove::end_duck_drag(Duckmatic* duckmatic)
                DuckList::const_iterator iter;
 
                int i;
-               
+
                smart_ptr<OneMoment> wait;if(selected_ducks.size()>20)wait.spawn();
-                       
+
                for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
                {
                        if(last_[i].mag()>0.0001)
index 75b1b4d..8ad77a4 100644 (file)
@@ -68,9 +68,9 @@ class studio::StateStroke_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        Duckmatic::Push duckmatic_push;
-       
+
        etl::smart_ptr<std::list<synfig::Point> > stroke_data;
 
        etl::smart_ptr<std::list<synfig::Real> > width_data;
@@ -96,7 +96,7 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
 };     // END of class StateStroke_Context
 
 
@@ -111,7 +111,7 @@ StateStroke::StateStroke():
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_UP,&StateStroke_Context::event_mouse_up_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_DRAG,&StateStroke_Context::event_mouse_draw_handler));
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateStroke_Context::event_refresh_tool_options));
-}      
+}
 
 StateStroke::~StateStroke()
 {
@@ -128,15 +128,15 @@ StateStroke_Context::StateStroke_Context(CanvasView* canvas_view):
 
        get_work_area()->add_stroke(stroke_data, synfigapp::Main::get_foreground_color());
 
-       synfig::info("Now Scribbling...");      
+       synfig::info("Now Scribbling...");
 }
 
 StateStroke_Context::~StateStroke_Context()
 {
        duckmatic_push.restore();
-       
+
        App::toolbox->refresh();
-       synfig::info("No longer scribbling");   
+       synfig::info("No longer scribbling");
 
        // Send the stroke data to whatever previously called this state.
        if(stroke_data->size()>=2)
@@ -172,11 +172,11 @@ StateStroke_Context::event_mouse_up_handler(const Smach::event& x)
                        modifier=event.modifier;
                        throw Smach::pop_exception();
                }
-       
+
        case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
                return Smach::RESULT_ACCEPT;
-       
-       default:        
+
+       default:
                return Smach::RESULT_OK;
        }
 }
@@ -191,14 +191,14 @@ StateStroke_Context::event_mouse_draw_handler(const Smach::event& x)
                {
                        stroke_data->push_back(event.pos);
                        width_data->push_back(event.pressure);
-                       get_work_area()->queue_draw();                  
+                       get_work_area()->queue_draw();
                        return Smach::RESULT_ACCEPT;
                }
-       
+
        case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
                return Smach::RESULT_ACCEPT;
-       
-       default:        
+
+       default:
                return Smach::RESULT_OK;
        }
 }
index 922e72b..01f9cc1 100644 (file)
@@ -61,7 +61,7 @@ struct EventStroke : public Smach::event
        etl::smart_ptr<std::list<synfig::Point> > stroke_data;
        etl::smart_ptr<std::list<synfig::Real> > width_data;
        Gdk::ModifierType modifier;
-       
+
        EventStroke(etl::smart_ptr<std::list<synfig::Point> > stroke_data,
                        etl::smart_ptr<std::list<synfig::Real> > width_data,
                        Gdk::ModifierType modifier=Gdk::ModifierType(0)
index d9d7697..b020369 100644 (file)
@@ -77,56 +77,56 @@ class studio::StateWidth_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        //Point mouse_pos;
-       
+
        handle<Duck> center;
        handle<Duck> radius;
        handle<Duck> closestpoint;
-       
+
        map<handle<Duck>,Real>  changetable;
-       
+
        etl::clock      clocktime;
        Real            lastt;
-       
+
        bool added;
 
        void refresh_ducks();
-       
+
        bool prev_workarea_layer_clicking;
        bool prev_workarea_duck_clicking;
        Duckmatic::Type old_duckmask;
-               
+
        //Toolbox settings
        synfigapp::Settings& settings;
-       
+
        //Toolbox display
        Gtk::Table options_table;
-       
+
        //Gtk::Entry            entry_id; //what to name the layer
-               
+
        Gtk::Adjustment adj_delta;
        Gtk::SpinButton spin_delta;
-       
+
        Gtk::Adjustment adj_radius;
        Gtk::SpinButton spin_radius;
-       
+
        Gtk::CheckButton check_relative;
-               
+
        void AdjustWidth(handle<Duckmatic::Bezier> c, float t, Real mult, bool invert);
-       
+
 public:
 
        Real get_delta()const { return adj_delta.get_value(); }
        void set_delta(Real f) { adj_delta.set_value(f); }
-       
+
        Real get_radius()const { return adj_radius.get_value(); }
        void set_radius(Real f) { adj_radius.set_value(f); }
-       
+
        bool get_relative() const { return check_relative.get_active(); }
        void set_relative(bool r) { check_relative.set_active(r); }
-       
-       void refresh_tool_options(); //to refresh the toolbox   
+
+       void refresh_tool_options(); //to refresh the toolbox
 
        //events
        Smach::event_result event_stop_handler(const Smach::event& x);
@@ -143,12 +143,12 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //Modifying settings etc.
        void load_settings();
        void save_settings();
        void reset();
-       
+
 };     // END of class StateGradient_Context
 
 /* === M E T H O D S ======================================================= */
@@ -170,20 +170,20 @@ StateWidth::~StateWidth()
 
 void
 StateWidth_Context::load_settings()
-{      
+{
        String value;
-       
+
        //parse the arguments yargh!
        if(settings.get_value("width.delta",value))
                set_delta(atof(value.c_str()));
        else
                set_delta(6);
-       
+
        if(settings.get_value("width.radius",value))
                set_radius(atof(value.c_str()));
        else
                set_radius(15);
-       
+
        //defaults to true
        if(settings.get_value("width.relative",value) && value == "0")
                set_relative(false);
@@ -193,7 +193,7 @@ StateWidth_Context::load_settings()
 
 void
 StateWidth_Context::save_settings()
-{      
+{
        settings.set_value("width.delta",strprintf("%f",get_delta()));
        settings.set_value("width.radius",strprintf("%f",get_radius()));
        settings.set_value("width.relative",get_relative()?"1":"0");
@@ -213,47 +213,47 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view):
        old_duckmask(get_work_area()->get_type_mask()),
 
        settings(synfigapp::Main::get_selected_input_device()->settings()),
-       
+
        adj_delta(6,0,1,0.001,0.01),
        spin_delta(adj_delta,0.01,3),
-       
+
        adj_radius(0,0,1e50,1,10),
        spin_radius(adj_radius,1,1),
 
        check_relative(_("Relative Growth"))
 {
        load_settings();
-       
+
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Width Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);       
+       //options_table.attach(*manage(new Gtk::Label(_("Width Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        //options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        //expand stuff
        options_table.attach(*manage(new Gtk::Label(_("Growth:"))), 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_delta, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        options_table.attach(*manage(new Gtk::Label(_("Radius:"))), 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        options_table.attach(spin_radius, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
        options_table.attach(check_relative, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-                       
+
        options_table.show_all();
-       
+
        refresh_tool_options();
        App::dialog_tool_options->present();
 
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
-       
+
        // clear out the ducks
        //get_work_area()->clear_ducks();
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
-       
+
        //Create the new ducks
        added = false;
-       
+
        if(!center)
        {
                center = new Duck();
@@ -269,14 +269,14 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view):
                radius->set_type(Duck::TYPE_RADIUS);
                radius->set_name("radius");
        }
-               
+
        if(!closestpoint)
        {
                closestpoint = new Duck();
                closestpoint->set_name("closest");
                closestpoint->set_type(Duck::TYPE_POSITION);
        }
-       
+
        //Disable duck clicking for the maximum coolness :)
        get_work_area()->allow_duck_clicks = false;
        get_work_area()->set_type_mask((Duck::Type)((int)Duck::TYPE_WIDTH + (int)Duck::TYPE_RADIUS));
@@ -287,10 +287,10 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view):
        // Hide the tables if they are showing
        //prev_table_status=get_canvas_view()->tables_are_visible();
        //if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        //get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateWidth_Context::on_user_click));
 
@@ -316,7 +316,7 @@ StateWidth_Context::event_refresh_tool_options(const Smach::event& x)
 StateWidth_Context::~StateWidth_Context()
 {
        save_settings();
-       
+
        //remove ducks if need be
        if(added)
        {
@@ -325,7 +325,7 @@ StateWidth_Context::~StateWidth_Context()
                get_work_area()->erase_duck(closestpoint);
                added = false;
        }
-       
+
        // Restore Duck clicking
        get_work_area()->allow_duck_clicks = prev_workarea_duck_clicking;
 
@@ -334,7 +334,7 @@ StateWidth_Context::~StateWidth_Context()
 
        // Restore the mouse pointer
        get_work_area()->reset_cursor();
-       
+
        // Restore duck masking
        get_work_area()->set_type_mask(old_duckmask);
 
@@ -347,7 +347,7 @@ StateWidth_Context::~StateWidth_Context()
 
        // Bring back the tables if they were out before
        //if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -367,24 +367,24 @@ StateWidth_Context::event_refresh_handler(const Smach::event& x)
        return Smach::RESULT_ACCEPT;
 }
 
-void 
+void
 StateWidth_Context::AdjustWidth(handle<Duckmatic::Bezier> c, float t, Real mult, bool invert)
 {
        //Leave the function if there is no curve
        if(!c)return;
-       
+
        Real amount1=0,amount2=0;
-       
+
        //decide how much to change each width
        /*
        t \in [0,1]
-       
+
        both pressure and multiply amount are in mult
                (may want to change this to allow different types of falloff)
-       
+
        rsq is the squared distance from the point on the curve (also part of the falloff)
-       
-               
+
+
        */
        //may want to provide a different falloff function...
        if(t <= 0.2)
@@ -397,24 +397,24 @@ StateWidth_Context::AdjustWidth(handle<Duckmatic::Bezier> c, float t, Real mult,
                amount1 = (1-t)*mult;
                amount2 = t*mult;
        }
-       
+
        if(invert)
        {
                amount1 *= -1;
                amount2 *= -1;
        }
-       
+
        handle<Duck>    p1 = c->p1;
        handle<Duck>    p2 = c->p2;
-       
+
        handle<Duck>    w1,w2;
-       
+
        //find w1,w2
        {
                const DuckList dl = get_work_area()->get_duck_list();
-               
+
                DuckList::const_iterator i = dl.begin();
-               
+
                for(;i != dl.end(); ++i)
                {
                        if((*i)->get_type() == Duck::TYPE_WIDTH)
@@ -423,7 +423,7 @@ StateWidth_Context::AdjustWidth(handle<Duckmatic::Bezier> c, float t, Real mult,
                                {
                                        w1 = *i;
                                }
-                               
+
                                if((*i)->get_origin_duck() == p2)
                                {
                                        w2 = *i;
@@ -431,26 +431,26 @@ StateWidth_Context::AdjustWidth(handle<Duckmatic::Bezier> c, float t, Real mult,
                        }
                }
        }
-       
+
        if(amount1 != 0 && w1)
        {
                Real width = w1->get_point().mag();
-               
+
                width += amount1;
                w1->set_point(Vector(width,0));
-               
+
                //log in the list of changes...
                //to truly be changed after everything is said and done
                changetable[w1] = width;
        }
-       
+
        if(amount2 != 0 && w2)
        {
                Real width = w2->get_point().mag();
-               
+
                width += amount2;
                w2->set_point(Vector(width,0));
-               
+
                //log in the list of changes...
                //to truly be changed after everything is said and done
                changetable[w2] = width;
@@ -461,8 +461,8 @@ Smach::event_result
 StateWidth_Context::event_mouse_handler(const Smach::event& x)
 {
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
-       
-       //handle ze click       
+
+       //handle ze click
        if( (event.key == EVENT_WORKAREA_MOUSE_BUTTON_DOWN || event.key == EVENT_WORKAREA_MOUSE_BUTTON_DRAG)
                        && event.button == BUTTON_LEFT )
        {
@@ -470,81 +470,81 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
                const Real ph = get_work_area()->get_ph();
                const Real scale = sqrt(pw*pw+ph*ph);
                const Real rad = get_relative() ? scale * get_radius() : get_radius();
-               
+
                bool invert = (event.modifier&Gdk::CONTROL_MASK);
-               
+
                const Real threshold = 0.08;
-               
+
                float t = 0;
                Real rsq = 0;
-               
+
                Real dtime = 1/60.0;
-                               
+
                //if we're dragging get the difference in time between now and then
                if(event.key == EVENT_WORKAREA_MOUSE_BUTTON_DRAG)
                {
                        dtime = min(1/15.0,clocktime());
                }
                clocktime.reset();
-               
+
                //make way for new ducks
                //get_work_area()->clear_ducks();
-               
+
                //update positions
                //mouse_pos = event.pos;
-               
+
                center->set_point(event.pos);
                if(!added)get_work_area()->add_duck(center);
 
                radius->set_scalar(rad);
                if(!added)get_work_area()->add_duck(radius);
-               
+
                //the other duck is at the current duck
                closestpoint->set_point(event.pos);
                if(!added)get_work_area()->add_duck(closestpoint);
-                       
+
                //get the closest curve...
                handle<Duckmatic::Bezier>       c;
                if(event.pressure >= threshold)
                        c = get_work_area()->find_bezier(event.pos,scale*8,rad,&t);
-                       
+
                //run algorithm on event.pos to get 2nd placement
                if(!c.empty())
                {
                        bezier<Point> curve;
                        Point p;
-                       
+
                        curve[0] = c->p1->get_trans_point();
                        curve[1] = c->c1->get_trans_point();
                        curve[2] = c->c2->get_trans_point();
                        curve[3] = c->p2->get_trans_point();
-                       
+
                        p = curve(t);
                        rsq = (p-event.pos).mag_squared();
-                       
+
                        const Real r = rad*rad;
-                       
+
                        if(rsq < r)
                        {
                                closestpoint->set_point(curve(t));
-                               
+
                                //adjust the width...
-                               //squared falloff for radius... [0,1]                           
-                               
+                               //squared falloff for radius... [0,1]
+
                                Real ri = (r - rsq)/r;
                                AdjustWidth(c,t,ri*event.pressure*get_delta()*dtime,invert);
                        }
                }
-               
+
                //the points have been added
                added = true;
-                               
+
                //draw where it is yo!
                get_work_area()->queue_draw();
-                               
+
                return Smach::RESULT_ACCEPT;
        }
-       
+
        if(event.key == EVENT_WORKAREA_MOUSE_BUTTON_UP && event.button == BUTTON_LEFT)
        {
                if(added)
@@ -554,11 +554,11 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
                        get_work_area()->erase_duck(closestpoint);
                        added = false;
                }
-               
+
                //Affect the width changes here...
                map<handle<Duck>,Real>::iterator i = changetable.begin();
 
-               synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Sketch Width")); 
+               synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Sketch Width"));
                for(; i != changetable.end(); ++i)
                {
                        //for each duck modify IT!!!
@@ -568,14 +568,14 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
                        {
                                Action::Handle action(Action::create("value_desc_set"));
                                assert(action);
-                               
-                               action->set_param("canvas",get_canvas());                                       
-                               action->set_param("canvas_interface",get_canvas_interface());                   
-                               
-                               action->set_param("value_desc",desc);                                   
+
+                               action->set_param("canvas",get_canvas());
+                               action->set_param("canvas_interface",get_canvas_interface());
+
+                               action->set_param("value_desc",desc);
                                action->set_param("new_value",ValueBase(i->second));
                                action->set_param("time",get_canvas_view()->get_time());
-                               
+
                                if(!action->is_ready() || !get_canvas_view()->get_instance()->perform_action(action))
                                {
                                        group.cancel();
@@ -583,12 +583,12 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
                                        return Smach::RESULT_ERROR;
                                }
                        }
-               }                       
-               
+               }
+
                changetable.clear();
-               
+
                get_work_area()->queue_draw();
-               
+
                return Smach::RESULT_ACCEPT;
        }
 
index c4d465e..a3b685d 100644 (file)
@@ -48,7 +48,7 @@ public:
 }; // END of class StateWidth
 
 extern StateWidth state_width;
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index e5a0e9b..48b8f76 100644 (file)
@@ -67,20 +67,20 @@ class studio::StateZoom_Context : public sigc::trackable
 {
        etl::handle<CanvasView> canvas_view_;
        CanvasView::IsWorking is_working;
-       
+
        Point p1,p2;
-       
+
        bool prev_workarea_layer_status_;
-               
+
        //Toolbox settings
        synfigapp::Settings& settings;
-       
+
        //Toolbox display
        Gtk::Table options_table;
-       
+
 public:
 
-       void refresh_tool_options(); //to refresh the toolbox   
+       void refresh_tool_options(); //to refresh the toolbox
 
        //events
        Smach::event_result event_stop_handler(const Smach::event& x);
@@ -97,14 +97,14 @@ public:
        etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
        synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
-       
+
        //Modifying settings etc.
        void load_settings();
        void save_settings();
        void reset();
-       
+
        //void zoom(const Point& p1, const Point& p2);
-       
+
 };     // END of class StateGradient_Context
 
 /* === M E T H O D S ======================================================= */
@@ -120,7 +120,7 @@ StateZoom::StateZoom():
        //insert(event_def(EVENT_WORKAREA_BUTTON_CLICK,&StateZoom_Context::event_mouse_click_handler));
        insert(event_def(EVENT_WORKAREA_MOUSE_BUTTON_UP,&StateZoom_Context::event_mouse_click_handler));
        insert(event_def(EVENT_REFRESH_TOOL_OPTIONS,&StateZoom_Context::event_refresh_tool_options));
-}      
+}
 
 StateZoom::~StateZoom()
 {
@@ -128,14 +128,14 @@ StateZoom::~StateZoom()
 
 void
 StateZoom_Context::load_settings()
-{      
+{
        String value;
-       
+
        //parse the arguments yargh!
        /*if(settings.get_value("circle.feather",value))
                set_feather(atof(value.c_str()));
        else
-               set_feather(0);*/       
+               set_feather(0);*/
 }
 
 void
@@ -157,31 +157,31 @@ StateZoom_Context::StateZoom_Context(CanvasView* canvas_view):
        settings(synfigapp::Main::get_selected_input_device()->settings())
 {
        // Set up the tool options dialog
-       //options_table.attach(*manage(new Gtk::Label(_("Zoom Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);        
-       
+       //options_table.attach(*manage(new Gtk::Label(_("Zoom Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+
        load_settings();
 
        options_table.show_all();
-       
+
        refresh_tool_options();
        App::dialog_tool_options->present();
 
        // Turn off layer clicking
        get_work_area()->allow_layer_clicks=false;
-       
+
        // clear out the ducks
        get_work_area()->clear_ducks(); //???
-       
+
        // Refresh the work area
        get_work_area()->queue_draw();
-       
+
        // Hide the tables if they are showing
        //prev_table_status=get_canvas_view()->tables_are_visible();
        //if(prev_table_status)get_canvas_view()->hide_tables();
-               
+
        // Hide the time bar
        //get_canvas_view()->hide_timebar();
-       
+
        // Connect a signal
        //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateZoom_Context::on_user_click));
        get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR);
@@ -221,7 +221,7 @@ StateZoom_Context::~StateZoom_Context()
 
        // Bring back the tables if they were out before
        //if(prev_table_status)get_canvas_view()->show_tables();
-                       
+
        // Refresh the work area
        get_work_area()->queue_draw();
 
@@ -248,14 +248,14 @@ StateZoom_Context::event_mouse_click_handler(const Smach::event& x)
        if(x.key==EVENT_WORKAREA_BOX)
        {
                const EventBox& event(*reinterpret_cast<const EventBox*>(&x));
-               
+
                if(event.button==BUTTON_LEFT)
                {
                        //respond to event box...
-                       
-                       
+
+
                        //Center the new position at the center of the box
-                       
+
                        //OH MY GOD HACK - the space is -1* and offset (by the value of the center of the canvas)...
                        Point newpos;
                        {
@@ -263,53 +263,53 @@ StateZoom_Context::event_mouse_click_handler(const Smach::event& x)
                                const Point realcenter = (get_work_area()->get_window_tl() + get_work_area()->get_window_br())/2;
                                newpos = -(evcenter - realcenter) + get_work_area()->get_focus_point();
                        }
-                       
+
                        //The zoom will be whatever the required factor to convert current box size to desired box size
                        Point tl = get_work_area()->get_window_tl();
                        Point br = get_work_area()->get_window_br();
-                       
+
                        Vector  span = br - tl;
                        Vector  v = event.p2 - event.p1;
-       
+
                        //get the minimum zoom as long as it's greater than 1...
                        v[0] = abs(v[0])/abs(span[0]);
                        v[1] = abs(v[1])/abs(span[1]);
-                       
+
                        float zdiv = max(v[0],v[1]);
                        if(zdiv < 1 && zdiv > 0) //must be zoomable
                        {
-                               get_work_area()->set_focus_point(newpos);                       
+                               get_work_area()->set_focus_point(newpos);
                                get_work_area()->set_zoom(get_work_area()->get_zoom()/zdiv);
                        }
-                       
+
                        return Smach::RESULT_ACCEPT;
                }
        }
-       
+
        if(x.key==EVENT_WORKAREA_MOUSE_BUTTON_UP)
        {
                const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
-               
+
                if(event.button==BUTTON_LEFT)
                {
                        Point evpos;
-                       
+
                        //make the event pos be in the same space...
                        //   The weird ass inverted center normalized space...
                        {
                                const Point realcenter = (get_work_area()->get_window_tl() + get_work_area()->get_window_br())/2;
                                evpos = -(event.pos - realcenter) + get_work_area()->get_focus_point();
                        }
-                       
+
                        /*      Zooming:
                                focus point must zoom about the point evpos...
-                       
+
                                trans about an origin not 0:
                                p' = A(p - o) + o
                        */
-                       
+
                        Vector v = get_work_area()->get_focus_point() - evpos;
-                       
+
                        if(event.modifier & Gdk::CONTROL_MASK) //zoom out...
                        {
                                v*=ZOOMFACTOR;
@@ -323,7 +323,7 @@ StateZoom_Context::event_mouse_click_handler(const Smach::event& x)
                                get_work_area()->set_focus_point(evpos + v);
                                get_work_area()->set_zoom(get_work_area()->get_zoom()*ZOOMFACTOR);
                        }
-               
+
                        return Smach::RESULT_ACCEPT;
                }
        }
index 81cd39d..72c0724 100644 (file)
@@ -78,7 +78,7 @@ void
 StateManager::add_state(const Smach::state_base *state)
 {
        String name(state->get_name());
-       
+
        Glib::RefPtr<Gtk::Action> action(
                Gtk::Action::create(
                        "state-"+name,
@@ -89,14 +89,14 @@ StateManager::add_state(const Smach::state_base *state)
        );
        /*action->set_sensitive(false);*/
        state_group->add(action);
-       
+
        action->signal_activate().connect(
                sigc::bind(
                        sigc::mem_fun(*this,&studio::StateManager::change_state_),
                        state
                )
        );
-       
+
        App::ui_manager()->ensure_update();
 
        /*App::ui_manager()->add_ui(
@@ -106,10 +106,10 @@ StateManager::add_state(const Smach::state_base *state)
                "state-"+name
        );
        */
-       
+
        String uid_def("<ui><popup action='menu-main'><menu action='menu-state'><menuitem action='state-"+name+"' /></menu></popup></ui>");
        merge_id_list.push_back(App::ui_manager()->add_ui_from_string(uid_def));
-       
+
        App::ui_manager()->ensure_update();
 
        App::toolbox->add_state(state);
index 93727ce..e648da0 100644 (file)
@@ -46,7 +46,7 @@ namespace studio {
 {
 private:
        Glib::RefPtr<Gtk::ActionGroup> state_group;
-       
+
        guint merge_id;
        std::vector<guint> merge_id_list;
 
@@ -56,7 +56,7 @@ public:
        StateManager();
 
        ~StateManager();
-       
+
        void add_state(const Smach::state_base *state);
 
        Glib::RefPtr<Gtk::ActionGroup> get_action_group();
index 880dd11..471da68 100644 (file)
@@ -156,7 +156,7 @@ close_selected_instance()
        }
 
        instance->safe_close();
-       
+
        //assert(instance.unique());
 }
 
@@ -205,7 +205,7 @@ Toolbox::Toolbox():
 
 
        recent_files_menu= manage(new class Gtk::Menu());
-       
+
        Gtk::Menu       *filemenu       =manage(new class Gtk::Menu());
 
        dock_dialogs=manage(new class Gtk::Menu());
@@ -214,14 +214,14 @@ Toolbox::Toolbox():
        dock_dialogs->items().push_back(Gtk::Menu_Helpers::MenuElem("Layers, Children , Params",sigc::ptr_fun(_create_stock_dialog2)));
        dock_dialogs->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
 
-       
+
        filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::NEW,
-               sigc::ptr_fun(&studio::App::new_instance)));    
+               sigc::ptr_fun(&studio::App::new_instance)));
        filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::OPEN,
-               sigc::ptr_fun(&studio::App::dialog_open)));     
+               sigc::ptr_fun(&studio::App::dialog_open)));
 
        filemenu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Open Recent"),*recent_files_menu));
-       
+
        filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-saveall"),
                sigc::ptr_fun(&studio::App::dialog_not_implemented)));
        filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::CLOSE,
@@ -244,26 +244,26 @@ Toolbox::Toolbox():
        filemenu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Setup..."),
                sigc::ptr_fun(&studio::App::show_setup)));
 
-       filemenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());        
+       filemenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
        filemenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID(Gtk::Stock::QUIT),
-               sigc::ptr_fun(studio::App::quit)));     
-       
+               sigc::ptr_fun(studio::App::quit)));
+
        Gtk::Menu       *helpmenu = manage(new class Gtk::Menu());
        helpmenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::HELP,
-               sigc::ptr_fun(studio::App::dialog_not_implemented)));   
-       helpmenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());        
+               sigc::ptr_fun(studio::App::dialog_not_implemented)));
+       helpmenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
        helpmenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-about"),
-               sigc::ptr_fun(studio::App::dialog_about)));     
-       
+               sigc::ptr_fun(studio::App::dialog_about)));
+
        Gtk::MenuBar *menubar1 = manage(new class Gtk::MenuBar());
        menubar1->items().push_back(Gtk::Menu_Helpers::MenuElem("_File",*filemenu));
        menubar1->items().push_back(Gtk::Menu_Helpers::MenuElem("_Help",*helpmenu));
 
-       
+
        menubar1->show();
-       
+
        Gtk::Image *icon;
-       
+
        ADD_TOOLBOX_BUTTON(button_new,"gtk-new","New");
        ADD_TOOLBOX_BUTTON(button_open,"gtk-open","Open");
        ADD_TOOLBOX_BUTTON(button_save,"gtk-save","Save");
@@ -273,12 +273,12 @@ Toolbox::Toolbox():
        TOOLBOX_BUTTON(button_redo,"gtk-redo","Redo");
        ADD_TOOLBOX_BUTTON(button_about,"synfig-about","About Synfig Studio");
        ADD_TOOLBOX_BUTTON(button_color,"synfig-color","Color Dialog");
-       
+
        TOOLBOX_BUTTON(button_rotoscope_bline,"synfig-rotoscope_bline",_("Old Rotoscope BLine"));
        TOOLBOX_BUTTON(button_rotoscope_polygon,"synfig-rotoscope_polygon",_("Rotoscope Polygon"));
        TOOLBOX_BUTTON(button_eyedrop,"synfig-eyedrop",_("Eyedrop Tool"));
        TOOLBOX_BUTTON(button_rotoscope,"synfig-rotoscope_bline",_("Rotoscope 2"));
-       
+
 
 
        button_about->signal_clicked().connect(sigc::ptr_fun(studio::App::dialog_about));
@@ -311,7 +311,7 @@ Toolbox::Toolbox():
        handle_tools->show();
        handle_tools->set_handle_position(Gtk::POS_TOP);
        handle_tools->set_snap_edge(Gtk::POS_TOP);
-       
+
        Widget_Defaults* widget_defaults(manage(new Widget_Defaults()));
        widget_defaults->show();
        Gtk::HandleBox* handle_defaults(manage(new Gtk::HandleBox()));
@@ -319,7 +319,7 @@ Toolbox::Toolbox():
        handle_defaults->show();
        handle_defaults->set_handle_position(Gtk::POS_TOP);
        handle_defaults->set_snap_edge(Gtk::POS_TOP);
-       
+
        // Create the toplevel table
        Gtk::Table *table1 = manage(new class Gtk::Table(1, 2, false));
        table1->set_row_spacings(0);
@@ -330,9 +330,9 @@ Toolbox::Toolbox():
        table1->attach(*handle_tools, 0, 1, 3, 4, Gtk::FILL|Gtk::EXPAND,Gtk::EXPAND|Gtk::FILL, 0, 0);
        table1->attach(*handle_defaults, 0, 1, 4, 5, Gtk::FILL|Gtk::EXPAND,Gtk::EXPAND|Gtk::FILL, 0, 0);
        table1->show_all();
-       
-       
-       
+
+
+
        // Set the parameters for this window
        add(*table1);
        set_title("Synfig Studio");
@@ -342,7 +342,7 @@ Toolbox::Toolbox():
        set_resizable(false);
 
 
-       
+
        App::signal_instance_selected().connect(
                sigc::hide(
                        sigc::mem_fun(*this,&studio::Toolbox::update_undo_redo)
@@ -354,11 +354,11 @@ Toolbox::Toolbox():
        );
 
        button_undo->set_sensitive(false);
-       button_redo->set_sensitive(false);      
+       button_redo->set_sensitive(false);
        button_rotoscope_bline->set_sensitive(false);
        button_rotoscope->set_sensitive(false);
-       button_rotoscope_polygon->set_sensitive(false); 
-       button_eyedrop->set_sensitive(false);   
+       button_rotoscope_polygon->set_sensitive(false);
+       button_eyedrop->set_sensitive(false);
 
 
        std::list<Gtk::TargetEntry> listTargets;
@@ -368,14 +368,14 @@ Toolbox::Toolbox():
 
        drag_dest_set(listTargets);
        signal_drag_data_received().connect( sigc::mem_fun(*this, &studio::Toolbox::on_drop_drag_data_received) );
-       
+
        App::dock_manager->signal_dockable_registered().connect(sigc::mem_fun(*this,&Toolbox::dockable_registered));
-       
+
        changing_state_=false;
-       
+
 
        add_accel_group(App::ui_manager()->get_accel_group());
-       
+
        App::signal_present_all().connect(sigc::mem_fun0(*this,&Toolbox::present));
 }
 
@@ -396,12 +396,12 @@ Toolbox::set_active_state(const String& statename)
        std::map<synfig::String,Gtk::ToggleButton *>::iterator iter;
 
        changing_state_=true;
-       
+
        synfigapp::Main::set_state(statename);
-       
+
        try
        {
-               
+
                for(iter=state_button_map.begin();iter!=state_button_map.end();++iter)
                {
                        if(iter->first==statename)
@@ -434,7 +434,7 @@ Toolbox::change_state(const synfig::String& statename)
                {
                        return;
                }
-               
+
                if(state_button_map.count(statename))
                {
                        state_button_map[statename]->clicked();
@@ -452,7 +452,7 @@ Toolbox::change_state_(const Smach::state_base *state)
        if(changing_state_)
                return;
        changing_state_=true;
-       
+
        try
        {
                etl::handle<studio::CanvasView> canvas_view(studio::App::get_selected_canvas_view());
@@ -460,7 +460,7 @@ Toolbox::change_state_(const Smach::state_base *state)
                {
                        if(state->get_name()==String("normal"))
                        {
-                               canvas_view->get_smach().egress();                              
+                               canvas_view->get_smach().egress();
                        }
                        else
                        {
@@ -475,7 +475,7 @@ Toolbox::change_state_(const Smach::state_base *state)
                changing_state_=false;
                throw;
        }
-       
+
        changing_state_=false;
 }
 
@@ -487,7 +487,7 @@ Toolbox::add_state(const Smach::state_base *state)
        assert(state);
 
        String name=state->get_name();
-       
+
        Gtk::ToggleButton* button;
        button=manage(new class Gtk::ToggleButton());
 
@@ -497,38 +497,38 @@ Toolbox::add_state(const Smach::state_base *state)
        icon->show();
        button->show();
 
-       
 
-       
+
+
        int row=state_button_map.size()/4;
        int col=state_button_map.size()%4;
 
        tool_table->attach(*button,col,col+1,row,row+1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       
+
        state_button_map[name]=button;
-       
+
        button->signal_clicked().connect(
                sigc::bind(
                        sigc::mem_fun(*this,&studio::Toolbox::change_state_),
                        state
                )
        );
-       
-       
+
+
        refresh();
 }
 
 
 void
 Toolbox::update_undo_redo()
-{      
+{
        etl::handle<Instance> instance=App::get_selected_instance();
        if(instance)
        {
                button_undo->set_sensitive(instance->get_undo_status());
-               button_redo->set_sensitive(instance->get_redo_status());        
+               button_redo->set_sensitive(instance->get_redo_status());
        }
-       
+
        // This should probably go elsewhere, but it should
        // work fine here with no troubles.
        // These next several lines just adjust the rotoscope buttons
@@ -536,14 +536,14 @@ Toolbox::update_undo_redo()
        if(instance && App::get_selected_canvas_view())
        {
                std::map<synfig::String,Gtk::ToggleButton *>::iterator iter;
-               
+
                for(iter=state_button_map.begin();iter!=state_button_map.end();++iter)
                        iter->second->set_sensitive(true);
        }
        else
        {
                std::map<synfig::String,Gtk::ToggleButton *>::iterator iter;
-               
+
                for(iter=state_button_map.begin();iter!=state_button_map.end();++iter)
                        iter->second->set_sensitive(false);
        }
@@ -560,10 +560,10 @@ Toolbox::update_undo_redo()
 
 void
 Toolbox::on_recent_files_changed()
-{      
+{
        while(recent_files_menu->get_children().size())
                recent_files_menu->remove(**recent_files_menu->get_children().begin());
-       
+
        list<string>::const_iterator iter;
        // Check to see if the file is already on the list.
        // If it is, then remove it from the list
@@ -571,7 +571,7 @@ Toolbox::on_recent_files_changed()
                recent_files_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(basename(*iter),
                        sigc::hide_return(sigc::bind(sigc::ptr_fun(&App::open),*iter))
                ));
-       
+
        // HACK
        show();
 }
@@ -581,7 +581,7 @@ Toolbox::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& contex
 {
        // We will make this true once we have a solid drop
        bool success(false);
-       
+
        if ((selection_data_.get_length() >= 0) && (selection_data_.get_format() == 8))
        {
                synfig::String selection_data((gchar *)(selection_data_.get_data()));
@@ -598,11 +598,11 @@ Toolbox::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& contex
                {
                        synfig::String filename,URI;
                        getline(stream,filename);
-                       
+
                        // If we don't have a filename, move on.
                        if(filename.empty())
                                continue;
-                       
+
                        // Make sure this URL is of the "file://" type.
                        URI=String(filename.begin(),filename.begin()+sizeof("file://")-1);
                        if(URI!="file://")
@@ -610,11 +610,11 @@ Toolbox::on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& contex
                                synfig::warning("Unknown URI (%s) in \"%s\"",URI.c_str(),filename.c_str());
                                continue;
                        }
-                       
+
                        // Strip the "file://" part from the filename
                        filename=synfig::String(filename.begin()+sizeof("file://")-1,filename.end());
-               
-                       synfig::info("Attempting to open "+filename);           
+
+                       synfig::info("Attempting to open "+filename);
                        if(App::open(filename))
                                success=true;
                        else
index d510d8c..d79f0f9 100644 (file)
@@ -47,11 +47,11 @@ namespace studio {
 
 class Dockable;
 class StateManager;
-       
+
 class Toolbox : public Gtk::Window
 {
        friend class studio::StateManager;
-       
+
        DialogSettings dialog_settings;
 
        Gtk::Tooltips tooltips;
@@ -62,22 +62,22 @@ class Toolbox : public Gtk::Window
        Gtk::Button *button_rotoscope;
        Gtk::Button *button_rotoscope_bline;
        Gtk::Button *button_rotoscope_polygon;
-       
+
        Gtk::Table *tool_table;
 
        std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
-       
+
        Gtk::Menu       *recent_files_menu;
 
        Gtk::Menu       *dock_dialogs;
 
        bool changing_state_;
-       
-       void on_recent_files_changed(); 
+
+       void on_recent_files_changed();
        void on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
 
        void change_state_(const Smach::state_base *state);
-       
+
 public:
 
        void change_state(const synfig::String& statename);
@@ -90,12 +90,12 @@ public:
 
        void add_state(const Smach::state_base *state);
 
-       
+
        void dockable_registered(Dockable* x);
-       
+
        Toolbox();
        virtual ~Toolbox();
-       
+
 };
 
 }; // END of namespace studio
index c38dbe5..c7d38c5 100644 (file)
@@ -65,12 +65,12 @@ ValueBaseLink::~ValueBaseLink()
 ValueNode::LooseHandle ValueBaseLink::get_link_vfunc(int i)const
 {
        /*list_type::const_iterator     it = list.begin();
-       
+
        while(it != list.end() && i-- > 0)
        {
                ++it;
        }
-       
+
        if(it == list.end())
        {
                return ValueNode::LooseHandle();
@@ -99,7 +99,7 @@ String ValueBaseLink::link_local_name(int i)const
 
        if(h)
        {
-               return h->get_local_name();             
+               return h->get_local_name();
        }else return String();
 }
 
@@ -128,7 +128,7 @@ ValueBaseLink::list_type::const_iterator ValueBaseLink::findlink(ValueNode::Hand
                        return i;
                }
        }
-       
+
        return list.end();
 }
 ValueBaseLink::list_type::iterator ValueBaseLink::findlink(ValueNode::Handle x)
@@ -140,14 +140,14 @@ ValueBaseLink::list_type::iterator ValueBaseLink::findlink(ValueNode::Handle x)
                        return i;
                }
        }
-       
+
        return list.end();
 }
 
 void ValueBaseLink::add(ValueNode::Handle v)
 {
        list_type::iterator i = findlink(v);
-       
+
        if(i != list.end())
        {
                list.push_back(v);
@@ -157,7 +157,7 @@ void ValueBaseLink::add(ValueNode::Handle v)
 void ValueBaseLink::remove(ValueNode::Handle v)
 {
        list_type::iterator i = findlink(v);
-       
+
        if(i != list.end())
        {
                if(i != list.end()-1)
@@ -165,5 +165,5 @@ void ValueBaseLink::remove(ValueNode::Handle v)
                        *i = list.back();
                }
                list.pop_back();
-       }       
+       }
 }
index 3720f74..79eb124 100644 (file)
@@ -47,17 +47,17 @@ protected:
        //stuff I don't want
        virtual bool set_link_vfunc(int i,synfig::ValueNode::Handle x) {return false;}
        virtual LinkableValueNode* create_new()const {return 0;}
-       
+
        //new stuff I need
        list_type::const_iterator findlink(synfig::ValueNode::Handle x) const;
        list_type::iterator findlink(synfig::ValueNode::Handle x);
-       
+
 public: //linkable interface
-       
-       //stuff I do want       
+
+       //stuff I do want
        virtual synfig::ValueNode::LooseHandle get_link_vfunc(int i)const;
        virtual int link_count()const;
-       
+
        //I have to support the thing because it's too much work otherwise
        virtual synfig::String link_local_name(int i)const;
        virtual synfig::String link_name(int i)const;
@@ -74,7 +74,7 @@ public:
        virtual void remove(synfig::ValueNode::Handle v);
 
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 1d94418..67942b4 100644 (file)
@@ -83,13 +83,13 @@ Widget_CanvasChooser::set_value(etl::handle<synfig::Canvas> data)
        synfig::Canvas::Children::iterator iter;
        synfig::Canvas::Children &children(parent_canvas->children());
        String label;
-       
+
        if(canvas)
        {
                label=canvas->get_name().empty()?canvas->get_id():canvas->get_name();
                canvas_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(label));
        }
-       
+
        for(iter=children.begin();iter!=children.end();iter++)
                if(*iter!=canvas)
                {
@@ -139,7 +139,7 @@ Widget_CanvasChooser::chooser_menu()
        catch(std::runtime_error x)
        {
                App::dialog_error_blocking(_("Error:Exception Thrown"),x.what());
-               set_value_(canvas);             
+               set_value_(canvas);
        }
        catch(...)
        {
index 934482f..1a0e9c3 100644 (file)
@@ -52,7 +52,7 @@ public:
 
        Widget_CanvasChooser();
        ~Widget_CanvasChooser();
-       
+
        void set_parent_canvas(synfig::Canvas::Handle x);
        void set_value(synfig::Canvas::Handle data);
        const synfig::Canvas::Handle &get_value();
index 73b63af..6a68af3 100644 (file)
@@ -72,18 +72,18 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
 {
        const int height(ca.get_height());
        const int width(ca.get_width());
-       
+
        const int square_size(height/2);
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(window));
-       
+
        if(color.get_alpha()!=1.0)
        {
                // In this case we need to render the alpha squares
-               
+
                const Color bg1(Color::blend(color,Color(0.75, 0.75, 0.75),1.0).clamped());
                const Color bg2(Color::blend(color,Color(0.5, 0.5, 0.5),1.0).clamped());
-       
+
                Gdk::Color gdk_c1(colorconv_synfig2gdk(bg1));
                Gdk::Color gdk_c2(colorconv_synfig2gdk(bg2));
 
@@ -91,12 +91,12 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
                for(int i=0;i<width;i+=square_size)
                {
                        const int square_width(min(square_size,width-i));
-                       
+
                        if(toggle)
                        {
                                gc->set_rgb_fg_color(gdk_c1);
-                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);                          
-               
+                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);
+
                                gc->set_rgb_fg_color(gdk_c2);
                                window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y()+square_size, square_width, square_size);
                                toggle=false;
@@ -104,8 +104,8 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
                        else
                        {
                                gc->set_rgb_fg_color(gdk_c2);
-                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);                          
-               
+                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);
+
                                gc->set_rgb_fg_color(gdk_c1);
                                window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y()+square_size, square_width, square_size);
                                toggle=true;
@@ -117,7 +117,7 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
                // In this case we have a solid color to use
                Gdk::Color gdk_c1(colorconv_synfig2gdk(color));
 
-               gc->set_rgb_fg_color(gdk_c1);   
+               gc->set_rgb_fg_color(gdk_c1);
                window->draw_rectangle(gc, true, ca.get_x(), ca.get_y(), width-1, height-1);
        }
        gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
@@ -177,7 +177,7 @@ Widget_Color::on_event(GdkEvent *event)
                        return true;
                }
                break;
-               
+
        default:
                break;
        }
@@ -190,8 +190,8 @@ Widget_Color::redraw(GdkEventExpose*bleh)
        //Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
 
        const int h(get_height());
-       const int w(get_width());       
-       
+       const int w(get_width());
+
        render_color_to_window(get_window(),Gdk::Rectangle(0,0,w,h),color);
 
        return true;
index 324364c..37fcb19 100644 (file)
@@ -44,13 +44,13 @@ namespace studio {
 
 
 Gdk::Color colorconv_synfig2gdk(const synfig::Color &c);
-       
+
 void render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const Gdk::Rectangle& ca,const synfig::Color &color);
 
 class Widget_Color : public Gtk::DrawingArea
 {
        synfig::Color color;
-       
+
        sigc::signal<void> signal_activate_;
        sigc::signal<void> signal_secondary_;
 
@@ -60,7 +60,7 @@ public:
        sigc::signal<void>& signal_activate() { return signal_activate_; }
        sigc::signal<void>& signal_clicked() { return signal_activate_; }
        sigc::signal<void>& signal_secondary() { return signal_secondary_; }
-       
+
        void set_value(const synfig::Color &data);
        const synfig::Color &get_value();
        Widget_Color();
@@ -70,7 +70,7 @@ private:
        bool on_event(GdkEvent *event);
 
 }; // END of class Widget_Color
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index ded67eb..282c493 100644 (file)
@@ -130,9 +130,9 @@ ColorSlider::redraw(GdkEventExpose*bleh)
                slider_color_TYPE_SAT,
                slider_color_TYPE_A,
        };
-       
+
        slider_color_func color_func(jump_table[int(type)]);
-       
+
        float amount;
        switch(type)
        {
@@ -149,12 +149,12 @@ ColorSlider::redraw(GdkEventExpose*bleh)
        }
        if(use_colorspace_gamma() && (type<TYPE_U))
                amount=gamma_in(amount);
-       
+
        const int height(get_height());
        const int width(get_width());
 
        Gdk::Rectangle ca(0,0,width,height);
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
        const Color bg1(0.75, 0.75, 0.75);
        const Color bg2(0.5, 0.5, 0.5);
@@ -167,14 +167,14 @@ ColorSlider::redraw(GdkEventExpose*bleh)
                const Color c2(Color::blend(color,bg2,1.0).clamped());
                assert(c1.is_valid());
                assert(c2.is_valid());
-               
+
                gushort r1;
                gushort g1;
                gushort b1;
                gushort r2;
                gushort g2;
                gushort b2;
-               
+
                if(use_colorspace_gamma() && (type<TYPE_U))
                {
                        r1=(256*App::gamma.r_F32_to_U8(gamma_out(c1.get_r())));
@@ -193,14 +193,14 @@ ColorSlider::redraw(GdkEventExpose*bleh)
                        g2=(256*App::gamma.g_F32_to_U8(c2.get_g()));
                        b2=(256*App::gamma.b_F32_to_U8(c2.get_b()));
                }
-                       
-               
+
+
                if((i*2/height)&1)
                {
                        gdk_c.set_rgb(r1,g1,b1);
                        gc->set_rgb_fg_color(gdk_c);
-                       get_window()->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), 1, height/2);                          
-       
+                       get_window()->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), 1, height/2);
+
                        gdk_c.set_rgb(r2,g2,b2);
                        gc->set_rgb_fg_color(gdk_c);
                        get_window()->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y()+height/2, 1, height/2);
@@ -209,14 +209,14 @@ ColorSlider::redraw(GdkEventExpose*bleh)
                {
                        gdk_c.set_rgb(r2,g2,b2);
                        gc->set_rgb_fg_color(gdk_c);
-                       get_window()->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), 1, height/2);                          
-       
+                       get_window()->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), 1, height/2);
+
                        gdk_c.set_rgb(r1,g1,b1);
                        gc->set_rgb_fg_color(gdk_c);
                        get_window()->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y()+height/2, 1, height/2);
                }
        }
-       
+
        get_style()->paint_arrow(
                get_window(),
                Gtk::STATE_SELECTED,
@@ -231,7 +231,7 @@ ColorSlider::redraw(GdkEventExpose*bleh)
                height,
                height
        );
-       
+
        gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
        get_window()->draw_rectangle(gc, false, ca.get_x()+1, ca.get_y()+1, width-3, height-3);
        gc->set_rgb_fg_color(Gdk::Color("#000000"));
@@ -256,7 +256,7 @@ ColorSlider::on_event(GdkEvent *event)
        case GDK_BUTTON_RELEASE:
                signal_activated_();
                return true;
-       
+
        case GDK_MOTION_NOTIFY:
 //             adjust_color(type,color_,pos);
                signal_slider_moved_(type,pos);
@@ -278,7 +278,7 @@ Widget_ColorEdit::Widget_ColorEdit():
        A_adjustment(0,-10000000,10000000,1,10,0)
 {
        notebook=manage(new Gtk::Notebook);
-       
+
        Gtk::Table* rgb_table(manage(new Gtk::Table()));
        Gtk::Table* yuv_table(manage(new Gtk::Table()));
        Gtk::Table* main_table(this);
@@ -295,27 +295,27 @@ Widget_ColorEdit::Widget_ColorEdit():
        color=Color(0,0,0,0);
 
        set_size_request(150,-1);
-       hold_signals=true;              
+       hold_signals=true;
 
        Gtk::Label *label;
-       
+
        R_adjustment.set_lower(-10000000);
        G_adjustment.set_lower(-10000000);
        B_adjustment.set_lower(-10000000);
        A_adjustment.set_lower(-10000000);
-       
+
        clamp_=true;
-       
+
        Pango::AttrList attr_list;
        Pango::AttrInt pango_size(Pango::Attribute::create_attr_size(Pango::SCALE*7));
        pango_size.set_start_index(0);
        pango_size.set_end_index(64);
        attr_list.change(pango_size);
-       
+
        widget_color.set_size_request(-1,16);
        attach(widget_color, 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
        attach(*notebook, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       
+
 #define SLIDER_ROW(i,n,l) \
        slider_##n=manage(new ColorSlider(ColorSlider::TYPE_##n));      \
        slider_##n->signal_slider_moved().connect(sigc::mem_fun(*this,&studio::Widget_ColorEdit::on_slider_moved)); \
@@ -357,10 +357,10 @@ Widget_ColorEdit::Widget_ColorEdit():
                SLIDER_ROW(1,A,_("Alpha"));
                ATTACH_SPIN_BUTTON(1,A);
        }
-       
+
 #undef SLIDER_ROW
-#undef ATTACH_SPIN_BUTTON      
-       
+#undef ATTACH_SPIN_BUTTON
+
        spinbutton_R->signal_activate().connect(sigc::mem_fun(*spinbutton_G,&Gtk::SpinButton::grab_focus));
        spinbutton_G->signal_activate().connect(sigc::mem_fun(*spinbutton_B,&Gtk::SpinButton::grab_focus));
        spinbutton_B->signal_activate().connect(sigc::mem_fun(*spinbutton_A,&Gtk::SpinButton::grab_focus));
@@ -386,7 +386,7 @@ void
 Widget_ColorEdit::on_slider_moved(ColorSlider::Type type, float amount)
 {
        Color color(get_value_raw());
-       
+
        assert(color.is_valid());
        ColorSlider::adjust_color(type,color,amount);
        assert(color.is_valid());
@@ -402,7 +402,7 @@ Widget_ColorEdit::on_slider_moved(ColorSlider::Type type, float amount)
        if(type==ColorSlider::TYPE_B && color.get_b()<0)clamp_=false;
        */
        clamp_=false;
-       
+
        set_value(color);
        assert(color.is_valid());
 }
@@ -412,7 +412,7 @@ Widget_ColorEdit::on_value_changed()
 {
        if(hold_signals)
                return;
-       
+
        const Color color(get_value_raw());
        assert(color.is_valid());
        slider_R->set_color(color);
@@ -513,7 +513,7 @@ Widget_ColorEdit::get_value_raw()
        }
        color.set_a(A_adjustment.get_value()/100);
        assert(color.is_valid());
-       
+
        return color;
 }
 
@@ -536,16 +536,16 @@ Widget_ColorEdit::get_value()
        }
        color.set_a(A_adjustment.get_value()/100);
        assert(color.is_valid());
-       
+
        if(notebook->get_current_page()!=0)
                color=color.clamped();
-       
+
        /*{
                // Clamp out negative values
                color.set_r(std::max(0.0f,(float)color.get_r()));
                color.set_g(std::max(0.0f,(float)color.get_g()));
                color.set_b(std::max(0.0f,(float)color.get_b()));
        }*/
-       
+
        return color;
 }
index ad97ee8..5823877 100644 (file)
@@ -61,10 +61,10 @@ public:
                TYPE_HUE,
                TYPE_SAT,
                TYPE_A,
-               
+
                TYPE_END
        };
-       
+
 private:
 
        sigc::signal<void,Type,float> signal_slider_moved_;
@@ -107,14 +107,14 @@ private:
        static void slider_color_TYPE_HUE(synfig::Color &color, float amount);
        static void slider_color_TYPE_SAT(synfig::Color &color, float amount);
        static void slider_color_TYPE_A(synfig::Color &color, float amount);
-       
+
 
        bool
        redraw(GdkEventExpose*bleh);
        bool on_event(GdkEvent *event);
 }; // END of class ColorSlider
 
-       
+
 class Widget_ColorEdit : public Gtk::Table
 {
        sigc::signal<void> signal_activated_;
@@ -129,13 +129,13 @@ class Widget_ColorEdit : public Gtk::Table
        ColorSlider *slider_V;
        ColorSlider *slider_SAT;
        ColorSlider *slider_HUE;
-       
+
        Widget_Color widget_color;
-       
+
        bool hold_signals;
-       
+
        bool clamp_;
-       
+
        Gtk::SpinButton *spinbutton_R;
        Gtk::SpinButton *spinbutton_G;
        Gtk::SpinButton *spinbutton_B;
@@ -145,13 +145,13 @@ class Widget_ColorEdit : public Gtk::Table
        Gtk::Adjustment G_adjustment;
        Gtk::Adjustment B_adjustment;
        Gtk::Adjustment A_adjustment;
-       
+
        synfig::Color color;
 
        Gtk::Notebook* notebook;
 
 protected:
-       
+
        void on_value_changed();
 
 public:
@@ -163,9 +163,9 @@ public:
        void on_slider_moved(ColorSlider::Type type, float amount);
 
        //Glib::SignalProxy0<void> signal_activate() { return spinbutton_A->signal_activate(); }
-       
+
        sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
-       
+
        void activated() { signal_activated_(); }
        void activate() { signal_activated_(); }
        void set_value(const synfig::Color &data);
@@ -176,7 +176,7 @@ public:
        Widget_ColorEdit();
        ~Widget_ColorEdit();
 }; // END of class Widget_ColorEdit
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 492e5dd..c1a06d6 100644 (file)
@@ -105,7 +105,7 @@ Widget_CompSelect::set_selected_instance(etl::loose_handle<studio::Instance> x)
        else
                set_history(0);
 
-       set_selected_instance_(x);      
+       set_selected_instance_(x);
 }
 
 void
@@ -113,11 +113,11 @@ Widget_CompSelect::new_instance(etl::handle<studio::Instance> instance)
 {
        if(studio::App::shutdown_in_progress)
                return;
-       
+
        assert(instance);
-       
+
        etl::loose_handle<studio::Instance> loose_instance(instance);
-       
+
        instance->synfigapp::Instance::signal_filename_changed().connect(sigc::mem_fun(*this,&Widget_CompSelect::refresh));
        instance->synfigapp::Instance::signal_filename_changed().connect(
                sigc::bind<etl::loose_handle<studio::Instance> >(
@@ -132,7 +132,7 @@ Widget_CompSelect::new_instance(etl::handle<studio::Instance> instance)
                instance_list_menu.items().push_back(Gtk::Menu_Helpers::MenuElem(name,
                        sigc::bind<etl::loose_handle<studio::Instance> >(sigc::ptr_fun(&studio::App::set_selected_instance),loose_instance)     ));
        }
-       
+
 }
 
 void
index 64cb204..2a48c25 100644 (file)
@@ -44,11 +44,11 @@ namespace studio {
 class Widget_CompSelect : public Gtk::OptionMenu
 {
        Gtk::Menu       instance_list_menu;
-       
+
 
        etl::loose_handle<studio::Instance>     selected_instance;
        void set_selected_instance_(etl::handle<studio::Instance> x);
-       
+
        void new_instance(etl::handle<studio::Instance> x);
 
        void delete_instance(etl::handle<studio::Instance> x);
@@ -56,12 +56,12 @@ class Widget_CompSelect : public Gtk::OptionMenu
        void set_selected_instance(etl::loose_handle<studio::Instance> x);
 
        void set_selected_instance_signal(etl::handle<studio::Instance> x);
-               
+
 public:
 
        Widget_CompSelect();
        ~Widget_CompSelect();
-       
+
        etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
 
        void refresh();
index 040aeac..a9085ab 100644 (file)
@@ -59,18 +59,18 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
 {
        const int height(ca.get_height());
        const int width(ca.get_width());
-       
+
        const int square_size(height/2);
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(window));
-       
+
        if(color.get_alpha()!=1.0)
        {
                // In this case we need to render the alpha squares
-               
+
                const Color bg1(Color::blend(color,Color(0.75, 0.75, 0.75),1.0).clamped());
                const Color bg2(Color::blend(color,Color(0.5, 0.5, 0.5),1.0).clamped());
-       
+
                Gdk::Color gdk_c1(colorconv_synfig2gdk(bg1));
                Gdk::Color gdk_c2(colorconv_synfig2gdk(bg2));
 
@@ -78,12 +78,12 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
                for(int i=0;i<width;i+=square_size)
                {
                        const int square_width(min(square_size,width-i));
-                       
+
                        if(toggle)
                        {
                                gc->set_rgb_fg_color(gdk_c1);
-                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);                          
-               
+                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);
+
                                gc->set_rgb_fg_color(gdk_c2);
                                window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y()+square_size, square_width, square_size);
                                toggle=false;
@@ -91,8 +91,8 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
                        else
                        {
                                gc->set_rgb_fg_color(gdk_c2);
-                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);                          
-               
+                               window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y(), square_width, square_size);
+
                                gc->set_rgb_fg_color(gdk_c1);
                                window->draw_rectangle(gc, true, ca.get_x()+i, ca.get_y()+square_size, square_width, square_size);
                                toggle=true;
@@ -104,7 +104,7 @@ studio::render_color_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const G
                // In this case we have a solid color to use
                Gdk::Color gdk_c1(colorconv_synfig2gdk(color));
 
-               gc->set_rgb_fg_color(gdk_c1);   
+               gc->set_rgb_fg_color(gdk_c1);
                window->draw_rectangle(gc, true, ca.get_x(), ca.get_y(), width-1, height-1);
        }
        gc->set_rgb_fg_color(Gdk::Color("#ffffff"));
@@ -189,7 +189,7 @@ struct studio::Widget_Curves::CurveStruct : sigc::trackable
                                channels.push_back(Channel());
                                channels.back().name="v.y";
                                channels.back().color=Gdk::Color("#7f3f00");
-                               
+
                                channels.push_back(Channel());
                                channels.back().name="width";
                                channels.back().color=Gdk::Color("#000000");
@@ -201,7 +201,7 @@ struct studio::Widget_Curves::CurveStruct : sigc::trackable
                                channels.push_back(Channel());
                                channels.back().name="tsplit";
                                channels.back().color=Gdk::Color("#ff00ff");
-                       
+
                                channels.push_back(Channel());
                                channels.back().name="t1.x";
                                channels.back().color=Gdk::Color("#ff0000");
@@ -220,7 +220,7 @@ struct studio::Widget_Curves::CurveStruct : sigc::trackable
                                throw synfig::Exception::BadType("Bad type for curves");
                }
        }
-       
+
        void clear_all_values()
        {
                DEBUGPOINT();
@@ -228,18 +228,18 @@ struct studio::Widget_Curves::CurveStruct : sigc::trackable
                for(iter=channels.begin();iter!=channels.end();++iter)
                        iter->values.clear();
        }
-       
+
        synfig::Real get_value(int chan, synfig::Real time, synfig::Real tolerance)
        {
                std::map<synfig::Real,synfig::Real>::iterator iter;
-               
+
                // First check to see if we have a value
                // that is "close enough" to the time
                // we are looking for
                iter=channels[chan].values.lower_bound(time);
                if(iter!=channels[chan].values.end() && iter->first-time<=tolerance)
                        return -iter->second;
-               
+
                // Since that didn't work, we now need
                // to go ahead and figure out what the
                // actual value is at that time.
@@ -285,7 +285,7 @@ struct studio::Widget_Curves::CurveStruct : sigc::trackable
                        default:
                                return 0;
                }
-               
+
                return -channels[chan].values[time];
        }
 };
@@ -310,10 +310,10 @@ Widget_Curves::Widget_Curves():
                )
        );
        //set_vadjustment(*range_adjustment_);
-       
+
        signal_expose_event().connect(sigc::mem_fun(*this, &studio::Widget_Curves::redraw));
        add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
-       
+
 }
 
 Widget_Curves::~Widget_Curves()
@@ -360,7 +360,7 @@ void
 Widget_Curves::set_value_descs(std::list<synfigapp::ValueDesc> value_descs)
 {
        curve_list_.clear();
-       
+
        std::list<synfigapp::ValueDesc>::iterator iter;
        for(iter=value_descs.begin();iter!=value_descs.end();++iter)
        {
@@ -430,7 +430,7 @@ Widget_Curves::on_event(GdkEvent *event)
        }
 
        return true;
-       
+
 /*     switch(event->type)
        {
        case GDK_BUTTON_PRESS:
@@ -445,7 +445,7 @@ Widget_Curves::on_event(GdkEvent *event)
                        return true;
                }
                break;
-               
+
        default:
                break;
        }
@@ -457,14 +457,14 @@ bool
 Widget_Curves::redraw(GdkEventExpose*bleh)
 {
        const int h(get_height());
-       const int w(get_width());       
+       const int w(get_width());
        get_window()->clear();
-       
+
        if(!time_adjustment_ || !range_adjustment_ || !h || !w)
                return false;
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
-       
+
        const Real t_begin(time_adjustment_->get_lower());
        const Real t_end(time_adjustment_->get_upper());
        const Real dt((t_end-t_begin)/w);
@@ -474,7 +474,7 @@ Widget_Curves::redraw(GdkEventExpose*bleh)
        const Real dr((r_top-r_bottom)/h);
        Real r_max(-100000000);
        Real r_min(100000000);
-       
+
        std::list<CurveStruct>::iterator curve_iter;
 
        vector<Gdk::Point> points[10];
@@ -521,23 +521,23 @@ Widget_Curves::redraw(GdkEventExpose*bleh)
                for(int chan=0;chan<channels;chan++)
                {
                        gc->set_rgb_fg_color(curve_iter->channels[chan].color);
-       
+
                        // Draw the curve
                        get_window()->draw_lines(gc, Glib::ArrayHandle<Gdk::Point>(points[chan]));
 
                        Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
-                                               
-                       layout->set_text(curve_iter->channels[chan].name);              
-                       get_window()->draw_layout(gc, 1, points[chan][0].get_y()+1, layout);                    
+
+                       layout->set_text(curve_iter->channels[chan].name);
+                       get_window()->draw_layout(gc, 1, points[chan][0].get_y()+1, layout);
                }
        }
-       
+
        if(!curve_list_.empty())
        {
                range_adjustment_->set_upper(r_max+range_adjustment_->get_page_size()/2);
                range_adjustment_->set_lower(r_min-range_adjustment_->get_page_size()/2);
        }
        get_window()->get_update_area();
-       
+
        return true;
 }
index 2f83ab0..650904b 100644 (file)
@@ -52,9 +52,9 @@ class Widget_Curves : public Gtk::DrawingArea
 
        Gtk::Adjustment* time_adjustment_;
        Gtk::Adjustment* range_adjustment_;
-               
+
        std::list<CurveStruct> curve_list_;
-       
+
 public:
 
        Widget_Curves();
@@ -73,7 +73,7 @@ private:
        bool on_event(GdkEvent *event);
 
 }; // END of class Widget_Curves
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index b0d5310..a7dea10 100644 (file)
@@ -76,14 +76,14 @@ public:
                synfigapp::Main::signal_bline_width_changed().connect(sigc::mem_fun(*this,&studio::Widget_Brush::queue_draw));
                studio::App::signal_instance_selected().connect(sigc::hide(sigc::mem_fun(*this,&studio::Widget_Brush::queue_draw)));
        }
-       
+
        bool
        redraw(GdkEventExpose*bleh)
        {
                Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
-               
+
                const int h(get_height());
-               const int w(get_width());       
+               const int w(get_width());
 
                float pixelsize(0);
                if(App::get_selected_canvas_view())
@@ -91,7 +91,7 @@ public:
                        const RendDesc& rend_desc(App::get_selected_canvas_view()->get_canvas()->rend_desc());
                        pixelsize=synfigapp::Main::get_bline_width().get(Distance::SYSTEM_PIXELS,rend_desc);
                }
-               else 
+               else
                {
                        RendDesc rend_desc;
                        pixelsize=synfigapp::Main::get_bline_width().get(Distance::SYSTEM_PIXELS,rend_desc);
@@ -101,7 +101,7 @@ public:
 
 /*
                gc->set_rgb_fg_color(colorconv_synfig2gdk(synfigapp::Main::get_background_color()));
-               gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);       
+               gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                get_window()->draw_rectangle(
                        gc,
                        true,   // Fill?
@@ -109,7 +109,7 @@ public:
                        w,h     //w,h
                );
 */
-               
+
                // Draw in the circle
                gc->set_rgb_fg_color(colorconv_synfig2gdk(synfigapp::Main::get_foreground_color()));
                gc->set_function(Gdk::COPY);
@@ -123,8 +123,8 @@ public:
                        round_to_int(pixelsize+0.6),
                        0,
                        360*64
-               );  
-                       
+               );
+
                return true;
        }
 
@@ -133,10 +133,10 @@ public:
        {
 //             const int x(static_cast<int>(event->button.x));
                const int y(static_cast<int>(event->button.y));
-               
+
                const int h(get_height());
-//             const int w(get_width());       
-               
+//             const int w(get_width());
+
                switch(event->type)
                {
                        case GDK_MOTION_NOTIFY:
@@ -145,7 +145,7 @@ public:
                                if(event->button.button==1) // Left click
                                {
                                        Distance dist(synfigapp::Main::get_bline_width());
-                                       
+
                                        if(y<h/2) // increase BLine size
                                        {
                                                dist+=DEFAULT_INCREMENT;
@@ -167,7 +167,7 @@ public:
                        case GDK_SCROLL:
                                {
                                        Distance dist(synfigapp::Main::get_bline_width());
-                                       
+
                                        if(event->scroll.direction==GDK_SCROLL_UP)
                                        {
                                                dist+=DEFAULT_INCREMENT;
@@ -182,7 +182,7 @@ public:
                        default:
                                break;
                }
-               
+
                return false;
        }
 
@@ -196,10 +196,10 @@ Widget_Defaults::Widget_Defaults()
 {
        //set_size_request(48,48+GRADIENT_HEIGHT+16);
        //set_size_request(48,-1);
-       
+
        {
                Gtk::Table* subtable(manage(new Gtk::Table()));
-       
+
                // Foreground Color
                widget_fg_color=manage(new Widget_Color());
                widget_fg_color->show();
@@ -207,7 +207,7 @@ Widget_Defaults::Widget_Defaults()
                widget_fg_color->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Defaults::on_fg_color_clicked));
                subtable->attach(*widget_fg_color, 0, 2, 0, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
                tooltips_.set_tip(*widget_fg_color,_("Foreground Color"));
-       
+
                // Background Color
                widget_bg_color=manage(new Widget_Color());
                widget_bg_color->show();
@@ -217,7 +217,7 @@ Widget_Defaults::Widget_Defaults()
                tooltips_.set_tip(*widget_bg_color,_("Background Color"));
 
                Gtk::Image* icon;
-               
+
                // Swap button
                Gtk::Button* button_swap(manage(new Gtk::Button()));
                button_swap->show();
@@ -244,7 +244,7 @@ Widget_Defaults::Widget_Defaults()
                subtable->attach(*button_reset, 0,1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
                tooltips_.set_tip(*button_reset,_("Reset Colors to Black and White"));
 
-               
+
                attach(*subtable, 0, 1, 0, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 1, 1);
                subtable->set_size_request(36,36);
                subtable->set_homogeneous(true);
@@ -336,7 +336,7 @@ Widget_Defaults::Widget_Defaults()
                App::dialog_gradient->reset();
                App::dialog_gradient->signal_edited().connect(sigc::mem_fun(synfigapp::Main::set_gradient));
        }
-       
+
        if(App::dialog_color)
        {
                App::dialog_color->set_color(synfigapp::Main::get_foreground_color());
@@ -345,7 +345,7 @@ Widget_Defaults::Widget_Defaults()
        }
 */
 }
-       
+
 Widget_Defaults::~Widget_Defaults()
 {
 }
@@ -465,21 +465,21 @@ Widget_Defaults::redraw(GdkEventExpose*bleh)
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
 
        const int h(get_height());
-       const int w(get_width());       
+       const int w(get_width());
        const int size=std::min(h-GRADIENT_HEIGHT,w);
-       
+
        render_color_to_window(get_window(),Gdk::Rectangle(size/4,size/4,size/4*3-1,size/4*3-1),synfigapp::Main::get_background_color());
        render_color_to_window(get_window(),Gdk::Rectangle(0,0,size/4*3-1,size/4*3-1),synfigapp::Main::get_foreground_color());
        render_gradient_to_window(get_window(),Gdk::Rectangle(0,h-GRADIENT_HEIGHT,w,GRADIENT_HEIGHT-1),synfigapp::Main::get_gradient());
 
-       
+
 
 
 
        Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
-       
+
        gc->set_rgb_fg_color(Gdk::Color("#FF0000"));
-       layout->set_text(synfigapp::Main::get_bline_width().get_string(2));             
+       layout->set_text(synfigapp::Main::get_bline_width().get_string(2));
        layout->set_alignment(Pango::ALIGN_CENTER);
        layout->set_width(w/2);
        get_window()->draw_layout(gc, w*3/4, (h-GRADIENT_HEIGHT)-16, layout);
@@ -494,7 +494,7 @@ Widget_Defaults::on_event(GdkEvent *event)
        const int y(static_cast<int>(event->button.y));
 
        const int h(get_height());
-       const int w(get_width());       
+       const int w(get_width());
        const int size=std::min(h-GRADIENT_HEIGHT,w);
 
        switch(event->type)
@@ -540,7 +540,7 @@ Widget_Defaults::on_event(GdkEvent *event)
                        if(x>size) // Left click on BLine Width
                        {
                                Distance dist(synfigapp::Main::get_bline_width());
-                               
+
                                if(y<size/2) // increase BLine size
                                {
                                        dist+=DEFAULT_INCREMENT;
@@ -568,20 +568,20 @@ Widget_Defaults::on_event(GdkEvent *event)
                                        synfigapp::Main::color_swap();
                                        return true;
                                }
-                               
+
                                if(x>w/2)
                                {
                                        // right click on bline width
                                        synfigapp::Main::set_bline_width(DEFAULT_WIDTH);
                                }
-                               
+
                        }
                }
                break;
        case GDK_SCROLL:
                {
                        Distance dist(synfigapp::Main::get_bline_width());
-                       
+
                        if(event->scroll.direction==GDK_SCROLL_UP)
                        {
                                dist+=DEFAULT_INCREMENT;
@@ -595,7 +595,7 @@ Widget_Defaults::on_event(GdkEvent *event)
        default:
                break;
        }
-       
+
        return false;
 }
 */
index a3367c2..80bbeca 100644 (file)
@@ -47,7 +47,7 @@ class Widget_Brush;
 class Widget_Color;
 class Widget_Distance;
 class Widget_Enum;
-       
+
 class Widget_Defaults : public Gtk::Table
 {
        Widget_Brush *widget_brush;
@@ -58,13 +58,13 @@ class Widget_Defaults : public Gtk::Table
        Widget_Enum     *widget_blend_method;
        Widget_Enum     *widget_interpolation;
        Gtk::HScale *widget_opacity;
-       
+
        void fg_color_refresh();
        void bg_color_refresh();
        void gradient_refresh();
        void bline_width_refresh();
        void interpolation_refresh();
-       
+
        void on_bline_width_changed();
        void on_fg_color_clicked();
        void on_bg_color_clicked();
@@ -80,11 +80,11 @@ class Widget_Defaults : public Gtk::Table
        void on_opacity_changed();
 
        Gtk::Tooltips tooltips_;
-       
+
 public:
-       
+
        Widget_Defaults();
-       
+
        ~Widget_Defaults();
 
 //     bool redraw(GdkEventExpose*bleh=NULL);
index 390fb84..5a30984 100644 (file)
@@ -46,19 +46,19 @@ namespace studio {
 class Widget_Distance : public Gtk::SpinButton
 {
        //sigc::signal<void> signal_value_changed_;
-       
+
        mutable synfig::Distance distance_;
 
        Gtk::Adjustment adjustment;
-       
+
 protected:
-       
+
        int     on_input(double* new_value);
        bool on_output();
 
 public:
        //sigc::signal<void> &signal_value_changed() { return signal_value_changed_; }
-       
+
        void set_value(const synfig::Distance &data);
        synfig::Distance get_value()const;
        Widget_Distance();
index 33e8b9f..cb56d00 100644 (file)
@@ -80,9 +80,9 @@ Widget_Enum::refresh()
 
        std::list<synfig::ParamDesc::EnumData> enum_list=param_desc.get_enum_list();
        std::list<synfig::ParamDesc::EnumData>::iterator iter;
-       
+
        String name=strprintf("(%d)",value);
-       
+
        for(iter=enum_list.begin();iter!=enum_list.end();iter++)
                if(iter->value!=value)
                        enum_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(iter->local_name,
@@ -92,17 +92,17 @@ Widget_Enum::refresh()
                        name=iter->local_name;
 
        enum_menu->items().push_front(Gtk::Menu_Helpers::MenuElem(name));
-               
-       set_menu(*enum_menu);   
+
+       set_menu(*enum_menu);
 }
 
 void
 Widget_Enum::set_value(int data)
 {
        value=data;
-       
+
        refresh();
-       
+
        set_history(0);
 }
 
index 7e3c120..f888b86 100644 (file)
@@ -45,14 +45,14 @@ class Widget_Enum : public Gtk::OptionMenu
 {
        Gtk::Menu *enum_menu;
        synfig::ParamDesc param_desc;
-       
+
        int value;
        void set_value_(int data);
 public:
 
        Widget_Enum();
        ~Widget_Enum();
-       
+
        void set_param_desc(const synfig::ParamDesc &x);
        void refresh();
 
index c332418..5d4845b 100644 (file)
@@ -57,7 +57,7 @@ public:
        Glib::SignalProxy0<void> signal_activate() { return entry_filename->signal_activate(); }
 
        void on_value_changed();
-       
+
        void set_value(const  std::string &data);
        std::string get_value() const;
        void set_has_frame(bool x);
index 6c98a87..3abfd75 100644 (file)
@@ -73,13 +73,13 @@ studio::render_gradient_to_window(const Glib::RefPtr<Gdk::Drawable>& window,cons
                gushort r2(256*App::gamma.r_F32_to_U8(c2.get_r()));
                gushort g2(256*App::gamma.g_F32_to_U8(c2.get_g()));
                gushort b2(256*App::gamma.b_F32_to_U8(c2.get_b()));
-                               
+
                if((i*2/height)&1)
                {
                        gdk_c.set_rgb(r1,g1,b1);
                        gc->set_rgb_fg_color(gdk_c);
-                       window->draw_rectangle(gc, true, ca.get_x()+i+2, ca.get_y(), 1, height/2);                              
-       
+                       window->draw_rectangle(gc, true, ca.get_x()+i+2, ca.get_y(), 1, height/2);
+
                        gdk_c.set_rgb(r2,g2,b2);
                        gc->set_rgb_fg_color(gdk_c);
                        window->draw_rectangle(gc, true, ca.get_x()+i+2, ca.get_y()+height/2, 1, height/2);
@@ -88,8 +88,8 @@ studio::render_gradient_to_window(const Glib::RefPtr<Gdk::Drawable>& window,cons
                {
                        gdk_c.set_rgb(r2,g2,b2);
                        gc->set_rgb_fg_color(gdk_c);
-                       window->draw_rectangle(gc, true, ca.get_x()+i+2, ca.get_y(), 1, height/2);                              
-       
+                       window->draw_rectangle(gc, true, ca.get_x()+i+2, ca.get_y(), 1, height/2);
+
                        gdk_c.set_rgb(r1,g1,b1);
                        gc->set_rgb_fg_color(gdk_c);
                        window->draw_rectangle(gc, true, ca.get_x()+i+2, ca.get_y()+height/2, 1, height/2);
@@ -112,7 +112,7 @@ Widget_Gradient::Widget_Gradient():
        add_events(Gdk::BUTTON1_MOTION_MASK);
 
 }
-       
+
 Widget_Gradient::~Widget_Gradient()
 {
 }
@@ -123,7 +123,7 @@ Widget_Gradient::redraw(GdkEventExpose*bleh)
 {
        const int h(get_height());
        const int w(get_width());
-       
+
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(get_window()));
        Gdk::Rectangle area(0,0,w,h);
        if(!editable_)
@@ -162,7 +162,7 @@ Widget_Gradient::redraw(GdkEventExpose*bleh)
                        show_selected=true;
                }
        }
-       
+
        // we do this so that we can be sure that
        // the selected marker is shown on top
        if(show_selected)
@@ -182,7 +182,7 @@ Widget_Gradient::redraw(GdkEventExpose*bleh)
                        CONTROL_HEIGHT
                );
        }
-       
+
        return true;
 }
 
@@ -210,7 +210,7 @@ void
 Widget_Gradient::popup_menu(float x)
 {
        Gtk::Menu* menu(manage(new Gtk::Menu()));
-       
+
        menu->items().clear();
 
        menu->items().push_back(
@@ -235,7 +235,7 @@ Widget_Gradient::popup_menu(float x)
                        )
                );
        }
-       
+
        menu->popup(0,0);
 }
 
@@ -284,14 +284,14 @@ Widget_Gradient::on_event(GdkEvent *event)
                float pos((float)x/(float)get_width());
                if(pos<0.0f)pos=0.0f;
                if(pos>1.0f)pos=1.0f;
-       
+
                switch(event->type)
                {
                case GDK_MOTION_NOTIFY:
                        if(editable_ && y>get_height()-CONTROL_HEIGHT)
                        {
                                Gradient::iterator iter(gradient_.find(selected_cpoint));
-                               
+
                                if(event->button.state&GDK_SHIFT_MASK)
                                {
                                        float begin(-100000000),end(100000000);
@@ -306,20 +306,20 @@ Widget_Gradient::on_event(GdkEvent *event)
                                        {
                                                end=after->pos;
                                        }
-                                       
+
                                        if(pos>end)
                                                pos=end;
                                        if(pos<begin)
                                                pos=begin;
-                                       
-                                       iter->pos=pos;                                  
+
+                                       iter->pos=pos;
                                }
                                else
                                {
                                        iter->pos=pos;
                                        gradient_.sort();
                                }
-                               
+
 //                             signal_value_changed_();
                                changed_=true;
                                queue_draw();
@@ -359,6 +359,6 @@ Widget_Gradient::on_event(GdkEvent *event)
                        break;
                }
        }
-       
+
        return false;
 }
index 4215bbb..6039972 100644 (file)
@@ -48,46 +48,46 @@ class Widget_Gradient : public Gtk::DrawingArea
        sigc::signal<void,synfig::Gradient::CPoint> signal_cpoint_selected_;
 
        synfig::Gradient gradient_;
-       
+
        bool editable_;
-       
+
        bool changed_;
-       
+
        synfig::Gradient::CPoint        selected_cpoint;
 
-       void popup_menu(float x);       
+       void popup_menu(float x);
 
-       void insert_cpoint(float x);    
+       void insert_cpoint(float x);
+
+       void remove_cpoint(float x);
 
-       void remove_cpoint(float x);    
-               
 public:
-       
+
        Widget_Gradient();
-       
+
        ~Widget_Gradient();
 
        sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
        sigc::signal<void>& signal_clicked() { return signal_clicked_; }
 
        sigc::signal<void,synfig::Gradient::CPoint>& signal_cpoint_selected() { return signal_cpoint_selected_; }
-       
+
        void set_value(const synfig::Gradient& x);
 
-       const synfig::Gradient& get_value()const { return gradient_; }  
-       
+       const synfig::Gradient& get_value()const { return gradient_; }
+
        void set_editable(bool x=true) { editable_=x; }
-       
+
        bool get_editable()const { return editable_; }
 
 
-       
+
        void set_selected_cpoint(const synfig::Gradient::CPoint &x);
 
        const synfig::Gradient::CPoint& get_selected_cpoint() { return selected_cpoint; }
 
        void update_cpoint(const synfig::Gradient::CPoint &x);
-       
+
 
 
        bool redraw(GdkEventExpose*bleh=NULL);
index 631db4b..34dcb30 100644 (file)
@@ -56,7 +56,7 @@ using studio::AudioProfile;
 /* === M E T H O D S ======================================================= */
 
 /* === E N T R Y P O I N T ================================================= */
-       
+
 studio::Widget_Sound::Widget_Sound()
 {
 }
@@ -73,14 +73,14 @@ void studio::Widget_Sound::set_position(double t)
                float upper = adj_timescale->get_upper();
                float lower = adj_timescale->get_lower();
                float framesize =  upper - lower;
-               
+
                if(t < lower)
                {
                        lower -= ceil((lower-t)/framesize)*framesize;
                        upper = lower + framesize;
                        adj_timescale->set_lower(lower); adj_timescale->set_upper(upper);
                        adj_timescale->set_value(t);
-                       adj_timescale->changed(); adj_timescale->value_changed(); 
+                       adj_timescale->changed(); adj_timescale->value_changed();
                }else
                if(t > upper)
                {
@@ -112,13 +112,13 @@ bool studio::Widget_Sound::set_profile(etl::handle<AudioProfile>  p)
 
        //set the profile
        audioprof = p;
-       
+
        if(!audioprof)
        {
                clear();
                return false;
        }
-       
+
        return true;
 }
 
@@ -138,82 +138,82 @@ void studio::Widget_Sound::draw()
 }
 
 bool studio::Widget_Sound::on_expose_event(GdkEventExpose *heh)
-{      
-       if(!get_window()) return false; 
+{
+       if(!get_window()) return false;
 
        //clear the background to dark grey
        Glib::RefPtr<Gdk::GC>   gc = Gdk::GC::create(get_window());
-       
+
        if(!gc) return false;
 
        {
                Gdk::Rectangle r(0,0,get_width(),get_height());
                get_window()->begin_paint_rect(r);
        }
-       Gdk::Color      c("#3f3f3f");   
+       Gdk::Color      c("#3f3f3f");
        gc->set_rgb_fg_color(c);
        gc->set_background(c);
 
        int w = get_width();
        int baseline = get_height()/2;
        get_window()->draw_rectangle(gc,true,0,0,w,get_height());
-       
+
        //set up the color to be blue
        c.set_rgb_p(0,0.5,1);
        gc->set_rgb_fg_color(c);
-       
+
        //draw the base line
        get_window()->draw_line(gc,0,baseline,w,baseline);
-       
+
        //redraw all the samples from begin to end, but only if we have samples to draw (or there is no space to draw)
-       
+
        //synfig::warning("Ok rendered everything, now must render actual sound wave");
-       if(!audioprof || !adj_timescale || !w) 
+       if(!audioprof || !adj_timescale || !w)
        {
                get_window()->end_paint();
                return true;
        }
-       
+
        //draw you fool!
        float framesize = adj_timescale->get_upper() - adj_timescale->get_lower();
        if(framesize)
        {
                float delta=0,cum=0;
-               
+
                //position in sample space
                int begin=0,end=0;
                int     cur=0,maxs=0,mins=0;
-               
+
                int       i=0; //pixel counter
-               
+
                //etl::clock    check; check.reset();
-               
+
                float position = adj_timescale->get_value();
                float samplerate = audioprof->get_samplerate();
-               int             posi = 0;               
-               //enforce position inside of frame size 
+               int             posi = 0;
+               //enforce position inside of frame size
                {
                        float offset = audioprof->get_offset();
-               
+
                        //clamp begin and end to framesize
                        float beginf = adj_timescale->get_lower();
                        float endf = adj_timescale->get_upper();
-                       
+
                        posi = round_to_int((position-beginf)*w/framesize);
                        //posi = (int)((position-beginf)*w/framesize);
-                       
+
                        //calculate in sample space from seconds
                        begin = round_to_int((beginf - offset)*samplerate);
                        end = round_to_int((endf - offset)*samplerate);
                        //begin = (int)((beginf - offset)*samplerate);
                        //end = (int)((endf - offset)*samplerate);
                }
-               
+
                delta = (end - begin)/(float)w; //samples per pixel
-               
-               /*synfig::warning("Rendering a framesize of %f secs from [%d,%d) samples to %d samples, took %f sec", 
+
+               /*synfig::warning("Rendering a framesize of %f secs from [%d,%d) samples to %d samples, took %f sec",
                                                framesize, begin, end, w, check());*/
-               
+
                cur = begin;
                i = 0; cum = 0;
                for(int i=0;i<w;++i)
@@ -227,24 +227,24 @@ bool studio::Widget_Sound::on_expose_event(GdkEventExpose *heh)
                                mins = std::min(mins,(int)(*audioprof)[cur]);
                        }
                        cum -= delta;
-                       
+
                        //draw spike if not needed be
                        if(maxs||mins)
                        {
                                int top = maxs * baseline / 64;
                                int bot = mins * baseline / 64;
-                               
+
                                get_window()->draw_line(gc,i,baseline+bot,i,baseline+top);
                        }
                }
-               
+
                //synfig::warning("Drawing audio line");
                c.set_rgb_p(1,0,0);
                gc->set_rgb_fg_color(c);
                get_window()->draw_line(gc,posi,0,posi,get_height());
        }
        get_window()->end_paint();
-               
+
        return true;
 }
 
@@ -259,16 +259,16 @@ bool studio::Widget_Sound::on_motion_notify_event(GdkEventMotion* event)
        {
                //Can't do this if we don't have a time frame (heheh...)
                if(!adj_timescale) return false;
-                       
+
                double beg = adj_timescale->get_lower(), end = adj_timescale->get_upper();
-               
+
                //find event position in time
                double t = beg + event->x * (end-beg) / get_width();
 
                //signal that we are scrubbing to this new value...
                signal_scrub()(t);
-                               
-               
+
+
                // We should be able to just call
                // Widget_Timeslider::on_motion_notify_event(),
                // but that seems to cause the program to halt
@@ -277,45 +277,45 @@ bool studio::Widget_Sound::on_motion_notify_event(GdkEventMotion* event)
                //adj_timescale->changed();
                //return true;
        }
-       
+
        return Widget_Timeslider::on_motion_notify_event(event);
 }
 
 bool studio::Widget_Sound::on_button_press_event(GdkEventButton *event)
 {
        //Assume button PRESS
-       
+
        //if we are starting... using left click
        if(event->button == 1)
        {
                if(!adj_timescale) return false;
-                       
+
                double beg = adj_timescale->get_lower(), end = adj_timescale->get_upper();
-               
+
                //find event position in time
                double t = beg + event->x * (end-beg) / get_width();
 
                //signal the attached scrubbing devices...
                signal_start_scrubbing()(t);
-                               
+
                return true;
        }
-       
+
        return Widget_Timeslider::on_button_press_event(event);
 }
 
 bool studio::Widget_Sound::on_button_release_event(GdkEventButton *event)
 {
        //Assume button RELEASE
-       
+
        //if we are ending... using left click
        if(event->button == 1)
        {
                //signal the scrubbing device... to stop
                signal_stop_scrubbing()();
-                               
+
                return true;
        }
-       
+
        return Widget_Timeslider::on_button_release_event(event);
 }
index a609cff..7743768 100644 (file)
@@ -39,7 +39,7 @@
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 class AudioProfile;
 class AudioContainer;
 
@@ -55,20 +55,20 @@ class AudioContainer;
 class Widget_Sound : public Widget_Timeslider
 {
        etl::handle<AudioProfile>       audioprof;
-       
+
        //event override interface
        virtual bool on_expose_event(GdkEventExpose *heh = 0);
-       
+
        //for scrubbing... (click is start, drag is scrub, and release is stop...)
        virtual bool on_motion_notify_event(GdkEventMotion* event);
        virtual bool on_button_press_event(GdkEventButton *event);
        virtual bool on_button_release_event(GdkEventButton *event);
-       
+
        //Might want a signal setup for scrubbing... and here it is
        sigc::signal1<void,double>      signal_start_scrubbing_;
        sigc::signal1<void,double>      signal_scrub_;
        sigc::signal0<void>                     signal_stop_scrubbing_;
-       
+
 public: //structors
        Widget_Sound();
        ~Widget_Sound();
@@ -88,7 +88,7 @@ public: //get set interface
 
 public: //interface
        void draw();
-       
+
        void clear();
 };
 
index cb7178b..d7afb84 100644 (file)
@@ -103,7 +103,7 @@ Widget_Time::refresh_value()
                if(abs(newtime-time_)>=0.001)
                {
                        time_=newtime;
-                       refresh_text();         
+                       refresh_text();
                        signal_value_changed()();
                }
        }
@@ -117,7 +117,7 @@ bool
 Widget_Time::on_event(GdkEvent* event)
 {
        const Time scroll_amount(0.25);
-       
+
        switch(event->type)
        {
        case GDK_SCROLL:
@@ -138,7 +138,7 @@ Widget_Time::on_event(GdkEvent* event)
        default:
                break;
        }
-       
+
        return Gtk::Entry::on_event(event);
 }
 
@@ -146,7 +146,7 @@ bool
 Widget_Time::on_focus_out_event(GdkEventFocus* event)
 {
        refresh_value();
-       refresh_text();         
+       refresh_text();
        return Gtk::Entry::on_focus_out_event(event);
 }
 
index 912893d..cd7aaf1 100644 (file)
@@ -47,29 +47,29 @@ class Widget_Time : public Gtk::Entry
 
 
        sigc::signal<void> signal_value_changed_;
-       
+
        float fps_;
-       
+
        synfig::Time time_;
-       
+
 protected:
        bool on_focus_out_event(GdkEventFocus* event);
 
        bool on_focus_in_event(GdkEventFocus* event);
-       
+
        //void on_activate();
-       
+
        void refresh_text();
 
        void refresh_value();
-       
+
        bool on_event(GdkEvent* event);
 
 public:
        sigc::signal<void> &signal_value_changed() { return signal_value_changed_; }
 
 
-       
+
        void set_value(const synfig::Time &data);
        synfig::Time get_value()const;
        void set_fps(float x);
index 9f8891a..ff3ce57 100644 (file)
@@ -105,7 +105,7 @@ studio::render_time_point_to_window(
 {
        Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(window));
        const Gdk::Color black("#000000");
-       
+
        if(selected)
                gc->set_line_attributes(2,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
        else
@@ -113,7 +113,7 @@ studio::render_time_point_to_window(
 
        Gdk::Color color;
        std::vector<Gdk::Point> points;
-       
+
 /*-    BEFORE ------------------------------------- */
 
        color=get_interp_color(tp.get_before());
@@ -178,7 +178,7 @@ studio::render_time_point_to_window(
                points.push_back(Gdk::Point(area.get_x()+area.get_width()/2,area.get_y()+area.get_height()));
                window->draw_polygon(gc,true,points);
                gc->set_rgb_fg_color(black);
-               window->draw_lines(gc,points);  
+               window->draw_lines(gc,points);
                break;
 
        case INTERPOLATION_CONSTANT:
@@ -191,7 +191,7 @@ studio::render_time_point_to_window(
                points.push_back(Gdk::Point(area.get_x()+area.get_width()/2,area.get_y()+area.get_height()));
                window->draw_polygon(gc,true,points);
                gc->set_rgb_fg_color(black);
-               window->draw_lines(gc,points);  
+               window->draw_lines(gc,points);
                break;
 
        case INTERPOLATION_UNDEFINED: default:
@@ -204,10 +204,10 @@ studio::render_time_point_to_window(
                points.push_back(Gdk::Point(area.get_x()+area.get_width()/2,area.get_y()+area.get_height()));
                window->draw_polygon(gc,true,points);
                gc->set_rgb_fg_color(black);
-               window->draw_lines(gc,points);  
+               window->draw_lines(gc,points);
                break;
        }
-       
+
 /*-    AFTER -------------------------------------- */
 
        color=get_interp_color(tp.get_after());
@@ -273,7 +273,7 @@ studio::render_time_point_to_window(
                points.push_back(Gdk::Point(area.get_x()+area.get_width()/2,area.get_y()+area.get_height()));
                window->draw_polygon(gc,true,points);
                gc->set_rgb_fg_color(black);
-               window->draw_lines(gc,points);  
+               window->draw_lines(gc,points);
                break;
 
        case INTERPOLATION_CONSTANT:
@@ -286,7 +286,7 @@ studio::render_time_point_to_window(
                points.push_back(Gdk::Point(area.get_x()+area.get_width()/2,area.get_y()+area.get_height()));
                window->draw_polygon(gc,true,points);
                gc->set_rgb_fg_color(black);
-               window->draw_lines(gc,points);  
+               window->draw_lines(gc,points);
                break;
 
        case INTERPOLATION_UNDEFINED: default:
@@ -299,7 +299,7 @@ studio::render_time_point_to_window(
                points.push_back(Gdk::Point(area.get_x()+area.get_width()/2,area.get_y()+area.get_height()));
                window->draw_polygon(gc,true,points);
                gc->set_rgb_fg_color(black);
-               window->draw_lines(gc,points);  
+               window->draw_lines(gc,points);
                break;
        }
 
@@ -321,11 +321,11 @@ fps(defaultfps),
 dragscroll(false)
 {
        set_size_request(-1,fullheight);
-       
+
        //                click                    scroll                     zoom
-       add_events( Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK 
+       add_events( Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK
                                | Gdk::BUTTON_MOTION_MASK | Gdk::SCROLL_MASK );
-       
+
        set_time_adjustment(&adj_default);
        //update_times();
 }
@@ -339,14 +339,14 @@ void Widget_Timeslider::set_time_adjustment(Gtk::Adjustment *x)
        //disconnect old connections
        time_value_change.disconnect();
        time_other_change.disconnect();
-       
+
        //connect update function to new adjustment
        adj_timescale = x;
-       
+
        if(x)
        {
                time_value_change = x->signal_value_changed().connect(sigc::mem_fun(*this,&Widget_Timeslider::queue_draw));
-               time_other_change = x->signal_changed().connect(sigc::mem_fun(*this,&Widget_Timeslider::queue_draw));   
+               time_other_change = x->signal_changed().connect(sigc::mem_fun(*this,&Widget_Timeslider::queue_draw));
                //invalidated = true;
                //refresh();
        }
@@ -357,7 +357,7 @@ void Widget_Timeslider::set_global_fps(float d)
        if(fps != d)
        {
                fps = d;
-               
+
                //update everything since we need to redraw already
                //invalidated = true;
                //refresh();
@@ -375,10 +375,10 @@ void Widget_Timeslider::set_global_fps(float d)
        }
 }*/
 
-void Widget_Timeslider::refresh() 
+void Widget_Timeslider::refresh()
 {
 }
-/*     
+/*
 {
        if(invalidated)
        {
@@ -388,13 +388,13 @@ void Widget_Timeslider::refresh()
                double  l = adj_timescale->get_lower(),
                                u = adj_timescale->get_upper(),
                                v = adj_timescale->get_value();
-               
+
                bool invalid = (l != start) || (u != end) || (v != current);
-               
+
                start = l;
                end = u;
                current = v;
-               
+
                if(invalid) queue_draw();
        }
 }*/
@@ -402,27 +402,27 @@ void Widget_Timeslider::refresh()
 bool Widget_Timeslider::redraw(bool doublebuffer)
 {
        Glib::RefPtr<Gdk::Window> window = get_window();
-       
+
        if(!window) return false;
-       
-       Glib::RefPtr<Gdk::GC>   gc = Gdk::GC::create(window);   
+
+       Glib::RefPtr<Gdk::GC>   gc = Gdk::GC::create(window);
        if(!gc) return false;
-       
+
        //synfig::info("Drawing Timeslider");
        //clear and update to current values
        //invalidated = false;
-       //update_times();       
-       
+       //update_times();
+
        //draw grey rectangle
        Gdk::Color      c("#7f7f7f");
        gc->set_rgb_fg_color(c);
        gc->set_background(c);
-       
+
        //Get the data for the window and the params to draw it...
        int w = get_width(), h = get_height();
-       
-       window->draw_rectangle(gc,true,0,0,w,h);                
-       
+
+       window->draw_rectangle(gc,true,0,0,w,h);
+
        const double EPSILON = 1e-6;
        if(!adj_timescale || w == 0) return true;
 
@@ -430,24 +430,24 @@ bool Widget_Timeslider::redraw(bool doublebuffer)
        double  start = adj_timescale->get_lower(),
                        end = adj_timescale->get_upper(),
                        current = adj_timescale->get_value();
-       
+
        if(end-start < EPSILON) return true;
-       
+
        //synfig::info("Drawing Lines");
-       
+
        //draw all the time stuff
        double dtdp = (end - start)/get_width();
        double dpdt = 1/dtdp;
-       
+
        //lines
-       
+
        //Draw the time line...
        double tpx = (current-start)*dpdt;
        gc->set_rgb_fg_color(Gdk::Color("#ffaf00"));
        window->draw_line(gc,round_to_int(tpx),0,round_to_int(tpx),fullheight);
-       
+
        //normal line/text color
-       gc->set_rgb_fg_color(Gdk::Color("#333333"));    
+       gc->set_rgb_fg_color(Gdk::Color("#333333"));
 
        //draw these lines... (always 5 between) maybe 6?
        const int subdiv = 4;
@@ -455,77 +455,77 @@ bool Widget_Timeslider::redraw(bool doublebuffer)
        //1h 45 30 20 10 5
        //..., 3m, 2m, 1m30s, 1m, 30s, 20s, 10s, 5s, 3s, 2s, 1s, 0.5s
        //frames... (how???)
-       double ranges[] = 
+       double ranges[] =
        { 1.0/fps,subdiv/fps,0.25,0.5, 1, 2, 3, 5, 10, 20, 30, 60, 90, 120, 180, 300, 600, 1200, 1800, 2700, 3600 };
        //{ 3600, 2700, 1800, 1200, 600, 300, 180, 120, 90, 60, 30, 20, 10, 5, 3, 2, 1, 0.5 };
        const int ranges_size = sizeof(ranges)/sizeof(double);
-       
+
        double lowerrange = dtdp*75, upperrange = dtdp*150;
        double midrange = (lowerrange + upperrange)/2;
-       
+
        //find most ideal scale
        double scale = ranges[0];
        {
                double *val = binary_find(ranges, ranges+ranges_size, midrange);
                double *after = val+1;
-               
+
                if(val >= ranges+ranges_size)
                {
                        val = ranges+ranges_size-1;
                }
-                       
+
                if(after >= ranges+ranges_size)
                {
                        after = ranges+ranges_size-1;
                }
-               
+
                scale = *val;
-               
+
                double diff = abs(scale - midrange), diff2 = abs(*after - midrange);
                if(diff2 < diff)
                        scale = *after;
        }
-               
-       //synfig::info("Range found: (l %.2lf,u %.2lf - m %.2lf) -> %.2lf",lowerrange,upperrange,midrange,scale);       
-       
-       //search around this area to get the right one          
-       
-       
+
+       //synfig::info("Range found: (l %.2lf,u %.2lf - m %.2lf) -> %.2lf",lowerrange,upperrange,midrange,scale);
+
+       //search around this area to get the right one
+
+
        //get first valid line and it's position in pixel space
        double time = 0;
        double pixel = 0;
-       
+
        int sdindex = 0;
 
        double subr = scale / subdiv;
-       
+
        //get it's position inside...
        time = ceil(start/subr)*subr - start;
        pixel = time*dpdt;
-       
+
        //absolute time of the line to be drawn
        time += start;
-       
+
        { //inside the big'n
                double t = (time/scale - floor(time/scale))*subdiv; // the difference from the big mark in 0:1
                //sdindex = (int)floor(t + 0.5); //get how far through the range it is...
                sdindex = round_to_int(t); //get how far through the range it is...
-               
+
                //synfig::info("Extracted fr %.2lf -> %d", t, sdindex);
        }
-       
+
        //synfig::info("Initial values: %.4lf t, %.1lf pixels, %d i", time,pixel,sdindex);
-       
+
        //loop to draw
        const int heightbig = 12;
        const int heightsmall = 4;
-       
+
        int width = get_width();
        while( pixel < width )
        {
                int xpx = round_to_int(pixel);
-               
-               //draw big              
+
+               //draw big
                if(sdindex == 0)
                {
                        window->draw_line(gc,xpx,0,xpx,heightbig);
@@ -533,46 +533,46 @@ bool Widget_Timeslider::redraw(bool doublebuffer)
                        Time tm((double)time);
                        if(get_global_fps()) tm.round(get_global_fps());
                        Glib::ustring timecode(tm.get_string(get_global_fps(),App::get_time_format()));
-                       
+
                        //gc->set_rgb_fg_color(Gdk::Color("#000000"));
                        layout->set_text(timecode);
                        window->draw_layout(gc,xpx+2,heightsmall,layout);
                }else
                {
-                       window->draw_line(gc,xpx,0,xpx,heightsmall);                    
+                       window->draw_line(gc,xpx,0,xpx,heightsmall);
                }
-               
+
                //increment time and position
                pixel += subr / dtdp;
                time += subr;
-               
+
                //increment index
                if(++sdindex >= subdiv) sdindex -= subdiv;
        }
-       
+
        return true;
 }
 
 bool Widget_Timeslider::on_motion_notify_event(GdkEventMotion* event) //for dragging
-{      
+{
        if(!adj_timescale) return false;
-               
+
        Gdk::ModifierType mod = Gdk::ModifierType(event->state);
-       
+
        //scrolling...
-       
+
        //NOTE: we might want to address the possibility of dragging with both buttons held down
-       
+
        if(mod & Gdk::BUTTON2_MASK)
        {
 
                //we need this for scrolling by dragging
                double  curx = event->x;
-               
+
                double  start = adj_timescale->get_lower(),
                                end = adj_timescale->get_upper();
-               
-               
+
+
                if(dragscroll)
                {
                        if(event->time-last_event_time<30)
@@ -582,25 +582,25 @@ bool Widget_Timeslider::on_motion_notify_event(GdkEventMotion* event) //for drag
 
                        if(abs(lastx - curx) < 1 && end != start) return true;
                        //translate the window and correct it
-                       
+
                        //update our stuff so we are operating correctly
                        //invalidated = true;
                        //update_times();
-                       
+
                        //Note: Use inverse of mouse movement because of conceptual space relationship
                        double diff = lastx - curx; //curx - lastx;
-                       
+
                        //NOTE: This might be incorrect...
                        //fraction to move...
                        double dpx = (end - start)/get_width();
                        lastx = curx;
-                       
+
                        diff *= dpx;
-                       
+
                        //Adjust...
                        start += diff;
                        end += diff;
-                       
+
                        //But clamp to bounds if they exist...
                        //HACK - bounds should not be required for this slider
                        if(adj_bounds)
@@ -611,17 +611,17 @@ bool Widget_Timeslider::on_motion_notify_event(GdkEventMotion* event) //for drag
                                        start += diff;
                                        end += diff;
                                }
-                               
+
                                if(end > adj_bounds->get_upper())
                                {
                                        diff = adj_bounds->get_upper() - end;
                                        start += diff;
                                        end += diff;
                                }
-                       }               
-                       
+                       }
+
                        //synfig::info("Scrolling timerange to (%.4f,%.4f)",start,end);
-                       
+
                        adj_timescale->set_lower(start);
                        adj_timescale->set_upper(end);
 
@@ -632,31 +632,31 @@ bool Widget_Timeslider::on_motion_notify_event(GdkEventMotion* event) //for drag
                        lastx = curx;
                        //lasty = cury;
                }
-               
-               return true;                            
+
+               return true;
        }
-       
+
        if(mod & Gdk::BUTTON1_MASK)
        {
                double curx = event->x;
-               
+
                //get time from drag...
                double  start = adj_timescale->get_lower(),
                                end = adj_timescale->get_upper(),
                                current = adj_timescale->get_value();
                double t = start + curx*(end - start)/get_width();
-               
+
                //snap it to fps - if they exist...
                if(fps)
                {
                        t = floor(t*fps + 0.5)/fps;
                }
-               
+
                //set time if needed
                if(current != t)
-               {                       
+               {
                        adj_timescale->set_value(t);
-                       
+
                        //Fixed this to actually do what it's supposed to...
                        if(event->time-last_event_time>50)
                        {
@@ -664,20 +664,20 @@ bool Widget_Timeslider::on_motion_notify_event(GdkEventMotion* event) //for drag
                                last_event_time = event->time;
                        }
                }
-               
+
                return true;
        }
-       
+
        return false;
 }
 
 bool Widget_Timeslider::on_scroll_event(GdkEventScroll* event) //for zooming
 {
        if(!adj_timescale) return false;
-       
+
        //Update so we are calculating based on current values
-       //update_times();       
-       
+       //update_times();
+
        //figure out if we should center ourselves on the current time
        bool center = false;
 
@@ -686,23 +686,23 @@ bool Widget_Timeslider::on_scroll_event(GdkEventScroll* event) //for zooming
        {
                center = true;
        }
-       
+
        switch(event->direction)
        {
                case GDK_SCROLL_UP: //zoom in
                {
                        zoom_in(center);
-                       
+
                        return true;
                }
                case GDK_SCROLL_DOWN: //zoom out
                {
                        zoom_out(center);
-                       
+
                        return true;
                }
-               
-               default: 
+
+               default:
                {
                        return false;
                }
@@ -712,17 +712,17 @@ bool Widget_Timeslider::on_scroll_event(GdkEventScroll* event) //for zooming
 void Widget_Timeslider::zoom_in(bool centerontime)
 {
        if(!adj_timescale) return;
-               
+
        double  start = adj_timescale->get_lower(),
                        end = adj_timescale->get_upper(),
                        current = adj_timescale->get_value();
-       
+
        double focuspoint = centerontime ? current : (start + end)/2;
-       
+
        //calculate new beginning and end
        end = focuspoint + (end-focuspoint)*zoominfactor;
        start = focuspoint + (start-focuspoint)*zoominfactor;
-       
+
        //synfig::info("Zooming in timerange to (%.4f,%.4f)",start,end);
        if(adj_bounds)
        {
@@ -730,17 +730,17 @@ void Widget_Timeslider::zoom_in(bool centerontime)
                {
                        start = adj_bounds->get_lower();
                }
-               
+
                if(end > adj_bounds->get_upper())
                {
                        end = adj_bounds->get_upper();
                }
        }
-       
+
        //reset values
        adj_timescale->set_lower(start);
        adj_timescale->set_upper(end);
-       
+
        //call changed function
        adj_timescale->changed();
 }
@@ -748,17 +748,17 @@ void Widget_Timeslider::zoom_in(bool centerontime)
 void Widget_Timeslider::zoom_out(bool centerontime)
 {
        if(!adj_timescale) return;
-               
+
        double  start = adj_timescale->get_lower(),
                        end = adj_timescale->get_upper(),
                        current = adj_timescale->get_value();
-       
+
        double focuspoint = centerontime ? current : (start + end)/2;
-       
+
        //calculate new beginning and end
        end = focuspoint + (end-focuspoint)*zoomoutfactor;
        start = focuspoint + (start-focuspoint)*zoomoutfactor;
-       
+
        //synfig::info("Zooming out timerange to (%.4f,%.4f)",start,end);
        if(adj_bounds)
        {
@@ -766,17 +766,17 @@ void Widget_Timeslider::zoom_out(bool centerontime)
                {
                        start = adj_bounds->get_lower();
                }
-               
+
                if(end > adj_bounds->get_upper())
                {
-                       end = adj_bounds->get_upper();  
+                       end = adj_bounds->get_upper();
                }
        }
-       
+
        //reset values
        adj_timescale->set_lower(start);
        adj_timescale->set_upper(end);
-       
+
        //call changed function
        adj_timescale->changed();
 }
@@ -791,29 +791,29 @@ bool Widget_Timeslider::on_button_press_event(GdkEventButton *event) //for click
                        double  start = adj_timescale->get_lower(),
                                        end = adj_timescale->get_upper(),
                                        current = adj_timescale->get_value();
-                       
+
                        double w = get_width();
                        double t = start + (end - start) * event->x / w;
-                       
+
                        t = floor(t*fps + 0.5)/fps;
-                       
-                       /*synfig::info("Clicking time from %.3lf to %.3lf [(%.2lf,%.2lf) %.2lf / %.2lf ... %.2lf", 
+
+                       /*synfig::info("Clicking time from %.3lf to %.3lf [(%.2lf,%.2lf) %.2lf / %.2lf ... %.2lf",
                                                current, vt, start, end, event->x, w, fps);*/
-                       
+
                        if(t != current)
-                       {                       
+                       {
                                current = t;
-                               
+
                                if(adj_timescale)
                                {
                                        adj_timescale->set_value(current);
                                        adj_timescale->value_changed();
                                }
                        }
-                               
+
                        break;
                }
-               
+
                //scroll click
                case 2:
                {
@@ -821,35 +821,35 @@ bool Widget_Timeslider::on_button_press_event(GdkEventButton *event) //for click
                        dragscroll = true;
                        lastx = event->x;
                        //lasty = event->y;
-                       
+
                        return true;
                }
-               
+
                default:
                {
                        break;
                }
        }
-       
+
        return false;
 }
 
 bool Widget_Timeslider::on_button_release_event(GdkEventButton *event) //end drag
-{      
+{
        switch(event->button)
-       {               
+       {
                case 2:
                {
                        //start dragging
                        dragscroll = false;
                        return true;
                }
-               
+
                default:
                {
                        break;
                }
        }
-       
+
        return false;
 }
index dc405eb..c7baf3b 100644 (file)
@@ -42,11 +42,11 @@ namespace studio {
 
 void render_time_point_to_window(const Glib::RefPtr<Gdk::Drawable>& window,const Gdk::Rectangle& ca,const synfig::TimePoint &tp,bool selected=false);
 
-       
+
 /* Design for the timeslider...
 
        Concept: Scalable ruler
-               Ticks are done every so often (30 s, 10 frames, 5 frames, etc.) 
+               Ticks are done every so often (30 s, 10 frames, 5 frames, etc.)
                Print out frame numbers next to the big ticks
                Show blue pills in separate area (above or below)
 */
@@ -61,52 +61,52 @@ protected: //implementation that other interfaces can see
 
        //HACK - I should not have to see this...
        Gtk::Adjustment *adj_bounds;
-       
+
        //Statistics used for drawing stuff (and making sure we don't if we don't need to)
        /*double start,end;
        double current;
-       
+
        bool invalidated;*/
-       
+
        guint32 last_event_time;
 
        float fps;
-       
+
        sigc::connection time_value_change;
        sigc::connection time_other_change;
-       
+
        //TODO: fill out blue pill stuff
-       
+
        //input functions
-       
+
        virtual bool on_motion_notify_event(GdkEventMotion* event); //for dragging
        virtual bool on_scroll_event(GdkEventScroll* event); //for zooming
        virtual bool on_button_press_event(GdkEventButton *event); //for clicking
        virtual bool on_button_release_event(GdkEventButton *event); //for clicking
-       
+
        virtual bool on_expose_event(GdkEventExpose *event) {redraw(); return true;}//for drawing
-       
+
        virtual bool redraw(bool doublebuffer = false);
-       
+
        //void update_times();
-       
+
        void zoom_in(bool centerontime = false);
        void zoom_out(bool centerontime = false);
-       
+
        //Drag the Frame
        bool dragscroll;
-       
+
        /*NOTE: if we can set the mouse position to the original position
                        this would only have to be set once (and it would be good otherwise too)
        */
        double lastx; //last mouse position for dragging
-               
+
 public: //structors
        Widget_Timeslider();
        ~Widget_Timeslider();
 
 public: //Normal Interface
-       
+
        void draw() {redraw();}
        virtual void refresh(); //reget bluepills, time values and queue_draw if need be
 
@@ -117,14 +117,14 @@ public: //Time Interface
        void set_global_fps(float d);
 
        //accessors for the time adjustment
-       Gtk::Adjustment &get_time_adjustment() const {return *adj_timescale;}   
+       Gtk::Adjustment &get_time_adjustment() const {return *adj_timescale;}
        void set_time_adjustment(Gtk::Adjustment *x);
-       
+
        //HACK - I should not have to see these bounds (should be boundless)
-       Gtk::Adjustment &get_bounds_adjustment() const {return *adj_bounds;}    
+       Gtk::Adjustment &get_bounds_adjustment() const {return *adj_bounds;}
        void set_bounds_adjustment(Gtk::Adjustment *x) {adj_bounds = x;}
 };
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */
index 76fe1bb..8f583d9 100644 (file)
@@ -74,7 +74,7 @@ Widget_ValueBase::Widget_ValueBase():
        angle_adjustment(0,-2000000000,2000000000,1,1,1)
 {
        set_no_show_all();
-       
+
        label=manage(new class Gtk::Label("Unknown Datatype"));
        pack_start(*label);
        label->show();
@@ -97,7 +97,7 @@ Widget_ValueBase::Widget_ValueBase():
        angle_widget=manage(new class Gtk::SpinButton(angle_adjustment,15,2));
        pack_start(*angle_widget);
 
-       bool_widget=manage(new class Gtk::CheckButton());                     
+       bool_widget=manage(new class Gtk::CheckButton());
        pack_start(*bool_widget);
 
        //color_widget=manage(new class Gtk::ColorSelection());
@@ -105,7 +105,7 @@ Widget_ValueBase::Widget_ValueBase():
 
        string_widget=manage(new class Gtk::Entry());
        pack_start(*string_widget);
-       
+
        canvas_widget=manage(new class Widget_CanvasChooser());
        pack_start(*canvas_widget);
 
@@ -118,7 +118,7 @@ Widget_ValueBase::Widget_ValueBase():
        distance_widget=manage(new class Widget_Distance());
        pack_start(*distance_widget);
 
-       
+
        vector_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
        color_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
        enum_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
@@ -130,7 +130,7 @@ Widget_ValueBase::Widget_ValueBase():
        filename_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
        time_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
        distance_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
-       
+
        /*signal_focus_in_event().connect(
                sigc::bind_return(
                sigc::hide(
@@ -162,7 +162,7 @@ Widget_ValueBase::inside_cellrenderer()
 
        distance_widget->set_has_frame(false);
        //static_cast<Gtk::Entry*>(distance_widget)->gobj()->is_cell_renderer = true; // XXX
-       
+
        integer_widget->set_has_frame(false);
        //static_cast<Gtk::Entry*>(integer_widget)->gobj()->is_cell_renderer = true; // XXX
        vector_widget->set_has_frame(false);
@@ -209,7 +209,7 @@ Widget_ValueBase::set_value(const synfig::ValueBase &data)
        filename_widget->hide();
        time_widget->hide();
        distance_widget->hide();
-       
+
        value=data;
        try{
        switch(value.get_type())
@@ -331,7 +331,7 @@ Widget_ValueBase::get_value()
                {
                        value=enum_widget->get_value();
                }
-                       
+
                break;
        case ValueBase::TYPE_BOOL:
                value=bool_widget->get_active();
@@ -357,7 +357,7 @@ Widget_ValueBase::get_value()
             color.set_g(gdkcolor.get_green_p());
             color.set_b(gdkcolor.get_blue_p());
                        color.set_a(color_widget->get_current_alpha()/65535.0);
-                       
+
                        value=color;
 */
                }
@@ -368,7 +368,7 @@ Widget_ValueBase::get_value()
 
        return value;
 }
-       
+
 
 void
 Widget_ValueBase::on_grab_focus()
@@ -402,7 +402,7 @@ Widget_ValueBase::on_grab_focus()
                {
                        enum_widget->grab_focus();
                }
-                       
+
                break;
        case ValueBase::TYPE_BOOL:
                bool_widget->grab_focus();
@@ -441,7 +441,7 @@ Widget_ValueBase::signal_activate()
                        return distance_widget->signal_activate();
                else
                        return real_widget->signal_activate();
-               
+
                break;
        case ValueBase::TYPE_TIME:
                return time_widget->signal_activate();
@@ -457,7 +457,7 @@ Widget_ValueBase::signal_activate()
                        return integer_widget->signal_activate();
                else
                        return enum_widget->signal_activate();
-                       
+
                break;
        case ValueBase::TYPE_BOOL:
                return string_widget->signal_activate();
index 7b17f6b..ae882e6 100644 (file)
@@ -72,7 +72,7 @@ class Widget_Filename;
 class Widget_Vector;
 class Widget_Time;
 class Widget_Distance;
-       
+
 class Widget_ValueBase : public Gtk::HBox
 {
        Gtk::Label *label;
@@ -95,9 +95,9 @@ class Widget_ValueBase : public Gtk::HBox
        Widget_Time *time_widget;
        Gtk::Entry *string_widget;
        Widget_Distance *distance_widget;
-       
+
 //     std::string hint;
-       
+
        synfig::ParamDesc param_desc;
        etl::handle<synfig::Canvas> canvas;
        sigc::signal<void> signal_value_changed_;
@@ -105,21 +105,21 @@ class Widget_ValueBase : public Gtk::HBox
 
 public:
        sigc::signal<void> &signal_value_changed() { return signal_value_changed_; }
-       
+
        void activate();
-       
+
        sigc::signal<void>& signal_activate() { return signal_activate_; }
 
        void set_value(const synfig::ValueBase &data);
        const synfig::ValueBase &get_value();
 
        void on_grab_focus();
-       
+
        void set_param_desc(const synfig::ParamDesc &x) { param_desc=x; }
        const synfig::ParamDesc &get_param_desc() { return param_desc; }
 
        void set_sensitive(bool x);
-       
+
        //void set_hint(std::string x) { hint=x; }
 //     std::string get_hint() { return hint; }
 
index e99b3a3..5a127f0 100644 (file)
@@ -58,7 +58,7 @@ Widget_Vector::Widget_Vector():
        y_adjustment(0,-100000000,100000000,0.05,0.05,0.05)
 {
        Gtk::Label *label;
-       
+
        label=manage(new class Gtk::Label("X:"));
        label->set_alignment(0, 0.5);
        label->show();
@@ -97,7 +97,7 @@ Widget_Vector::Widget_Vector():
 
        spinbutton_x->show();
        spinbutton_y->show();
-       
+
        spinbutton_x->signal_activate().connect(sigc::mem_fun(*spinbutton_y,&Gtk::SpinButton::grab_focus));
        distance_x->signal_activate().connect(sigc::mem_fun(*distance_y,&Gtk::SpinButton::grab_focus));
 }
@@ -142,7 +142,7 @@ Widget_Vector::set_digits(int x)
                spinbutton_x->set_size_request(48,-1);
                spinbutton_y->set_size_request(48,-1);
        }
-       
+
        distance_x->set_digits(x);
        distance_y->set_digits(x);
        distance_x->set_size_request(48,-1);
index 969255f..3348c87 100644 (file)
@@ -44,7 +44,7 @@ namespace Gtk { class SpinButton; };
 namespace studio {
 
 class Widget_Distance;
-       
+
 class Widget_Vector : public Gtk::HBox
 {
        Gtk::SpinButton* spinbutton_x;
@@ -52,7 +52,7 @@ class Widget_Vector : public Gtk::HBox
 
        Widget_Distance* distance_x;
        Widget_Distance* distance_y;
-       
+
        Gtk::Adjustment x_adjustment;
        Gtk::Adjustment y_adjustment;
 
@@ -61,16 +61,16 @@ class Widget_Vector : public Gtk::HBox
        sigc::signal<void> signal_value_changed_;
 
        sigc::signal<void> signal_activate_;
-       
+
        synfig::Canvas::LooseHandle canvas_;
 
 public:
-       
+
        void activate() { signal_activate_(); }
-       
+
        void set_canvas(synfig::Canvas::LooseHandle);
        synfig::Canvas::LooseHandle get_canvas()const { return canvas_; }
-       
+
        sigc::signal<void>& signal_value_changed() { return signal_value_changed_; }
 
        sigc::signal<void>& signal_activate() { return signal_activate_; }
@@ -84,7 +84,7 @@ public:
        void set_digits(int x);
        Widget_Vector();
        ~Widget_Vector();
-       
+
 protected:
        void show_all_vfunc();
 }; // END of class Widget_Vector
index 054fd14..5f61130 100644 (file)
@@ -69,10 +69,10 @@ Widget_Waypoint::Widget_Waypoint(etl::handle<synfig::Canvas> canvas):
        value_widget=manage(new Widget_ValueBase());
        value_widget->set_canvas(canvas);
        value_widget->show();
-       
+
        value_node_label=manage(new Gtk::Label(_("(Non-static value)")));
-       
-       
+
+
        time_widget=manage(new Widget_Time());
        time_widget->set_fps(canvas->rend_desc().get_frame_rate());
        //spinbutton=manage(new Gtk::SpinButton(time_adjustment,0.05,3));
@@ -109,12 +109,12 @@ Widget_Waypoint::Widget_Waypoint(etl::handle<synfig::Canvas> canvas):
        spin_bias->show();
        spin_temporal_tension=manage(new class Gtk::SpinButton(adj_temporal_tension,0.1,3));
        spin_temporal_tension->show();
-       
+
        set_padding(12, 12, 12, 12);
-       
+
        Gtk::VBox *widgetBox = manage(new Gtk::VBox(false, 12));
        add(*widgetBox);
-       
+
        Gtk::Frame *waypointFrame = manage(new Gtk::Frame(_("Waypoint")));
        waypointFrame->set_shadow_type(Gtk::SHADOW_NONE);
        ((Gtk::Label *) waypointFrame->get_label_widget())->set_markup(_("<b>Waypoint</b>"));
@@ -154,7 +154,7 @@ Widget_Waypoint::Widget_Waypoint(etl::handle<synfig::Canvas> canvas):
        interpolationTable->set_row_spacings(6);
        interpolationTable->set_col_spacings(12);
        interpolationPadding->add(*interpolationTable);
-       
+
        Gtk::Label *interpolationInLabel = manage(new Gtk::Label(_("_In Interpolation"), true));
        interpolationInLabel->set_alignment(0, 0.5);
        interpolationInLabel->set_mnemonic_widget(*before);
@@ -220,7 +220,7 @@ Widget_Waypoint::set_canvas(synfig::Canvas::Handle x)
 {
        canvas=x;
        assert(canvas);
-       
+
        time_widget->set_fps(canvas->rend_desc().get_frame_rate());
        value_widget->set_canvas(canvas);
 }
@@ -231,7 +231,7 @@ Widget_Waypoint::set_waypoint(synfig::Waypoint &x)
        time_widget->set_fps(canvas->rend_desc().get_frame_rate());
 
        waypoint=x;
-                       
+
 #warning This really needs to be fixed to support value node waypoints!
        if(waypoint.is_static())
        {
@@ -244,7 +244,7 @@ Widget_Waypoint::set_waypoint(synfig::Waypoint &x)
                value_widget->hide();
                value_node_label->show();
        }
-       
+
        time_widget->set_value(waypoint.get_time());
 
        before->set_history((int)waypoint.get_before());
@@ -254,7 +254,7 @@ Widget_Waypoint::set_waypoint(synfig::Waypoint &x)
        adj_continuity.set_value(waypoint.get_continuity());
        adj_bias.set_value(waypoint.get_bias());
        adj_temporal_tension.set_value(waypoint.get_temporal_tension());
-       
+
 }
 const synfig::Waypoint &
 Widget_Waypoint::get_waypoint()const
index 4d8ba2a..6786ec3 100644 (file)
@@ -103,7 +103,7 @@ Widget_WaypointModel::Widget_WaypointModel():
        checkbutton_continuity.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
        checkbutton_bias.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
        checkbutton_temporal_tension.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
-       
+
        adj_tension.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
        adj_continuity.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
        adj_bias.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
@@ -111,19 +111,19 @@ Widget_WaypointModel::Widget_WaypointModel():
 
        before->signal_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
        after->signal_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change));
-       
-       attach(checkbutton_before, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);     
+
+       attach(checkbutton_before, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        attach(*before, 1, 2, 0,1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       attach(checkbutton_after, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);      
+       attach(checkbutton_after, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        attach(*after, 3, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
-       attach(checkbutton_tension, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
+       attach(checkbutton_tension, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        attach(*spin_tension, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       attach(checkbutton_continuity, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
+       attach(checkbutton_continuity, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        attach(*spin_continuity, 3, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       attach(checkbutton_bias, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);       
+       attach(checkbutton_bias, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        attach(*spin_bias, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
-       attach(checkbutton_temporal_tension, 2, 3, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);   
+       attach(checkbutton_temporal_tension, 2, 3, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);
        attach(*spin_temporal_tension, 3, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        show_all();
@@ -137,7 +137,7 @@ Widget_WaypointModel::on_change()
 {
        if(updating)
                return;
-       
+
        waypoint_model.set_before((Waypoint::Interpolation)before->get_history());
        waypoint_model.set_after((Waypoint::Interpolation)after->get_history());
 
@@ -152,7 +152,7 @@ Widget_WaypointModel::on_change()
        waypoint_model.set_continuity_flag(checkbutton_continuity.get_active());
        waypoint_model.set_bias_flag(checkbutton_bias.get_active());
        waypoint_model.set_temporal_tension_flag(checkbutton_temporal_tension.get_active());
-       
+
        before->set_sensitive(checkbutton_before.get_active());
        after->set_sensitive(checkbutton_after.get_active());
        spin_tension->set_sensitive(checkbutton_tension.get_active());
@@ -166,7 +166,7 @@ Widget_WaypointModel::set_waypoint_model(synfig::Waypoint::Model &x)
 {
        waypoint_model=x;
        updating=true;
-       
+
        before->set_history((int)waypoint_model.get_before());
        after->set_history((int)waypoint_model.get_after());
 
@@ -174,15 +174,15 @@ Widget_WaypointModel::set_waypoint_model(synfig::Waypoint::Model &x)
        adj_continuity.set_value(waypoint_model.get_continuity());
        adj_bias.set_value(waypoint_model.get_bias());
        adj_temporal_tension.set_value(waypoint_model.get_temporal_tension());
-       
+
        checkbutton_before.set_active(waypoint_model.get_before_flag());
        checkbutton_after.set_active(waypoint_model.get_after_flag());
        checkbutton_tension.set_active(waypoint_model.get_tension_flag());
        checkbutton_continuity.set_active(waypoint_model.get_continuity_flag());
        checkbutton_bias.set_active(waypoint_model.get_bias_flag());
        checkbutton_temporal_tension.set_active(waypoint_model.get_temporal_tension_flag());
-       
+
        updating=false;
-       
+
        on_change();
 }
index 5cb5ce8..23248b2 100644 (file)
@@ -61,11 +61,11 @@ class Widget_Time;
 class Widget_WaypointModel;
 
 class Widget_WaypointModel : public Gtk::Table
-{      
+{
        synfig::Waypoint::Model waypoint_model;
-       
+
        bool updating;
-       
+
        Gtk::Combo *in,*out;
        Gtk::OptionMenu *before, *after;
        Gtk::Menu *before_options,*after_options;
@@ -81,7 +81,7 @@ class Widget_WaypointModel : public Gtk::Table
        Gtk::CheckButton checkbutton_temporal_tension;
 
        void on_change();
-       
+
 public:
        Widget_WaypointModel();
        void set_waypoint_model(synfig::Waypoint::Model &x);
index e22108a..a1bd112 100644 (file)
@@ -104,7 +104,7 @@ public:
 
        int twindow_start, twindow_width, twindow_height, twindow_pad;
        int refresh_id;
-       
+
        bool onionskin;
        bool onion_first_tile;
        int onion_layers;
@@ -116,13 +116,13 @@ public:
        void set_onion_skin(bool x)
        {
                onionskin=x;
-               
+
                Time time(rend_desc().get_time_start());
-               
+
                onion_skin_queue.push_back(time);
                //onion_skin_queue.push_back(time-1);
                //onion_skin_queue.push_back(time+1);
-               
+
                try
                {
                        onion_skin_queue.push_back(
@@ -133,7 +133,7 @@ public:
                }
                catch(...)
                {  }
-               
+
                try
                {
                        onion_skin_queue.push_back(
@@ -144,13 +144,13 @@ public:
                }
                catch(...)
                {  }
-               
+
                onion_layers=onion_skin_queue.size();
-               
+
                onion_first_tile=false;
        }
 public:
-       
+
        WorkAreaTarget(WorkArea *workarea,int w, int h):
                workarea(workarea),
                low_res(workarea->get_low_resolution_flag()),
@@ -178,7 +178,7 @@ public:
                set_canvas(workarea->get_canvas());
                set_quality(workarea->get_quality());
        }
-       
+
        ~WorkAreaTarget()
        {
                workarea->queue_draw();
@@ -197,7 +197,7 @@ public:
                                workarea->get_w()!=w
                        ||      workarea->get_h()!=h
                ) workarea->set_wh(w,h,4);
-               
+
                workarea->full_frame=false;
 
                desc=*newdesc;
@@ -216,12 +216,12 @@ public:
        virtual int next_frame(Time& time)
        {
                synfig::Mutex::Lock lock(mutex);
-               
+
                if(!onionskin)
                        return synfig::Target_Tile::next_frame(time);
-               
+
                onion_first_tile=(onion_layers==(signed)onion_skin_queue.size());
-               
+
                if(!onion_skin_queue.empty())
                {
                        time=onion_skin_queue.front();
@@ -229,7 +229,7 @@ public:
                }
                else
                        return 0;
-               
+
                return onion_skin_queue.size()+1;
        }
 
@@ -237,17 +237,17 @@ public:
        {
                synfig::Mutex::Lock lock(mutex);
                //if(workarea->tile_queue.empty()) return 0;
-                       
+
                //int curr_tile(workarea->tile_queue.front());
                //workarea->tile_queue.pop_front();
                int curr_tile(workarea->next_unrendered_tile(refresh_id-onion_skin_queue.size()));
                if(curr_tile<0)
                        return 0;
-               
+
                // Width of the image(in tiles)
                int tw(rend_desc().get_w()/get_tile_w());
                if(rend_desc().get_w()%get_tile_w()!=0)tw++;
-                               
+
                y=(curr_tile/tw)*get_tile_w();
                x=(curr_tile%tw)*get_tile_h();
 
@@ -260,7 +260,7 @@ public:
                return total_tiles()-curr_tile+1;
        }
 
-       
+
        virtual bool start_frame(synfig::ProgressCallback *cb)
        {
                synfig::Mutex::Lock lock(mutex);
@@ -279,16 +279,16 @@ public:
                //tile_iter=workarea->tile_book.begin()+twindow_start;
                return true;
        }
-               
+
        static void free_buff(const guint8 *x) { free(const_cast<guint8*>(x)); }
-       
+
        virtual bool add_tile(const synfig::Surface &surface, int x, int y)
        {
                synfig::Mutex::Lock lock(mutex);
                assert(surface);
-               
+
                PixelFormat pf(PF_RGB);
-               
+
                const int total_bytes(get_tile_w()*get_tile_h()*synfig::channels(pf));
 
                unsigned char *buffer((unsigned char*)malloc(total_bytes));
@@ -326,7 +326,7 @@ public:
                        return false;
 
                Glib::RefPtr<Gdk::Pixbuf> pixbuf;
-               
+
                pixbuf=Gdk::Pixbuf::create_from_data(
                        buffer, // pointer to the data
                        Gdk::COLORSPACE_RGB, // the colorspace
@@ -336,7 +336,7 @@ public:
                        surface.get_h(),        // height
                        surface.get_w()*synfig::channels(pf), // stride (pitch)
                        sigc::ptr_fun(&WorkAreaTarget::free_buff)
-               );      
+               );
 
                if(low_res)
                {
@@ -347,9 +347,9 @@ public:
                                Gdk::INTERP_NEAREST
                        );
                }
-               
+
                if(!onionskin || onion_first_tile || !workarea->tile_book[index].first)
-               {                                                       
+               {
                        workarea->tile_book[index].first=pixbuf;
                }
                else
@@ -368,9 +368,9 @@ public:
                                255/(onion_layers-onion_skin_queue.size()+1) //int overall_alpha
                        );
                }
-               
+
                //if(index%2)
-                       workarea->queue_draw();                 
+                       workarea->queue_draw();
                assert(workarea->tile_book[index].first);
                return true;
        }
@@ -393,7 +393,7 @@ public:
 
        int twindow_start, twindow_width, twindow_height, twindow_pad;
        int refresh_id;
-       
+
        bool onionskin;
        bool onion_first_tile;
        int onion_layers;
@@ -405,15 +405,15 @@ public:
        void set_onion_skin(bool x)
        {
                onionskin=x;
-               
+
                Time time(rend_desc().get_time_start());
-               
+
                onion_skin_queue.push_back(time);
                //onion_skin_queue.push_back(time-1);
                //onion_skin_queue.push_back(time+1);
                if(!onionskin)
                        return;
-               
+
                try
                {
                        onion_skin_queue.push_back(
@@ -424,7 +424,7 @@ public:
                }
                catch(...)
                {  }
-               
+
                try
                {
                        onion_skin_queue.push_back(
@@ -435,13 +435,13 @@ public:
                }
                catch(...)
                {  }
-               
+
                onion_layers=onion_skin_queue.size();
-               
+
                onion_first_tile=false;
        }
 public:
-       
+
        WorkAreaTarget_Full(WorkArea *workarea,int w, int h):
                workarea(workarea),
                low_res(workarea->get_low_resolution_flag()),
@@ -454,7 +454,7 @@ public:
                set_canvas(workarea->get_canvas());
                set_quality(workarea->get_quality());
        }
-       
+
        ~WorkAreaTarget_Full()
        {
        }
@@ -472,7 +472,7 @@ public:
                                workarea->get_w()!=w
                        ||      workarea->get_h()!=h
                ) workarea->set_wh(w,h,4);
-               
+
                surface.set_wh(newdesc->get_w(),newdesc->get_h());
 
                desc=*newdesc;
@@ -491,20 +491,20 @@ public:
 
                if(!onionskin)
                        return synfig::Target_Scanline::next_frame(time);
-               
+
                onion_first_tile=(onion_layers==(signed)onion_skin_queue.size());
-               
+
                if(!onion_skin_queue.empty())
                {
                        time=onion_skin_queue.front();
                        onion_skin_queue.pop_front();
                }
                else
-                       return 0;               
+                       return 0;
                return onion_skin_queue.size()+1;
        }
 
-       
+
        virtual bool start_frame(synfig::ProgressCallback *cb)
        {
                return true;
@@ -521,13 +521,13 @@ public:
        }
 
        static void free_buff(const guint8 *x) { free(const_cast<guint8*>(x)); }
-       
+
        virtual void end_frame()
        {
                assert(surface);
-               
+
                PixelFormat pf(PF_RGB);
-               
+
                const int total_bytes(surface.get_w()*surface.get_h()*synfig::channels(pf));
 
                unsigned char *buffer((unsigned char*)malloc(total_bytes));
@@ -564,7 +564,7 @@ public:
                }
 
                Glib::RefPtr<Gdk::Pixbuf> pixbuf;
-               
+
                pixbuf=Gdk::Pixbuf::create_from_data(
                        buffer, // pointer to the data
                        Gdk::COLORSPACE_RGB, // the colorspace
@@ -574,7 +574,7 @@ public:
                        surface.get_h(),        // height
                        surface.get_w()*synfig::channels(pf), // stride (pitch)
                        sigc::ptr_fun(&WorkAreaTarget::free_buff)
-               );      
+               );
 
                if(low_res)
                {
@@ -585,11 +585,11 @@ public:
                                Gdk::INTERP_NEAREST
                        );
                }
-               
+
                int index=0;
-               
+
                if(!onionskin || onion_first_tile || !workarea->tile_book[index].first)
-               {                                                       
+               {
                        workarea->tile_book[index].first=pixbuf;
                }
                else
@@ -608,8 +608,8 @@ public:
                                255/(onion_layers-onion_skin_queue.size()+1) //int overall_alpha
                        );
                }
-               
-               workarea->queue_draw();                 
+
+               workarea->queue_draw();
                assert(workarea->tile_book[index].first);
        }
 };
@@ -634,7 +634,7 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        show_grid(false),
        tile_w(128),
        tile_h(128)
-{      
+{
        show_guides=true;
        curr_input_device=0;
        full_frame=false;
@@ -643,7 +643,7 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        render_idle_func_id=0;
        zoom=prev_zoom=1.0;
        quality=10;
-       rendering=false;        
+       rendering=false;
        canceled_=false;
        low_resolution=true;
        pw=0.001;
@@ -653,7 +653,7 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        queued=false;
        dirty_trap_enabled=false;
        solid_lines=true;
-       
+
        dirty_trap_queued=0;
 
        meta_data_lock=false;
@@ -674,7 +674,7 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
 
        // Not that it really makes a difference... (setting this to zero, that is)
        refreshes=0;
-       
+
        drawing_area=manage(new class Gtk::DrawingArea());
        drawing_area->show();
        drawing_area->set_extension_events(Gdk::EXTENSION_EVENTS_ALL);
@@ -696,9 +696,9 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        drawing_frame->modify_bg(Gtk::STATE_SELECTED,Gdk::Color("#00ff00"));
        */
        //drawing_frame->set_state(Gtk::STATE_NORMAL);
-       
+
        drawing_frame->show();
-       
+
        attach(*drawing_frame, 1, 3+RULER_FIX, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
 
        Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon");
@@ -726,7 +726,7 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        menubutton->signal_pressed().connect(sigc::mem_fun(*this, &WorkArea::popup_menu));
        attach(*menubutton, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
 
-       
+
 
        Gtk::VScrollbar *vscrollbar1 = manage(new class Gtk::VScrollbar(*get_scrolly_adjustment()));
        Gtk::HScrollbar *hscrollbar1 = manage(new class Gtk::HScrollbar(*get_scrollx_adjustment()));
@@ -747,15 +747,15 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        add_events(Gdk::KEY_PRESS_MASK);
        drawing_area->add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
        drawing_area->add_events(Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK |Gdk::POINTER_MOTION_MASK);
-       
+
        // ----------------- Attach signals
-       
+
        drawing_area->signal_expose_event().connect(sigc::mem_fun(*this, &WorkArea::refresh));
        drawing_area->signal_event().connect(sigc::mem_fun(*this, &WorkArea::on_drawing_area_event));
        drawing_area->signal_size_allocate().connect(sigc::hide(sigc::mem_fun(*this, &WorkArea::refresh_dimension_info)));
 
 
-       
+
        canvas_interface->signal_rend_desc_changed().connect(sigc::mem_fun(*this, &WorkArea::refresh_dimension_info));
        // When either of the scrolling adjustments change, then redraw.
        get_scrollx_adjustment()->signal_value_changed().connect(sigc::mem_fun(*this, &WorkArea::queue_scroll));
@@ -779,7 +779,7 @@ WorkArea::WorkArea(etl::loose_handle<synfigapp::CanvasInterface> canvas_interfac
        set_focus_point(Point(0,0));
 
 
-       load_meta_data();       
+       load_meta_data();
        // Load sketch
        {
                String data(canvas->get_meta_data("sketch"));
@@ -826,7 +826,7 @@ WorkArea::save_meta_data()
                }
                if(!data.empty())
                        canvas_interface->set_meta_data("guide_x",data);
-               
+
                data.clear();
                for(iter=get_guide_list_y().begin();iter!=get_guide_list_y().end();++iter)
                {
@@ -837,7 +837,7 @@ WorkArea::save_meta_data()
                if(!data.empty())
                        canvas_interface->set_meta_data("guide_y",data);
        }
-       
+
        if(get_sketch_filename().size())
        {
                if(dirname(canvas->get_file_name())==dirname(get_sketch_filename()))
@@ -855,7 +855,7 @@ WorkArea::load_meta_data()
        if(meta_data_lock)
                return;
        meta_data_lock=true;
-       
+
        String data;
 
        data=canvas->get_meta_data("grid_size");
@@ -864,11 +864,11 @@ WorkArea::load_meta_data()
                float gx(get_grid_size()[0]),gy(get_grid_size()[1]);
 
                String::iterator iter(find(data.begin(),data.end(),' '));
-               String tmp(data.begin(),iter);                                          
-               
+               String tmp(data.begin(),iter);
+
                if(!tmp.empty())
                        gx=stratof(tmp);
-               
+
                if(iter==data.end())
                        tmp.clear();
                else
@@ -876,7 +876,7 @@ WorkArea::load_meta_data()
 
                if(!tmp.empty())
                        gy=stratof(tmp);
-               
+
                set_grid_size(Vector(gx,gy));
        }
        else
@@ -917,34 +917,34 @@ WorkArea::load_meta_data()
                set_onion_skin(true);
        if(data.size() && (data=="0" || data[0]=='f' || data[0]=='F'))
                set_onion_skin(false);
-       
+
        data=canvas->get_meta_data("guide_x");
        get_guide_list_x().clear();
        while(!data.empty())
        {
                String::iterator iter(find(data.begin(),data.end(),' '));
-               String guide(data.begin(),iter);                                                
+               String guide(data.begin(),iter);
 
                if(!guide.empty())
                        get_guide_list_x().push_back(stratof(guide));
-               
+
                if(iter==data.end())
                        data.clear();
                else
                        data=String(iter+1,data.end());
        }
        //sort(get_guide_list_x());
-       
+
        data=canvas->get_meta_data("guide_y");
        get_guide_list_y().clear();
        while(!data.empty())
        {
                String::iterator iter(find(data.begin(),data.end(),' '));
-               String guide(data.begin(),iter);                                                
+               String guide(data.begin(),iter);
 
                if(!guide.empty())
                        get_guide_list_y().push_back(stratof(guide));
-               
+
                if(iter==data.end())
                        data.clear();
                else
@@ -981,7 +981,7 @@ WorkArea::enable_grid()
        queue_draw();
 }
 
-void 
+void
 WorkArea::disable_grid()
 {
        show_grid=false;
@@ -1045,13 +1045,13 @@ WorkArea::set_focus_point(const synfig::Point &point)
        adjusted[1]=(abs(adjusted[1]-floor(adjusted[1]))<0.5)?floor(adjusted[1])*abs(get_ph()):ceil(adjusted[1])*abs(get_ph());
        */
        const synfig::Point& adjusted(point);
-       
+
        synfig::RendDesc &rend_desc(get_canvas()->rend_desc());
        Real x_factor=(rend_desc.get_br()[0]-rend_desc.get_tl()[0]>0)?-1:1;
        Real y_factor=(rend_desc.get_br()[1]-rend_desc.get_tl()[1]>0)?-1:1;
 
        get_scrollx_adjustment()->set_value(adjusted[0]*x_factor);
-       get_scrolly_adjustment()->set_value(adjusted[1]*y_factor);      
+       get_scrolly_adjustment()->set_value(adjusted[1]*y_factor);
 }
 
 synfig::Point
@@ -1060,7 +1060,7 @@ WorkArea::get_focus_point()const
        synfig::RendDesc &rend_desc(get_canvas()->rend_desc());
        Real x_factor=(rend_desc.get_br()[0]-rend_desc.get_tl()[0]>0)?-1:1;
        Real y_factor=(rend_desc.get_br()[1]-rend_desc.get_tl()[1]>0)?-1:1;
-       
+
        return synfig::Point(get_scrollx_adjustment()->get_value()*x_factor, get_scrolly_adjustment()->get_value()*y_factor);
 }
 
@@ -1074,11 +1074,11 @@ WorkArea::set_wh(int W, int H,int CHAN)
        }
        if(W<=0 || H<=0 || CHAN<=0)
                return false;
-       
+
        assert(W>0);
        assert(H>0);
        assert(CHAN>0);
-       
+
        // Set all of the parameters
        w=W;
        h=H;
@@ -1087,7 +1087,7 @@ WorkArea::set_wh(int W, int H,int CHAN)
        refresh_dimension_info();
 
        tile_book.clear();
-               
+
        return true;
 }
 
@@ -1098,10 +1098,10 @@ WorkArea::on_key_press_event(GdkEventKey* event)
                return false;
 
        Real multiplier(1.0);
-       
+
        if(Gdk::ModifierType(event->state)&GDK_SHIFT_MASK)
                multiplier=10.0;
-       
+
        Vector nudge;
        switch(event->keyval)
        {
@@ -1121,15 +1121,15 @@ WorkArea::on_key_press_event(GdkEventKey* event)
                        return false;
                        break;
        }
-       
+
        synfigapp::Action::PassiveGrouper grouper(instance.get(),"Nudge");
-       
+
        // Grid snap does not apply to nudging
        bool grid_snap_holder(get_grid_snap());
        bool guide_snap_holder(get_guide_snap());
        set_grid_snap(false);
 
-       try {   
+       try {
                start_duck_drag(get_selected_duck()->get_trans_point());
                translate_selected_ducks(get_selected_duck()->get_trans_point()+nudge*multiplier);
                end_duck_drag();
@@ -1142,7 +1142,7 @@ WorkArea::on_key_press_event(GdkEventKey* event)
 
        set_grid_snap(grid_snap_holder);
        set_guide_snap(guide_snap_holder);
-       
+
        return true;
 }
 
@@ -1156,9 +1156,9 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
        float pressure(0);
        bool is_mouse(false);
        Gdk::ModifierType modifier(Gdk::ModifierType(0));
-       
+
        drawing_area->grab_focus();
-       
+
        // Handle input stuff
        if(
                event->any.type==GDK_MOTION_NOTIFY ||
@@ -1179,7 +1179,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        device=event->button.device;
                        modifier=Gdk::ModifierType(event->button.state);
                }
-                       
+
                // Make sure we recognise the device
                if(curr_input_device)
                {
@@ -1189,15 +1189,15 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                curr_input_device=device;
                                signal_input_device_changed()(curr_input_device);
                        }
-               }               
+               }
                else if(device)
                {
                        curr_input_device=device;
                        signal_input_device_changed()(curr_input_device);
-               }                       
+               }
 
                assert(curr_input_device);
-               
+
                // Calculate the position of the
                // input device in canvas coordinates
                // and the buttons
@@ -1221,14 +1221,14 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        //synfig::info("pressure=%f",pressure);
                        pressure-=0.04f;
                        pressure/=1.0f-0.04f;
-                       
-                       
+
+
                        assert(!isnan(pressure));
-                       
+
                        mouse_pos=synfig::Point(screen_to_comp_coords(synfig::Point(x,y)));
-                       
+
                        button_pressed=event->button.button;
-                       
+
                        if(button_pressed==1 && pressure<0 && (event->any.type!=GDK_BUTTON_RELEASE && event->any.type!=GDK_BUTTON_PRESS))
                                button_pressed=0;
                        if(pressure<0)
@@ -1236,11 +1236,11 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
 
                        //if(event->any.type==GDK_BUTTON_PRESS && button_pressed)
                        //      synfig::info("Button pressed on input device = %d",event->button.button);
-                       
+
                        //if(event->button.axes[2]>0.1)
                        //      button_pressed=1;
                        //else
-                       //      button_pressed=0;                               
+                       //      button_pressed=0;
                }
        }
        // GDK mouse scrolling events
@@ -1277,14 +1277,14 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                switch(button_pressed)
                {
                case 1: // Attempt to click on a duck
-               {       
+               {
                        etl::handle<Duck> duck;
                        dragging=DRAG_NONE;
-                       
+
                        if(allow_duck_clicks)
                        {
                                duck=find_duck(mouse_pos,radius);
-                               
+
                                if(duck)
                                {
                                        clicked_duck=0;
@@ -1312,9 +1312,9 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        }
                        //else
                        //      clear_selected_ducks();
-                               
-               
-               
+
+
+
                        selected_bezier=find_bezier(mouse_pos,radius,&bezier_click_pos);
                        if(duck && duck->get_editable())
                        {
@@ -1329,7 +1329,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        }
 // I commented out this section because
 // it was causing issues when rotoscoping.
-// At the moment, we don't need it, so 
+// At the moment, we don't need it, so
 // this was the easiest way to fix the problem.
 /*
                        else
@@ -1347,7 +1347,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                {
                                        // Check for a guide click
                                        GuideList::iterator iter;
-                                       
+
                                        iter=find_guide_x(mouse_pos,radius);
                                        if(iter==get_guide_list_x().end())
                                        {
@@ -1395,7 +1395,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                {
                        etl::handle<Duck> duck=find_duck(mouse_pos,radius);
                        etl::handle<Bezier> bezier=find_bezier(mouse_pos,radius,&bezier_click_pos);
-                       
+
                        Layer::Handle layer(get_canvas()->find_layer(mouse_pos));
                        if(duck)
                        {
@@ -1413,15 +1413,15 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                bezier->signal_user_click(2)(bezier_click_pos);
                                return true;
                        }
-                       else 
+                       else
                        if(layer)
                        {
-                               if(canvas_view->get_smach().process_event(EventLayerClick(layer,BUTTON_RIGHT,mouse_pos))==Smach::RESULT_OK)                                             
+                               if(canvas_view->get_smach().process_event(EventLayerClick(layer,BUTTON_RIGHT,mouse_pos))==Smach::RESULT_OK)
                                        return false;
                                return true;
                        }
                        else
-                               canvas_view->get_smach().process_event(EventMouse(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,BUTTON_RIGHT,mouse_pos,pressure,modifier));                  
+                               canvas_view->get_smach().process_event(EventMouse(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,BUTTON_RIGHT,mouse_pos,pressure,modifier));
                        /*
                        if(canvas_view->get_smach().process_event(EventMouse(EVENT_WORKAREA_MOUSE_BUTTON_DOWN,BUTTON_RIGHT,mouse_pos,pressure,modifier))==Smach::RESULT_OK)
                        {
@@ -1451,16 +1451,16 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        last_event_time=event->motion.time;
 
                signal_cursor_moved_();
-       
+
                // Guide/Duck hilights on hover
                if(dragging==DRAG_NONE)
                {
                        GuideList::iterator iter;
-                       
+
                        iter=find_guide_x(mouse_pos,radius);
                        if(iter==get_guide_list_x().end())
                                iter=find_guide_y(mouse_pos,radius);
-                       
+
                        if(iter!=curr_guide)
                        {
                                curr_guide=iter;
@@ -1476,7 +1476,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        }
                }
 
-       
+
                if(dragging==DRAG_DUCK)
                {
                        if(canvas_view->get_cancel_status())
@@ -1494,13 +1494,13 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        }
                        selected_duck->set_point(point);
                        */
-                       
+
                        //Point p(mouse_pos);
-                       
+
                        set_axis_lock(event->motion.state&GDK_SHIFT_MASK);
-                       
+
                        translate_selected_ducks(mouse_pos);
-                       
+
                        drawing_area->queue_draw();
                }
                if(dragging==DRAG_BOX)
@@ -1552,12 +1552,12 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                }
                else
                if(dragging==DRAG_DUCK)
-               {                       
+               {
                        synfigapp::Action::PassiveGrouper grouper(instance.get(),"Move");
                        dragging=DRAG_NONE;
                        //translate_selected_ducks(mouse_pos);
                        set_axis_lock(false);
-                       
+
                        try{
                        get_canvas_view()->duck_refresh_flag=false;
                        get_canvas_view()->duck_refresh_needed=false;
@@ -1566,7 +1566,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        if(!drag_did_anything)
                        {
                                //etl::handle<Duck> duck=find_duck(mouse_pos,radius);
-                               
+
                                if(modifier&GDK_SHIFT_MASK)
                                {
                                        //synfig::info("DUCK_DRAG_RELEASE: SHIFT-MASK ON!");
@@ -1594,7 +1594,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                                clear_selected_ducks();
                                                select_duck(clicked_duck);
                                        }
-                               }               
+                               }
                                if(clicked_duck)clicked_duck->signal_user_click(0)();
                        }
                        else
@@ -1614,9 +1614,9 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
 
                        ret=true;
                }
-               
+
                if(dragging==DRAG_BOX)
-               {                       
+               {
                        dragging=DRAG_NONE;
                        if((drag_point-mouse_pos).mag()>radius/2.0f)
                        {
@@ -1629,13 +1629,13 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                ret=true;
                        }
                        else
-                       {       
+                       {
                                if(allow_layer_clicks)
                                {
                                        Layer::Handle layer(get_canvas()->find_layer(drag_point));
                                        //if(layer)
                                        {
-                                               if(canvas_view->get_smach().process_event(EventLayerClick(layer,BUTTON_LEFT,mouse_pos,modifier))==Smach::RESULT_OK)                                             
+                                               if(canvas_view->get_smach().process_event(EventLayerClick(layer,BUTTON_LEFT,mouse_pos,modifier))==Smach::RESULT_OK)
                                                        signal_layer_selected_(layer);
                                                ret=true;
                                        }
@@ -1646,12 +1646,12 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                }
                        }
                }
-               
+
                dragging=DRAG_NONE;
 
                if(canvas_view->get_smach().process_event(EventMouse(EVENT_WORKAREA_MOUSE_BUTTON_UP,MouseButton(event->button.button),mouse_pos,pressure,modifier))==Smach::RESULT_ACCEPT)
                        ret=true;
-               
+
                return ret;
        }
                break;
@@ -1666,7 +1666,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
 
                if(modifier&GDK_CONTROL_MASK)
                {
-                       
+
                        // The zoom is performed while preserving the pointer
                        // position as a fixed point (similarly to Xara Xtreme and
                        // Inkscape).
@@ -1724,7 +1724,7 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                        }
                }
                else
-               {       
+               {
                        // Scroll in either direction by 20 pixels. Ideally, the
                        // amount of pixels per scrolling event should be
                        // configurable. Xara Xtreme currently uses an (hard
@@ -1783,17 +1783,17 @@ WorkArea::on_hruler_event(GdkEvent *event)
                                x=event->button.x;
                                y=event->button.y;
                        }
-                       
+
                        if(isnan(y) || isnan(x))
-                               return false;                   
-                       
+                               return false;
+
                        *curr_guide=synfig::Point(screen_to_comp_coords(synfig::Point(x,y)))[1];
 
                        queue_draw();
                }
                return true;
                break;
-               
+
        case GDK_BUTTON_RELEASE:
                if(dragging==DRAG_GUIDE && curr_guide_is_x==false)
                {
@@ -1853,7 +1853,7 @@ WorkArea::refresh_dimension_info()
        canvasheight=rend_desc.get_br()[1]-rend_desc.get_tl()[1];
 
        pw=canvaswidth/w;
-       ph=canvasheight/h;      
+       ph=canvasheight/h;
 
        scrollx_adjustment.set_page_increment(abs(get_grid_size()[0]));
        scrollx_adjustment.set_step_increment(abs(pw));
@@ -1865,20 +1865,20 @@ WorkArea::refresh_dimension_info()
        scrolly_adjustment.set_page_increment(abs(get_grid_size()[1]));
 
 
-       
+
        if(drawing_area->get_width()<=0 || drawing_area->get_height()<=0 || w==0 || h==0)
                return;
-       
+
        const synfig::Point focus_point(get_focus_point());
        const synfig::Real x(focus_point[0]/pw+drawing_area->get_width()/2-w/2);
        const synfig::Real y(focus_point[1]/ph+drawing_area->get_height()/2-h/2);
-       
+
        window_tl[0]=rend_desc.get_tl()[0]-pw*x;
        window_br[0]=rend_desc.get_br()[0]+pw*(drawing_area->get_width()-x-w);
 
        window_tl[1]=rend_desc.get_tl()[1]-ph*y;
        window_br[1]=rend_desc.get_br()[1]+ph*(drawing_area->get_height()-y-h);
-       
+
        hruler->property_lower()=Distance(window_tl[0],Distance::SYSTEM_UNITS).get(App::distance_system,rend_desc);
        hruler->property_upper()=Distance(window_br[0],Distance::SYSTEM_UNITS).get(App::distance_system,rend_desc);
        vruler->property_lower()=Distance(window_tl[1],Distance::SYSTEM_UNITS).get(App::distance_system,rend_desc);
@@ -1918,32 +1918,32 @@ WorkArea::next_unrendered_tile(int refreshes)const
                return -1;
 
        //const synfig::RendDesc &rend_desc(get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_focus_point());
-       
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
        const synfig::Vector::value_type
                x(focus_point[0]/pw+drawing_area->get_width()/2-w/2),
                y(focus_point[1]/ph+drawing_area->get_height()/2-h/2);
-       
+
        const int width_in_tiles(w/tile_w+(w%tile_w?1:0));
        const int height_in_tiles(h/tile_h+(h%tile_h?1:0));
-                       
+
        int
                u(0),v(0),
                u1(int(-x/tile_w)),
                v1(int(-y/tile_h)),
                u2(int((-x+drawing_area->get_width())/tile_w+1)),
                v2(int((-y+drawing_area->get_height())/tile_h+1));
-       
+
        if(u2>width_in_tiles)u2=width_in_tiles;
        if(v2>height_in_tiles)v2=height_in_tiles;
        if(u1<0)u1=0;
        if(v1<0)v1=0;
-               
+
        int last_good_tile(-1);
-       
+
        for(v=v1;v<v2;v++)
                for(u=u1;u<u2;u++)
                {
@@ -1966,7 +1966,7 @@ private:
        F func;
 public:
        handle2ptr_t(const F &func):func(func) { };
-       
+
        R operator()(typename etl::handle<T> x) { return func(*x); }
 };
 
@@ -1999,14 +1999,14 @@ WorkArea::refresh(GdkEventExpose*event)
        assert(get_canvas());
 
        drawing_area->get_window()->clear();
-       
+
        //const synfig::RendDesc &rend_desc(get_canvas()->rend_desc());
-       
+
        const synfig::Vector focus_point(get_focus_point());
-       
+
        // Update the old focus point
        last_focus_point=focus_point;
-       
+
        // Draw out the renderables
        {
                std::set<etl::handle<WorkAreaRenderer> >::iterator iter;
@@ -2019,8 +2019,8 @@ WorkArea::refresh(GdkEventExpose*event)
                                );
                }
        }
-       
-       
+
+
        // Calculate the window coordinates of the top-left
        // corner of the canvas.
        //const synfig::Vector::value_type
@@ -2031,7 +2031,7 @@ WorkArea::refresh(GdkEventExpose*event)
        //const synfig::Vector::value_type window_endx(window_br[0]);
        //const synfig::Vector::value_type window_starty(window_tl[1]);
        //const synfig::Vector::value_type window_endy(window_br[1]);
-       
+
        Glib::RefPtr<Gdk::GC> gc=Gdk::GC::create(drawing_area->get_window());
 
 
@@ -2040,7 +2040,7 @@ WorkArea::refresh(GdkEventExpose*event)
        if(canvas_interface->get_mode()&synfigapp::MODE_ANIMATE)
        {
                /*gc->set_rgb_fg_color(Gdk::Color("#FF0000"));
-               gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);       
+               gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER);
                drawing_area->get_window()->draw_rectangle(
                        gc,
                        false,  // Fill?
@@ -2056,7 +2056,7 @@ WorkArea::refresh(GdkEventExpose*event)
 
 
 
-       previous_focus=get_focus_point();       
+       previous_focus=get_focus_point();
 
        return true;
 }
@@ -2141,41 +2141,41 @@ studio::WorkArea::async_update_preview()
        // This object will mark us as busy until
        // we are done.
        //studio::App::Busy busy;
-       
+
        //WorkAreaProgress callback(this,get_canvas_view()->get_ui_interface().get());
        //synfig::ProgressCallback *cb=&callback;
 
        if(!is_visible())return false;
-       
+
        /*
        // If we are queued to render the scene at the next idle
-       // go ahead and de-queue it. 
+       // go ahead and de-queue it.
        if(render_idle_func_id)
        {
-               g_source_remove(render_idle_func_id);           
+               g_source_remove(render_idle_func_id);
                //queued=false;
                render_idle_func_id=0;
        }
        */
-       
+
        dirty=false;
        get_canvas_view()->reset_cancel_status();
-       
+
        //bool ret=false;
        RendDesc desc=get_canvas()->rend_desc();
-       
+
        int w=(int)(desc.get_w()*zoom);
        int h=(int)(desc.get_h()*zoom);
-               
+
        // Setup the description parameters
-       desc.set_antialias(1);  
+       desc.set_antialias(1);
        desc.set_time(cur_time);
-       
+
        set_rend_desc(desc);
 
        // Create the render target
        handle<Target> target;
-       
+
        if(w*h>(low_resolution?480*270:480*270/2))
        {
                handle<WorkAreaTarget> trgt(new class WorkAreaTarget(this,w,h));
@@ -2192,7 +2192,7 @@ studio::WorkArea::async_update_preview()
                trgt->set_onion_skin(get_onion_skin());
                target=trgt;
        }
-       
+
        // We can rest assured that our time has already
        // been set, so there is no need to have to
        // recalculate that over again.
@@ -2212,11 +2212,11 @@ studio::WorkArea::async_update_preview()
        rendering=true;
        cb->task("Rendering...");
        rendering=true;
-       
+
        return true;
 }
 
-void 
+void
 studio::WorkArea::async_update_finished()
 {
        synfig::ProgressCallback *cb=get_canvas_view()->get_ui_interface().get();
@@ -2225,7 +2225,7 @@ studio::WorkArea::async_update_finished()
 
        if(!async_renderer)
                return;
-       
+
        // If we completed successfuly, then
        // we aren't dirty anymore
        if(async_renderer->has_success())
@@ -2257,10 +2257,10 @@ again:
        // This object will mark us as busy until
        // we are done.
        studio::App::Busy busy;
-       
+
        WorkAreaProgress callback(this,get_canvas_view()->get_ui_interface().get());
        synfig::ProgressCallback *cb=&callback;
-       
+
        // We don't want to render if we are already rendering
        if(rendering)
        {
@@ -2269,36 +2269,36 @@ again:
        }
 
        if(!is_visible())return false;
-       get_canvas()->set_time(get_time());     
+       get_canvas()->set_time(get_time());
        get_canvas_view()->get_smach().process_event(EVENT_REFRESH_DUCKS);
        signal_rendering()();
-       
+
        // If we are queued to render the scene at the next idle
-       // go ahead and de-queue it. 
+       // go ahead and de-queue it.
        if(render_idle_func_id)
        {
-               g_source_remove(render_idle_func_id);           
+               g_source_remove(render_idle_func_id);
                //queued=false;
                render_idle_func_id=0;
        }
        // Start rendering
        rendering=true;
-       
+
        dirty=false;
        get_canvas_view()->reset_cancel_status();
-       
+
        bool ret=false;
        RendDesc desc=get_canvas()->rend_desc();
        //newdesc->set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN);
-       
+
        int w=(int)(desc.get_w()*zoom);
        int h=(int)(desc.get_h()*zoom);
-               
+
        // Setup the description parameters
-       desc.set_antialias(1);  
+       desc.set_antialias(1);
        desc.set_time(cur_time);
        //desc.set_wh(w,h);
-       
+
        set_rend_desc(desc);
 
        // Create the render target
@@ -2310,12 +2310,12 @@ again:
        // been set, so there is no need to have to
        // recalculate that over again.
        target->set_avoid_time_sync(true);
-       
+
        if(cb)
                cb->task(strprintf("Rendering canvas %s...",get_canvas()->get_name().c_str()));
 
        target->render(cb);
-       
+
        if(!ret && !get_canvas_view()->get_cancel_status() && dirty)
        {
                rendering=false;
@@ -2324,20 +2324,20 @@ again:
        }
        if(get_canvas_view()->get_cancel_status())
                canceled_=true;
-       
+
        if(cb)
        {
                if(ret)
                        cb->task("Idle");
                else
                        cb->task("Render Failed");
-               cb->amount_complete(0,1);                       
+               cb->amount_complete(0,1);
        }
 
        // Refresh the work area to make sure that
        // it is being displayed correctly
        drawing_area->queue_draw();
-               
+
        // If we completed successfuly, then
        // we aren't dirty anymore
        if(ret)
@@ -2361,7 +2361,7 @@ studio::WorkArea::async_render_preview(Time time)
        refreshes+=5;
        if(!is_visible())return;
 
-       get_canvas()->set_time(get_time());     
+       get_canvas()->set_time(get_time());
        get_canvas_view()->get_smach().process_event(EVENT_REFRESH_DUCKS);
        signal_rendering()();
 
@@ -2399,9 +2399,9 @@ void
 WorkArea::queue_scroll()
 {
 //     const synfig::RendDesc &rend_desc(get_canvas()->rend_desc());
-       
+
        const synfig::Point focus_point(get_focus_point());
-       
+
        const synfig::Real
                new_x(focus_point[0]/pw+drawing_area->get_width()/2-w/2),
                new_y(focus_point[1]/ph+drawing_area->get_height()/2-h/2);
@@ -2415,9 +2415,9 @@ WorkArea::queue_scroll()
                return;
 
        const int
-               dx(round_to_int(old_x)-round_to_int(new_x)),    
+               dx(round_to_int(old_x)-round_to_int(new_x)),
                dy(round_to_int(old_y)-round_to_int(new_y));
-       
+
        drawing_area->get_window()->scroll(-dx,-dy);
 
        /*drawing_area->queue_draw_area(
@@ -2489,18 +2489,18 @@ studio::WorkArea::queue_render_preview()
 */
                //async_renderer=0;
        }
-       
+
        if(dirty_trap_enabled)
        {
                dirty_trap_queued++;
                return;
        }
-       
+
        int queue_time=50;
-       
+
        if(rendering)
                queue_time+=250;
-       
+
 
        if(queued==false)
        {
@@ -2521,7 +2521,7 @@ studio::WorkArea::queue_render_preview()
 DirtyTrap::DirtyTrap(WorkArea *work_area):work_area(work_area)
 {
        work_area->dirty_trap_enabled=true;
-       
+
        work_area->dirty_trap_queued=0;
 }
 
index daeb906..033997a 100644 (file)
@@ -69,7 +69,7 @@ public:
        typedef etl::loose_handle<T_> first_argument_type;
        typedef etl::loose_handle<T_> second_argument_type;
        typedef bool result_type;
-       
+
 }
 };
 */
@@ -105,11 +105,11 @@ class WorkArea : public Gtk::Table, public Duckmatic
        friend class WorkAreaTarget_Full;
        friend class DirtyTrap;
        friend class WorkAreaRenderer;
-               
+
        /*
  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
        */
-       
+
 public:
 
        void insert_renderer(const etl::handle<WorkAreaRenderer> &x);
@@ -152,7 +152,7 @@ private:
        Gtk::Frame *drawing_frame;
 
        GdkDevice* curr_input_device;
-       
+
        // Bleh!
        int     w;                                              //!< Width of the image (in pixels)
        int     h;                                              //!< Height of the image (in pixels)
@@ -169,17 +169,17 @@ private:
 
        int bpp;
        //unsigned char *buffer;
-       
+
        //! ???
        synfig::ProgressCallback *progresscallback;
 
        //! ???
        synfig::RendDesc desc;
-       
+
        //! This flag is set if the user is dragging the video window
        /*! \see drag_point */
        DragMode dragging;
-               
+
        etl::handle<Duckmatic::Duck> clicked_duck;
        etl::handle<Duckmatic::Duck> hover_duck;
 
@@ -198,23 +198,23 @@ private:
        bool show_guides;
 
        bool low_resolution;
-       
+
        bool meta_data_lock;
 
-       //! This flag is set if the entire frame is rendered rather than using tiles    
+       //! This flag is set if the entire frame is rendered rather than using tiles
        bool full_frame;
-       
+
        //Glib::RefPtr<Gdk::Pixbuf> pix_buf;
-       
+
        //! This vector holds all of the tiles for this image
        std::vector< std::pair<Glib::RefPtr<Gdk::Pixbuf>,int> > tile_book;
 
        //! This integer describes the total times that the work are has been refreshed
        int refreshes;
-       
+
        //! This list holds the queue of tiles that need to be rendered
        //std::list<int> tile_queue;
-       
+
        int tile_w, tile_h;
 
        gint render_idle_func_id;
@@ -223,16 +223,16 @@ private:
        synfig::Point last_focus_point;
 
        bool canceled_;
-       
+
        int quality;
 
        bool dirty_trap_enabled;
-       
+
        int dirty_trap_queued;
-       
-       
+
+
        bool onion_skin;
-               
+
        etl::loose_handle<synfig::ValueNode> selected_value_node_;
 
 
@@ -255,7 +255,7 @@ public:
 
        int get_tile_w()const { return tile_w; }
        int get_tile_h()const { return tile_h; }
-       
+
        bool solid_lines;
        bool rendering;
        bool dirty;
@@ -358,16 +358,16 @@ public:
        etl::loose_handle<studio::CanvasView> get_canvas_view()const { return canvas_view; }
 
        void refresh_dimension_info();
-       
+
        //! Enables showing of the grid
        void enable_grid();
-       
+
        //! Disables showing of the grid
        void disable_grid();
-       
+
        //! Toggles the showing of the grid
        void toggle_grid();
-       
+
        //! Returns the state of the show_grid flag
        bool grid_status()const { return show_grid; }
 
@@ -376,24 +376,24 @@ public:
        bool get_show_guides()const { return show_guides; }
        void set_show_guides(bool x);
        void toggle_show_guides() { set_show_guides(!get_show_guides()); }
-               
+
        bool get_low_resolution_flag()const { return low_resolution; }
        void set_low_resolution_flag(bool x);
        void toggle_low_resolution_flag();
-       
+
        //! ???
        void queue_scroll();
-       
+
        //! Sets the size of the grid
        void set_grid_size(const synfig::Vector &s);
-               
+
        //! ??
        void popup_menu();
-       
+
        int get_quality()const { return quality; }
 
        void set_quality(int x);
-       
+
 
        int get_w()const { return w; }
        int get_h()const { return h; }
@@ -401,10 +401,10 @@ public:
 
        //! ??
        const synfig::RendDesc &get_rend_desc()const { return desc; }
-       
+
        //! ??
        void set_rend_desc(const synfig::RendDesc &x) { desc=x; }
-       
+
        //! Converts screen coords (ie: pixels) to composition coordinates
        synfig::Point screen_to_comp_coords(synfig::Point pos)const;
 
@@ -413,7 +413,7 @@ public:
 
        float get_pw()const { return pw; }
        float get_ph()const { return ph; }
-       
+
        const synfig::Point &get_window_tl()const { return window_tl; }
        const synfig::Point &get_window_br()const { return window_br; }
 
@@ -422,23 +422,23 @@ public:
        void async_update_finished();
        void async_render_preview(synfig::Time time);
        void async_render_preview();
-       
+
        bool sync_update_preview();
        bool sync_render_preview(synfig::Time time);
        bool sync_render_preview();
        void sync_render_preview_hook();
 
        void queue_render_preview();
-       
-       
+
+
        void queue_draw_preview();
-       
+
        void zoom_in();
        void zoom_out();
        void zoom_fit();
        void zoom_norm();
        float get_zoom()const { return zoom; }
-       
+
        void set_zoom(float z);
 
 
@@ -450,15 +450,15 @@ public:
        synfig::Point get_focus_point()const;
 
        void done_rendering();
-       
+
        bool refresh(GdkEventExpose*bleh=NULL);
-       
+
        void reset_cursor();
        void refresh_cursor();
 
        void save_meta_data();
        void load_meta_data();
-       
+
        /*
  -- ** -- S I G N A L   T E R M I N A L S -------------------------------------
        */
index 716e7d8..277286a 100644 (file)
@@ -88,7 +88,7 @@ WorkAreaRenderer::set_work_area(WorkArea* x)
 {
        work_area_=x;
 }
-       
+
 void
 WorkAreaRenderer::render_vfunc(
        const Glib::RefPtr<Gdk::Drawable>& window,
@@ -111,7 +111,7 @@ WorkAreaRenderer::get_w()const
 int
 WorkAreaRenderer::get_h()const
 { return get_work_area()->get_h(); }
-       
+
 float
 WorkAreaRenderer::get_pw()const
 { return get_work_area()->get_pw(); }
index 4f2a4dc..04e3b83 100644 (file)
@@ -42,7 +42,7 @@
 
 namespace studio {
 class WorkArea;
-       
+
 class WorkAreaRenderer : public etl::shared_object, public sigc::trackable
 {
 public:
@@ -52,19 +52,19 @@ public:
 private:
        bool enabled_;
        int priority_;
-       
+
        sigc::signal<void> signal_changed_;
-       
+
        WorkArea* work_area_;
-       
+
 public:
 
        sigc::signal<void>& signal_changed() { return signal_changed_; }
-               
+
 public:
        int get_w()const;
        int get_h()const;
-       
+
        float get_pw()const;
        float get_ph()const;
 
@@ -80,11 +80,11 @@ public:
        bool get_enabled()const { return get_enabled_vfunc(); }
        int get_priority()const { return priority_; }
        WorkArea* get_work_area()const { return work_area_; }
-       
+
        void set_enabled(bool x);
        void set_priority(int x);
        void set_work_area(WorkArea* work_area_);
-       
+
        virtual void render_vfunc(
                const Glib::RefPtr<Gdk::Drawable>& window,
                const Gdk::Rectangle& expose_area
index 333f74c..39e5d8c 100644 (file)
@@ -55,7 +55,7 @@ class ZoomDial : public Gtk::Table
        Gtk::Tooltips tooltips;
        Gtk::IconSize iconsize;
 
-       
+
 public:
        Gtk::Button *zoom_in;
        Gtk::Button *zoom_out;
index 04d20f5..b5533a2 100644 (file)
@@ -137,12 +137,12 @@ synfigapp::Action::Book *book_;
        be.get_param_vocab=x::get_param_vocab; \
        be.is_candidate=x::is_candidate; \
        }
-       
+
 
 Action::Main::Main()
 {
        book_=new synfigapp::Action::Book();
-       
+
        ADD_ACTION(Action::LayerRemove);
        ADD_ACTION(Action::LayerMove);
        ADD_ACTION(Action::LayerRaise);
@@ -155,10 +155,10 @@ Action::Main::Main()
        ADD_ACTION(Action::LayerEncapsulate);
        ADD_ACTION(Action::LayerDuplicate);
        ADD_ACTION(Action::LayerSetDesc);
-       
-       ADD_ACTION(Action::ValueNodeConstSet);  
-       ADD_ACTION(Action::ValueNodeAdd);       
-       ADD_ACTION(Action::ValueNodeReplace);   
+
+       ADD_ACTION(Action::ValueNodeConstSet);
+       ADD_ACTION(Action::ValueNodeAdd);
+       ADD_ACTION(Action::ValueNodeReplace);
        ADD_ACTION(Action::ValueNodeLinkConnect);
        ADD_ACTION(Action::ValueNodeLinkDisconnect);
        ADD_ACTION(Action::ValueNodeDynamicListInsert);
@@ -170,7 +170,7 @@ Action::Main::Main()
        ADD_ACTION(Action::ValueNodeDynamicListRotateOrder);
        ADD_ACTION(Action::ValueNodeRename);
        ADD_ACTION(Action::ValueNodeRemove);
-       
+
        ADD_ACTION(Action::ValueDescSet);
        ADD_ACTION(Action::ValueDescExport);
        ADD_ACTION(Action::ValueDescConvert);
@@ -208,7 +208,7 @@ Action::Main::Main()
 
        ADD_ACTION(Action::GradientSet);
        ADD_ACTION(Action::ColorSet);
-       
+
        ADD_ACTION(Action::TimepointsMove);
        ADD_ACTION(Action::TimepointsCopy);
        ADD_ACTION(Action::TimepointsDelete);
@@ -222,7 +222,7 @@ Action::Main::Main()
 Action::Main::~Main()
 {
        delete book_;
-       
+
 }
 
 
@@ -234,7 +234,7 @@ Action::create(const String &name)
 {
        if(!book().count(name))
                return 0; //! \todo perhaps we should throw something instead?
-       return book()[name].factory();  
+       return book()[name].factory();
 }
 
 
@@ -242,7 +242,7 @@ Action::CandidateList
 Action::compile_candidate_list(const ParamList& param_list, Category category)
 {
        Action::CandidateList ret;
-       
+
        Book::const_iterator iter;
 
        //synfig::info("param_list.size()=%d",param_list.size());
@@ -259,7 +259,7 @@ Action::compile_candidate_list(const ParamList& param_list, Category category)
                        }
                }
        }
-       
+
        return ret;
 }
 
@@ -277,7 +277,7 @@ void
 Action::Base::set_param_list(const ParamList &param_list)
 {
        ParamList::const_iterator iter;
-       
+
        for(iter=param_list.begin();iter!=param_list.end();++iter)
                set_param(iter->first,iter->second);
 }
@@ -286,7 +286,7 @@ void
 Super::perform()
 {
        set_dirty(false);
-       
+
        prepare();
 
        ActionList::const_iterator iter;
@@ -382,7 +382,7 @@ Action::ParamVocab
 Action::CanvasSpecific::get_param_vocab()
 {
        ParamVocab ret;
-       
+
        ret.push_back(ParamDesc("canvas",Param::TYPE_CANVAS)
                .set_local_name(_("Canvas"))
                .set_desc(_("Selected Canvas"))
@@ -393,7 +393,7 @@ Action::CanvasSpecific::get_param_vocab()
                .set_desc(_("Canvas Interface"))
                .set_optional(true)
        );
-       
+
 
        return ret;
 }
@@ -406,7 +406,7 @@ CanvasSpecific::set_param(const synfig::String& name, const Param &param)
                if(!param.get_canvas())
                        return false;
                set_canvas(param.get_canvas());
-               
+
                return true;
        }
        if(name=="canvas_interface" && param.get_type()==Param::TYPE_CANVASINTERFACE)
@@ -416,13 +416,13 @@ CanvasSpecific::set_param(const synfig::String& name, const Param &param)
                set_canvas_interface(param.get_canvas_interface());
                if(!get_canvas())
                        set_canvas(get_canvas_interface()->get_canvas());
-               
+
                return true;
        }
        if(name=="edit_mode" && param.get_type()==Param::TYPE_EDITMODE)
        {
                set_edit_mode(param.get_edit_mode());
-               
+
                return true;
        }
 
@@ -442,9 +442,9 @@ CanvasSpecific::get_edit_mode()const
 {
        if(mode_!=MODE_UNDEFINED)
                return mode_;
-       
+
        if(get_canvas_interface())
                return get_canvas_interface()->get_mode();
-       
+
        return MODE_NORMAL;
 }
index b2d9e77..d113bc4 100644 (file)
@@ -92,11 +92,11 @@ namespace synfigapp {
 
 class Instance;
 class Main;
-       
-namespace Action {     
+
+namespace Action {
 
 class System;
-       
+
 
 //! Exception class, thrown when redoing or undoing an action
 class Error
@@ -119,7 +119,7 @@ private:
        synfig::String desc_;
 
 public:
-       
+
        Error(Type type, const char *format, ...):
                type_(type)
        {
@@ -140,10 +140,10 @@ public:
                type_(type)
        {
        }
-       
+
        Type get_type()const { return type_; }
        synfig::String get_desc()const { return desc_; }
-       
+
 }; // END of class Action::Error
 
 class Param;
@@ -167,7 +167,7 @@ enum Category
        CATEGORY_OTHER                  =(1<<12),
 
        CATEGORY_DRAG                   =(1<<24),
-       
+
        CATEGORY_HIDDEN                 =(1<<31),
        CATEGORY_ALL                    =(~0)-(1<<31)           //!< All categories (EXCEPT HIDDEN)
 }; // END of enum Category
@@ -188,25 +188,25 @@ inline Category operator|(Category lhs, Category rhs)
 **             -       Factory for creating this action from a ParamList
 **
 */
-class Base : public etl::shared_object 
+class Base : public etl::shared_object
 {
 protected:
        Base() { }
-       
+
 public:
        virtual ~Base() { };
 
        //! This function will throw an Action::Error() on failure
        virtual void perform()=0;
-       
+
        virtual bool set_param(const synfig::String& name, const Param &) { return false; }
        virtual bool is_ready()const=0;
-       
+
        virtual synfig::String get_name()const =0;
        virtual synfig::String get_local_name()const { return get_name(); }
 
        void set_param_list(const ParamList &);
-       
+
 }; // END of class Action::Base
 
 typedef Action::Base* (*Factory)();
@@ -237,7 +237,7 @@ public:
 }; // END of class Action::Undoable
 
 //! Action base class for canvas-specific actions
-class CanvasSpecific 
+class CanvasSpecific
 {
 private:
        bool is_dirty_;
@@ -251,8 +251,8 @@ protected:
        CanvasSpecific():is_dirty_(true), mode_(MODE_UNDEFINED) { }
 
        virtual ~CanvasSpecific() { };
-       
-       
+
+
 public:
 
        void set_canvas(synfig::Canvas::Handle x) { canvas_=x; }
@@ -268,10 +268,10 @@ public:
        EditMode get_edit_mode()const;
 
        void set_edit_mode(EditMode x) { mode_=x; }
-       
+
        bool is_dirty()const { return is_dirty_; }
        void set_dirty(bool x=true) { is_dirty_=x; }
-       
+
 }; // END of class Action::Undoable
 
 typedef std::list< etl::handle<Action::Undoable> > ActionList;
@@ -294,9 +294,9 @@ public:
        virtual void prepare()=0;
 
        void clear() { action_list().clear(); }
-       
+
        bool first_time()const { return action_list_.empty(); }
-       
+
        void add_action(etl::handle<Undoable> action);
 
        void add_action_front(etl::handle<Undoable> action);
@@ -342,8 +342,8 @@ struct BookEntry
        Category                category;
        Factory                 factory;
        CandidateChecker        is_candidate;
-       GetParamVocab   get_param_vocab;        
-       
+       GetParamVocab   get_param_vocab;
+
        bool operator<(const BookEntry &rhs)const { return priority<rhs.priority; }
 }; // END of struct BookEntry
 
index 4ab3b33..8ea0c09 100644 (file)
@@ -47,7 +47,7 @@ bool
 Action::candidate_check(const ParamVocab& param_vocab, const ParamList& param_list)
 {
        ParamVocab::const_iterator iter;
-       
+
        for(iter=param_vocab.begin();iter!=param_vocab.end();++iter)
        {
                int n(param_list.count(iter->get_name()));
@@ -60,14 +60,14 @@ Action::candidate_check(const ParamVocab& param_vocab, const ParamList& param_li
 
                if(iter->get_user_supplied() || iter->get_optional())
                        continue;
-                                                       
+
                if(n==0)
                        return false;
                if(n==1 && iter->get_requires_multiple())
                        return false;
                if(n>1 && !iter->get_supports_multiple())
                        return false;
-               
+
                if(iter->get_type()!=param_list.find(iter->get_name())->second.get_type())
                        return false;
        }
@@ -172,7 +172,7 @@ Param::Param(const Param &rhs):
 }
 
 Param::Param(const etl::handle<synfigapp::CanvasInterface>& x):
-       
+
        type_(TYPE_CANVASINTERFACE)
 {
        _ParamCounter::counter++;
@@ -182,7 +182,7 @@ Param::Param(const etl::handle<synfigapp::CanvasInterface>& x):
 
 /*
 Param::Param(synfigapp::CanvasInterface* x):
-       
+
        type_(TYPE_CANVASINTERFACE)
 {
        _ParamCounter::counter++;
@@ -192,7 +192,7 @@ Param::Param(synfigapp::CanvasInterface* x):
 */
 
 Param::Param(const etl::loose_handle<synfigapp::CanvasInterface>& x):
-       
+
        type_(TYPE_CANVASINTERFACE)
 {
        _ParamCounter::counter++;
@@ -200,7 +200,7 @@ Param::Param(const etl::loose_handle<synfigapp::CanvasInterface>& x):
        data.canvas_interface.get()=x;
 }
 
-Param::Param(const synfig::Canvas::Handle& x): 
+Param::Param(const synfig::Canvas::Handle& x):
        type_(TYPE_CANVAS)
 {
        _ParamCounter::counter++;
@@ -208,7 +208,7 @@ Param::Param(const synfig::Canvas::Handle& x):
        data.canvas.get()=x;
 }
 
-Param::Param(const synfig::Canvas::LooseHandle& x):    
+Param::Param(const synfig::Canvas::LooseHandle& x):
        type_(TYPE_CANVAS)
 {
        _ParamCounter::counter++;
@@ -217,7 +217,7 @@ Param::Param(const synfig::Canvas::LooseHandle& x):
 }
 
 Param::Param(const synfig::Layer::Handle& x):
-       
+
        type_(TYPE_LAYER)
 {
        _ParamCounter::counter++;
@@ -226,7 +226,7 @@ Param::Param(const synfig::Layer::Handle& x):
 }
 
 Param::Param(const synfig::Layer::LooseHandle& x):
-       
+
        type_(TYPE_LAYER)
 {
        _ParamCounter::counter++;
@@ -235,7 +235,7 @@ Param::Param(const synfig::Layer::LooseHandle& x):
 }
 
 Param::Param(const synfig::ValueNode::Handle& x):
-       
+
        type_(TYPE_VALUENODE)
 {
        _ParamCounter::counter++;
@@ -244,7 +244,7 @@ Param::Param(const synfig::ValueNode::Handle& x):
 }
 
 Param::Param(const synfig::ValueNode::LooseHandle& x):
-       
+
        type_(TYPE_VALUENODE)
 {
        _ParamCounter::counter++;
@@ -253,7 +253,7 @@ Param::Param(const synfig::ValueNode::LooseHandle& x):
 }
 
 Param::Param(const synfig::ValueBase& x):
-       
+
        type_(TYPE_VALUE)
 {
        _ParamCounter::counter++;
@@ -261,7 +261,7 @@ Param::Param(const synfig::ValueBase& x):
        data.value.get()=x;
 }
 
-Param::Param(const synfig::RendDesc& x):       
+Param::Param(const synfig::RendDesc& x):
        type_(TYPE_RENDDESC)
 {
        _ParamCounter::counter++;
@@ -278,7 +278,7 @@ Param::Param(const synfig::Time& x):
 }
 
 Param::Param(const synfig::Activepoint& x):
-       
+
        type_(TYPE_ACTIVEPOINT)
 {
        _ParamCounter::counter++;
@@ -286,7 +286,7 @@ Param::Param(const synfig::Activepoint& x):
        data.activepoint.get()=x;
 }
 
-Param::Param(const synfig::Waypoint& x):       
+Param::Param(const synfig::Waypoint& x):
        type_(TYPE_WAYPOINT)
 {
        _ParamCounter::counter++;
@@ -294,7 +294,7 @@ Param::Param(const synfig::Waypoint& x):
        data.waypoint.get()=x;
 }
 
-Param::Param(const synfig::Waypoint::Model& x):        
+Param::Param(const synfig::Waypoint::Model& x):
        type_(TYPE_WAYPOINTMODEL)
 {
        _ParamCounter::counter++;
@@ -319,7 +319,7 @@ Param::Param(const char * x):
 }
 
 Param::Param(const synfig::Keyframe& x):
-       
+
        type_(TYPE_KEYFRAME)
 {
        _ParamCounter::counter++;
@@ -328,7 +328,7 @@ Param::Param(const synfig::Keyframe& x):
 }
 
 Param::Param(const synfigapp::ValueDesc& x):
-       
+
        type_(TYPE_VALUEDESC)
 {
        _ParamCounter::counter++;
@@ -351,7 +351,7 @@ Param::Param(const EditMode& x):
 }
 
 Param::Param(const synfig::Real& x):
-       
+
        type_(TYPE_REAL)
 {
        _ParamCounter::counter++;
@@ -359,7 +359,7 @@ Param::Param(const synfig::Real& x):
 }
 
 Param::Param(const bool& x):
-       
+
        type_(TYPE_BOOL)
 {
        _ParamCounter::counter++;
@@ -377,7 +377,7 @@ Param::operator=(const Param& rhs)
 {
        clear();
        type_=rhs.type_;
-       
+
        switch(type_)
        {
        case TYPE_ACTIVEPOINT:
index 754e976..bae9e8b 100644 (file)
@@ -64,8 +64,8 @@ class RendDesc;
 namespace synfigapp {
 
 class CanvasInterface;
-       
-namespace Action {     
+
+namespace Action {
 
 //! Action Parameter
 class Param
@@ -91,7 +91,7 @@ public:
                TYPE_CANVASINTERFACE,
                TYPE_EDITMODE,
                TYPE_RENDDESC,
-               
+
                TYPE_END
        };
 private:
@@ -116,7 +116,7 @@ private:
                synfig::Real real;
                bool b;
                EditMode edit_mode;
-               
+
        } data;
 public:
 
@@ -147,11 +147,11 @@ public:
        Param(const synfig::ValueBase& x);
 
        ~Param();
-       
+
        Param& operator=(const Param& rhs);
-       
+
        void clear();
-       
+
        const synfig::Canvas::LooseHandle& get_canvas()const { assert(type_==TYPE_CANVAS); return data.canvas.get(); }
        const etl::loose_handle<synfigapp::CanvasInterface>& get_canvas_interface()const { assert(type_==TYPE_CANVASINTERFACE); return data.canvas_interface.get(); }
        const synfig::Layer::LooseHandle& get_layer()const { assert(type_==TYPE_LAYER); return data.layer.get(); }
@@ -204,7 +204,7 @@ public:
                requires_multiple_(false),
                optional_(false)
        { }
-       
+
        const synfig::String& get_name()const { return name_; }
        const synfig::String& get_desc()const { return desc_; }
        const synfig::String& get_mutual_exclusion()const { return mutual_exclusion_; }
index 8495dc9..54ca6d5 100644 (file)
@@ -67,28 +67,28 @@ bool
 Action::System::perform_action(handle<Action::Base> action)
 {
        handle<UIInterface> uim(get_ui_interface());
-       
+
        assert(action);
-       
+
        if(!action->is_ready())
        {
                uim->error(action->get_name()+": "+_("Action is not ready."));
                return false;
-       }       
-       
+       }
+
        most_recent_action_=action;
-       
+
        static bool inuse=false;
 
        if(inuse) return false;
 
        inuse=true;
        try {
-               
+
        assert(action);
-       
+
        Action::CanvasSpecific* canvas_specific(dynamic_cast<Action::CanvasSpecific*>(action.get()));
-       
+
        if(canvas_specific && canvas_specific->get_canvas())
        {
                handle<CanvasInterface> canvas_interface=static_cast<Instance*>(this)->find_canvas_interface(canvas_specific->get_canvas());
@@ -97,7 +97,7 @@ Action::System::perform_action(handle<Action::Base> action)
        }
 
        handle<Action::Undoable> undoable_action=handle<Action::Undoable>::cast_dynamic(action);
-       
+
        // If we cannot undo this action, make sure
        // that the user knows this.
        if(!undoable_action)
@@ -129,9 +129,9 @@ Action::System::perform_action(handle<Action::Base> action)
                if(err.get_type()!=Action::Error::TYPE_UNABLE)
                {
                        if(err.get_desc().empty())
-                               uim->error(action->get_name()+": "+strprintf("%d",err.get_type()));             
+                               uim->error(action->get_name()+": "+strprintf("%d",err.get_type()));
                        else
-                               uim->error(action->get_name()+": "+err.get_desc());             
+                               uim->error(action->get_name()+": "+err.get_desc());
                }
 
                // If action failed for whatever reason, just return false and do
@@ -143,7 +143,7 @@ Action::System::perform_action(handle<Action::Base> action)
                uim->task(action->get_name()+' '+_("Failed"));
                inuse=false;
 
-               uim->error(action->get_name()+": "+err.what());         
+               uim->error(action->get_name()+": "+err.what());
 
                // If action failed for whatever reason, just return false and do
                // not add the action onto the list
@@ -161,19 +161,19 @@ Action::System::perform_action(handle<Action::Base> action)
 
        // Clear the redo stack
        if(clear_redo_stack_on_new_action_)
-               clear_redo_stack();     
+               clear_redo_stack();
 
        if(!group_stack_.empty())
                group_stack_.front()->inc_depth();
        else
                inc_action_count();
-       
+
        // Push this action onto the action list if we can undo it
        if(undoable_action)
        {
                // If necessary, signal the change in status of undo
                if(undo_action_stack_.empty()) signal_undo_status_(true);
-               
+
                // Add it to the list
                undo_action_stack_.push_front(undoable_action);
 
@@ -181,7 +181,7 @@ Action::System::perform_action(handle<Action::Base> action)
                if(group_stack_.empty())
                        signal_new_action()(undoable_action);
        }
-               
+
        inuse=false;
 
        uim->task(action->get_name()+' '+_("Successful"));
@@ -211,16 +211,16 @@ synfigapp::Action::System::undo_(handle<UIInterface> uim)
 {
        handle<Action::Undoable> action(undo_action_stack().front());
        most_recent_action_=action;
-       
+
        try { if(action->is_active()) action->undo(); }
        catch(Action::Error err)
        {
                if(err.get_type()!=Action::Error::TYPE_UNABLE)
                {
                        if(err.get_desc().empty())
-                               uim->error(action->get_name()+_(" (Undo): ")+strprintf("%d",err.get_type()));           
+                               uim->error(action->get_name()+_(" (Undo): ")+strprintf("%d",err.get_type()));
                        else
-                               uim->error(action->get_name()+_(" (Undo): ")+err.get_desc());           
+                               uim->error(action->get_name()+_(" (Undo): ")+err.get_desc());
                }
 
                return false;
@@ -286,7 +286,7 @@ synfigapp::Action::System::undo()
        }
 
        inuse=false;
-       
+
        // If the action has "dirtied" the preview, signal it.
        if(0)if(action->is_active() && canvas_specific && canvas_specific->is_dirty())
        {
@@ -317,9 +317,9 @@ Action::System::redo_(handle<UIInterface> uim)
                if(err.get_type()!=Action::Error::TYPE_UNABLE)
                {
                        if(err.get_desc().empty())
-                               uim->error(action->get_name()+_(" (Redo): ")+strprintf("%d",err.get_type()));           
+                               uim->error(action->get_name()+_(" (Redo): ")+strprintf("%d",err.get_type()));
                        else
-                               uim->error(action->get_name()+_(" (Redo): ")+err.get_desc());           
+                               uim->error(action->get_name()+_(" (Redo): ")+err.get_desc());
                }
 
                return false;
@@ -442,7 +442,7 @@ Action::System::clear_undo_stack()
        signal_undo_status_(false);
        signal_undo_stack_cleared_();
 }
-       
+
 void
 Action::System::clear_redo_stack()
 {
@@ -457,7 +457,7 @@ Action::System::set_action_status(etl::handle<Action::Undoable> action, bool x)
 {
        Stack::iterator iter;
        int failed=false;
-       
+
        if(action->is_active()==x)
                return true;
 
@@ -466,7 +466,7 @@ Action::System::set_action_status(etl::handle<Action::Undoable> action, bool x)
        Action::CanvasSpecific* canvas_specific(dynamic_cast<Action::CanvasSpecific*>(action.get()));
 
        handle<UIInterface> uim=new ConfidentUIInterface();
-       
+
        iter=find(undo_action_stack_.begin(),undo_action_stack_.end(),action);
        if(iter!=undo_action_stack_.end())
        {
@@ -476,12 +476,12 @@ Action::System::set_action_status(etl::handle<Action::Undoable> action, bool x)
                        {
                                return false;
                        }
-               } 
+               }
                if(!undo_(uim))
                {
                        return false;
                }
-               
+
                action->set_active(x);
 
                if(redo_(get_ui_interface()))
@@ -493,8 +493,8 @@ Action::System::set_action_status(etl::handle<Action::Undoable> action, bool x)
                        action->set_active(!x);
                        failed=true;
                }
-               
-               
+
+
                while(undo_action_stack_.front()!=cur_pos)
                {
                        if(!redo_(uim))
@@ -592,7 +592,7 @@ Action::PassiveGrouper::request_redraw(handle<CanvasInterface> x)
 Action::PassiveGrouper::~PassiveGrouper()
 {
        assert(instance_->group_stack_.front()==this);
-       
+
        // Remove this group from the group stack
        instance_->group_stack_.pop_front();
 
@@ -613,11 +613,11 @@ Action::PassiveGrouper::~PassiveGrouper()
                else
                {
                        Action::CanvasSpecific* canvas_specific(dynamic_cast<Action::CanvasSpecific*>(action.get()));
-                       
+
                        if(0)if(canvas_specific && canvas_specific->is_dirty() && canvas_specific->get_canvas_interface())
                        {
                                if(instance_->group_stack_.empty())
-                                       request_redraw(canvas_specific->get_canvas_interface());                                        
+                                       request_redraw(canvas_specific->get_canvas_interface());
                        }
                }
 
@@ -634,34 +634,34 @@ Action::PassiveGrouper::~PassiveGrouper()
        if(depth_>0)
        {
                group=new Action::Group(name_);
-               
+
                for(int i=0;i<depth_;i++)
        //      for(;depth_;depth_--)
                {
                        handle<Action::Undoable> action(instance_->undo_action_stack_.front());
                        Action::CanvasSpecific* canvas_specific(dynamic_cast<Action::CanvasSpecific*>(action.get()));
-                       
+
                        if(0)if(canvas_specific && canvas_specific->is_dirty())
                        {
                                group->set_dirty(true);
                                group->set_canvas(canvas_specific->get_canvas());
                                group->set_canvas_interface(canvas_specific->get_canvas_interface());
                        }
-                       
+
                        // Copy the action from the undo stack to the group
                        group->add_action_front(action);
-       
+
                        // Remove the action from the undo stack
                        instance_->undo_action_stack_.pop_front();
                }
-                       
+
                // Push the group onto the stack
                instance_->undo_action_stack_.push_front(group);
-       
+
                if(0)if(group->is_dirty())
                        request_redraw(group->get_canvas_interface());
                //      group->get_canvas_interface()->signal_dirty_preview()();
-       
+
                if(instance_->group_stack_.empty())
                {
                        instance_->inc_action_count();
@@ -670,7 +670,7 @@ Action::PassiveGrouper::~PassiveGrouper()
                else
                        instance_->group_stack_.front()->inc_depth();
        }
-       
+
        if(0)if(redraw_requested_)
        {
                if(instance_->group_stack_.empty())
@@ -695,16 +695,16 @@ Action::PassiveGrouper::cancel()
        // Cancel any groupers that may be on top of us first
        //while(instance_->group_stack_.front()!=this)
        //      instance_->group_stack_.front()->cancel();
-       
+
        synfig::warning("Cancel depth: %d",depth_);
-       
+
        while(depth_)
                if(!instance_->undo())
                {
                        error=true;
                        break;
                }
-       
+
        if(error)
                instance_->get_ui_interface()->error(_("State restore failure"));
        else
index 251ffc8..983e14b 100644 (file)
 namespace synfigapp {
 
 class CanvasInterface;
-       
+
 namespace Action {
 
 
-       
-       
-       
+
+
+
 class System;
 
 //! Passive action grouping class
@@ -71,11 +71,11 @@ public:
        void set_name(const synfig::String &x) { name_=x; }
 
        etl::loose_handle<System> get_instance() { return instance_; }
-       
+
        void request_redraw(etl::handle<CanvasInterface>);
-       
+
        void cancel();
-       
+
        void inc_depth() { depth_++; }
 
        void dec_depth() { depth_--; }
@@ -84,11 +84,11 @@ public:
 }; // END of class Action::PassiveGrouper
 
 typedef std::list< etl::handle<Action::Undoable> > Stack;
-       
+
 class System : public etl::shared_object, public sigc::trackable
 {
        friend class PassiveGrouper;
-               
+
        /*
  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
        */
@@ -100,7 +100,7 @@ public:
        */
 
 public:
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -122,7 +122,7 @@ private:
        sigc::signal<void> signal_undo_;
        sigc::signal<void> signal_redo_;
        sigc::signal<void,etl::handle<Action::Undoable> > signal_action_status_changed_;
-       
+
        mutable sigc::signal<void,bool> signal_unsaved_status_changed_;
 
        //! If this is non-zero, then the changes have not yet been saved.
@@ -131,7 +131,7 @@ private:
        etl::handle<UIInterface> ui_interface_;
 
        bool clear_redo_stack_on_new_action_;
-       
+
        /*
  -- ** -- P R I V A T E   M E T H O D S ---------------------------------------
        */
@@ -168,7 +168,7 @@ public:
        const etl::handle<Action::Base>& get_most_recent_action() { return most_recent_action_; }
 
        bool get_clear_redo_stack_on_new_action()const { return clear_redo_stack_on_new_action_; }
-       
+
        void set_clear_redo_stack_on_new_action(bool x) { clear_redo_stack_on_new_action_=x; }
 
        bool perform_action(etl::handle<Action::Base> action);
@@ -184,13 +184,13 @@ public:
 
        //! Redoes the last undone action
        bool redo();
-       
-       //! Clears the undo stack. 
+
+       //! Clears the undo stack.
        void clear_undo_stack();
-       
-       //! Clears the redo stack. 
+
+       //! Clears the redo stack.
        void clear_redo_stack();
-       
+
        //! Increments the action counter
        /*! \note You should not have to call this under normal circumstances.
        **      \see dec_action_count(), reset_action_count(), get_action_count() */
@@ -212,7 +212,7 @@ public:
 
        void set_ui_interface(const etl::handle<UIInterface> &uim) { assert(uim); ui_interface_=uim; }
        void unset_ui_interface() { ui_interface_=new DefaultUIInterface(); }
-       const etl::handle<UIInterface> &get_ui_interface() { return ui_interface_; }    
+       const etl::handle<UIInterface> &get_ui_interface() { return ui_interface_; }
 
        /*
  -- ** -- S I G N A L   I N T E R F A C E S -----------------------------------
index 324bf6e..189c017 100644 (file)
@@ -68,7 +68,7 @@ Action::ParamVocab
 Action::ActivepointAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -110,26 +110,26 @@ Action::ActivepointAdd::set_param(const synfig::String& name, const Action::Para
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                if(time_set)
                        calc_activepoint();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set)
        {
                activepoint=param.get_activepoint();
-               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME && activepoint.get_time()==Time::begin()-1)
@@ -139,7 +139,7 @@ Action::ActivepointAdd::set_param(const synfig::String& name, const Action::Para
 
                if(value_node)
                        calc_activepoint();
-               
+
                return true;
        }
 
@@ -154,16 +154,16 @@ Action::ActivepointAdd::is_ready()const
        return Action::CanvasSpecific::is_ready();
 }
 
-// This function is called if a time is specified, but not 
+// This function is called if a time is specified, but not
 // a activepoint. In this case, we need to calculate the value
 // of the activepoint
 void
 Action::ActivepointAdd::calc_activepoint()
-{      
+{
        const Time time(activepoint.get_time());
        activepoint.set_state(value_node->list[index].status_at_time(time));
        activepoint.set_priority(0);
-       
+
        // In this case, nothing is really changing, so there will be
        // no need to redraw the window
        set_dirty(false);
@@ -171,16 +171,16 @@ Action::ActivepointAdd::calc_activepoint()
 
 void
 Action::ActivepointAdd::perform()
-{      
+{
        try { value_node->list[index].find(activepoint.get_time()); throw Error(_("A Activepoint already exists at this point in time"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        try { if(value_node->list[index].find(activepoint)!=value_node->list[index].timing_info.end()) throw Error(_("This activepoint is already in the ValueNode"));}
-       catch(synfig::Exception::NotFound) { }  
-       
+       catch(synfig::Exception::NotFound) { }
+
        value_node->list[index].add(activepoint);
        value_node->changed();
-       
+
        /*if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(value_node);
index ec3cd44..0dbdca1 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::ActivepointRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -100,23 +100,23 @@ Action::ActivepointRemove::set_param(const synfig::String& name, const Action::P
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT)
        {
                activepoint=param.get_activepoint();
-               
+
                return true;
        }
 
@@ -133,18 +133,18 @@ Action::ActivepointRemove::is_ready()const
 
 void
 Action::ActivepointRemove::perform()
-{      
+{
        ValueNode_DynamicList::ListEntry::ActivepointList::iterator iter;
-       
+
        try { iter=value_node->list[index].find(activepoint); }
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find activepoint"));
-       }       
+       }
 
        value_node->list[index].erase(activepoint);
        value_node->changed();
-       
+
        /*
        // Signal that a layer has been inserted
        if(get_canvas_interface())
@@ -159,11 +159,11 @@ void
 Action::ActivepointRemove::undo()
 {
        try { value_node->list[index].find(activepoint.get_time()); throw Error(_("A Activepoint already exists at this point in time"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        try { if(value_node->list[index].find(activepoint)!=value_node->list[index].timing_info.end()) throw Error(_("This activepoint is already in the ValueNode"));}
-       catch(synfig::Exception::NotFound) { }  
-       
+       catch(synfig::Exception::NotFound) { }
+
        value_node->list[index].add(activepoint);
        value_node->changed();
        /*
index b0ee32a..610bcf2 100644 (file)
@@ -66,7 +66,7 @@ Action::ParamVocab
 Action::ActivepointSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -100,24 +100,24 @@ Action::ActivepointSet::set_param(const synfig::String& name, const Action::Para
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT)
        {
                //NOTE: there is no duplication checking at the moment
                activepoints.push_back(param.get_activepoint());
-               
+
                return true;
        }
 
@@ -134,14 +134,14 @@ Action::ActivepointSet::is_ready()const
 
 void
 Action::ActivepointSet::perform()
-{      
+{
        typedef ValueNode_DynamicList::ListEntry::ActivepointList AList;
        AList::iterator iter;
 
-#if 1  
+#if 1
        vector<AList::iterator> iters;
-       vector<Activepoint>::iterator i = activepoints.begin(), end = activepoints.end();       
-       
+       vector<Activepoint>::iterator i = activepoints.begin(), end = activepoints.end();
+
        for(; i != end; ++i)
        {
                try { iters.push_back(value_node->list[index].find(*i)); }
@@ -150,16 +150,16 @@ Action::ActivepointSet::perform()
                        throw Error(_("Unable to find activepoint"));
                }
        }
-       
+
        //check to see which valuenodes are going to override because of the time...
        ValueNode_DynamicList::ListEntry::findresult timeiter;
-       
+
        for(i = activepoints.begin(); i != end; ++i)
        {
                timeiter = value_node->list[index].find_time(i->get_time());
-               
+
                bool candelete = timeiter.second;
-       
+
                //we only want to track overwrites (not activepoints that are also being modified)
                if(candelete)
                {
@@ -172,7 +172,7 @@ Action::ActivepointSet::perform()
                                }
                        }
                }
-               
+
                //if we can still delete it after checking, record it, and then remove them all later
                if(candelete)
                {
@@ -180,7 +180,7 @@ Action::ActivepointSet::perform()
                        overwritten_activepoints.push_back(a);
                }
        }
-       
+
        //overwrite all the valuenodes we're supposed to set
        {
                i = activepoints.begin();
@@ -190,7 +190,7 @@ Action::ActivepointSet::perform()
                        **ii = *i; //set the point to the corresponding point in the normal waypoint list
                }
        }
-       
+
        //remove all the points we're supposed to be overwritting
        {
                vector<Activepoint>::iterator   oi = overwritten_activepoints.begin(),
@@ -201,39 +201,39 @@ Action::ActivepointSet::perform()
                }
        }
 
-#else  
+#else
        try { iter=value_node->list[index].find(activepoint); }
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find activepoint"));
-       }       
+       }
 
        //find the value at the old time before we replace it
        ValueNode_DynamicList::ListEntry::findresult timeiter;
        timeiter = value_node->list[index].find_time(activepoint.get_time());
-       
+
        //we only want to track overwrites (not inplace modifications)
        if(timeiter.second && activepoint.get_uid() == timeiter.first->get_uid())
        {
                timeiter.second = false;
        }
-               
+
        old_activepoint=*iter;
        *iter=activepoint;
-       
+
        if(timeiter.second)
        {
                synfig::info("Erasing the found activepoint");
                time_overwrite = true;
                overwritten_ap = *timeiter.first;
-               
+
                value_node->list[index].erase(overwritten_ap);
        }
-       
+
 #endif
-       
+
        value_node->list[index].timing_info.sort();
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
@@ -243,9 +243,9 @@ Action::ActivepointSet::undo()
 {
        ValueNode_DynamicList::ListEntry::ActivepointList::iterator iter;
 
-#if 1  
-       vector<Activepoint>::iterator i = old_activepoints.begin(), end = old_activepoints.end();       
-       
+#if 1
+       vector<Activepoint>::iterator i = old_activepoints.begin(), end = old_activepoints.end();
+
        for(; i != end; ++i)
        {
                try { iter = value_node->list[index].find(*i); }
@@ -253,11 +253,11 @@ Action::ActivepointSet::undo()
                {
                        throw Error(_("Unable to find activepoint"));
                }
-               
+
                //overwrite with old one
                *iter = *i;
        }
-               
+
        //add back in all the points that we removed before...
        {
                vector<Activepoint>::iterator   oi = overwritten_activepoints.begin(),
@@ -268,23 +268,23 @@ Action::ActivepointSet::undo()
                }
        }
 
-#else  
+#else
        try { iter=value_node->list[index].find(activepoint); }
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find activepoint"));
-       }       
+       }
 
        *iter=old_activepoint;
-               
+
        if(time_overwrite)
        {
                value_node->list[index].add(overwritten_ap);
        }
 #endif
-       
+
        value_node->list[index].timing_info.sort();
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
index 2c116b7..f2e51b9 100644 (file)
@@ -51,9 +51,9 @@ private:
 
        synfig::ValueNode_DynamicList::Handle value_node;
        int index;
-       
+
        std::vector<synfig::Activepoint> activepoints;
-       std::vector<synfig::Activepoint> old_activepoints;      
+       std::vector<synfig::Activepoint> old_activepoints;
 
        std::vector<synfig::Activepoint> overwritten_activepoints;
 
index 8824a27..dccb2c9 100644 (file)
@@ -76,7 +76,7 @@ Action::ParamVocab
 Action::ActivepointSetOff::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -90,7 +90,7 @@ Action::ActivepointSetOff::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -102,12 +102,12 @@ Action::ActivepointSetOff::is_candidate(const ParamList &x)
                ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
                if(!value_desc.parent_is_value_node() || !ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()))
                        return false;
-               
+
                // We are only a candidate if this canvas is animated.
                Canvas::Handle canvas(x.find("canvas")->second.get_canvas());
                if(canvas->rend_desc().get_time_start()==canvas->rend_desc().get_time_end())
                        return false;
-               
+
                // We need either a activepoint or a time.
                if(x.count("activepoint") || x.count("time"))
                        return true;
@@ -121,26 +121,26 @@ Action::ActivepointSetOff::set_param(const synfig::String& name, const Action::P
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                if(time_set)
                        calc_activepoint();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set)
        {
                activepoint=param.get_activepoint();
-               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME && activepoint.get_time()==Time::begin()-1)
@@ -150,7 +150,7 @@ Action::ActivepointSetOff::set_param(const synfig::String& name, const Action::P
 
                if(value_node)
                        calc_activepoint();
-               
+
                return true;
        }
 
@@ -165,20 +165,20 @@ Action::ActivepointSetOff::is_ready()const
 
        if(activepoint.get_time()==(Time::begin()-1))
                synfig::error("Missing activepoint");
-       
+
        if(!value_node || activepoint.get_time()==(Time::begin()-1))
                return false;
        return Action::CanvasSpecific::is_ready();
 }
 
-// This function is called if a time is specified, but not 
+// This function is called if a time is specified, but not
 // a activepoint. In this case, we need to calculate the value
 // of the activepoint
 void
 Action::ActivepointSetOff::calc_activepoint()
-{      
+{
        const Time time(activepoint.get_time());
-       
+
        try { activepoint=*value_node->list[index].find(time); }
        catch(...)
        {
@@ -197,7 +197,7 @@ Action::ActivepointSetOff::prepare()
        activepoint.set_state(false);
 
        Action::Handle action(ActivepointSetSmart::create());
-       
+
        action->set_param("edit_mode",get_edit_mode());
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",get_canvas_interface());
@@ -209,5 +209,5 @@ Action::ActivepointSetOff::prepare()
                throw Error(Error::TYPE_NOTREADY);
 
        add_action_front(action);
-       
+
 }
index 41ad8d2..0304efd 100644 (file)
@@ -76,7 +76,7 @@ Action::ParamVocab
 Action::ActivepointSetOn::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -90,7 +90,7 @@ Action::ActivepointSetOn::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -121,26 +121,26 @@ Action::ActivepointSetOn::set_param(const synfig::String& name, const Action::Pa
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                if(time_set)
                        calc_activepoint();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set)
        {
                activepoint=param.get_activepoint();
-               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME && activepoint.get_time()==Time::begin()-1)
@@ -150,7 +150,7 @@ Action::ActivepointSetOn::set_param(const synfig::String& name, const Action::Pa
 
                if(value_node)
                        calc_activepoint();
-               
+
                return true;
        }
 
@@ -165,20 +165,20 @@ Action::ActivepointSetOn::is_ready()const
 
        if(activepoint.get_time()==(Time::begin()-1))
                synfig::error("Missing activepoint");
-       
+
        if(!value_node || activepoint.get_time()==(Time::begin()-1))
                return false;
        return Action::CanvasSpecific::is_ready();
 }
 
-// This function is called if a time is specified, but not 
+// This function is called if a time is specified, but not
 // a activepoint. In this case, we need to calculate the value
 // of the activepoint
 void
 Action::ActivepointSetOn::calc_activepoint()
-{      
+{
        const Time time(activepoint.get_time());
-       
+
        try { activepoint=*value_node->list[index].find(time); }
        catch(...)
        {
@@ -197,7 +197,7 @@ Action::ActivepointSetOn::prepare()
        activepoint.set_state(true);
 
        Action::Handle action(ActivepointSetSmart::create());
-       
+
        action->set_param("edit_mode",get_edit_mode());
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",get_canvas_interface());
@@ -209,5 +209,5 @@ Action::ActivepointSetOn::prepare()
                throw Error(Error::TYPE_NOTREADY);
 
        add_action_front(action);
-       
+
 }
index 7a36b37..2503dcc 100644 (file)
@@ -75,7 +75,7 @@ Action::ParamVocab
 Action::ActivepointSetSmart::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -91,7 +91,7 @@ Action::ActivepointSetSmart::get_param_vocab()
                .set_desc(_("Time where activepoint is to be added"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -117,26 +117,26 @@ Action::ActivepointSetSmart::set_param(const synfig::String& name, const Action:
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                if(time_set)
                        calc_activepoint();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set)
        {
                activepoint=param.get_activepoint();
-               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME && activepoint.get_time()==Time::begin()-1)
@@ -146,7 +146,7 @@ Action::ActivepointSetSmart::set_param(const synfig::String& name, const Action:
 
                if(value_node)
                        calc_activepoint();
-               
+
                return true;
        }
 
@@ -163,18 +163,18 @@ Action::ActivepointSetSmart::is_ready()const
 
        if(activepoint.get_time()==(Time::begin()-1))
                synfig::error("Missing activepoint");
-       
+
        if(!value_node || activepoint.get_time()==(Time::begin()-1))
                return false;
        return Action::CanvasSpecific::is_ready();
 }
 
-// This function is called if a time is specified, but not 
+// This function is called if a time is specified, but not
 // a activepoint. In this case, we need to calculate the value
 // of the activepoint
 void
 Action::ActivepointSetSmart::calc_activepoint()
-{      
+{
 /*
        const Time time(activepoint.get_time());
        activepoint.set_state(value_node->list[index].status_at_time(time));
@@ -191,7 +191,7 @@ Action::ActivepointSetSmart::calc_activepoint()
 void
 Action::ActivepointSetSmart::enclose_activepoint(const synfig::Activepoint& activepoint)
 {
-       times.insert(activepoint.get_time());                   
+       times.insert(activepoint.get_time());
 
        if(get_edit_mode()&MODE_ANIMATE_PAST) try
        {
@@ -201,25 +201,25 @@ Action::ActivepointSetSmart::enclose_activepoint(const synfig::Activepoint& acti
                if(times.count(keyframe.get_time()))
                        throw int();
                else
-                       times.insert(keyframe.get_time());                      
-               
+                       times.insert(keyframe.get_time());
+
                try { value_node->list[index].find(keyframe.get_time()); }
                catch(synfig::Exception::NotFound)
                {
                        Action::Handle action(ActivepointAdd::create());
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_desc",value_desc);
-               
+
                        if(!value_node->list[index].timing_info.empty())
-                       {       
+                       {
                                action->set_param("time",keyframe.get_time());
                        }
                        else
                        {
                                synfig::Activepoint tmp;
-                               
+
                                tmp.set_state(true);
                                tmp.set_time(keyframe.get_time());
                                action->set_param("activepoint",tmp);
@@ -228,9 +228,9 @@ Action::ActivepointSetSmart::enclose_activepoint(const synfig::Activepoint& acti
                        assert(action->is_ready());
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-               
+
                        add_action_front(action);
-               }                                               
+               }
        }
        catch(int) { }
        catch(synfig::Exception::NotFound) { }
@@ -243,25 +243,25 @@ Action::ActivepointSetSmart::enclose_activepoint(const synfig::Activepoint& acti
                if(times.count(keyframe.get_time()))
                        throw int();
                else
-                       times.insert(keyframe.get_time());                      
-               
+                       times.insert(keyframe.get_time());
+
                try { value_node->list[index].find(keyframe.get_time()); }
                catch(synfig::Exception::NotFound)
                {
                        Action::Handle action(ActivepointAdd::create());
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_desc",value_desc);
-               
+
                        if(!value_node->list[index].timing_info.empty())
-                       {       
+                       {
                                action->set_param("time",keyframe.get_time());
                        }
                        else
                        {
                                synfig::Activepoint tmp;
-                               
+
                                tmp.set_state(true);
                                tmp.set_time(keyframe.get_time());
                                action->set_param("activepoint",tmp);
@@ -270,9 +270,9 @@ Action::ActivepointSetSmart::enclose_activepoint(const synfig::Activepoint& acti
                        assert(action->is_ready());
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-               
+
                        add_action_front(action);
-               }                                               
+               }
        }
        catch(int) { }
        catch(synfig::Exception::NotFound) { }
@@ -283,32 +283,32 @@ Action::ActivepointSetSmart::prepare()
 {
        clear();
        times.clear();
-       
+
        // First, we need to to add any activepoints necessary to
        // maintain the integrity of the keyframes.
        enclose_activepoint(activepoint);
-       
+
        try
        {
                if(value_node->list[index].find(activepoint)==value_node->list[index].timing_info.end())
                        throw int();
-               
+
                // Then, lets try to replace the old activepoint, if it exists
                enclose_activepoint(*value_node->list[index].find(activepoint));
 
                Action::Handle action(ActivepointSet::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",value_desc);
                action->set_param("activepoint",activepoint);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               
+
                return;
        }
        catch(int){}
@@ -320,46 +320,46 @@ Action::ActivepointSetSmart::prepare()
                activepoint.mimic(*value_node->list[index].find(activepoint.get_time()));
 
                enclose_activepoint(*value_node->list[index].find(activepoint.get_time()));
-               
+
                Action::Handle action(ActivepointSet::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",value_desc);
                action->set_param("activepoint",activepoint);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               
+
                return;
        }
        catch(int){}
        catch(Exception::NotFound){}
-       
+
        try
        {
                // At this point we know that the old activepoint doesn't exist,
                // so we need to create it.
                Action::Handle action(ActivepointAdd::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",value_desc);
                action->set_param("activepoint",activepoint);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               
+
                return;
        }
        catch(int){}
        catch(Exception::NotFound){}
-       
+
        throw Error(_("Unable to determine how to procede. This is a bug."));
 }
index 940efb8..0861da2 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::ActivepointSimpleAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("Destination ValueNode (Animated)"))
        );
@@ -100,23 +100,23 @@ Action::ActivepointSimpleAdd::set_param(const synfig::String& name, const Action
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                return true;
        }
        if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT)
        {
                activepoint = param.get_activepoint();
-               
+
                return true;
        }
 
@@ -133,11 +133,11 @@ Action::ActivepointSimpleAdd::is_ready()const
 
 void
 Action::ActivepointSimpleAdd::perform()
-{      
+{
        //remove any pretenders that lie at our destination
        ValueNode_DynamicList::ListEntry::findresult iter = value_node->list[index]
                                                                                                                        .find_time(activepoint.get_time());
-       
+
        time_overwrite = false;
        if(iter.second)
        {
@@ -145,13 +145,13 @@ Action::ActivepointSimpleAdd::perform()
                time_overwrite = true;
                value_node->list[index].erase(overwritten_ap);
        }
-       
+
        //add the value node in since it's safe
        value_node->list[index].add(activepoint);
-       
+
        //sort them...
        value_node->list[index].timing_info.sort();
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
@@ -161,23 +161,23 @@ Action::ActivepointSimpleAdd::undo()
 {
        //remove our old version...
        ValueNode_DynamicList::ListEntry::findresult iter = value_node->list[index].find_uid(activepoint);
-       
+
        if(!iter.second)
        {
                throw Error(_("The activepoint to remove no longer exists"));
        }
-       
+
        //remove the offending value
        value_node->list[index].erase(*iter.first); //could also just use waypoint
-       
+
        if(time_overwrite)
        {
-               value_node->list[index].add(overwritten_ap);                            
+               value_node->list[index].add(overwritten_ap);
        }
-       
+
        //sort them...
        value_node->list[index].timing_info.sort();
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
index ce169bd..1706d3c 100644 (file)
@@ -48,10 +48,10 @@ class ActivepointSimpleAdd :
        public CanvasSpecific
 {
 private:
-       
+
        synfig::ValueNode_DynamicList::Handle value_node;
        int     index;
-       
+
        synfig::Activepoint activepoint;
 
        bool time_overwrite;
index 39e6a17..8303bab 100644 (file)
@@ -73,7 +73,7 @@ Action::ParamVocab
 Action::BLinePointTangentMerge::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode of BLinePoint"))
        );
@@ -81,7 +81,7 @@ Action::BLinePointTangentMerge::get_param_vocab()
        ret.push_back(ParamDesc("time",Param::TYPE_TIME)
                .set_local_name(_("Time"))
        );
-       
+
        return ret;
 }
 
@@ -108,13 +108,13 @@ Action::BLinePointTangentMerge::set_param(const synfig::String& name, const Acti
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=value_node.cast_dynamic(param.get_value_node());
-               
+
                return (bool)(value_node);
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -129,7 +129,7 @@ Action::BLinePointTangentMerge::is_ready()const
 
        if(time==(Time::begin()-1))
                synfig::error("Missing time");
-       
+
        if(!value_node || time==(Time::begin()-1))
                return false;
        return Action::CanvasSpecific::is_ready();
@@ -141,40 +141,40 @@ Action::BLinePointTangentMerge::prepare()
        clear();
 
        Action::Handle action;
-       
+
        {
                action=Action::create("value_desc_set");
                if(!action)
                        throw Error(_("Couldn't find action \"value_desc_set\""));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",ValueDesc(value_node,3));
                action->set_param("time",time);
                action->set_param("new_value",synfig::ValueBase(false));
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
        }
        {
                action=Action::create("value_desc_set");
                if(!action)
                        throw Error(_("Couldn't find action \"value_desc_set\""));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",ValueDesc(value_node,5));
                action->set_param("time",time);
                action->set_param("new_value",(*value_node->get_link("t1"))(time));
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
        }
-       
+
 }
index e799fd3..cef7f82 100644 (file)
@@ -73,7 +73,7 @@ Action::ParamVocab
 Action::BLinePointTangentSplit::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode of BLinePoint"))
        );
@@ -81,7 +81,7 @@ Action::BLinePointTangentSplit::get_param_vocab()
        ret.push_back(ParamDesc("time",Param::TYPE_TIME)
                .set_local_name(_("Time"))
        );
-       
+
        return ret;
 }
 
@@ -108,13 +108,13 @@ Action::BLinePointTangentSplit::set_param(const synfig::String& name, const Acti
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=value_node.cast_dynamic(param.get_value_node());
-               
+
                return (bool)(value_node);
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -129,7 +129,7 @@ Action::BLinePointTangentSplit::is_ready()const
 
        if(time==(Time::begin()-1))
                synfig::error("Missing time");
-       
+
        if(!value_node || time==(Time::begin()-1))
                return false;
        return Action::CanvasSpecific::is_ready();
@@ -141,40 +141,40 @@ Action::BLinePointTangentSplit::prepare()
        clear();
 
        Action::Handle action;
-       
+
        {
                action=Action::create("value_desc_set");
                if(!action)
                        throw Error(_("Couldn't find action \"value_desc_set\""));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",ValueDesc(value_node,3));
                action->set_param("time",time);
                action->set_param("new_value",synfig::ValueBase(true));
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
        }
        {
                action=Action::create("value_desc_set");
                if(!action)
                        throw Error(_("Couldn't find action \"value_desc_set\""));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",ValueDesc(value_node,5));
                action->set_param("time",time);
                action->set_param("new_value",(*value_node->get_link("t1"))(time));
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
        }
-       
+
 }
index bf2b7bb..441d674 100644 (file)
@@ -66,7 +66,7 @@ Action::ParamVocab
 Action::CanvasAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("src",Param::TYPE_CANVAS)
                .set_local_name(_("New Canvas"))
                .set_optional()
@@ -77,7 +77,7 @@ Action::CanvasAdd::get_param_vocab()
                .set_desc(_("The name that you want this canvas to be"))
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -93,13 +93,13 @@ Action::CanvasAdd::set_param(const synfig::String& name, const Action::Param &pa
        if(name=="src" && param.get_type()==Param::TYPE_CANVAS)
        {
                new_canvas=param.get_canvas();
-               
+
                return true;
        }
        if(name=="id" && param.get_type()==Param::TYPE_STRING)
        {
                id=param.get_string();
-               
+
                return true;
        }
 
@@ -141,8 +141,8 @@ Action::CanvasAdd::undo()
        get_canvas()->remove_child_canvas(new_canvas);
 
        if(inline_parent)
-               new_canvas->set_inline(inline_parent);          
-       
+               new_canvas->set_inline(inline_parent);
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_canvas_removed()(new_canvas);
index cd5ba09..b0dbebb 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::CanvasRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        return ret;
 }
 
@@ -79,7 +79,7 @@ Action::CanvasRemove::is_candidate(const ParamList &x)
                // We cannot remove the root canvas.
                if(canvas->is_root())
                        return false;
-               
+
                return true;
        }
        return false;
@@ -106,14 +106,14 @@ Action::CanvasRemove::perform()
 
        if(get_canvas()->is_inline())
                throw Error(_("You cannot remove an inline canvas!"));
-       
+
        parent_canvas=get_canvas()->parent();
        canvas_id=get_canvas()->get_id();
-       
+
        assert(parent_canvas);
-       
+
        parent_canvas->remove_child_canvas(get_canvas());
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_canvas_removed()(get_canvas());
index 1c68411..85ad231 100644 (file)
@@ -66,11 +66,11 @@ Action::ParamVocab
 Action::CanvasRendDescSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("rend_desc",Param::TYPE_RENDDESC)
                .set_local_name(_("RendDesc"))
        );
-       
+
        return ret;
 }
 
@@ -86,7 +86,7 @@ Action::CanvasRendDescSet::set_param(const synfig::String& name, const Action::P
        if(name=="rend_desc" && param.get_type()==Param::TYPE_RENDDESC)
        {
                new_rend_desc=param.get_rend_desc();
-               
+
                return true;
        }
 
@@ -105,7 +105,7 @@ Action::CanvasRendDescSet::perform()
        old_rend_desc=get_canvas()->rend_desc();
 
        get_canvas()->rend_desc()=new_rend_desc;
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_rend_desc_changed()();
@@ -117,7 +117,7 @@ void
 Action::CanvasRendDescSet::undo()
 {
        get_canvas()->rend_desc()=old_rend_desc;
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_rend_desc_changed()();
index a9b535d..3f39d39 100644 (file)
@@ -72,7 +72,7 @@ Action::ParamVocab
 Action::ColorSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -81,7 +81,7 @@ Action::ColorSet::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -100,17 +100,17 @@ Action::ColorSet::set_param(const synfig::String& name, const Action::Param &par
        {
                // Grab the value_desc
                value_desc=param.get_value_desc();
-               
+
                // Grab the current color
                color=synfigapp::Main::get_foreground_color();
-               
+
                return value_desc.get_value_type()==ValueBase::TYPE_COLOR;
        }
 
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -129,16 +129,16 @@ void
 Action::ColorSet::prepare()
 {
        clear();
-       
+
        Action::Handle action;
        action=Action::create("value_desc_set");
-               
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",get_canvas_interface());
        action->set_param("value_desc",value_desc);
        action->set_param("new_value",ValueBase(color));
        action->set_param("time",time);
-       
+
        if(!action->is_ready())
                throw Error(Error::TYPE_NOTREADY);
 
index 48a4e4e..fadccc8 100644 (file)
@@ -65,11 +65,11 @@ Action::ParamVocab
 Action::EditModeSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("edit_mode",Param::TYPE_EDITMODE)
                .set_local_name(_("New Edit Mode"))
        );
-       
+
        return ret;
 }
 
@@ -86,11 +86,11 @@ Action::EditModeSet::set_param(const synfig::String& name, const Action::Param &
        if(name=="edit_mode" && param.get_type()==Param::TYPE_EDITMODE)
        {
                set_edit_mode(param.get_edit_mode());
-               
+
                return true;
        }
 */
-       
+
        return Action::CanvasSpecific::set_param(name,param);
 }
 
@@ -111,7 +111,7 @@ Action::EditModeSet::perform()
                return;
 
        get_canvas_interface()->mode_=get_edit_mode();
-               
+
        get_canvas_interface()->signal_mode_changed_(get_edit_mode());
 }
 
@@ -124,6 +124,6 @@ Action::EditModeSet::undo()
                return;
 
        get_canvas_interface()->mode_=old_edit_mode;
-               
+
        get_canvas_interface()->signal_mode_changed_(old_edit_mode);
 }
index 8f19c99..e17ac62 100644 (file)
@@ -72,7 +72,7 @@ Action::ParamVocab
 Action::GradientSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -81,7 +81,7 @@ Action::GradientSet::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -100,17 +100,17 @@ Action::GradientSet::set_param(const synfig::String& name, const Action::Param &
        {
                // Grab the value_desc
                value_desc=param.get_value_desc();
-               
+
                // Grab the current gradient
                gradient=synfigapp::Main::get_gradient();
-               
+
                return value_desc.get_value_type()==ValueBase::TYPE_GRADIENT;
        }
 
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -129,16 +129,16 @@ void
 Action::GradientSet::prepare()
 {
        clear();
-       
+
        Action::Handle action;
        action=Action::create("value_desc_set");
-               
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",get_canvas_interface());
        action->set_param("value_desc",value_desc);
        action->set_param("new_value",ValueBase(gradient));
        action->set_param("time",time);
-       
+
        if(!action->is_ready())
                throw Error(Error::TYPE_NOTREADY);
 
index 369dd45..4313324 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::GroupAddLayers::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be added to group"))
@@ -77,7 +77,7 @@ Action::GroupAddLayers::get_param_vocab()
                .set_desc(_("Name of the Group to add the Layers to"))
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -95,14 +95,14 @@ Action::GroupAddLayers::set_param(const synfig::String& name, const Action::Para
                std::pair<synfig::Layer::Handle,String> layer_pair;
                layer_pair.first=param.get_layer();
                layer_list.push_back(layer_pair);
-               
+
                return true;
        }
 
        if(name=="group" && param.get_type()==Param::TYPE_STRING)
        {
                group=param.get_string();
-               
+
                return true;
        }
 
@@ -125,7 +125,7 @@ Action::GroupAddLayers::perform()
        {
                Layer::Handle layer(iter->first);
                iter->second=layer->get_group();
-               
+
                layer->add_to_group(group);
        }
 }
@@ -137,9 +137,9 @@ Action::GroupAddLayers::undo()
        for(iter=layer_list.begin();iter!=layer_list.end();++iter)
        {
                Layer::Handle layer(iter->first);
-               
+
                layer->remove_from_group(group);
-               
+
                layer->add_to_group(iter->second);
        }
 }
index 1292c39..4b036c6 100644 (file)
@@ -51,7 +51,7 @@ private:
 
        // List contains the layers and their previous groups
        std::list<std::pair<synfig::Layer::Handle,synfig::String> > layer_list;
-       
+
        // The name of the new group
        synfig::String group;
 
index ee7842b..87a85c4 100644 (file)
@@ -65,12 +65,12 @@ Action::ParamVocab
 Action::GroupRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("group",Param::TYPE_STRING)
                .set_local_name(_("Group"))
                .set_desc(_("Name of the Group to remove"))
        );
-       
+
        return ret;
 }
 
@@ -96,7 +96,7 @@ Action::GroupRemove::set_param(const synfig::String& name, const Action::Param &
        if(name=="group" && param.get_type()==Param::TYPE_STRING)
        {
                group=param.get_string();
-               
+
                return true;
        }
 
@@ -115,7 +115,7 @@ void
 Action::GroupRemove::perform()
 {
        layer_list=get_canvas()->get_layers_in_group(group);
-       
+
        std::set<synfig::Layer::Handle>::iterator iter;
        for(iter=layer_list.begin();iter!=layer_list.end();++iter)
        {
index 824bd05..c312fed 100644 (file)
@@ -51,7 +51,7 @@ private:
 
        // List contains the layers
        std::set<synfig::Layer::Handle> layer_list;
-       
+
        // The name of the group to remove
        synfig::String group;
 
index a8d4dc9..d83b840 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::GroupRemoveLayers::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be added to group"))
@@ -77,7 +77,7 @@ Action::GroupRemoveLayers::get_param_vocab()
                .set_desc(_("Name of the Group to add the Layers to"))
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -95,14 +95,14 @@ Action::GroupRemoveLayers::set_param(const synfig::String& name, const Action::P
                std::pair<synfig::Layer::Handle,String> layer_pair;
                layer_pair.first=param.get_layer();
                layer_list.push_back(layer_pair);
-               
+
                return true;
        }
 
        if(name=="group" && param.get_type()==Param::TYPE_STRING)
        {
                group=param.get_string();
-               
+
                return true;
        }
 
@@ -125,7 +125,7 @@ Action::GroupRemoveLayers::perform()
        {
                Layer::Handle layer(iter->first);
                iter->second=layer->get_group();
-               
+
                layer->remove_from_group(group);
        }
 }
@@ -137,7 +137,7 @@ Action::GroupRemoveLayers::undo()
        for(iter=layer_list.begin();iter!=layer_list.end();++iter)
        {
                Layer::Handle layer(iter->first);
-               
+
                layer->add_to_group(iter->second);
        }
 }
index 08a114d..53cf83b 100644 (file)
@@ -51,7 +51,7 @@ private:
 
        // List contains the layers and their previous groups
        std::list<std::pair<synfig::Layer::Handle,synfig::String> > layer_list;
-       
+
        // The name of the new group
        synfig::String group;
 
index e094b10..908fb05 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::GroupRename::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("group",Param::TYPE_STRING)
                .set_local_name(_("Old Group"))
                .set_desc(_("Name of the Group to rename"))
@@ -75,7 +75,7 @@ Action::GroupRename::get_param_vocab()
                .set_local_name(_("New Group"))
                .set_desc(_("New name for group"))
        );
-       
+
        return ret;
 }
 
@@ -91,14 +91,14 @@ Action::GroupRename::set_param(const synfig::String& name, const Action::Param &
        if(name=="group" && param.get_type()==Param::TYPE_STRING)
        {
                old_group_name=param.get_string();
-               
+
                return true;
        }
 
        if(name=="new_group" && param.get_type()==Param::TYPE_STRING)
        {
                new_group_name=param.get_string();
-               
+
                return true;
        }
 
index c96088d..421868a 100644 (file)
@@ -51,7 +51,7 @@ private:
 
        // List contains the layers
        std::set<synfig::Layer::Handle> layer_list;
-       
+
        // The name of the group to remove
        synfig::String old_group_name;
 
index db3b7a5..0c96edb 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::KeyframeAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("keyframe",Param::TYPE_KEYFRAME)
                .set_local_name(_("New Keyframe"))
                .set_desc(_("Keyframe to be added"))
@@ -81,7 +81,7 @@ Action::KeyframeAdd::is_candidate(const ParamList &x)
 {
        if(!candidate_check(get_param_vocab(),x))
                return false;
-       
+
        return true;
 }
 
@@ -91,7 +91,7 @@ Action::KeyframeAdd::set_param(const synfig::String& name, const Action::Param &
        if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
        {
                keyframe=param.get_keyframe();
-               
+
                return true;
        }
 
@@ -108,15 +108,15 @@ Action::KeyframeAdd::is_ready()const
 
 void
 Action::KeyframeAdd::perform()
-{      
+{
        try { get_canvas()->keyframe_list().find(keyframe.get_time()); throw Error(_("A Keyframe already exists at this point in time"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        try { get_canvas()->keyframe_list().find(keyframe); throw Error(_("This keyframe is already in the ValueNode"));}
-       catch(synfig::Exception::NotFound) { }  
-       
+       catch(synfig::Exception::NotFound) { }
+
        get_canvas()->keyframe_list().add(keyframe);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_keyframe_added()(keyframe);
@@ -133,5 +133,5 @@ Action::KeyframeAdd::undo()
        }
        else synfig::warning("CanvasInterface not set on action");
 
-       get_canvas()->keyframe_list().erase(keyframe);  
+       get_canvas()->keyframe_list().erase(keyframe);
 }
index 48ddf07..faa7741 100644 (file)
@@ -72,7 +72,7 @@ Action::ParamVocab
 Action::KeyframeDuplicate::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("keyframe",Param::TYPE_KEYFRAME)
                .set_local_name(_("Keyframe"))
                .set_desc(_("Keyframe to be duplicated"))
@@ -98,13 +98,13 @@ Action::KeyframeDuplicate::set_param(const synfig::String& name, const Action::P
        {
                keyframe=param.get_keyframe();
                new_keyframe.set_description(keyframe.get_description()+_(" (Duplicate)"));
-               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                new_keyframe.set_time(param.get_time());
-               
+
                return true;
        }
 
@@ -131,12 +131,12 @@ Action::KeyframeDuplicate::prepare()
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find the given keyframe"));
-       }       
+       }
 
        try { if(get_canvas()->keyframe_list().find(new_time)!=get_canvas()->keyframe_list().end()) throw Error(_("A Keyframe already exists at this point in time"));}
-       catch(...) { }                  
+       catch(...) { }
 
-       // If the times are different, then we 
+       // If the times are different, then we
        // will need to romp through the valuenodes
        // and add actions to update their values.
        if(new_time!=old_time)
@@ -153,20 +153,20 @@ Action::KeyframeDuplicate::prepare()
 
 void
 Action::KeyframeDuplicate::process_value_desc(const synfigapp::ValueDesc& value_desc)
-{      
+{
        const synfig::Time old_time=keyframe.get_time();
        const synfig::Time new_time=new_keyframe.get_time();
 
        if(value_desc.is_value_node())
        {
                ValueNode::Handle value_node(value_desc.get_value_node());
-       
+
                // If we are a dynamic list, then we need to update the ActivePoints
                if(ValueNode_DynamicList::Handle::cast_dynamic(value_node))
                {
                        ValueNode_DynamicList::Handle value_node_dynamic(ValueNode_DynamicList::Handle::cast_dynamic(value_node));
                        int i;
-                       
+
                        for(i=0;i<value_node_dynamic->link_count();i++)
                        {
                                synfigapp::ValueDesc value_desc(value_node_dynamic,i);
@@ -174,7 +174,7 @@ Action::KeyframeDuplicate::process_value_desc(const synfigapp::ValueDesc& value_
                                activepoint.set_time(new_time);
 
                                Action::Handle action(ActivepointSetSmart::create());
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_desc",value_desc);
@@ -183,8 +183,8 @@ Action::KeyframeDuplicate::process_value_desc(const synfigapp::ValueDesc& value_
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
-                               add_action_front(action);                                               
+
+                               add_action_front(action);
                        }
                }
                else if(ValueNode_Animated::Handle::cast_dynamic(value_node))
@@ -192,19 +192,19 @@ Action::KeyframeDuplicate::process_value_desc(const synfigapp::ValueDesc& value_
                        ValueNode_Animated::Handle value_node_animated(ValueNode_Animated::Handle::cast_dynamic(value_node));
                        Waypoint waypoint(value_node_animated->new_waypoint_at_time(old_time));
                        waypoint.set_time(new_time);
-                       
+
                        Action::Handle action(WaypointSetSmart::create());
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_node",ValueNode::Handle(value_node_animated));
                        action->set_param("waypoint",waypoint);
-       
+
                        assert(action->is_ready());
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-               
-                       add_action_front(action);                                               
+
+                       add_action_front(action);
                }
        }
 }
@@ -213,15 +213,15 @@ void
 Action::KeyframeDuplicate::perform()
 {
        try { get_canvas()->keyframe_list().find(new_keyframe.get_time()); throw Error(_("A Keyframe already exists at this point in time"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        try { get_canvas()->keyframe_list().find(new_keyframe); throw Error(_("This keyframe is already in the ValueNode"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        Action::Super::perform();
-       
+
        get_canvas()->keyframe_list().add(new_keyframe);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_keyframe_added()(new_keyframe);
@@ -233,12 +233,12 @@ void
 Action::KeyframeDuplicate::undo()
 {
        Action::Super::undo();
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_keyframe_removed()(new_keyframe);
        }
        else synfig::warning("CanvasInterface not set on action");
 
-       get_canvas()->keyframe_list().erase(new_keyframe);      
+       get_canvas()->keyframe_list().erase(new_keyframe);
 }
index eaa3bb1..47cd2f2 100644 (file)
@@ -71,7 +71,7 @@ Action::ParamVocab
 Action::KeyframeRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("keyframe",Param::TYPE_KEYFRAME)
                .set_local_name(_("Keyframe"))
                .set_desc(_("Keyframe to be removed"))
@@ -92,7 +92,7 @@ Action::KeyframeRemove::set_param(const synfig::String& name, const Action::Para
        if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
        {
                keyframe=param.get_keyframe();
-               
+
                return true;
        }
 
@@ -116,9 +116,9 @@ Action::KeyframeRemove::prepare()
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find the given keyframe"));
-       }       
+       }
+
 
-       
        {
                std::vector<synfigapp::ValueDesc> value_desc_list;
                get_canvas_interface()->find_important_value_descs(value_desc_list);
@@ -132,13 +132,13 @@ Action::KeyframeRemove::prepare()
 
 void
 Action::KeyframeRemove::process_value_desc(const synfigapp::ValueDesc& value_desc)
-{      
+{
        const synfig::Time time(keyframe.get_time());
 
        if(value_desc.is_value_node())
        {
                ValueNode::Handle value_node(value_desc.get_value_node());
-       
+
                // If we are a dynamic list, then we need to update the ActivePoints
                if(ValueNode_DynamicList::Handle::cast_dynamic(value_node))
                {
@@ -153,7 +153,7 @@ Action::KeyframeRemove::process_value_desc(const synfigapp::ValueDesc& value_des
                                synfigapp::ValueDesc value_desc(value_node_dynamic,i);
 
                                Action::Handle action(ActivepointRemove::create());
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_desc",value_desc);
@@ -162,8 +162,8 @@ Action::KeyframeRemove::process_value_desc(const synfigapp::ValueDesc& value_des
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
-                               add_action_front(action);                                               
+
+                               add_action_front(action);
                        }
                        catch(...)
                        {
@@ -176,19 +176,19 @@ Action::KeyframeRemove::process_value_desc(const synfigapp::ValueDesc& value_des
                        Waypoint waypoint;
                        waypoint=*value_node_animated->find(time);
                        assert(waypoint.get_time()==time);
-                       
+
                        Action::Handle action(WaypointRemove::create());
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_node",ValueNode::Handle(value_node_animated));
                        action->set_param("waypoint",waypoint);
-       
+
                        assert(action->is_ready());
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-               
-                       add_action_front(action);                                               
+
+                       add_action_front(action);
                }
                catch(...)
                {
@@ -201,29 +201,29 @@ void
 Action::KeyframeRemove::perform()
 {
        Action::Super::perform();
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_keyframe_removed()(keyframe);
        }
        else synfig::warning("CanvasInterface not set on action");
 
-       get_canvas()->keyframe_list().erase(keyframe);  
+       get_canvas()->keyframe_list().erase(keyframe);
 }
 
 void
 Action::KeyframeRemove::undo()
 {
        try { get_canvas()->keyframe_list().find(keyframe.get_time()); throw Error(_("A Keyframe already exists at this point in time"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        try { get_canvas()->keyframe_list().find(keyframe); throw Error(_("This keyframe is already in the ValueNode"));}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        Action::Super::undo();
-       
+
        get_canvas()->keyframe_list().add(keyframe);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_keyframe_added()(keyframe);
index 039497e..3320340 100644 (file)
@@ -71,7 +71,7 @@ Action::ParamVocab
 Action::KeyframeSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("keyframe",Param::TYPE_KEYFRAME)
                .set_local_name(_("New Keyframe"))
                .set_desc(_("Keyframe to be added"))
@@ -95,7 +95,7 @@ Action::KeyframeSet::set_param(const synfig::String& name, const Action::Param &
                keyframe=param.get_keyframe();
                synfig::info("KeyframeSet::set_param():new_time: %s",keyframe.get_time().get_string().c_str());
                synfig::info("KeyframeSet::set_param():get_keyframe(): %s",param.get_keyframe().get_time().get_string().c_str());
-               
+
                return true;
        }
 
@@ -115,19 +115,19 @@ Action::KeyframeSet::prepare()
 {
        clear();
        guid_set.clear();
-       
-       
 
-       
-       
+
+
+
+
        //synfig::info("new_time: %s",new_time.get_string().c_str());
        //synfig::info("old_time: %s",old_time.get_string().c_str());
-       
+
        try { if(get_canvas()->keyframe_list().find(new_time)!=get_canvas()->keyframe_list().end()) throw Error(_("A Keyframe already exists at this point in time"));}
-       catch(...) { }  
+       catch(...) { }
 
 
-       // If the times are different, then we 
+       // If the times are different, then we
        // will need to romp through the valuenodes
        // and add actions to update their values.
        if(new_time!=old_time)
@@ -149,10 +149,10 @@ Action::KeyframeSet::scale_activepoints(const synfigapp::ValueDesc& value_desc,c
 {
        ValueNode_DynamicList::Handle value_node(ValueNode_DynamicList::Handle::cast_static(value_desc.get_parent_value_node()));
        ValueNode_DynamicList::ListEntry& list_entry(value_node->list[value_desc.get_index()]);
-       
+
        std::vector<Activepoint*> selected;
        std::vector<Activepoint*>::iterator iter;
-       
+
        if(list_entry.find(old_begin,old_end,selected))
        {
                // check to make sure this operation is OK
@@ -170,18 +170,18 @@ Action::KeyframeSet::scale_activepoints(const synfigapp::ValueDesc& value_desc,c
                        }
                        catch(Exception::NotFound) { }
                }
-               
+
                int ret(0);
                while(!selected.empty())
                {
                        if(selected.back()->get_time()!=old_2_new(selected.back()->get_time()))
                        {
                                Action::Handle action(Action::create("activepoint_set"));
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_desc",value_desc);
-                               
+
                                Activepoint activepoint(*selected.back());
                                activepoint.set_time(old_2_new(selected.back()->get_time()));
 
@@ -190,8 +190,8 @@ Action::KeyframeSet::scale_activepoints(const synfigapp::ValueDesc& value_desc,c
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
-                               add_action_front(action);                                               
+
+                               add_action_front(action);
 
                                ret++;
                        }
@@ -206,10 +206,10 @@ int
 Action::KeyframeSet::scale_waypoints(const synfigapp::ValueDesc& value_desc,const Time& old_begin,const Time& old_end,const Time& new_begin,const Time& new_end)
 {
        ValueNode_Animated::Handle value_node(ValueNode_Animated::Handle::cast_static(value_desc.get_value_node()));
-       
+
        std::vector<Waypoint*> selected;
        std::vector<Waypoint*>::iterator iter;
-       
+
        if(value_node->find(old_begin,old_end,selected))
        {
                // check to make sure this operation is OK
@@ -229,18 +229,18 @@ Action::KeyframeSet::scale_waypoints(const synfigapp::ValueDesc& value_desc,cons
                        }
                        catch(Exception::NotFound) { }
                }
-               
+
                int ret(0);
                while(!selected.empty())
                {
                        if(selected.back()->get_time()!=old_2_new(selected.back()->get_time()))
                        {
                                Action::Handle action(Action::create("waypoint_set"));
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",ValueNode::Handle::cast_static(value_node));
-                               
+
                                Waypoint waypoint(*selected.back());
                                waypoint.set_time(old_2_new(selected.back()->get_time()));
 
@@ -249,8 +249,8 @@ Action::KeyframeSet::scale_waypoints(const synfigapp::ValueDesc& value_desc,cons
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
-                               add_action_front(action);                                               
+
+                               add_action_front(action);
 
                                ret++;
                        }
@@ -263,9 +263,9 @@ Action::KeyframeSet::scale_waypoints(const synfigapp::ValueDesc& value_desc,cons
 
 void
 Action::KeyframeSet::process_value_desc(const synfigapp::ValueDesc& value_desc)
-{      
+{
        if(value_desc.is_value_node())
-       {               
+       {
                ValueNode::Handle value_node(value_desc.get_value_node());
 
                //if(guid_set.count(value_node->get_guid()))
@@ -289,13 +289,13 @@ Action::KeyframeSet::process_value_desc(const synfigapp::ValueDesc& value_desc)
                                        scale_activepoints(value_desc,old_time,keyframe_next,new_time,keyframe_next);
                                }
                                //else
-                               {       
+                               {
                                        Action::Handle action(ActivepointSetSmart::create());
-                                       
+
                                        action->set_param("canvas",get_canvas());
                                        action->set_param("canvas_interface",get_canvas_interface());
                                        action->set_param("value_desc",value_desc);
-                                       
+
                                        Activepoint activepoint;
                                        try
                                        {
@@ -309,11 +309,11 @@ Action::KeyframeSet::process_value_desc(const synfigapp::ValueDesc& value_desc)
                                                activepoint.set_priority(0);
                                        }
                                        action->set_param("activepoint",activepoint);
-       
+
                                        assert(action->is_ready());
                                        if(!action->is_ready())
                                                throw Error(Error::TYPE_NOTREADY);
-                               
+
                                        add_action_front(action);
                                }
                        }
@@ -331,13 +331,13 @@ Action::KeyframeSet::process_value_desc(const synfigapp::ValueDesc& value_desc)
                        //else
                        {
                                ValueNode_Animated::Handle value_node_animated(ValueNode_Animated::Handle::cast_dynamic(value_node));
-                               
+
                                Action::Handle action(WaypointSetSmart::create());
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",ValueNode::Handle(value_node_animated));
-                               
+
                                Waypoint waypoint;
                                try
                                {
@@ -350,11 +350,11 @@ Action::KeyframeSet::process_value_desc(const synfigapp::ValueDesc& value_desc)
                                        waypoint.set_value((*value_node_animated)(old_time));
                                }
                                action->set_param("waypoint",waypoint);
-               
+
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
+
                                add_action_front(action);
                        }
                }
@@ -368,13 +368,13 @@ Action::KeyframeSet::perform()
 
        old_time=get_canvas()->keyframe_list().find(keyframe)->get_time();
        new_time=keyframe.get_time();
-       
+
        try { get_canvas()->keyframe_list().find(keyframe);}
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find the given keyframe"));
-       }       
-       
+       }
+
        // Check for colisions
        if(old_time!=new_time)
        {
@@ -391,7 +391,7 @@ Action::KeyframeSet::perform()
 
        old_keyframe=*get_canvas()->keyframe_list().find(keyframe);
        *get_canvas()->keyframe_list().find(keyframe)=keyframe;
-       
+
        get_canvas()->keyframe_list().sync();
 
        try{
@@ -403,7 +403,7 @@ Action::KeyframeSet::perform()
                get_canvas()->keyframe_list().sync();
                throw;
        }
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
@@ -420,7 +420,7 @@ Action::KeyframeSet::undo()
        *get_canvas()->keyframe_list().find(old_keyframe)=old_keyframe;
 
        get_canvas()->keyframe_list().sync();
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
index c6c70b8..fce3cbb 100644 (file)
@@ -56,11 +56,11 @@ private:
        synfig::Time new_time;
 
        synfig::Time keyframe_prev,keyframe_next;
-       
+
        std::set<synfig::GUID> guid_set;
 
        void process_value_desc(const synfigapp::ValueDesc& value_desc);
-       
+
        int scale_activepoints(const synfigapp::ValueDesc& value_desc,const synfig::Time& old_begin,const synfig::Time& old_end,const synfig::Time& new_begin,const synfig::Time& new_end);
        int scale_waypoints(const synfigapp::ValueDesc& value_desc,const synfig::Time& old_begin,const synfig::Time& old_end,const synfig::Time& new_begin,const synfig::Time& new_end);
 
index 4eabd69..610d414 100644 (file)
@@ -72,7 +72,7 @@ Action::ParamVocab
 Action::KeyframeSetDelta::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("keyframe",Param::TYPE_KEYFRAME)
                .set_local_name(_("Keyframe"))
        );
@@ -121,9 +121,9 @@ Action::KeyframeSetDelta::prepare()
        value_desc_list.clear();
        get_canvas_interface()->find_important_value_descs(value_desc_list);
 
-       
+
        Time time(get_canvas()->keyframe_list().find(keyframe)->get_time());
-       
+
        std::vector<synfigapp::ValueDesc>::iterator iter;
                DEBUGPOINT();
        for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)
@@ -132,10 +132,10 @@ Action::KeyframeSetDelta::prepare()
                ValueNode_Animated::Handle value_node(
                        ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node())
                );
-               
+
                if(!value_node)
                        continue;
-               
+
                try{
                        value_node->find(time);
                        // if we got to this point, then we know that
@@ -153,7 +153,7 @@ Action::KeyframeSetDelta::prepare()
                        }
                }
                Action::Handle action(Action::create("waypoint_set_smart"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle::cast_static(value_node));
@@ -163,8 +163,8 @@ Action::KeyframeSetDelta::prepare()
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action(action);                                             
+
+               add_action(action);
        }
 }
 
@@ -174,11 +174,11 @@ Action::KeyframeSetDelta::perform()
        if(!delta)
                return;
        Action::Super::perform();
-       
+
 //     Time location(keyframe.get_time());
-       Time location(get_canvas()->keyframe_list().find(keyframe)->get_time());        
+       Time location(get_canvas()->keyframe_list().find(keyframe)->get_time());
        Time delta(delta);
-       
+
        get_canvas()->keyframe_list().insert_time(location,delta);
 
        std::vector<synfigapp::ValueDesc>::iterator iter;
@@ -218,11 +218,11 @@ Action::KeyframeSetDelta::undo()
 {
        if(!delta)
                return;
-       
+
 //     Time location(keyframe.get_time());
-       Time location(get_canvas()->keyframe_list().find(keyframe)->get_time());        
+       Time location(get_canvas()->keyframe_list().find(keyframe)->get_time());
        Time delta(-delta);
-       
+
        get_canvas()->keyframe_list().insert_time(location,delta);
 
        std::vector<synfigapp::ValueDesc>::iterator iter;
index 7a29dac..09c4023 100644 (file)
@@ -55,7 +55,7 @@ private:
        std::vector<synfigapp::ValueDesc> value_desc_list;
 
        void process_value_desc(const synfigapp::ValueDesc& value_desc);
-       
+
        int scale_activepoints(const synfigapp::ValueDesc& value_desc,const synfig::Time& old_begin,const synfig::Time& old_end,const synfig::Time& new_begin,const synfig::Time& new_end);
        int scale_waypoints(const synfigapp::ValueDesc& value_desc,const synfig::Time& old_begin,const synfig::Time& old_end,const synfig::Time& new_begin,const synfig::Time& new_end);
 
index 78e6d8c..7cb870f 100644 (file)
@@ -71,7 +71,7 @@ Action::ParamVocab
 Action::KeyframeWaypointSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("keyframe",Param::TYPE_KEYFRAME)
                .set_local_name(_("Keyframe"))
        );
@@ -95,13 +95,13 @@ Action::KeyframeWaypointSet::set_param(const synfig::String& name, const Action:
        if(name=="keyframe" && param.get_type()==Param::TYPE_KEYFRAME)
        {
                keyframe=param.get_keyframe();
-               
+
                return true;
        }
        if(name=="model" && param.get_type()==Param::TYPE_WAYPOINTMODEL)
        {
                waypoint_model=param.get_waypoint_model();
-               
+
                return true;
        }
 
@@ -125,7 +125,7 @@ Action::KeyframeWaypointSet::prepare()
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find the given keyframe"));
-       }       
+       }
 
        {
                std::vector<synfigapp::ValueDesc> value_desc_list;
@@ -140,19 +140,19 @@ Action::KeyframeWaypointSet::prepare()
 
 void
 Action::KeyframeWaypointSet::process_value_desc(const synfigapp::ValueDesc& value_desc)
-{      
+{
        if(value_desc.is_value_node())
        {
                ValueNode_Animated::Handle value_node(ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node()));
-       
+
                if(value_node)
-               {                       
+               {
                        Action::Handle action(WaypointSetSmart::create());
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_node",ValueNode::Handle(value_node));
-                       
+
                        Waypoint waypoint;
                        try
                        {
@@ -164,14 +164,14 @@ Action::KeyframeWaypointSet::process_value_desc(const synfigapp::ValueDesc& valu
                                waypoint.set_value((*value_node)(keyframe.get_time()));
                        }
                        waypoint.apply_model(waypoint_model);
-                       
+
                        action->set_param("waypoint",waypoint);
-       
+
                        assert(action->is_ready());
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-               
-                       add_action_front(action);                                               
+
+                       add_action_front(action);
                }
        }
 }
index 7e29845..e7f6ee1 100644 (file)
@@ -43,7 +43,7 @@ using namespace Action;
 /* === M A C R O S ========================================================= */
 #define ACTION_INIT2(class) \
        Action::Base* class::create() { return new class(); }   \
-       synfig::String class::get_name()const { return name__; }        
+       synfig::String class::get_name()const { return name__; }
 
 ACTION_INIT2(Action::LayerActivate);
 ACTION_SET_NAME(Action::LayerActivate,"layer_activate");
@@ -82,7 +82,7 @@ Action::ParamVocab
 Action::LayerActivate::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
        );
@@ -91,7 +91,7 @@ Action::LayerActivate::get_param_vocab()
                .set_local_name(_("New Status"))
                .set_desc(_("The new status of the layer"))
        );
-       
+
        return ret;
 }
 
@@ -107,14 +107,14 @@ Action::LayerActivate::set_param(const synfig::String& name, const Action::Param
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="new_status" && param.get_type()==Param::TYPE_BOOL)
        {
                new_status=param.get_bool();
-               
+
                return true;
        }
 
@@ -133,10 +133,10 @@ void
 Action::LayerActivate::perform()
 {
        Canvas::Handle subcanvas(layer->get_canvas());
-       
+
        // Find the iterator for the layer
        Canvas::iterator iter=find(subcanvas->begin(),subcanvas->end(),layer);
-       
+
        // If we couldn't find the layer in the canvas, then bail
        if(*iter!=layer)
                throw Error(_("This layer doesn't exist anymore."));
@@ -147,9 +147,9 @@ Action::LayerActivate::perform()
        //if(get_canvas()!=subcanvas && !subcanvas->is_inline())
        //if(get_canvas()->get_root()!=subcanvas->get_root())
        //      throw Error(_("This layer doesn't belong to this composition"));
-       
+
        old_status=layer->active();
-       
+
        // If we are changing the status to what it already is,
        // the go ahead and return
        if(new_status==old_status)
@@ -159,7 +159,7 @@ Action::LayerActivate::perform()
        }
        else
                set_dirty();
-       
+
        if(new_status)
                layer->enable();
        else
@@ -190,7 +190,7 @@ Action::LayerActivate::undo()
                layer->enable();
        else
                layer->disable();
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_layer_status_changed()(layer,old_status);
index 31167be..c6379d8 100644 (file)
@@ -65,12 +65,12 @@ Action::ParamVocab
 Action::LayerAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("new",Param::TYPE_LAYER)
                .set_local_name(_("New Layer"))
                .set_desc(_("Layer to be added"))
        );
-       
+
        return ret;
 }
 
@@ -86,7 +86,7 @@ Action::LayerAdd::set_param(const synfig::String& name, const Action::Param &par
        if(name=="new" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
@@ -106,13 +106,13 @@ Action::LayerAdd::perform()
 {
        // Set the layer's canvas
        layer->set_canvas(get_canvas());
-               
+
        // Push the layer onto the front of the canvas
-       get_canvas()->push_front(layer);        
+       get_canvas()->push_front(layer);
 
        // Mark ourselves as dirty if necessary
        //set_dirty(layer->active());
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
@@ -126,17 +126,17 @@ Action::LayerAdd::undo()
 {
        // Find the iterator for the layer
        Canvas::iterator iter=find(get_canvas()->begin(),get_canvas()->end(),layer);
-               
+
        // If we couldn't find the layer in the canvas, then bail
        if(*iter!=layer)
                throw Error(_("This layer doesn't exist anymore."));
-       
+
        // Remove the layer from the canvas
        get_canvas()->erase(iter);
 
        // Mark ourselves as dirty if necessary
        //set_dirty(layer->active());
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
index 56d3444..74a829d 100644 (file)
@@ -66,13 +66,13 @@ Action::ParamVocab
 Action::LayerDuplicate::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be duplicated"))
                .set_supports_multiple()
        );
-       
+
        return ret;
 }
 
@@ -88,7 +88,7 @@ Action::LayerDuplicate::set_param(const synfig::String& name, const Action::Para
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layers.push_back(param.get_layer());
-               
+
                return true;
        }
 
@@ -108,47 +108,47 @@ Action::LayerDuplicate::prepare()
 {
        if(!first_time())
                return;
-       
+
        std::list<synfig::Layer::Handle>::const_iterator iter;
-       
+
        for(iter=layers.begin();iter!=layers.end();++iter)
        {
                Layer::Handle layer(*iter);
-               
+
                Canvas::Handle subcanvas(layer->get_canvas());
-               
+
                // Find the iterator for the layer
                Canvas::iterator iter=find(subcanvas->begin(),subcanvas->end(),layer);
-               
+
                // If we couldn't find the layer in the canvas, then bail
                if(*iter!=layer)
                        throw Error(_("This layer doesn't exist anymore."));
-       
+
                // If the subcanvas isn't the same as the canvas,
                // then it had better be an inline canvas. If not,
                // bail
                if(get_canvas()!=subcanvas && !subcanvas->is_inline())
                        throw Error(_("This layer doesn't belong to this canvas anymore"));
-               
+
                Layer::Handle new_layer(layer->clone(guid));
-               
+
                {
                        Action::Handle action(Action::create("layer_move"));
-                       
+
                        action->set_param("canvas",subcanvas);
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("layer",new_layer);
                        action->set_param("new_index",layers.front()->get_depth());
-                       
+
                        add_action_front(action);
                }
                {
                        Action::Handle action(Action::create("layer_add"));
-               
+
                        action->set_param("canvas",subcanvas);
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("new",new_layer);
-                       
+
                        add_action_front(action);
                }
        }
index bf4e22b..5584381 100644 (file)
@@ -67,13 +67,13 @@ Action::ParamVocab
 Action::LayerEncapsulate::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be encapsulated"))
                .set_supports_multiple()
        );
-       
+
        return ret;
 }
 
@@ -89,7 +89,7 @@ Action::LayerEncapsulate::set_param(const synfig::String& name, const Action::Pa
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layers.push_back(param.get_layer());
-               
+
                return true;
        }
 
@@ -109,7 +109,7 @@ Action::LayerEncapsulate::lowest_depth()const
 {
        std::list<synfig::Layer::Handle>::const_iterator iter;
        int lowest_depth(0x7fffffff);
-       
+
        for(iter=layers.begin();iter!=layers.end();++iter)
        {
                int depth((*iter)->get_depth());
@@ -130,57 +130,57 @@ Action::LayerEncapsulate::prepare()
 
        if(layers.empty())
                throw Error("No layers to encapsulate");
-               
+
        // First create the new canvas and layer
        if(!child_canvas)
                child_canvas=Canvas::create_inline(get_canvas());
-       
+
        Layer::Handle new_layer(Layer::create("PasteCanvas"));
-       
+
        new_layer->set_param("canvas",child_canvas);
-       
+
        int target_depth(lowest_depth());
-       
+
        // Add the layer
        {
                Action::Handle action(LayerAdd::create());
-       
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("new",new_layer);
-               
+
                add_action(action);
-       }       
-       
+       }
+
        // Move the layer
        {
                Action::Handle action(Action::create("layer_move"));
-               
+
                assert(action);
-       
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("layer",new_layer);
                action->set_param("new_index",target_depth);
-               
+
                add_action(action);
-       }               
-               
+       }
+
        std::list<synfig::Layer::Handle>::reverse_iterator iter;
-       
+
        for(iter=layers.rbegin();iter!=layers.rend();++iter)
        {
                Layer::Handle layer(*iter);
-               
+
                Canvas::Handle subcanvas(layer->get_canvas());
-               
+
                // Find the iterator for the layer
                Canvas::iterator iter=find(subcanvas->begin(),subcanvas->end(),layer);
-               
+
                // If we couldn't find the layer in the canvas, then bail
                if(*iter!=layer)
                        throw Error(_("This layer doesn't exist anymore."));
-       
+
                if(!subcanvas)
                        throw Error(_("This layer doesn't have a parent canvas"));
 
@@ -192,25 +192,25 @@ Action::LayerEncapsulate::prepare()
 
                if(get_canvas()!=subcanvas)
                        throw Error(_("get_canvas()!=subcanvas"));
-               
+
                // Remove the layer from the old canvas
                {
                        Action::Handle action(LayerRemove::create());
-                       
+
                        action->set_param("canvas",subcanvas);
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("layer",layer);
-                       
+
                        add_action(action);
                }
                // Add the layer to the new canvas
                {
                        Action::Handle action(LayerAdd::create());
-                       
+
                        action->set_param("canvas",child_canvas);
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("new",layer);
-                       
+
                        add_action(action);
                }
        }
index 6fc401c..7c6a968 100644 (file)
@@ -66,13 +66,13 @@ Action::ParamVocab
 Action::LayerLower::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be lowered"))
                .set_supports_multiple()
        );
-       
+
        return ret;
 }
 
@@ -81,7 +81,7 @@ Action::LayerLower::is_candidate(const ParamList &x)
 {
        if(!candidate_check(get_param_vocab(),x))
                return false;
-       
+
        Layer::Handle layer(x.find("layer")->second.get_layer());
        //synfig::info("layer->get_depth()= %d ; layer->get_canvas()->size()=%d ;",layer->get_depth(),layer->get_canvas()->size());
        if(layer->get_depth()+1>=layer->get_canvas()->size())
@@ -95,7 +95,7 @@ Action::LayerLower::set_param(const synfig::String& name, const Action::Param &p
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layers.push_back(param.get_layer());
-               
+
                return true;
        }
 
@@ -116,41 +116,41 @@ Action::LayerLower::prepare()
        std::list<synfig::Layer::Handle>::const_iterator iter;
 
        clear();
-       
+
        for(iter=layers.begin();iter!=layers.end();++iter)
        {
                Layer::Handle layer(*iter);
-               
+
                Canvas::Handle subcanvas(layer->get_canvas());
-               
+
                // Find the iterator for the layer
                Canvas::iterator iter=find(subcanvas->begin(),subcanvas->end(),layer);
-               
+
                // If we couldn't find the layer in the canvas, then bail
                if(*iter!=layer)
                        throw Error(_("This layer doesn't exist anymore."));
-       
+
                // If the subcanvas isn't the same as the canvas,
                // then it had better be an inline canvas. If not,
                // bail
                //if(get_canvas()!=subcanvas && !subcanvas->is_inline())
                //      throw Error(_("This layer doesn't belong to this canvas anymore"));
-               
+
                int new_index=iter-subcanvas->begin();
-                               
+
                new_index++;
-               
+
                // If this lowers the layer past the bottom then don't bother
                if(new_index==subcanvas->size())
                        continue;
-               
+
                Action::Handle layer_move(LayerMove::create());
-               
+
                layer_move->set_param("canvas",get_canvas());
                layer_move->set_param("canvas_interface",get_canvas_interface());
                layer_move->set_param("layer",layer);
                layer_move->set_param("new_index",new_index);
-               
+
                add_action_front(layer_move);
        }
 }
index ca16dd3..341cc01 100644 (file)
@@ -68,7 +68,7 @@ Action::ParamVocab
 Action::LayerMove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be moved"))
@@ -84,7 +84,7 @@ Action::LayerMove::get_param_vocab()
                .set_desc(_("The canvas the layer is to be moved to"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -101,21 +101,21 @@ Action::LayerMove::set_param(const synfig::String& name, const Action::Param &pa
        {
 
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="new_index" && param.get_type()==Param::TYPE_INTEGER)
        {
                new_index=param.get_integer();
-               
+
                return true;
        }
 
        if(name=="dest_canvas" && param.get_type()==Param::TYPE_CANVAS)
        {
                dest_canvas=param.get_canvas();
-               
+
                return true;
        }
 
@@ -133,17 +133,17 @@ Action::LayerMove::is_ready()const
 
 void
 Action::LayerMove::perform()
-{              
+{
        synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count());
 
        Canvas::Handle subcanvas(layer->get_canvas());
        src_canvas=subcanvas;
        if(!dest_canvas)
                dest_canvas=subcanvas;
-               
+
        // Find the iterator for the layer
        Canvas::iterator iter=find(src_canvas->begin(),src_canvas->end(),layer);
-       
+
        // If we couldn't find the layer in the canvas, then bail
        if(*iter!=layer)
                throw Error(_("This layer doesn't exist anymore."));
@@ -156,15 +156,15 @@ Action::LayerMove::perform()
        //if(get_canvas()!=subcanvas && !subcanvas->is_inline())
        if(get_canvas()->get_root()!=dest_canvas->get_root() || get_canvas()->get_root()!=src_canvas->get_root())
                throw Error(_("You cannot directly move layers across compositions"));
-       
+
        old_index=iter-src_canvas->begin();
        int depth;
-       
+
        if(new_index<0)
                depth=dest_canvas->size()+new_index+1;
        else
                depth=new_index;
-       
+
        set_dirty(layer->active());
 
        synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count());
@@ -172,22 +172,22 @@ Action::LayerMove::perform()
        // If we were to move it to where it is
        if(old_index==depth && src_canvas==dest_canvas)
                return;
-       
+
        if(depth>dest_canvas->size())
                depth=dest_canvas->size();
        if(depth<0)
                depth=0;
-               
+
        src_canvas->erase(iter);
-       
-       dest_canvas->insert(dest_canvas->begin()+depth,layer);          
+
+       dest_canvas->insert(dest_canvas->begin()+depth,layer);
        layer->set_canvas(dest_canvas);
-       
+
        layer->changed();
        dest_canvas->changed(); if(dest_canvas!=src_canvas) src_canvas->changed();
-       
+
        synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count());
-       
+
        if(get_canvas_interface())
        {
                if(src_canvas==dest_canvas)
@@ -216,11 +216,11 @@ Action::LayerMove::undo()
 {
        // Find the iterator for the layer
        Canvas::iterator iter=find(dest_canvas->begin(),dest_canvas->end(),layer);
-       
+
        // If we couldn't find the layer in the canvas, then bail
        if(*iter!=layer || (get_canvas()!=dest_canvas && !dest_canvas->is_inline()))
                throw Error(_("This layer doesn't exist anymore."));
-       
+
        // If we were to move it to where it is
        if(old_index==new_index && src_canvas==dest_canvas)
                return;
@@ -229,13 +229,13 @@ Action::LayerMove::undo()
        set_dirty(layer->active());
 
        dest_canvas->erase(iter);
-       
+
        src_canvas->insert(src_canvas->begin()+old_index,layer);
        layer->set_canvas(src_canvas);
 
        layer->changed();
        dest_canvas->changed(); if(dest_canvas!=src_canvas) src_canvas->changed();
-       
+
        // Execute any signals
        if(get_canvas_interface())
        {
@@ -253,7 +253,7 @@ Action::LayerMove::undo()
                else
                {
                        get_canvas_interface()->signal_layer_moved()(layer,old_index,src_canvas);
-                       //get_canvas_interface()->signal_layer_removed()(layer);        
+                       //get_canvas_interface()->signal_layer_removed()(layer);
                        //get_canvas_interface()->signal_layer_inserted()(layer,old_index);
                }
        }
index d1bfb81..f95d679 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::LayerParamConnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
        );
@@ -77,7 +77,7 @@ Action::LayerParamConnect::get_param_vocab()
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode"))
        );
-       
+
        return ret;
 }
 
@@ -93,21 +93,21 @@ Action::LayerParamConnect::set_param(const synfig::String& name, const Action::P
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=param.get_value_node();
-               
+
                return true;
        }
 
        if(name=="param" && param.get_type()==Param::TYPE_STRING)
        {
                param_name=param.get_string();
-               
+
                return true;
        }
 
@@ -123,7 +123,7 @@ Action::LayerParamConnect::is_ready()const
                synfig::warning("Action::LayerParamConnect: Missing \"value_node\"");
        if(param_name.empty())
                synfig::warning("Action::LayerParamConnect: Missing \"param\"");
-       
+
        if(!layer || !value_node || param_name.empty())
                return false;
        return Action::CanvasSpecific::is_ready();
@@ -142,11 +142,11 @@ Action::LayerParamConnect::perform()
 
        old_value=layer->get_param(param_name);
        if(!old_value.is_valid())
-               throw Error(_("Layer did not recognise parameter name"));               
+               throw Error(_("Layer did not recognise parameter name"));
 
        if(!layer->set_param(param_name,(*value_node)(0)))
                throw Error(_("Bad connection"));
-       
+
        layer->connect_dynamic_param(param_name,value_node);
 
        layer->changed();
@@ -169,7 +169,7 @@ Action::LayerParamConnect::undo()
                layer->disconnect_dynamic_param(param_name);
                layer->set_param(param_name,old_value);
        }
-       
+
        layer->changed();
        if(old_value_node)
                old_value_node->changed();
@@ -179,7 +179,7 @@ Action::LayerParamConnect::undo()
        else
                set_dirty(false);
        */
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
index 49e9f95..68c55c3 100644 (file)
@@ -61,14 +61,14 @@ ACTION_SET_CVS_ID(Action::LayerParamDisconnect,"$Id: layerparamdisconnect.cpp,v
 Action::LayerParamDisconnect::LayerParamDisconnect():
        time(0)
 {
-       
+
 }
 
 Action::ParamVocab
 Action::LayerParamDisconnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
        );
@@ -81,7 +81,7 @@ Action::LayerParamDisconnect::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -97,21 +97,21 @@ Action::LayerParamDisconnect::set_param(const synfig::String& name, const Action
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="param" && param.get_type()==Param::TYPE_STRING)
        {
                param_name=param.get_string();
-               
+
                return true;
        }
 
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -134,7 +134,7 @@ Action::LayerParamDisconnect::perform()
 
        old_value_node=layer->dynamic_param_list().find(param_name)->second;
        layer->disconnect_dynamic_param(param_name);
-       
+
        if(new_value_node || ValueNode_DynamicList::Handle::cast_dynamic(old_value_node))
        {
                if(!new_value_node)
@@ -143,12 +143,12 @@ Action::LayerParamDisconnect::perform()
        }
        else
                layer->set_param(param_name,(*old_value_node)(time));
-       
+
        layer->changed();
        old_value_node->changed();
 
        set_dirty(false);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
@@ -159,7 +159,7 @@ void
 Action::LayerParamDisconnect::undo()
 {
        layer->connect_dynamic_param(param_name,old_value_node);
-       
+
 /*     if(layer->active() && get_canvas()->get_time()!=time)
                set_dirty(true);
        else
index de500cb..fbd559b 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::LayerParamSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
        );
@@ -77,7 +77,7 @@ Action::LayerParamSet::get_param_vocab()
        ret.push_back(ParamDesc("new_value",Param::TYPE_VALUE)
                .set_local_name(_("ValueBase"))
        );
-       
+
        return ret;
 }
 
@@ -93,21 +93,21 @@ Action::LayerParamSet::set_param(const synfig::String& name, const Action::Param
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="new_value" && param.get_type()==Param::TYPE_VALUE)
        {
                new_value=param.get_value();
-               
+
                return true;
        }
 
        if(name=="param" && param.get_type()==Param::TYPE_STRING)
        {
                param_name=param.get_string();
-               
+
                return true;
        }
 
@@ -130,7 +130,7 @@ Action::LayerParamSet::perform()
                throw Error(_("ValueNode attached to Parameter."));
 
        old_value=layer->get_param(param_name);
-       
+
        if(!layer->set_param(param_name,new_value))
                throw Error(_("Layer did not accept parameter."));
 
@@ -140,7 +140,7 @@ Action::LayerParamSet::perform()
                set_dirty(false);
        */
        layer->changed();
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
@@ -160,9 +160,9 @@ Action::LayerParamSet::undo()
        else
                set_dirty(false);
        */
-       
+
        layer->changed();
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
index 1efbb8e..3e29bea 100644 (file)
@@ -66,13 +66,13 @@ Action::ParamVocab
 Action::LayerRaise::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be raised"))
                .set_supports_multiple()
        );
-       
+
        return ret;
 }
 
@@ -92,7 +92,7 @@ Action::LayerRaise::set_param(const synfig::String& name, const Action::Param &p
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layers.push_back(param.get_layer());
-               
+
                return true;
        }
 
@@ -113,40 +113,40 @@ Action::LayerRaise::prepare()
        std::list<synfig::Layer::Handle>::reverse_iterator iter;
 
        clear();
-       
+
        for(iter=layers.rbegin();!(iter==layers.rend());++iter)
        {
                Layer::Handle layer(*iter);
-               
+
                Canvas::Handle subcanvas(layer->get_canvas());
-               
+
                // Find the iterator for the layer
                Canvas::iterator iter=find(subcanvas->begin(),subcanvas->end(),layer);
-               
+
                // If we couldn't find the layer in the canvas, then bail
                if(*iter!=layer)
                        throw Error(_("This layer doesn't exist anymore."));
-       
+
                // If the subcanvas isn't the same as the canvas,
                // then it had better be an inline canvas. If not,
                // bail
                //if(get_canvas()!=subcanvas && !subcanvas->is_inline())
                //      throw Error(_("This layer doesn't belong to this canvas anymore"));
-               
+
                int new_index=iter-subcanvas->begin();
-               
+
                if(new_index==0)
                        continue;
-               
+
                new_index--;
-               
+
                Action::Handle layer_move(LayerMove::create());
-               
+
                layer_move->set_param("canvas",get_canvas());
                layer_move->set_param("canvas_interface",get_canvas_interface());
                layer_move->set_param("layer",layer);
                layer_move->set_param("new_index",new_index);
-               
+
                add_action_front(layer_move);
        }
 }
index 4fd7b0f..e5b9079 100644 (file)
@@ -65,13 +65,13 @@ Action::ParamVocab
 Action::LayerRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be deleted"))
                .set_supports_multiple()
        );
-       
+
        return ret;
 }
 
@@ -89,7 +89,7 @@ Action::LayerRemove::set_param(const synfig::String& name, const Action::Param &
                std::pair<synfig::Layer::Handle,int> layer_pair;
                layer_pair.first=param.get_layer();
                layer_list.push_back(layer_pair);
-               
+
                return true;
        }
 
@@ -116,7 +116,7 @@ Action::LayerRemove::perform()
 
                // Find the iterator for the layer
                Canvas::iterator iter2=find(subcanvas->begin(),subcanvas->end(),layer);
-               
+
                // If we couldn't find the layer in the canvas, then bail
                if(*iter2!=layer)
                {
@@ -124,7 +124,7 @@ Action::LayerRemove::perform()
                        **      before we go throwing shit around */
                        throw Error(_("This layer doesn't exist anymore."));
                }
-               
+
                // If the subcanvas isn't the same as the canvas,
                // then it had better be an inline canvas. If not,
                // bail
@@ -134,18 +134,18 @@ Action::LayerRemove::perform()
                        **      before we go throwing shit around */
                        throw Error(_("This layer doesn't belong to this canvas anymore"));
                }
-               
+
                set_canvas(subcanvas);
-               
+
                // Calculate the depth that the layer was at (For the undo)
                iter->second=layer->get_depth();
-       
+
                // Mark ourselves as dirty if necessary
                set_dirty(layer->active());
-                       
+
                // Remove the layer from the canvas
                subcanvas->erase(iter2);
-               
+
                // Signal that a layer has been removed
                if(get_canvas_interface())
                        get_canvas_interface()->signal_layer_removed()(layer);
@@ -157,23 +157,23 @@ Action::LayerRemove::undo()
 {
        std::list<std::pair<synfig::Layer::Handle,int> >::reverse_iterator iter;
        for(iter=layer_list.rbegin();iter!=layer_list.rend();++iter)
-       {       
+       {
                Layer::Handle layer(iter->first);
                int& depth(iter->second);
-               
+
                // Set the layer's canvas
                layer->set_canvas(get_canvas());
-       
+
                // Make sure that the depth is valid
                if(get_canvas()->size()<depth)
                        depth=get_canvas()->size();
-               
+
                // Mark ourselves as dirty if necessary
                set_dirty(layer->active());
-       
+
                // Insert the layer into the canvas at the desired depth
-               get_canvas()->insert(get_canvas()->begin()+depth,layer);        
-               
+               get_canvas()->insert(get_canvas()->begin()+depth,layer);
+
                // Signal that a layer has been inserted
                if(get_canvas_interface())
                        get_canvas_interface()->signal_layer_inserted()(layer,depth);
index 5f35bc3..1b75122 100644 (file)
@@ -50,7 +50,7 @@ class LayerRemove :
 private:
 
        std::list<std::pair<synfig::Layer::Handle,int> > layer_list;
-       
+
        //synfig::Layer::Handle layer;
        //int depth;
 
index 5018de2..f08a8bc 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::LayerSetDesc::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
                .set_desc(_("Layer to be moved"))
@@ -78,7 +78,7 @@ Action::LayerSetDesc::get_param_vocab()
                .set_local_name(_("Enter a new description for this layer"))
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -94,14 +94,14 @@ Action::LayerSetDesc::set_param(const synfig::String& name, const Action::Param
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="new_description" && param.get_type()==Param::TYPE_STRING)
        {
                new_description=param.get_string();
-               
+
                return true;
        }
 
index 1c8f2e6..8e34ac9 100644 (file)
@@ -76,34 +76,34 @@ Action::ParamVocab
 Action::TimepointsCopy::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("addlayer",Param::TYPE_VALUE)
                .set_local_name(_("New Selected Layer"))
                .set_desc(_("A layer to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addcanvas",Param::TYPE_CANVAS)
                .set_local_name(_("New Selected Canvas"))
                .set_desc(_("A canvas to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addvaluedesc",Param::TYPE_VALUEDESC)
                .set_local_name(_("New Selected ValueBase"))
                .set_desc(_("A valuenode's description to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addtime",Param::TYPE_TIME)
                .set_local_name(_("New Selected Time Point"))
                .set_desc(_("A time point to add to our selected list"))
                .set_supports_multiple()
        );
-       
+
        ret.push_back(ParamDesc("deltatime",Param::TYPE_TIME)
                .set_local_name(_("Time adjustment"))
                .set_desc(_("The amount of time to adjust all the selected points"))
@@ -115,11 +115,11 @@ Action::TimepointsCopy::get_param_vocab()
 bool
 Action::TimepointsCopy::is_candidate(const ParamList &x)
 {
-       if(!candidate_check(get_param_vocab(),x)) 
+       if(!candidate_check(get_param_vocab(),x))
                return false;
-       
-       if(     x.find("addlayer") == x.end() && 
-               x.find("addcanvas") == x.end() && 
+
+       if(     x.find("addlayer") == x.end() &&
+               x.find("addcanvas") == x.end() &&
                x.find("addvaluedesc") == x.end())
                return false;
        return true;
@@ -133,42 +133,42 @@ Action::TimepointsCopy::set_param(const synfig::String& name, const Action::Para
                //add a layer to the list
                sel_layers.push_back(param.get_layer());
                //synfig::info("action got layer");
-               
+
                return true;
        }
-       
+
        if(name=="addcanvas" && param.get_type()==Param::TYPE_CANVAS)
        {
                //add a layer to the list
                sel_canvases.push_back(param.get_canvas());
                //synfig::info("action got canvas");
-               
+
                return true;
        }
-       
+
        if(name=="addvaluedesc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                //add a layer to the list
                sel_values.push_back(param.get_value_desc());
                //synfig::info("action got valuedesc");
-               
+
                return true;
        }
-       
+
        if(name=="addtime" && param.get_type()==Param::TYPE_TIME)
        {
                //add a layer to the list
                sel_times.insert(param.get_time());
                //synfig::info("action got time");
-               
+
                return true;
        }
-       
+
        if(name=="deltatime" && param.get_type()==Param::TYPE_TIME)
        {
                timedelta = param.get_time();
                //synfig::info("action got time to move");
-               
+
                return true;
        }
 
@@ -187,61 +187,61 @@ void
 Action::TimepointsCopy::prepare()
 {
        clear();
-       
+
        //synfig::info("Preparing TimepointsCopy by %f secs",(float)timemove);
-       
+
        if(sel_times.empty()) return;
-       
+
        //all our lists should be set correctly...
 
        //build our sub-action list
-       //      and yes we do need to store it temporarily so we don't duplicate 
+       //      and yes we do need to store it temporarily so we don't duplicate
        //              an operation on a specific valuenode, etc....
        timepoints_ref  match;
-       
+
        Time fps = get_canvas()->rend_desc().get_frame_rate();
-       
+
        //std::vector<synfig::Layer::Handle>
        //synfig::info("Layers %d", sel_layers.size());
        {
                std::vector<synfig::Layer::Handle>::iterator i = sel_layers.begin(),
                                                                                                        end = sel_layers.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a layer");
                        recurse_layer(*i,sel_times,match);
                }
        }
-       
+
        //std::vector<synfig::Canvas::Handle>   sel_canvases;
        //synfig::info("Canvases %d", sel_canvases.size());
        {
                std::vector<synfig::Canvas::Handle>::iterator   i = sel_canvases.begin(),
                                                                                                                end = sel_canvases.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a canvas");
                        recurse_canvas(*i,sel_times,match);
                }
        }
-       
+
        //std::vector<synfigapp::ValueDesc>
        //synfig::info("ValueBasedescs %d", sel_values.size());
        {
                std::vector<synfigapp::ValueDesc>::iterator     i = sel_values.begin(),
                                                                                                        end = sel_values.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a valuedesc");
                        recurse_valuedesc(*i,sel_times,match);
                }
        }
-       
+
        //synfig::info("built list of waypoints/activepoints to modify");
-       //synfig::info("\t There are %d waypoint sets and %d activepointsets", 
+       //synfig::info("\t There are %d waypoint sets and %d activepointsets",
        //                              match.waypointbiglist.size(), match.actpointbiglist.size());
        //process the hell out of em...
        {
@@ -252,29 +252,29 @@ Action::TimepointsCopy::prepare()
                {
                        //iterate through each waypoint for this specific valuenode
                        std::set<synfig::Waypoint>::const_iterator      j = i->waypoints.begin(),
-                                                                                                               end = i->waypoints.end();                       
+                                                                                                               end = i->waypoints.end();
                        for(; j != end; ++j)
                        {
                                Action::Handle action(WaypointSimpleAdd::create());
-               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",ValueNode::Handle(i->val));
-                               
+
                                //synfig::info("add waypoint mod...");
                                //NOTE: We may want to store the old time for undoing the action...
                                Waypoint neww;
                                Waypoint w = *j;
                                w.set_time((w.get_time() + timedelta).round(fps));
                                w.mimic(neww); //make sure the new waypoint has a new id
-                               
+
                                action->set_param("waypoint",w);
-                               
+
                                //run the action now that we've added everything
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                               
+
                                add_action_front(action);
                        }
                }
@@ -291,25 +291,25 @@ Action::TimepointsCopy::prepare()
                        for(; j != jend; ++j)
                        {
                                Action::Handle action(ActivepointSimpleAdd::create());
-                                       
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_desc",i->val);
-                               
+
                                //NOTE: We may want to store the old time for undoing the action...
                                Activepoint newa;
                                Activepoint a = *j;
                                a.set_time((a.get_time() + timedelta).round(fps));
                                a.mimic(newa); //make sure the new activepoint has a new id
-                               
+
                                action->set_param("activepoint",a);
-                               
+
                                assert(action->is_ready());
                                if(!action->is_ready())
                                {
                                        throw Error(Error::TYPE_NOTREADY);
                                }
-                       
+
                                add_action_front(action);
                        }
                }
index e82394b..34f8aae 100644 (file)
@@ -49,13 +49,13 @@ class TimepointsCopy :
        public Super
 {
 private:
-       
+
        //process all the value descriptions that are selected (or are in subselections)
        std::vector<synfig::Layer::Handle>      sel_layers;
        std::vector<synfig::Canvas::Handle>     sel_canvases;
        std::vector<synfigapp::ValueDesc>       sel_values;
        std::set<synfig::Time>                          sel_times;
-       
+
        synfig::Time                                                    timedelta;
 
 public:
index 5c2039b..f38052a 100644 (file)
@@ -75,45 +75,45 @@ Action::ParamVocab
 Action::TimepointsDelete::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("addlayer",Param::TYPE_VALUE)
                .set_local_name(_("New Selected Layer"))
                .set_desc(_("A layer to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addcanvas",Param::TYPE_CANVAS)
                .set_local_name(_("New Selected Canvas"))
                .set_desc(_("A canvas to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addvaluedesc",Param::TYPE_VALUEDESC)
                .set_local_name(_("New Selected ValueBase"))
                .set_desc(_("A valuenode's description to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addtime",Param::TYPE_TIME)
                .set_local_name(_("New Selected Time Point"))
                .set_desc(_("A time point to add to our selected list"))
                .set_supports_multiple()
        );
-       
+
        return ret;
 }
 
 bool
 Action::TimepointsDelete::is_candidate(const ParamList &x)
 {
-       if(!candidate_check(get_param_vocab(),x)) 
+       if(!candidate_check(get_param_vocab(),x))
                return false;
-       
-       if(     x.find("addlayer") == x.end() && 
-               x.find("addcanvas") == x.end() && 
+
+       if(     x.find("addlayer") == x.end() &&
+               x.find("addcanvas") == x.end() &&
                x.find("addvaluedesc") == x.end())
                return false;
        return true;
@@ -126,31 +126,31 @@ Action::TimepointsDelete::set_param(const synfig::String& name, const Action::Pa
        {
                //add a layer to the list
                sel_layers.push_back(param.get_layer());
-               
+
                return true;
        }
-       
+
        if(name=="addcanvas" && param.get_type()==Param::TYPE_CANVAS)
        {
                //add a layer to the list
                sel_canvases.push_back(param.get_canvas());
-               
+
                return true;
        }
-       
+
        if(name=="addvaluedesc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                //add a layer to the list
                sel_values.push_back(param.get_value_desc());
-               
+
                return true;
        }
-       
+
        if(name=="addtime" && param.get_type()==Param::TYPE_TIME)
        {
                //add a layer to the list
                sel_times.insert(param.get_time());
-               
+
                return true;
        }
 
@@ -169,57 +169,57 @@ void
 Action::TimepointsDelete::prepare()
 {
        clear();
-       
+
        if(sel_times.empty()) return;
-       
+
        //all our lists should be set correctly...
 
        //build our sub-action list
-       //      and yes we do need to store it temporarily so we don't duplicate 
+       //      and yes we do need to store it temporarily so we don't duplicate
        //              an operation on a specific valuenode, etc....
        timepoints_ref  match;
-       
+
        Time fps = get_canvas()->rend_desc().get_frame_rate();
-       
+
        //std::vector<synfig::Layer::Handle>
        //synfig::info("Layers %d", sel_layers.size());
        {
                std::vector<synfig::Layer::Handle>::iterator i = sel_layers.begin(),
                                                                                                        end = sel_layers.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a layer");
                        recurse_layer(*i,sel_times,match);
                }
        }
-       
+
        //std::vector<synfig::Canvas::Handle>   sel_canvases;
        //synfig::info("Canvases %d", sel_canvases.size());
        {
                std::vector<synfig::Canvas::Handle>::iterator   i = sel_canvases.begin(),
                                                                                                                end = sel_canvases.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a canvas");
                        recurse_canvas(*i,sel_times,match);
                }
        }
-       
+
        //std::vector<synfigapp::ValueDesc>
        //synfig::info("ValueBasedescs %d", sel_values.size());
        {
                std::vector<synfigapp::ValueDesc>::iterator     i = sel_values.begin(),
                                                                                                        end = sel_values.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a valuedesc");
                        recurse_valuedesc(*i,sel_times,match);
                }
        }
-       
+
        //process the hell out of em...
        {
                //must build from both lists
@@ -229,21 +229,21 @@ Action::TimepointsDelete::prepare()
                {
                        //iterate through each waypoint for this specific valuenode
                        std::set<synfig::Waypoint>::const_iterator      j = i->waypoints.begin(),
-                                                                                                               end = i->waypoints.end();                       
+                                                                                                               end = i->waypoints.end();
                        for(; j != end; ++j)
                        {
                                Action::Handle action(WaypointRemove::create());
-               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",ValueNode::Handle(i->val));
                                action->set_param("waypoint",*j);
-                               
+
                                //run the action now that we've added everything
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                               
+
                                add_action_front(action);
                        }
                }
@@ -260,19 +260,19 @@ Action::TimepointsDelete::prepare()
                        for(; j != jend; ++j)
                        {
                                Action::Handle action(ActivepointRemove::create());
-                                       
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_desc",i->val);
                                action->set_param("activepoint",*j);
-                               
+
                                //run the action now that everything should be in order
                                assert(action->is_ready());
                                if(!action->is_ready())
                                {
                                        throw Error(Error::TYPE_NOTREADY);
                                }
-                       
+
                                add_action_front(action);
                        }
                }
index 901da75..4267e3f 100644 (file)
@@ -49,7 +49,7 @@ class TimepointsDelete :
        public Super
 {
 private:
-       
+
        //process all the value descriptions that are selected (or are in subselections)
        std::vector<synfig::Layer::Handle>      sel_layers;
        std::vector<synfig::Canvas::Handle>     sel_canvases;
index 9799356..aefb069 100644 (file)
@@ -76,34 +76,34 @@ Action::ParamVocab
 Action::TimepointsMove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("addlayer",Param::TYPE_VALUE)
                .set_local_name(_("New Selected Layer"))
                .set_desc(_("A layer to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addcanvas",Param::TYPE_CANVAS)
                .set_local_name(_("New Selected Canvas"))
                .set_desc(_("A canvas to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addvaluedesc",Param::TYPE_VALUEDESC)
                .set_local_name(_("New Selected ValueBase"))
                .set_desc(_("A valuenode's description to add to our selected list"))
                .set_supports_multiple()
                .set_optional()
        );
-       
+
        ret.push_back(ParamDesc("addtime",Param::TYPE_TIME)
                .set_local_name(_("New Selected Time Point"))
                .set_desc(_("A time point to add to our selected list"))
                .set_supports_multiple()
        );
-       
+
        ret.push_back(ParamDesc("deltatime",Param::TYPE_TIME)
                .set_local_name(_("Time adjustment"))
                .set_desc(_("The amount of time to adjust all the selected points"))
@@ -115,11 +115,11 @@ Action::TimepointsMove::get_param_vocab()
 bool
 Action::TimepointsMove::is_candidate(const ParamList &x)
 {
-       if(!candidate_check(get_param_vocab(),x)) 
+       if(!candidate_check(get_param_vocab(),x))
                return false;
-       
-       if(     x.find("addlayer") == x.end() && 
-               x.find("addcanvas") == x.end() && 
+
+       if(     x.find("addlayer") == x.end() &&
+               x.find("addcanvas") == x.end() &&
                x.find("addvaluedesc") == x.end())
                return false;
        return true;
@@ -133,42 +133,42 @@ Action::TimepointsMove::set_param(const synfig::String& name, const Action::Para
                //add a layer to the list
                sel_layers.push_back(param.get_layer());
                //synfig::info("action got layer");
-               
+
                return true;
        }
-       
+
        if(name=="addcanvas" && param.get_type()==Param::TYPE_CANVAS)
        {
                //add a layer to the list
                sel_canvases.push_back(param.get_canvas());
                //synfig::info("action got canvas");
-               
+
                return true;
        }
-       
+
        if(name=="addvaluedesc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                //add a layer to the list
                sel_values.push_back(param.get_value_desc());
                //synfig::info("action got valuedesc");
-               
+
                return true;
        }
-       
+
        if(name=="addtime" && param.get_type()==Param::TYPE_TIME)
        {
                //add a layer to the list
                sel_times.insert(param.get_time());
                //synfig::info("action got time");
-               
+
                return true;
        }
-       
+
        if(name=="deltatime" && param.get_type()==Param::TYPE_TIME)
        {
                timemove = param.get_time();
                //synfig::info("action got time to move");
-               
+
                return true;
        }
 
@@ -187,70 +187,70 @@ void
 Action::TimepointsMove::prepare()
 {
        clear();
-       
+
        //synfig::info("Preparing TimepointsMove by %f secs",(float)timemove);
-       
+
        if(sel_times.empty()) return;
-       
+
        //all our lists should be set correctly...
-       
+
        /*{
                std::set<synfig::Time>::iterator i = sel_times.begin(), end = sel_times.end();
-               
+
                for(; i != end; ++i)
                {
                        synfig::info("Time %f", (float)*i);
-               }               
+               }
        }*/
 
        //build our sub-action list
-       //      and yes we do need to store it temporarily so we don't duplicate 
+       //      and yes we do need to store it temporarily so we don't duplicate
        //              an operation on a specific valuenode, etc....
        timepoints_ref  match;
-       
+
        Time fps = get_canvas()->rend_desc().get_frame_rate();
-       
+
        //std::vector<synfig::Layer::Handle>
        //synfig::info("Layers %d", sel_layers.size());
        {
                std::vector<synfig::Layer::Handle>::iterator i = sel_layers.begin(),
                                                                                                        end = sel_layers.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a layer");
                        recurse_layer(*i,sel_times,match);
                }
        }
-       
+
        //std::vector<synfig::Canvas::Handle>   sel_canvases;
        //synfig::info("Canvases %d", sel_canvases.size());
        {
                std::vector<synfig::Canvas::Handle>::iterator   i = sel_canvases.begin(),
                                                                                                                end = sel_canvases.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a canvas");
                        recurse_canvas(*i,sel_times,match);
                }
        }
-       
+
        //std::vector<synfigapp::ValueDesc>
        //synfig::info("ValueBasedescs %d", sel_values.size());
        {
                std::vector<synfigapp::ValueDesc>::iterator     i = sel_values.begin(),
                                                                                                        end = sel_values.end();
-               
+
                for(; i != end; ++i)
                {
                        //synfig::info("Recurse through a valuedesc");
                        recurse_valuedesc(*i,sel_times,match);
                }
        }
-       
+
        //synfig::info("built list of waypoints/activepoints to modify");
-       //synfig::info("\t There are %d waypoint sets and %d activepointsets", 
+       //synfig::info("\t There are %d waypoint sets and %d activepointsets",
        //                              match.waypointbiglist.size(), match.actpointbiglist.size());
        //process the hell out of em...
        {
@@ -260,28 +260,28 @@ Action::TimepointsMove::prepare()
                for(; i != end; ++i)
                {
                        Action::Handle action(WaypointSet::create());
-               
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_node",ValueNode::Handle(i->val));
-                       
+
                        //iterate through each waypoint for this specific valuenode
                        std::set<synfig::Waypoint>::const_iterator      j = i->waypoints.begin(),
-                                                                                                               end = i->waypoints.end();                       
+                                                                                                               end = i->waypoints.end();
                        for(; j != end; ++j)
-                       {                               
+                       {
                                //synfig::info("add waypoint mod...");
                                //NOTE: We may want to store the old time for undoing the action...
                                Waypoint w = *j;
                                w.set_time((w.get_time() + timemove).round(fps));
                                action->set_param("waypoint",w);
                        }
-                       
+
                        //run the action now that we've added everything
                        assert(action->is_ready());
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-                       
+
                        add_action_front(action);
                }
        }
@@ -292,30 +292,30 @@ Action::TimepointsMove::prepare()
                for(; i != end; ++i)
                {
                        Action::Handle action(ActivepointSet::create());
-                                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("value_desc",i->val);
-                       
+
                        //iterate through each activepoint for this specific valuenode
                        std::set<synfig::Activepoint>::const_iterator   j = i->activepoints.begin(),
                                                                                                                        jend = i->activepoints.end();
                        for(; j != jend; ++j)
                        {
                                //synfig::info("add activepoint mod...");
-                               
+
                                //NOTE: We may want to store the old time for undoing the action...
                                Activepoint a = *j;
                                a.set_time((a.get_time() + timemove).round(fps));
                                action->set_param("activepoint",a);
                        }
-                       
+
                        assert(action->is_ready());
                        if(!action->is_ready())
                        {
                                throw Error(Error::TYPE_NOTREADY);
                        }
-               
+
                        add_action_front(action);
                }
        }
index b42e954..5a91126 100644 (file)
@@ -52,13 +52,13 @@ class TimepointsMove :
        public Super
 {
 private:
-       
+
        //process all the value descriptions that are selected (or are in subselections)
        std::vector<synfig::Layer::Handle>      sel_layers;
        std::vector<synfig::Canvas::Handle>     sel_canvases;
        std::vector<synfigapp::ValueDesc>       sel_values;
        std::set<synfig::Time>                          sel_times;
-       
+
        synfig::Time                                                    timemove;
 
 public:
index 7b0c465..45783fb 100644 (file)
@@ -69,7 +69,7 @@ Action::ParamVocab
 Action::ValueDescConnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("dest",Param::TYPE_VALUEDESC)
                .set_local_name(_("Destination ValueDesc"))
        );
@@ -84,7 +84,7 @@ Action::ValueDescConnect::get_param_vocab()
                .set_mutual_exclusion("src")
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -97,7 +97,7 @@ Action::ValueDescConnect::is_candidate(const ParamList &x)
                {
                        ValueDesc value_desc=x.find("dest")->second.get_value_desc();
                        ValueNode::Handle value_node=x.find("src")->second.get_value_node();
-                       if(value_desc.get_value_type()==value_node->get_type()) 
+                       if(value_desc.get_value_type()==value_node->get_type())
                                return true;
                }
                return true;
@@ -111,14 +111,14 @@ Action::ValueDescConnect::set_param(const synfig::String& name, const Action::Pa
        if(name=="dest" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                return true;
        }
 
        if(name=="src" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=param.get_value_node();
-               
+
                return true;
        }
 
@@ -126,21 +126,21 @@ Action::ValueDescConnect::set_param(const synfig::String& name, const Action::Pa
        {
                value_node=param.get_canvas()->find_value_node(value_node_name);
        }
-       
+
        if(name=="src_name" && param.get_type()==Param::TYPE_STRING)
        {
                value_node_name=param.get_string();
-               
+
                if(get_canvas())
                {
                        value_node=get_canvas()->find_value_node(value_node_name);
                        if(!value_node)
                                return false;
                }
-               
+
                return true;
        }
-       
+
        return Action::CanvasSpecific::set_param(name,param);
 }
 
@@ -158,60 +158,60 @@ Action::ValueDescConnect::prepare()
        clear();
 
        if(value_desc.parent_is_canvas())
-       {                               
+       {
                ValueNode::Handle dest_value_node;
                dest_value_node=value_desc.get_value_node();
 
                Action::Handle action(ValueNodeReplace::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("src",value_node);
                action->set_param("dest",value_desc.get_value_node());
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
        else
        if(value_desc.parent_is_linkable_value_node())
        {
                Action::Handle action(ValueNodeLinkConnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("parent_value_node",value_desc.get_parent_value_node());
                action->set_param("value_node", value_node);
                action->set_param("index",value_desc.get_index());
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
        else
        if(value_desc.parent_is_layer_param())
        {
                Action::Handle action(LayerParamConnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("layer",value_desc.get_layer());
                action->set_param("param",value_desc.get_param_name());
                action->set_param("value_node",value_node);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
-       
-       throw Error(_("ValueDesc is not recognised or supported."));    
+
+       throw Error(_("ValueDesc is not recognised or supported."));
 }
index c4c9f56..6f8977b 100644 (file)
@@ -75,7 +75,7 @@ Action::ParamVocab
 Action::ValueDescConvert::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -84,7 +84,7 @@ Action::ValueDescConvert::get_param_vocab()
                .set_local_name(_("Type"))
                .set_desc(_("The type of ValueNode that you want to be converted to"))
        );
-       
+
        return ret;
 }
 
@@ -100,14 +100,14 @@ Action::ValueDescConvert::set_param(const synfig::String& name, const Action::Pa
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                return true;
        }
 
        if(name=="type" && param.get_type()==Param::TYPE_STRING)
        {
                type=param.get_string();
-               
+
                return true;
        }
 
@@ -128,25 +128,25 @@ Action::ValueDescConvert::prepare()
        clear();
 
        ValueBase value;
-       
+
        if(value_desc.is_const())
                value=value_desc.get_value();
        else if(value_desc.is_value_node())
                value=(*value_desc.get_value_node())(0);
        else
                throw Error(_("Unable to decipher ValueDesc (Bug?)"));
-       
+
        ValueNode::Handle src_value_node(LinkableValueNode::create(type,value));
 
        if(!src_value_node)
                throw Error(_("Unable to create new value node"));
 
-       
+
        ValueNode::Handle dest_value_node;
        dest_value_node=value_desc.get_value_node();
 
        Action::Handle action(ValueDescConnect::create());
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",get_canvas_interface());
        action->set_param("src",src_value_node);
@@ -159,67 +159,67 @@ Action::ValueDescConvert::prepare()
        add_action_front(action);
 
 /*
-       return;         
+       return;
+
 
-               
        if(value_desc.parent_is_canvas())
-       {                               
+       {
                ValueNode::Handle dest_value_node;
                dest_value_node=value_desc.get_value_node();
 
                Action::Handle action(ValueNodeReplace::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("src",src_value_node);
                action->set_param("dest",dest_value_node);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
        else
        if(value_desc.parent_is_linkable_value_node())
        {
                Action::Handle action(ValueNodeLinkConnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("parent_value_node",value_desc.get_parent_value_node());
                action->set_param("value_node", src_value_node);
                action->set_param("index",value_desc.get_index());
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
        else
        if(value_desc.parent_is_layer_param())
        {
                Action::Handle action(LayerParamConnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("layer",value_desc.get_layer());
                action->set_param("param",value_desc.get_param_name());
                action->set_param("value_node",src_value_node);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
-       
-       
-       
-       throw Error(_("ValueDesc is not recognised or supported."));    
+
+
+
+       throw Error(_("ValueDesc is not recognised or supported."));
 */
 }
index 2473b80..2efc2e6 100644 (file)
@@ -71,7 +71,7 @@ Action::ParamVocab
 Action::ValueDescDisconnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -80,7 +80,7 @@ Action::ValueDescDisconnect::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -107,14 +107,14 @@ Action::ValueDescDisconnect::set_param(const synfig::String& name, const Action:
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                return true;
        }
 
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -135,60 +135,60 @@ Action::ValueDescDisconnect::prepare()
        clear();
 
        if(value_desc.parent_is_canvas())
-       {                               
+       {
                ValueNode::Handle src_value_node;
                src_value_node=ValueNode_Const::create((*value_desc.get_value_node())(time));
 
                Action::Handle action(ValueNodeReplace::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("src",src_value_node);
                action->set_param("dest",value_desc.get_value_node());
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
        else
        if(value_desc.parent_is_linkable_value_node())
        {
                Action::Handle action(ValueNodeLinkDisconnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("parent_value_node",value_desc.get_parent_value_node());
                action->set_param("index",value_desc.get_index());
                action->set_param("time",time);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
        else
        if(value_desc.parent_is_layer_param())
        {
                Action::Handle action(LayerParamDisconnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("layer",value_desc.get_layer());
                action->set_param("param",value_desc.get_param_name());
                action->set_param("time",time);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
-               return;         
+               return;
        }
-       
-       throw Error(_("ValueDesc is not recognised or supported."));    
+
+       throw Error(_("ValueDesc is not recognised or supported."));
 }
index eed8056..3a517a5 100644 (file)
@@ -71,7 +71,7 @@ Action::ParamVocab
 Action::ValueDescExport::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -81,7 +81,7 @@ Action::ValueDescExport::get_param_vocab()
                .set_desc(_("The name that you want this value to be exported as"))
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -95,7 +95,7 @@ Action::ValueDescExport::is_candidate(const ParamList &x)
                        return false;
                return true;
        }
-       return false;           
+       return false;
 }
 
 bool
@@ -104,14 +104,14 @@ Action::ValueDescExport::set_param(const synfig::String& param_name, const Actio
        if(param_name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                return true;
        }
 
        if(param_name=="name" && param.get_type()==Param::TYPE_STRING)
        {
                name=param.get_string();
-               
+
                return true;
        }
 
@@ -138,24 +138,24 @@ Action::ValueDescExport::prepare()
                if(!value_desc.is_const())
                        throw Error(_("Can only export Canvas when used as constant parameter"));
                Canvas::Handle canvas(value_desc.get_value().get(Canvas::Handle()));
-               
+
                Action::Handle action(CanvasAdd::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("src",canvas);
                action->set_param("id",name);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action_front(action);               
-               
+
+               add_action_front(action);
+
                return;
        }
 
-       
+
        if(value_desc.is_value_node())
        {
                if(value_desc.get_value_node()->is_exported())
@@ -167,32 +167,32 @@ Action::ValueDescExport::prepare()
        {
                if(!value_desc.parent_is_layer_param())
                        throw Error(_("Unable to export parameter. (Bug?)"));
-                       
+
                value_node=ValueNode_Const::create(value_desc.get_value());
-               
+
                Action::Handle action(LayerParamConnect::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("layer",value_desc.get_layer());
                action->set_param("param",value_desc.get_param_name());
                action->set_param("value_node",value_node);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action_front(action);               
+
+               add_action_front(action);
        }
-       
+
        Action::Handle action(ValueNodeAdd::create());
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",get_canvas_interface());
        action->set_param("new",value_node);
        action->set_param("name",name);
 
-       assert(action->is_ready());             
+       assert(action->is_ready());
        if(!action->is_ready())
                throw Error(Error::TYPE_NOTREADY);
 
index 52d9477..bfb2fed 100644 (file)
@@ -68,12 +68,12 @@ Action::ParamVocab
 Action::ValueDescLink::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc to link"))
                .set_requires_multiple()
        );
-       
+
        return ret;
 }
 
@@ -91,22 +91,22 @@ Action::ValueDescLink::set_param(const synfig::String& name, const Action::Param
                time=param.get_time();
                return true;
        }
-       
+
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-                               
+
                if(value_desc.is_value_node() && value_desc.get_value_node()->is_exported())
                {
                        if(link_value_node==value_desc.get_value_node())
                                return true;
-                       
+
                        if(link_value_node && link_value_node->is_exported())
                        {
                                poison=true;
                                return false;
                        }
-                                               
+
                        link_value_node=value_desc.get_value_node();
                }
                else if(value_desc.is_value_node())
@@ -142,7 +142,7 @@ Action::ValueDescLink::set_param(const synfig::String& name, const Action::Param
                        {
                                link_value_node=value_desc.get_value_node();
                        }
-                       
+
                        /*
                        // Use the one that was most recently changed
                        else if(link_value_node->get_time_last_changed()<value_desc.get_value_node()->get_time_last_changed())
@@ -152,7 +152,7 @@ Action::ValueDescLink::set_param(const synfig::String& name, const Action::Param
                        */
                }
 
-               
+
                if(value_desc_list.size() && value_desc.get_value_type()!=value_desc_list.front().get_value_type())
                {
                        // Everything must be of the same type
@@ -180,66 +180,66 @@ Action::ValueDescLink::prepare()
 {
        if(poison || value_desc_list.empty())
                throw Error(Error::TYPE_NOTREADY);
-               
+
        clear();
 
        if(!link_value_node)
        {
                ValueDesc& value_desc(value_desc_list.front());
-               
+
                link_value_node=ValueNode_Const::create(value_desc.get_value(time));
-               
+
                Action::Handle action(Action::create("value_desc_connect"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("src",link_value_node);
                action->set_param("dest",value_desc);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action_front(action);               
+
+               add_action_front(action);
        }
 
        /*
        if(!link_value_node->is_exported())
        {
                Action::Handle action(Action::create("value_node_add"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("new",link_value_node);
                action->set_param("name",strprintf(_("Unnamed%08d"),synfig::UniqueID().get_uid()));
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action_front(action);
        }
        */
-       
+
        std::list<ValueDesc>::iterator iter;
        for(iter=value_desc_list.begin();iter!=value_desc_list.end();++iter)
        {
                ValueDesc& value_desc(*iter);
-               
+
                if(value_desc.is_value_node() && value_desc.get_value_node()==link_value_node)
                        continue;
 
                Action::Handle action(Action::create("value_desc_connect"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("src",link_value_node);
                action->set_param("dest",value_desc);
-       
-               assert(action->is_ready());             
+
+               assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action_front(action);               
+
+               add_action_front(action);
        }
 }
index fb114fc..ddc8dcc 100644 (file)
@@ -52,7 +52,7 @@ using namespace Action;
 /* === M A C R O S ========================================================= */
 #define ACTION_INIT2(class) \
        Action::Base* class::create() { return new class(); }   \
-       synfig::String class::get_name()const { return name__; }        
+       synfig::String class::get_name()const { return name__; }
 
 ACTION_INIT2(Action::ValueDescSet);
 ACTION_SET_NAME(Action::ValueDescSet,"value_desc_set");
@@ -78,7 +78,7 @@ synfig::String
 Action::ValueDescSet::get_local_name()const
 {
        String name("ValueDesc");
-       
+
        if(!value_desc)
        {
        }
@@ -94,7 +94,7 @@ Action::ValueDescSet::get_local_name()const
        {
                synfig::LinkableValueNode::Handle value_node(synfig::LinkableValueNode::Handle::cast_reinterpret(value_desc.get_parent_value_node()));
                name=value_node->link_local_name(value_desc.get_index());
-               
+
                synfig::Node* node;
                for(node=value_node.get();!node->parent_set.empty() && !dynamic_cast<Layer*>(node);node=*node->parent_set.begin());
                Layer::Handle parent_layer(dynamic_cast<Layer*>(node));
@@ -114,7 +114,7 @@ Action::ParamVocab
 Action::ValueDescSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -127,7 +127,7 @@ Action::ValueDescSet::get_param_vocab()
                .set_local_name(_("Time"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -143,21 +143,21 @@ Action::ValueDescSet::set_param(const synfig::String& name, const Action::Param
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                value_desc=param.get_value_desc();
-               
+
                return true;
        }
 
        if(name=="new_value" && param.get_type()==Param::TYPE_VALUE)
        {
                value=param.get_value();
-               
+
                return true;
        }
 
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -190,24 +190,24 @@ Action::ValueDescSet::prepare()
                DEBUGPOINT();
                ValueNode_Composite::Handle parent_value_node;
                parent_value_node=parent_value_node.cast_dynamic(value_desc.get_parent_value_node());
-               
+
                assert(parent_value_node);
-               
+
                Action::Handle action(Action::create("value_desc_set"));
-       
+
                if(!action)
                        throw Error(_("Unable to find action value_desc_set (bug)"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("new_value",value);
                action->set_param("value_desc",ValueDesc(parent_value_node,5));
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action(action);                     
+
+               add_action(action);
        }
 
        // If we are a reference value node, then
@@ -221,21 +221,21 @@ Action::ValueDescSet::prepare()
 
                if(!action)
                        throw Error(_("Unable to find action value_desc_set (bug)"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("new_value",value);
                action->set_param("value_desc",reference_value_desc);
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
 
-               add_action(action);                     
-       
+               add_action(action);
+
                return;
        }
-       
+
        // If we are a composite value node, then
        // we need to distribute the changes to the
        // individual parts
@@ -277,35 +277,35 @@ Action::ValueDescSet::prepare()
                        break;
                }
                default:
-                       throw Error("Bad type for composite (%s)",ValueBase::type_name(value.get_type()).c_str());                      
+                       throw Error("Bad type for composite (%s)",ValueBase::type_name(value.get_type()).c_str());
                        break;
                }
-               
+
                for(int i=0;i<n_components;i++)
                {
                        ValueDesc component_value_desc(ValueNode_Composite::Handle::cast_dynamic(value_desc.get_value_node()),i);
 
                        Action::Handle action(Action::create("value_desc_set"));
-       
+
                        if(!action)
                                throw Error(_("Unable to find action value_desc_set (bug)"));
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("time",time);
                        action->set_param("new_value",components[i]);
                        action->set_param("value_desc",component_value_desc);
-                       
+
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-       
-                       add_action(action);                     
+
+                       add_action(action);
                }
-               
+
                return;
        }
 
-       
+
        // If we are a RADIAL composite value node, then
        // we need to distribute the changes to the
        // individual parts
@@ -331,7 +331,7 @@ Action::ValueDescSet::prepare()
                        n_components=4;
                        break;
                default:
-                       throw Error("Bad type for radial composite (%s)",ValueBase::type_name(value.get_type()).c_str());                       
+                       throw Error("Bad type for radial composite (%s)",ValueBase::type_name(value.get_type()).c_str());
                        break;
                }
                for(int i=0;i<n_components;i++)
@@ -339,22 +339,22 @@ Action::ValueDescSet::prepare()
                        ValueDesc component_value_desc(ValueNode_RadialComposite::Handle::cast_dynamic(value_desc.get_value_node()),i);
 
                        Action::Handle action(Action::create("value_desc_set"));
-       
+
                        if(!action)
                                throw Error(_("Unable to find action value_desc_set (bug)"));
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("time",time);
                        action->set_param("new_value",components[i]);
                        action->set_param("value_desc",component_value_desc);
-                       
+
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-       
-                       add_action(action);                     
+
+                       add_action(action);
                }
-               
+
                return;
        }
 
@@ -369,24 +369,24 @@ Action::ValueDescSet::prepare()
        {
                ValueNode_Composite::Handle parent_value_node;
                parent_value_node=parent_value_node.cast_dynamic(value_desc.get_parent_value_node());
-               
+
                assert(parent_value_node);
-               
+
                Action::Handle action(Action::create("value_desc_set"));
-       
+
                if(!action)
                        throw Error(_("Unable to find action value_desc_set (bug)"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("new_value",(*parent_value_node->get_link(4))(time));
                action->set_param("value_desc",ValueDesc(parent_value_node,5));
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
-               add_action(action);                     
+
+               add_action(action);
        }
 
 /*     DEBUGPOINT();
@@ -406,9 +406,9 @@ Action::ValueDescSet::prepare()
                        }
                }
        }
-*/     
+*/
+
 
-       
        // If we are in animate editing mode
        if(get_edit_mode()&MODE_ANIMATE)
        {
@@ -425,12 +425,12 @@ Action::ValueDescSet::prepare()
                                value=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())->get_value();
                        else
                                value=value_desc.get_value();
-                       
+
                        if(!value_node)value_node=ValueNode_Animated::create(value,time);
                        //if(!value_node)value_node=ValueNode_Animated::create(value.get_type());
-                       
+
                        Action::Handle action;
-                       
+
                        if(!value_desc.is_value_node())
                        {
                                action=(ValueDescConnect::create());
@@ -443,13 +443,13 @@ Action::ValueDescSet::prepare()
                                action->set_param("dest",value_desc.get_value_node());
                                action->set_param("src",ValueNode::Handle(value_node));
                        }
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
-                       
+
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-       
+
                                DEBUGPOINT();
                        add_action_front(action);
                }
@@ -457,32 +457,32 @@ Action::ValueDescSet::prepare()
                {
                        value_node=value_node.cast_dynamic(value_desc.get_value_node());
                }
-               
+
                                DEBUGPOINT();
                if(!value_node)
-                       throw Error(_("Direct manipulation of this ValueNode type is not yet supported"));              
-               
+                       throw Error(_("Direct manipulation of this ValueNode type is not yet supported"));
+
                Action::Handle action(WaypointSetSmart::create());
-               
+
                //Waypoint waypoint(value,time);
-               
+
                Waypoint waypoint(value_node->new_waypoint_at_time(time));
                waypoint.set_value(value);
-               
+
                waypoint.set_before(synfigapp::Main::get_interpolation());
                waypoint.set_after(synfigapp::Main::get_interpolation());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle(value_node));
                action->set_param("waypoint",waypoint);
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
 
                                DEBUGPOINT();
                add_action(action);
-               
+
                return;
        }
        else
@@ -492,38 +492,38 @@ Action::ValueDescSet::prepare()
                        if(ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()))
                        {
                                Action::Handle action(ValueNodeConstSet::create());
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",value_desc.get_value_node());
                                action->set_param("new_value",value);
-                               
+
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-               
+
                                add_action_front(action);
                                return;
                        }
                        else
                        if(ValueNode_Animated::Handle::cast_dynamic(value_desc.get_value_node()))
-                               throw Error(_("You must be in Animate-Editing-Mode to directly manipulate this value"));                
+                               throw Error(_("You must be in Animate-Editing-Mode to directly manipulate this value"));
                        else
-                               throw Error(_("Direct manipulation of this ValueNode type is not yet supported"));              
+                               throw Error(_("Direct manipulation of this ValueNode type is not yet supported"));
                }
                else
                if(value_desc.parent_is_layer_param() && !value_desc.is_value_node())
                {
                        Action::Handle layer_param_set(LayerParamSet::create());
-                       
+
                        layer_param_set->set_param("canvas",get_canvas());
                        layer_param_set->set_param("canvas_interface",get_canvas_interface());
                        layer_param_set->set_param("layer",value_desc.get_layer());
                        layer_param_set->set_param("param",value_desc.get_param_name());
                        layer_param_set->set_param("new_value",value);
-       
+
                        if(!layer_param_set->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-                       
+
                        add_action_front(layer_param_set);
                        return;
                }
index c9201fc..0a92232 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::ValueNodeAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("new",Param::TYPE_VALUENODE)
                .set_local_name(_("New ValueNode"))
                .set_desc(_("ValueNode to be added"))
@@ -74,7 +74,7 @@ Action::ValueNodeAdd::get_param_vocab()
        ret.push_back(ParamDesc("name",Param::TYPE_STRING)
                .set_local_name(_("Name"))
        );
-       
+
        return ret;
 }
 
@@ -90,14 +90,14 @@ Action::ValueNodeAdd::set_param(const synfig::String& param_name, const Action::
        if(param_name=="new" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=param.get_value_node();
-               
+
                return true;
        }
 
        if(param_name=="name" && param.get_type()==Param::TYPE_STRING)
        {
                name=param.get_string();
-               
+
                return true;
        }
 
@@ -119,7 +119,7 @@ Action::ValueNodeAdd::perform()
        {
                throw Error(_("Parameter appears to already be exported"));
        }
-       
+
        try
        {
                get_canvas()->add_value_node(value_node,name);
@@ -134,7 +134,7 @@ Action::ValueNodeAdd::perform()
        }
 
        set_dirty(false);
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
@@ -153,7 +153,7 @@ Action::ValueNodeAdd::undo()
        }
 
        set_dirty(false);
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
index 38a5658..16ea545 100644 (file)
@@ -66,7 +66,7 @@ Action::ParamVocab
 Action::ValueNodeConstSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode_Const"))
        );
@@ -74,7 +74,7 @@ Action::ValueNodeConstSet::get_param_vocab()
        ret.push_back(ParamDesc("new_value",Param::TYPE_VALUE)
                .set_local_name(_("ValueBase"))
        );
-       
+
        return ret;
 }
 
@@ -95,14 +95,14 @@ Action::ValueNodeConstSet::set_param(const synfig::String& name, const Action::P
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=ValueNode_Const::Handle::cast_dynamic(param.get_value_node());
-               
+
                return (bool)value_node;
        }
 
        if(name=="new_value" && param.get_type()==Param::TYPE_VALUE)
        {
                new_value=param.get_value();
-               
+
                return true;
        }
 
@@ -121,11 +121,11 @@ void
 Action::ValueNodeConstSet::perform()
 {
        //set_dirty(true);
-       
+
        old_value=value_node->get_value();
 
-       value_node->set_value(new_value);       
-       
+       value_node->set_value(new_value);
+
        // Signal that a layer has been inserted
        /*if(get_canvas_interface())
        {
@@ -138,8 +138,8 @@ Action::ValueNodeConstSet::undo()
 {
        //set_dirty(true);
 
-       value_node->set_value(old_value);       
-       
+       value_node->set_value(old_value);
+
        // Signal that a layer has been inserted
        /*if(get_canvas_interface())
        {
index a0199a2..a29ac67 100644 (file)
@@ -69,7 +69,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListInsert::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -109,12 +109,12 @@ Action::ValueNodeDynamicListInsert::set_param(const synfig::String& name, const
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
 
@@ -125,15 +125,15 @@ Action::ValueNodeDynamicListInsert::set_param(const synfig::String& name, const
                list_entry=value_node->create_list_entry(index,time,origin);
                if(item)
                        list_entry.value_node=item;
-               
+
                assert(list_entry.value_node.rcount()==1);
-                               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
        if(name=="item" && param.get_type()==Param::TYPE_VALUENODE)
@@ -141,13 +141,13 @@ Action::ValueNodeDynamicListInsert::set_param(const synfig::String& name, const
                item=param.get_value_node();
                if(item)
                        list_entry.value_node=item;
-               
+
                return true;
        }
        if(name=="origin" && param.get_type()==Param::TYPE_REAL)
        {
                origin=param.get_real();
-               
+
                return true;
        }
 
@@ -164,13 +164,13 @@ Action::ValueNodeDynamicListInsert::is_ready()const
 
 void
 Action::ValueNodeDynamicListInsert::perform()
-{      
+{
        if(index>value_node->link_count())
                index=value_node->link_count();
-       
+
        value_node->add(list_entry,index);
        assert(list_entry.value_node.rcount()>=2);
-       
+
        // Signal that a layer has been inserted
        value_node->changed();
 /*_if(get_canvas_interface())
@@ -186,7 +186,7 @@ Action::ValueNodeDynamicListInsert::undo()
        assert(list_entry.value_node.rcount()>=2);
        value_node->erase((value_node->list.begin()+index)->value_node);
        assert(list_entry.value_node.rcount()>=1);
-       
+
        // Signal that a layer has been inserted
        value_node->changed();
 /*_if(get_canvas_interface())
index 3376b0c..0019e97 100644 (file)
@@ -70,7 +70,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListInsertSmart::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -106,29 +106,29 @@ Action::ValueNodeDynamicListInsertSmart::set_param(const synfig::String& name, c
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
 
                index=value_desc.get_index();
-                               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
        if(name=="origin" && param.get_type()==Param::TYPE_REAL)
        {
                origin=param.get_real();
-               
+
                return true;
        }
 
@@ -145,12 +145,12 @@ Action::ValueNodeDynamicListInsertSmart::is_ready()const
 
 void
 Action::ValueNodeDynamicListInsertSmart::prepare()
-{      
+{
        //clear();
        // HACK
        if(!first_time())
                return;
-       
+
        // If we are in animate editing mode
        if(get_edit_mode()&MODE_ANIMATE)
        {
@@ -163,87 +163,87 @@ Action::ValueNodeDynamicListInsertSmart::prepare()
                synfig::info("ValueNodeDynamicListInsertSmart: value_node->list.size()=%d",value_node->list.size());
                if(value_node->list.size()<=index && index>0)
                        synfig::info("ValueNodeDynamicListInsertSmart: value_node->list[index-1].status_at_time(time)=%d",value_node->list[index-1].status_at_time(time));
-               
+
                if(value_node->list.size()>=index && index>0 && !value_node->list[index-1].status_at_time(time))
                {
                        // Ok, we do not have to create a new
-                       // entry in the dynamic list after all.                 
+                       // entry in the dynamic list after all.
                        // However, we do need to set the
                        // position and tangent of this point.
                        ValueNode_DynamicList::ListEntry list_entry(value_node->create_list_entry(index,time,origin));
                        ValueBase value((*list_entry.value_node)(time));
                        index--;
-                       
+
                        ValueDesc item_value_desc(value_node,index);
 
                        Action::Handle action(Action::create("value_desc_set"));
-       
+
                        if(!action)
                                throw Error(_("Unable to find action value_desc_set (bug)"));
-                       
+
                        action->set_param("edit_mode",get_edit_mode());
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("time",time);
                        action->set_param("new_value",value);
                        action->set_param("value_desc",ValueDesc(value_node,index));
-                       
+
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-       
-                       add_action(action);                     
+
+                       add_action(action);
                }
                else
                {
                        // Ok, not a big deal, we just need to
                        // add a new item
                        Action::Handle action(Action::create("value_node_dynamic_list_insert"));
-       
+
                        if(!action)
                                throw Error(_("Unable to find action (bug)"));
-                       
+
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("time",time);
                        action->set_param("origin",origin);
                        action->set_param("value_desc",ValueDesc(value_node,index));
-                       
+
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-       
+
                        add_action(action);
-                       
+
                        action=Action::create("activepoint_set_off");
-       
+
                        if(!action)
                                throw Error(_("Unable to find action \"activepoint_set_off\""));
-                       
+
                        action->set_param("edit_mode",MODE_ANIMATE);
                        action->set_param("canvas",get_canvas());
                        action->set_param("canvas_interface",get_canvas_interface());
                        action->set_param("time",Time::begin());
                        action->set_param("origin",origin);
                        action->set_param("value_desc",ValueDesc(value_node,index));
-                       
+
                        if(!action->is_ready())
                                throw Error(Error::TYPE_NOTREADY);
-       
+
                        add_action(action);
                }
-                       
+
                // Now we set the activepoint up and then we'll be done
                Action::Handle action(Action::create("activepoint_set_on"));
 
                if(!action)
                        throw Error(_("Unable to find action \"activepoint_set_on\""));
-               
+
                action->set_param("edit_mode",get_edit_mode());
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("origin",origin);
                action->set_param("value_desc",ValueDesc(value_node,index));
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
 
@@ -255,16 +255,16 @@ Action::ValueNodeDynamicListInsertSmart::prepare()
 
                if(!action)
                        throw Error(_("Unable to find action (bug)"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("origin",origin);
                action->set_param("value_desc",ValueDesc(value_node,index));
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
 
-               add_action(action);     
+               add_action(action);
        }
 }
index 2feb427..ee910a9 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListLoop::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode"))
        );
@@ -112,9 +112,9 @@ Action::ValueNodeDynamicListLoop::set_param(const synfig::String& name, const Ac
        }
 
        if(!value_node && name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
-       {               
+       {
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(param.get_value_node());
-               
+
                if(!value_node)
                        return false;
 
@@ -134,9 +134,9 @@ Action::ValueNodeDynamicListLoop::is_ready()const
 
 void
 Action::ValueNodeDynamicListLoop::perform()
-{      
+{
        old_loop_value=value_node->get_loop();
-       
+
        if(old_loop_value==true)
        {
                set_dirty(false);
@@ -144,7 +144,7 @@ Action::ValueNodeDynamicListLoop::perform()
        }
        set_dirty(true);
        value_node->set_loop(true);
-               
+
        value_node->changed();
 /*_if(get_canvas_interface())
        {
@@ -163,7 +163,7 @@ Action::ValueNodeDynamicListLoop::undo()
        }
        set_dirty(true);
        value_node->set_loop(old_loop_value);
-               
+
        value_node->changed();
 /*_if(get_canvas_interface())
        {
index 732b95c..36dc7da 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -95,20 +95,20 @@ Action::ValueNodeDynamicListRemove::set_param(const synfig::String& name, const
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
-               
+
                index=value_desc.get_index();
-               
+
                return true;
        }
-       
+
        return Action::CanvasSpecific::set_param(name,param);
 }
 
@@ -122,13 +122,13 @@ Action::ValueNodeDynamicListRemove::is_ready()const
 
 void
 Action::ValueNodeDynamicListRemove::perform()
-{      
+{
        if(index>=value_node->link_count())
                index=value_node->link_count()-1;
 
        list_entry=value_node->list[index];
        value_node->erase((value_node->list.begin()+index)->value_node);
-               
+
        // Signal that a layer has been inserted
        value_node->changed();
 /*_if(get_canvas_interface())
@@ -142,7 +142,7 @@ void
 Action::ValueNodeDynamicListRemove::undo()
 {
        value_node->add(list_entry,index);
-       
+
        // Signal that a layer has been inserted
        value_node->changed();
 /*_if(get_canvas_interface())
index bfb3920..99e9b01 100644 (file)
@@ -70,7 +70,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListRemoveSmart::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -106,29 +106,29 @@ Action::ValueNodeDynamicListRemoveSmart::set_param(const synfig::String& name, c
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
 
                index=value_desc.get_index();
-                               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
        if(name=="origin" && param.get_type()==Param::TYPE_REAL)
        {
                origin=param.get_real();
-               
+
                return true;
        }
 
@@ -145,9 +145,9 @@ Action::ValueNodeDynamicListRemoveSmart::is_ready()const
 
 void
 Action::ValueNodeDynamicListRemoveSmart::prepare()
-{      
+{
        clear();
-       
+
        // If we are in animate editing mode
        if(get_edit_mode()&MODE_ANIMATE)
        {
@@ -155,13 +155,13 @@ Action::ValueNodeDynamicListRemoveSmart::prepare()
 
                if(!action)
                        throw Error(_("Unable to find action (bug)"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("origin",origin);
                action->set_param("value_desc",ValueDesc(value_node,index));
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
 
@@ -173,13 +173,13 @@ Action::ValueNodeDynamicListRemoveSmart::prepare()
 
                if(!action)
                        throw Error(_("Unable to find action (bug)"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("time",time);
                action->set_param("origin",origin);
                action->set_param("value_desc",ValueDesc(value_node,index));
-               
+
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
 
index 4f5886a..dd4d5bd 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListRotateOrder::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
                .set_local_name(_("ValueDesc"))
        );
@@ -95,12 +95,12 @@ Action::ValueNodeDynamicListRotateOrder::set_param(const synfig::String& name, c
        if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
        {
                ValueDesc value_desc(param.get_value_desc());
-               
+
                if(!value_desc.parent_is_value_node())
                        return false;
-               
+
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node());
-               
+
                if(!value_node)
                        return false;
 
@@ -124,7 +124,7 @@ void
 Action::ValueNodeDynamicListRotateOrder::prepare()
 {
        clear();
-       
+
        for(int i(0);i<(value_node->link_count()-index)%value_node->link_count();++i)
        {
                ValueDesc value_desc(value_node,value_node->link_count()-1-i);
@@ -132,33 +132,33 @@ Action::ValueNodeDynamicListRotateOrder::prepare()
 
 
                Action::Handle action(Action::create("value_node_dynamic_list_remove"));
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",ValueDesc(value_node,value_node->link_count()-1));
-               
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
-               
-               
+
+
                action=Action::create("value_node_dynamic_list_insert");
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_desc",ValueDesc(value_node,0));
                action->set_param("item",child);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
 
-               
-               
-       
+
+
+
        }
 }
index e53656f..a1ee55d 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::ValueNodeDynamicListUnLoop::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode"))
        );
@@ -112,9 +112,9 @@ Action::ValueNodeDynamicListUnLoop::set_param(const synfig::String& name, const
        }
 
        if(!value_node && name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
-       {               
+       {
                value_node=ValueNode_DynamicList::Handle::cast_dynamic(param.get_value_node());
-               
+
                if(!value_node)
                        return false;
 
@@ -134,9 +134,9 @@ Action::ValueNodeDynamicListUnLoop::is_ready()const
 
 void
 Action::ValueNodeDynamicListUnLoop::perform()
-{      
+{
        old_loop_value=value_node->get_loop();
-       
+
        if(old_loop_value==false)
        {
                set_dirty(false);
@@ -145,7 +145,7 @@ Action::ValueNodeDynamicListUnLoop::perform()
 
        set_dirty(true);
        value_node->set_loop(false);
-               
+
        value_node->changed();
 /*_if(get_canvas_interface())
        {
@@ -165,7 +165,7 @@ Action::ValueNodeDynamicListUnLoop::undo()
 
        set_dirty(true);
        value_node->set_loop(old_loop_value);
-               
+
        value_node->changed();
 /*_if(get_canvas_interface())
        {
index 1cf9672..1b4194e 100644 (file)
@@ -66,7 +66,7 @@ Action::ParamVocab
 Action::ValueNodeLinkConnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("parent_value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("Parent ValueNode"))
        );
@@ -94,21 +94,21 @@ Action::ValueNodeLinkConnect::set_param(const synfig::String& name, const Action
        if(name=="parent_value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                parent_value_node=LinkableValueNode::Handle::cast_dynamic(param.get_value_node());
-               
+
                return static_cast<bool>(parent_value_node);
        }
 
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                new_value_node=param.get_value_node();
-               
+
                return true;
        }
 
        if(name=="index" && param.get_type()==Param::TYPE_INTEGER)
        {
                index=param.get_integer();
-               
+
                return true;
        }
 
@@ -127,15 +127,15 @@ void
 Action::ValueNodeLinkConnect::perform()
 {
        if(parent_value_node->link_count()<=index)
-               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);             
-               
+               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);
+
        old_value_node=parent_value_node->get_link(index);
 
        if(!parent_value_node->set_link(index,new_value_node))
                throw Error(_("Parent would not accept link"));
-       
+
        /*set_dirty(true);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(parent_value_node);
@@ -146,13 +146,13 @@ void
 Action::ValueNodeLinkConnect::undo()
 {
        if(parent_value_node->link_count()<=index)
-               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);             
-               
+               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);
+
        if(!parent_value_node->set_link(index,old_value_node))
                throw Error(_("Parent would not accept old link"));
-       
+
        /*set_dirty(true);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(parent_value_node);
index 0e1dd58..f10744b 100644 (file)
@@ -68,7 +68,7 @@ Action::ParamVocab
 Action::ValueNodeLinkDisconnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("parent_value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("Parent ValueNode"))
        );
@@ -97,21 +97,21 @@ Action::ValueNodeLinkDisconnect::set_param(const synfig::String& name, const Act
        if(name=="parent_value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                parent_value_node=LinkableValueNode::Handle::cast_dynamic(param.get_value_node());
-               
+
                return static_cast<bool>(parent_value_node);
        }
 
        if(name=="index" && param.get_type()==Param::TYPE_INTEGER)
        {
                index=param.get_integer();
-               
+
                return true;
        }
 
        if(name=="time" && param.get_type()==Param::TYPE_TIME)
        {
                time=param.get_time();
-               
+
                return true;
        }
 
@@ -130,19 +130,19 @@ void
 Action::ValueNodeLinkDisconnect::perform()
 {
        if(parent_value_node->link_count()<=index)
-               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);             
-               
+               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);
+
        old_value_node=parent_value_node->get_link(index);
 
        if(!parent_value_node->set_link(index,ValueNode_Const::create((*old_value_node)(time))))
                throw Error(_("Parent would not accept link"));
-       
+
        /*
        if(get_canvas()->get_time()!=time)
                set_dirty(true);
        else
                set_dirty(false);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(parent_value_node);
@@ -154,16 +154,16 @@ void
 Action::ValueNodeLinkDisconnect::undo()
 {
        if(parent_value_node->link_count()<=index)
-               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);             
-               
+               throw Error(_("Bad index, too big. LinkCount=%d, Index=%d"),parent_value_node->link_count(),index);
+
        if(!parent_value_node->set_link(index,old_value_node))
                throw Error(_("Parent would not accept old link"));
-       
+
        /*if(get_canvas()->get_time()!=time)
                set_dirty(true);
        else
                set_dirty(false);
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(parent_value_node);
index c86042f..a1f1987 100644 (file)
@@ -65,11 +65,11 @@ Action::ParamVocab
 Action::ValueNodeRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode"))
        );
-       
+
        return ret;
 }
 
@@ -94,13 +94,13 @@ Action::ValueNodeRemove::set_param(const synfig::String& name, const Action::Par
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=param.get_value_node();
-               
+
                if(value_node && !value_node->is_exported())
                {
                        synfig::error("Action::ValueNodeRemove::set_param(): ValueBase node not exported!");
                        value_node=0;
                }
-               
+
                return (bool)value_node;
        }
 
@@ -120,7 +120,7 @@ Action::ValueNodeRemove::is_ready()const
 
 void
 Action::ValueNodeRemove::perform()
-{      
+{
 //     if(value_node->rcount()!=1)
 //             throw Error(_("ValueNode is still being used by something"));
 
@@ -132,18 +132,18 @@ Action::ValueNodeRemove::perform()
        {
                get_canvas_interface()->signal_value_node_deleted()(value_node);
        }
-       
+
        //throw Error(_("Not yet implemented"));
 /*
        assert(value_node->is_exported());
 
        if(get_canvas()->value_node_list().count(new_name))
                throw Error(_("A ValueNode with this ID already exists in this canvas"));
-       
+
        old_name=value_node->get_id();
 
-       value_node->set_id(new_name);   
-       
+       value_node->set_id(new_name);
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(value_node);
@@ -159,16 +159,16 @@ Action::ValueNodeRemove::undo()
        {
                get_canvas_interface()->signal_value_node_added()(value_node);
        }
-       
+
        //throw Error(_("Not yet implemented"));
 /*
        assert(value_node->is_exported());
 
        if(get_canvas()->value_node_list().count(old_name))
                throw Error(_("A ValueNode with the old ID already exists in this canvas (BUG)"));
-       
-       value_node->set_id(old_name);   
-       
+
+       value_node->set_id(old_name);
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(value_node);
index da5d0b5..62142f7 100644 (file)
@@ -65,7 +65,7 @@ Action::ParamVocab
 Action::ValueNodeRename::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode_Const"))
        );
@@ -75,7 +75,7 @@ Action::ValueNodeRename::get_param_vocab()
                .set_desc(_("The new name of the ValueNode"))
                .set_user_supplied()
        );
-       
+
        return ret;
 }
 
@@ -96,20 +96,20 @@ Action::ValueNodeRename::set_param(const synfig::String& name, const Action::Par
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=param.get_value_node();
-               
+
                if(value_node && !value_node->is_exported())
                {
                        synfig::error("Action::ValueNodeRename::set_param(): ValueBase node not exported!");
                        value_node=0;
                }
-               
+
                return (bool)value_node;
        }
 
        if(name=="name" && param.get_type()==Param::TYPE_STRING)
        {
                new_name=param.get_string();
-               
+
                return true;
        }
 
@@ -132,16 +132,16 @@ Action::ValueNodeRename::is_ready()const
 
 void
 Action::ValueNodeRename::perform()
-{      
+{
        assert(value_node->is_exported());
 
        if(get_canvas()->value_node_list().count(new_name))
                throw Error(_("A ValueNode with this ID already exists in this canvas"));
-       
+
        old_name=value_node->get_id();
 
-       value_node->set_id(new_name);   
-       
+       value_node->set_id(new_name);
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(value_node);
@@ -155,9 +155,9 @@ Action::ValueNodeRename::undo()
 
        if(get_canvas()->value_node_list().count(old_name))
                throw Error(_("A ValueNode with the old ID already exists in this canvas (BUG)"));
-       
-       value_node->set_id(old_name);   
-       
+
+       value_node->set_id(old_name);
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(value_node);
index 1a8bf73..a2cdadf 100644 (file)
@@ -62,7 +62,7 @@ void swap_guid(const ValueNode::Handle& a,const ValueNode::Handle& b)
 
        GUID old_b(b->get_guid());
        b->set_guid(GUID());
-       
+
        a->set_guid(old_b);
        b->set_guid(old_a);
 }
@@ -78,7 +78,7 @@ Action::ParamVocab
 Action::ValueNodeReplace::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("dest",Param::TYPE_VALUENODE)
                .set_local_name(_("Destination ValueNode"))
                .set_desc(_("ValueNode to replaced"))
@@ -88,7 +88,7 @@ Action::ValueNodeReplace::get_param_vocab()
                .set_local_name(_("Source ValueNode"))
                .set_desc(_("ValueNode that will replace the destination"))
        );
-       
+
        return ret;
 }
 
@@ -104,14 +104,14 @@ Action::ValueNodeReplace::set_param(const synfig::String& name, const Action::Pa
        if(name=="dest" && param.get_type()==Param::TYPE_VALUENODE)
        {
                dest_value_node=param.get_value_node();
-               
+
                return true;
        }
 
        if(name=="src" && param.get_type()==Param::TYPE_VALUENODE)
        {
                src_value_node=param.get_value_node();
-               
+
                return true;
        }
 
@@ -136,47 +136,47 @@ Action::ValueNodeReplace::perform()
 
        if(dest_value_node->get_type() != src_value_node->get_type())
                throw Error(_("You cannot replace ValueNodes with different types!"));
-       
+
        is_undoable=true;
-       
+
        if(!src_value_node->is_exported())
        {
                src_value_node->set_id(dest_value_node->get_id());
                src_value_node->set_parent_canvas(dest_value_node->get_parent_canvas());
 
                ValueNode::RHandle value_node(src_value_node);
-               
+
                if(!value_node.runique() && value_node.rcount()>1)
                        is_undoable=false;      // !!!
        }
        else
                is_undoable=false;      // !!!
-       
+
        if(!is_undoable)
                synfig::warning("ValueNodeReplace: Circumstances make undoing this action impossible at the current time. :(");
-       
+
        ValueNode::RHandle value_node(dest_value_node);
-       
+
        if(value_node.runique() || value_node.rcount()<=1)
                throw Error(_("Nothing to replace."));
-       
+
        int replacements;
-               
+
        replacements=value_node->replace(src_value_node);
        assert(replacements);
        if(!replacements)
                throw Error(_("Action Failure. This is a bug. Please report it."));
        swap_guid(dest_value_node,src_value_node);
-       
+
        //src_value_node->parent_set.swap(dest_value_node->parent_set);
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_replaced()(dest_value_node,src_value_node);
        }
        else synfig::warning("CanvasInterface not set on action");
-       
+
 }
 
 void
@@ -184,7 +184,7 @@ Action::ValueNodeReplace::undo()
 {
        if(!is_undoable)
                throw Error(_("This action cannot be undone under these circumstances."));
-               
+
        set_dirty(true);
 
        if(dest_value_node == src_value_node)
@@ -192,14 +192,14 @@ Action::ValueNodeReplace::undo()
 
        if(dest_value_node->get_type() != src_value_node->get_type())
                throw Error(_("You cannot replace ValueNodes with different types!"));
-               
+
        ValueNode::RHandle value_node(src_value_node);
-       
+
        if(value_node.runique() || value_node.rcount()<=1)
                throw Error(_("Nothing to replace."));
-       
+
        int replacements;
-       
+
        replacements=value_node->replace(dest_value_node);
        assert(replacements);
        if(!replacements)
@@ -207,17 +207,17 @@ Action::ValueNodeReplace::undo()
        swap_guid(dest_value_node,src_value_node);
 
        //src_value_node->parent_set.swap(dest_value_node->parent_set);
-       
+
        synfig::info(get_name()+_(": (Undo) ")+strprintf("Replaced %d ValueNode instances",replacements));
 
        src_value_node->set_id(String());
        src_value_node->set_parent_canvas(0);
-       
+
        // Signal that a layer has been inserted
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_replaced()(src_value_node,dest_value_node);
        }
        else synfig::warning("CanvasInterface not set on action");
-       
+
 }
index c29d8b9..fc1bb11 100644 (file)
@@ -69,7 +69,7 @@ Action::ParamVocab
 Action::WaypointAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("Destination ValueNode (Animated)"))
        );
@@ -112,13 +112,13 @@ Action::WaypointAdd::set_param(const synfig::String& name, const Action::Param &
                value_node=ValueNode_Animated::Handle::cast_dynamic(param.get_value_node());
                if(time_set)
                        calc_waypoint();
-               
+
                return static_cast<bool>(value_node);
        }
        if(name=="waypoint" && param.get_type()==Param::TYPE_WAYPOINT && !time_set)
        {
                waypoint=param.get_waypoint();
-               
+
                return true;
        }
        if(name=="time" && param.get_type()==Param::TYPE_TIME && waypoint.get_time()==Time::begin()-1)
@@ -128,7 +128,7 @@ Action::WaypointAdd::set_param(const synfig::String& name, const Action::Param &
 
                if(value_node)
                        calc_waypoint();
-               
+
                return true;
        }
 
@@ -143,15 +143,15 @@ Action::WaypointAdd::is_ready()const
        return Action::CanvasSpecific::is_ready();
 }
 
-// This function is called if a time is specified, but not 
+// This function is called if a time is specified, but not
 // a waypoint. In this case, we need to calculate the value
 // of the waypoint
 void
 Action::WaypointAdd::calc_waypoint()
-{      
+{
        Time time=waypoint.get_time();
        Waypoint original(waypoint);
-       waypoint=value_node->new_waypoint_at_time(time);        
+       waypoint=value_node->new_waypoint_at_time(time);
        waypoint.mimic(original);
        waypoint.set_before(synfigapp::Main::get_interpolation());
        waypoint.set_after(synfigapp::Main::get_interpolation());
@@ -159,7 +159,7 @@ Action::WaypointAdd::calc_waypoint()
 /*
        ValueNode_Animated::WaypointList &waypoint_list(value_node->waypoint_list());
        ValueNode_Animated::WaypointList::iterator iter;
-       
+
        if(waypoint_list.empty())
        {
                waypoint.set_value((*value_node)(time));
@@ -167,7 +167,7 @@ Action::WaypointAdd::calc_waypoint()
        }
 
        ValueNode_Animated::WaypointList::iterator closest=waypoint_list.begin();
-               
+
        for(iter=waypoint_list.begin();iter!=waypoint_list.end();++iter)
        {
                const Real dist(abs(iter->get_time()-time));
@@ -183,15 +183,15 @@ Action::WaypointAdd::calc_waypoint()
 
 void
 Action::WaypointAdd::perform()
-{              
+{
        try { value_node->find(waypoint.get_time()); throw Error(_("A Waypoint already exists at this point in time (%s)"),waypoint.get_time().get_string().c_str());}
-       catch(synfig::Exception::NotFound) { }  
+       catch(synfig::Exception::NotFound) { }
 
        try { if(value_node->find(waypoint)!=value_node->waypoint_list().end()) throw Error(_("This waypoint is already in the ValueNode"));}
-       catch(synfig::Exception::NotFound) { }  
-       
+       catch(synfig::Exception::NotFound) { }
+
        value_node->add(waypoint);
-       
+
        value_node->changed();
 /*_if(get_canvas_interface())
        {
@@ -204,7 +204,7 @@ void
 Action::WaypointAdd::undo()
 {
        value_node->erase(waypoint);
-       
+
        value_node->changed();
 /*_if(get_canvas_interface())
        {
index 15ae928..bd877f2 100644 (file)
@@ -50,7 +50,7 @@ class WaypointAdd :
 private:
 
        synfig::Waypoint waypoint;
-       
+
        bool time_overwrite;
        synfig::Waypoint overwritten_wp;
 
index 8b02890..2dd442a 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::WaypointRemove::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode (Animated)"))
        );
@@ -92,13 +92,13 @@ Action::WaypointRemove::set_param(const synfig::String& name, const Action::Para
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=ValueNode_Animated::Handle::cast_dynamic(param.get_value_node());
-               
+
                return static_cast<bool>(value_node);
        }
        if(name=="waypoint" && param.get_type()==Param::TYPE_WAYPOINT)
        {
                waypoint=param.get_waypoint();
-               
+
                return true;
        }
 
@@ -115,7 +115,7 @@ Action::WaypointRemove::is_ready()const
 
 void
 Action::WaypointRemove::perform()
-{      
+{
        WaypointList::iterator iter(value_node->find(waypoint));
 
        if((UniqueID)*iter!=(UniqueID)waypoint)
@@ -123,9 +123,9 @@ Action::WaypointRemove::perform()
 
        if(iter->get_time()!=waypoint.get_time())
                throw Error(_("Time mismatch iter=%s, waypoint=%s"),iter->get_time().get_string().c_str(),waypoint.get_time().get_string().c_str());
-       
+
        waypoint=*iter;
-       
+
        value_node->erase(waypoint);
 
        // In this case, we need to convert this to a
@@ -138,10 +138,10 @@ Action::WaypointRemove::perform()
                        if(!value_node_ref)
                                throw Error(_("Unable to create ValueNode_Reference"));
                }
-               
+
                value_node->replace(value_node_ref);
                value_node->waypoint_list().clear();
-               
+
                if(get_canvas_interface())
                {
                        get_canvas_interface()->signal_value_node_replaced()(value_node,value_node_ref);
@@ -158,11 +158,11 @@ Action::WaypointRemove::undo()
        {
                if(value_node->waypoint_list().size()!=0)
                        throw Error(_("This animated value node should be empty, but for some reason it isn't. This is a bug. (1)"));
-               
+
                value_node_ref->replace(value_node);
-               
+
                waypoint.set_value_node(value_node_ref);
-               
+
                if(get_canvas_interface())
                        get_canvas_interface()->signal_value_node_replaced()(value_node_ref,value_node);
 
@@ -173,14 +173,14 @@ Action::WaypointRemove::undo()
        if(value_node->waypoint_list().size()!=0)
        {
                try { value_node->find(waypoint.get_time()); throw Error(_("A Waypoint already exists at this point in time"));}
-               catch(synfig::Exception::NotFound) { }  
-               
+               catch(synfig::Exception::NotFound) { }
+
                try { if(value_node->find(waypoint)!=value_node->waypoint_list().end()) throw Error(_("This waypoint is already in the ValueNode"));}
-               catch(synfig::Exception::NotFound) { }  
+               catch(synfig::Exception::NotFound) { }
        }
-       
+
        value_node->add(waypoint);
-       
+
 /*_if(get_canvas_interface())
        {
                get_canvas_interface()->signal_value_node_changed()(value_node);
index c676aeb..577161b 100644 (file)
@@ -66,7 +66,7 @@ Action::ParamVocab
 Action::WaypointSet::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("Destination ValueNode (Animated)"))
        );
@@ -92,14 +92,14 @@ Action::WaypointSet::set_param(const synfig::String& name, const Action::Param &
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=ValueNode_Animated::Handle::cast_dynamic(param.get_value_node());
-               
+
                return static_cast<bool>(value_node);
        }
        if(name=="waypoint" && param.get_type()==Param::TYPE_WAYPOINT)
        {
                //NOTE: at the moment there is no error checking for multiple sets!!!
                waypoints.push_back(param.get_waypoint());
-               
+
                return true;
        }
 
@@ -116,13 +116,13 @@ Action::WaypointSet::is_ready()const
 
 void
 Action::WaypointSet::perform()
-{      
+{
        WaypointList::iterator iter;
 
-#if 1  
+#if 1
        vector<WaypointList::iterator>  iters;
-       vector<Waypoint>::iterator i = waypoints.begin(), end = waypoints.end();        
-       
+       vector<Waypoint>::iterator i = waypoints.begin(), end = waypoints.end();
+
        for(; i != end; ++i)
        {
                try { iters.push_back(value_node->find(*i)); }
@@ -131,16 +131,16 @@ Action::WaypointSet::perform()
                        throw Error(_("Unable to find waypoint"));
                }
        }
-       
+
        //check to see which valuenodes are going to override because of the time...
        ValueNode_Animated::findresult timeiter;
-       
+
        for(i = waypoints.begin(); i != end; ++i)
        {
                timeiter = value_node->find_time(i->get_time());
-               
+
                bool candelete = timeiter.second;
-       
+
                //we only want to track overwrites (not waypoints that are also being modified)
                if(candelete)
                {
@@ -153,7 +153,7 @@ Action::WaypointSet::perform()
                                }
                        }
                }
-               
+
                //if we can still delete it after checking, record it, and then remove them all later
                if(candelete)
                {
@@ -161,7 +161,7 @@ Action::WaypointSet::perform()
                        overwritten_waypoints.push_back(w);
                }
        }
-       
+
        //overwrite all the valuenodes we're supposed to set
        {
                i = waypoints.begin();
@@ -171,7 +171,7 @@ Action::WaypointSet::perform()
                        **ii = *i; //set the point to the corresponding point in the normal waypoint list
                }
        }
-       
+
        //remove all the points we're supposed to be overwritting
        {
                vector<Waypoint>::iterator      oi = overwritten_waypoints.begin(),
@@ -192,27 +192,27 @@ Action::WaypointSet::perform()
        //find the value at the old time before we replace it
        ValueNode_Animated::findresult timeiter;
        timeiter = value_node->find_time(waypoint.get_time());
-       
+
        //we only want to track overwrites (not inplace modifications)
        if(timeiter.second && waypoint.get_uid() == timeiter.first->get_uid())
        {
-               timeiter.second = false;                        
+               timeiter.second = false;
        }
-               
+
        //copy and overwrite
        old_waypoint=*iter;
        *iter=waypoint;
-       
+
        //if we've found a unique one then we need to erase it, but store it first
        if(timeiter.second)
        {
                time_overwrite = true;
                overwritten_wp = *timeiter.first;
-               
+
                value_node->erase(overwritten_wp);
        }
 #endif
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
@@ -221,10 +221,10 @@ void
 Action::WaypointSet::undo()
 {
        WaypointList::iterator iter;
-       
+
 #if 1
-       vector<Waypoint>::iterator i = old_waypoints.begin(), end = old_waypoints.end();        
-       
+       vector<Waypoint>::iterator i = old_waypoints.begin(), end = old_waypoints.end();
+
        for(; i != end; ++i)
        {
                try { iter = value_node->find(*i); }
@@ -232,11 +232,11 @@ Action::WaypointSet::undo()
                {
                        throw Error(_("Unable to find waypoint"));
                }
-               
+
                //overwrite with old one
                *iter = *i;
        }
-               
+
        //add back in all the points that we removed before...
        {
                vector<Waypoint>::iterator      oi = overwritten_waypoints.begin(),
@@ -252,16 +252,16 @@ Action::WaypointSet::undo()
        catch(synfig::Exception::NotFound)
        {
                throw Error(_("Unable to find waypoint"));
-       }       
+       }
 
        *iter=old_waypoint;
-       
+
        if(time_overwrite)
        {
                value_node->add(overwritten_wp);
        }
 #endif
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
index ac44966..4298453 100644 (file)
@@ -48,11 +48,11 @@ class WaypointSet :
        public CanvasSpecific
 {
 private:
-       
+
        synfig::ValueNode_Animated::Handle value_node;
-       
+
        std::vector<synfig::Waypoint> waypoints;
-       std::vector<synfig::Waypoint> old_waypoints;    
+       std::vector<synfig::Waypoint> old_waypoints;
 
        std::vector<synfig::Waypoint> overwritten_waypoints;
 
index 1f6d07a..165b629 100644 (file)
@@ -83,7 +83,7 @@ Action::ParamVocab
 Action::WaypointSetSmart::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("Destination ValueNode (Animated)"))
        );
@@ -104,7 +104,7 @@ Action::WaypointSetSmart::get_param_vocab()
                .set_desc(_("Time where waypoint is to be added"))
                .set_optional()
        );
-       
+
        return ret;
 }
 
@@ -132,14 +132,14 @@ Action::WaypointSetSmart::set_param(const synfig::String& name, const Action::Pa
                DEBUGPOINT();
                if(time_set)
                        calc_waypoint();
-               
+
                return static_cast<bool>(value_node);
        }
        if(name=="waypoint" && param.get_type()==Param::TYPE_WAYPOINT && !time_set)
        {
                waypoint=param.get_waypoint();
                DEBUGPOINT();
-               
+
                return true;
        }
 
@@ -151,7 +151,7 @@ Action::WaypointSetSmart::set_param(const synfig::String& name, const Action::Pa
                if(value_node)
                        calc_waypoint();
                DEBUGPOINT();
-               
+
                return true;
        }
 
@@ -161,7 +161,7 @@ Action::WaypointSetSmart::set_param(const synfig::String& name, const Action::Pa
                        calc_waypoint();
 
                waypoint.apply_model(param.get_waypoint_model());
-               
+
                return true;
        }
 
@@ -176,20 +176,20 @@ Action::WaypointSetSmart::is_ready()const
 
        if(waypoint.get_time()==(Time::begin()-1))
                synfig::error("Missing waypoint");
-       
+
        if(!value_node || waypoint.get_time()==(Time::begin()-1))
                return false;
        return Action::CanvasSpecific::is_ready();
 }
 
-// This function is called if a time is specified, but not 
+// This function is called if a time is specified, but not
 // a waypoint. In this case, we need to calculate the value
 // of the waypoint
 void
 Action::WaypointSetSmart::calc_waypoint()
 {
        DEBUGPOINT();
-       Time time=waypoint.get_time();  
+       Time time=waypoint.get_time();
        try
        {
                // Trivial case, we are sitting on a waypoint
@@ -197,7 +197,7 @@ Action::WaypointSetSmart::calc_waypoint()
        }
        catch(...)
        {
-               waypoint=value_node->new_waypoint_at_time(time);        
+               waypoint=value_node->new_waypoint_at_time(time);
                waypoint.set_before(synfigapp::Main::get_interpolation());
                waypoint.set_after(synfigapp::Main::get_interpolation());
        }
@@ -205,7 +205,7 @@ Action::WaypointSetSmart::calc_waypoint()
        Time time=waypoint.get_time();
        ValueNode_Animated::WaypointList &waypoint_list(value_node->waypoint_list());
        ValueNode_Animated::WaypointList::iterator iter;
-       
+
        if(waypoint_list.empty())
        {
                waypoint.set_value((*value_node)(time));
@@ -213,7 +213,7 @@ Action::WaypointSetSmart::calc_waypoint()
        }
 
        ValueNode_Animated::WaypointList::iterator closest=waypoint_list.begin();
-               
+
        for(iter=waypoint_list.begin();iter!=waypoint_list.end();++iter)
        {
                const Real dist(abs(iter->get_time()-time));
@@ -230,21 +230,21 @@ Action::WaypointSetSmart::calc_waypoint()
 void
 Action::WaypointSetSmart::enclose_waypoint(const synfig::Waypoint& waypoint)
 {
-       times.insert(waypoint.get_time());                      
-       
+       times.insert(waypoint.get_time());
+
        try {
                times.insert(value_node->find(waypoint)->get_time());
 //             synfig::info(__FILE__":%d: value_node->find(waypoint)->get_time()=%s",__LINE__,value_node->find(waypoint)->get_time().get_string().c_str());
 //             DEBUGPOINT();
        }catch (...) { }
-       
+
 //     DEBUGPOINT();
        // First we need to to add any waypoints necessary to
-       // maintain the integrity of the keyframes.     
+       // maintain the integrity of the keyframes.
        if(get_edit_mode()&MODE_ANIMATE_PAST) try
        {
                Time curr_time(waypoint.get_time());
-               
+
                //while(value_node->waypoint_list().front().get_time()<=curr_time)
                {
                        // Try to find prev keyframe
@@ -253,7 +253,7 @@ Action::WaypointSetSmart::enclose_waypoint(const synfig::Waypoint& waypoint)
 
 //                     synfig::info(__FILE__":%d: prev_keyframe->time=%s",__LINE__,keyframe.get_time().get_string().c_str());
 //                     synfig::info(__FILE__":%d: waypoint->time=%s",__LINE__,waypoint.get_time().get_string().c_str());
-                       
+
 //                     DEBUGPOINT();
                        if(times.count(keyframe.get_time()))
                        {
@@ -266,7 +266,7 @@ Action::WaypointSetSmart::enclose_waypoint(const synfig::Waypoint& waypoint)
                                throw int();
                        }
 
-                       times.insert(keyframe.get_time());                      
+                       times.insert(keyframe.get_time());
 //                     DEBUGPOINT();
                        try
                        {
@@ -276,31 +276,31 @@ Action::WaypointSetSmart::enclose_waypoint(const synfig::Waypoint& waypoint)
                        catch(synfig::Exception::NotFound)
                        {
                                Action::Handle action(WaypointAdd::create());
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",ValueNode::Handle(value_node));
-                       
+
                                if(!value_node->waypoint_list().empty())
-                               {       
+                               {
                                        action->set_param("time",keyframe.get_time());
                                }
                                else
                                {
                                        synfig::Waypoint tmp;
-                                       
+
                                        tmp.set_value(waypoint.get_value());
                                        tmp.set_time(keyframe.get_time());
                                        action->set_param("waypoint",tmp);
                                }
-       
+
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
+
                                add_action(action);
-                       }                                               
-               }               
+                       }
+               }
        }
        catch(Error x) { throw x; }
        catch(synfig::Exception::NotFound) { DEBUGPOINT(); }
@@ -312,56 +312,56 @@ Action::WaypointSetSmart::enclose_waypoint(const synfig::Waypoint& waypoint)
        if(get_edit_mode()&MODE_ANIMATE_FUTURE)try
        {
                Time curr_time(waypoint.get_time());
-               
+
                //while(value_node->waypoint_list().back().get_time()>=curr_time)
                {
-       
+
                        //DEBUGPOINT();
                        // Try to find next keyframe
                        //synfig::info("FUTURE waypoint.get_time()=%s",waypoint.get_time().get_string().c_str());
                        Keyframe keyframe(*get_canvas()->keyframe_list().find_next(curr_time));
                        //synfig::info("FUTURE keyframe.get_time()=%s",keyframe.get_time().get_string().c_str());
                        curr_time=keyframe.get_time();
-                       
+
                        //DEBUGPOINT();
                        if(times.count(keyframe.get_time())|| waypoint.get_time().is_equal(keyframe.get_time()))
                                throw int();
                        else
-                               times.insert(keyframe.get_time());                      
+                               times.insert(keyframe.get_time());
                        //DEBUGPOINT();
-                       
+
                        try
                        {
                                value_node->find(keyframe.get_time());
                                synfig::info(__FILE__":%d: time=%s",__LINE__,keyframe.get_time().get_string().c_str());
                                synfig::info(__FILE__":%d: waypointtime=%s",__LINE__,value_node->find(keyframe.get_time())->get_time().get_string().c_str());
-                               
+
                        }
                        catch(synfig::Exception::NotFound)
                        {
                                Action::Handle action(WaypointAdd::create());
-                               
+
                                action->set_param("canvas",get_canvas());
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_node",ValueNode::Handle(value_node));
-                       
+
                                if(!value_node->waypoint_list().empty())
-                               {       
+                               {
                                        action->set_param("time",keyframe.get_time());
                                }
                                else
                                {
                                        synfig::Waypoint tmp;
-                                       
+
                                        tmp.set_value(waypoint.get_value());
                                        tmp.set_time(keyframe.get_time());
                                        action->set_param("waypoint",tmp);
                                }
-       
+
                                assert(action->is_ready());
                                if(!action->is_ready())
                                        throw Error(Error::TYPE_NOTREADY);
-                       
+
                                add_action(action);
                        }
                }
@@ -380,9 +380,9 @@ Action::WaypointSetSmart::prepare()
                //DEBUGPOINT();
        clear();
        times.clear();
-       
+
        // First we need to to add any waypoints necessary to
-       // maintain the integrity of the keyframes.     
+       // maintain the integrity of the keyframes.
        enclose_waypoint(waypoint);
 
        try
@@ -390,25 +390,25 @@ Action::WaypointSetSmart::prepare()
                //synfig::info("WaypointSetSmart: Move/Update?");
                // Lets try to replace the old waypoint, if it exists
                WaypointList::iterator iter(value_node->find(waypoint));
-               
+
                if(iter == value_node->waypoint_list().end())
                        throw int();
-               
+
                enclose_waypoint(*iter);
 
                Action::Handle action(WaypointSet::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle(value_node));
                action->set_param("waypoint",waypoint);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
-               
+
                return;
        }
        catch(synfig::Exception::NotFound){ } catch(int){ }
@@ -419,28 +419,28 @@ Action::WaypointSetSmart::prepare()
                //DEBUGPOINT();
                // Check to see if a waypoint exists at this point in time
                WaypointList::iterator iter=value_node->find(waypoint.get_time());
-               
+
                waypoint.mimic(*iter);
 
                enclose_waypoint(*iter);
-               
+
                Action::Handle action(WaypointSet::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle(value_node));
                action->set_param("waypoint",waypoint);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
-               
+
                return;
        }
        catch(synfig::Exception::NotFound){ } catch(int){ }
-       
+
        try
        {
                //synfig::info("WaypointSetSmart: Add?");
@@ -448,21 +448,21 @@ Action::WaypointSetSmart::prepare()
                // At this point we know that the old waypoint doesn't exist,
                // so we need to create it.
                Action::Handle action(WaypointAdd::create());
-               
+
                action->set_param("canvas",get_canvas());
                action->set_param("canvas_interface",get_canvas_interface());
                action->set_param("value_node",ValueNode::Handle(value_node));
                action->set_param("waypoint",waypoint);
-       
+
                assert(action->is_ready());
                if(!action->is_ready())
                        throw Error(Error::TYPE_NOTREADY);
-       
+
                add_action(action);
-               
+
                return;
        }
        catch(synfig::Exception::NotFound){ } catch(int){ }
 
-       throw Error(_("Unable to determine how to procede. This is a bug."));   
+       throw Error(_("Unable to determine how to procede. This is a bug."));
 }
index 3af4278..905d6cd 100644 (file)
@@ -67,7 +67,7 @@ Action::ParamVocab
 Action::WaypointSimpleAdd::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("Destination ValueNode (Animated)"))
        );
@@ -92,13 +92,13 @@ Action::WaypointSimpleAdd::set_param(const synfig::String& name, const Action::P
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=ValueNode_Animated::Handle::cast_dynamic(param.get_value_node());
-               
+
                return static_cast<bool>(value_node);
        }
        if(name=="waypoint" && param.get_type()==Param::TYPE_WAYPOINT)
        {
                waypoint = param.get_waypoint();
-               
+
                return true;
        }
 
@@ -115,20 +115,20 @@ Action::WaypointSimpleAdd::is_ready()const
 
 void
 Action::WaypointSimpleAdd::perform()
-{      
+{
        //remove any pretenders that lie at our destination
        ValueNode_Animated::findresult iter = value_node->find_time(waypoint.get_time());
-       
+
        time_overwrite = false;
        if(iter.second)
        {
                overwritten_wp = *iter.first;
                time_overwrite = true;
        }
-       
+
        //add the value node in since it's safe
        value_node->add(waypoint);
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
@@ -138,20 +138,20 @@ Action::WaypointSimpleAdd::undo()
 {
        //remove our old version...
        ValueNode_Animated::findresult iter = value_node->find_uid(waypoint);
-       
+
        if(!iter.second)
        {
                throw Error(_("The waypoint to remove no longer exists"));
        }
-       
+
        //remove the offending value
        value_node->erase(*iter.first); //could also just use waypoint
-       
+
        if(time_overwrite)
        {
-               value_node->add(overwritten_wp);                                
+               value_node->add(overwritten_wp);
        }
-       
+
        // Signal that a valuenode has been changed
        value_node->changed();
 }
index f56acfa..9942cba 100644 (file)
@@ -48,9 +48,9 @@ class WaypointSimpleAdd :
        public CanvasSpecific
 {
 private:
-       
+
        synfig::ValueNode_Animated::Handle value_node;
-       
+
        synfig::Waypoint waypoint;
 
        bool time_overwrite;
index d242e9f..697e428 100644 (file)
@@ -134,22 +134,22 @@ void DerivativeApprox(T &df, const T f[], const Real t[], int npoints, int index
 {
        /*
        Lj(x) = PI_i!=j (x - xi) / PI_i!=j (xj - xi)
-       
+
        so Lj'(x) = SUM_k PI_i!=j|k (x - xi) / PI_i!=j (xj - xi)
        */
-       
+
        unsigned int i,j,k,i0,i1;
-       
+
        Real Lpj,mult,div,tj;
        Real tval = t[indexval];
-                               
-       //sum k 
+
+       //sum k
        for(j=0;j<npoints;++j)
        {
                Lpj = 0;
                div = 1;
                tj = t[j];
-               
+
                for(k=0;k<npoints;++k)
                {
                        if(k != j) //because there is no summand for k == j, since that term is missing from the original equation
@@ -162,17 +162,17 @@ void DerivativeApprox(T &df, const T f[], const Real t[], int npoints, int index
                                                mult *= tval - t[i];
                                        }
                                }
-                               
+
                                Lpj += mult; //add into the summation
-                               
+
                                //since the ks follow the exact patern we need for the divisor (use that too)
                                div *= tj - t[k];
                        }
                }
-               
+
                //get the actual coefficient
                Lpj /= div;
-               
+
                //add it in to the equation
                df += f[j]*Lpj;
        }
@@ -197,7 +197,7 @@ void GetFirstDerivatives(const std::vector<synfig::Point> &f, unsigned int left,
        else if(right - left < 3)
        {
                synfig::Vector v = f[left+1] - f[left];
-               
+
                //set both to the one we want
                *(synfig::Vector*)out = v;
                out += dfstride;
@@ -210,7 +210,7 @@ void GetFirstDerivatives(const std::vector<synfig::Point> &f, unsigned int left,
                ThreePointdt(*(synfig::Vector*)out,f[left+0], f[left+1], f[left+2], -1);
                current += 1;
                out += dfstride;
-               
+
                for(;current < right-1; current++, out += dfstride)
                {
                        ThreePointdt(*(synfig::Vector*)out,f[current-1], f[current], f[current+1], 0);
@@ -219,18 +219,18 @@ void GetFirstDerivatives(const std::vector<synfig::Point> &f, unsigned int left,
                ThreePointdt(*(synfig::Vector*)out,f[right-3], f[right-2], f[right-1], 1);
                current++;
                out += dfstride;
-               
+
        }else //can use 5 point
        {
                //left 2 then middle bunch then right two
                //may want to use 3 point for inner edge ones
-               
+
                FivePointdt(*(synfig::Vector*)out,f[left+0], f[left+1], f[left+2], f[left+3], f[left+4], -2);
                out += dfstride;
                FivePointdt(*(synfig::Vector*)out,f[left+1], f[left+2], f[left+3], f[left+4], f[left+5], -1);
                out += dfstride;
                current += 2;
-               
+
                for(;current < right-2; current++, out += dfstride)
                {
                        FivePointdt(*(synfig::Vector*)out,f[current-2], f[current-1], f[current], f[current+1], f[current+2], 0);
@@ -238,27 +238,27 @@ void GetFirstDerivatives(const std::vector<synfig::Point> &f, unsigned int left,
 
                FivePointdt(*(synfig::Vector*)out,f[right-5], f[right-4], f[right-3], f[right-2], f[right-1], 1);
                out += dfstride;
-               FivePointdt(*(synfig::Vector*)out,f[right-6], f[right-5], f[right-4], f[right-3], f[right-2], 2);               
+               FivePointdt(*(synfig::Vector*)out,f[right-6], f[right-5], f[right-4], f[right-3], f[right-2], 2);
                out += dfstride;
                current += 2;
        }
 }
 
-void GetSimpleDerivatives(const std::vector<synfig::Point> &f, int left, int right, 
+void GetSimpleDerivatives(const std::vector<synfig::Point> &f, int left, int right,
                                                        std::vector<synfig::Point> &df, int outleft,
                                                        const std::vector<synfig::Real> &di)
 {
        int i1,i2,i;
        int offset = 2; //df = 1/2 (f[i+o]-f[i-o])
-       
+
        assert((int)df.size() >= right-left+outleft); //must be big enough
-       
+
        for(i = left; i < right; ++i)
        {
                //right now indices (figure out distance later)
                i1 = std::max(left,i-offset);
                i2 = std::max(left,i+offset);
-               
+
                df[outleft++] = (f[i2] - f[i1])*0.5f;
        }
 }
@@ -267,59 +267,59 @@ void GetSimpleDerivatives(const std::vector<synfig::Point> &f, int left, int rig
 Real CurveError(const synfig::Point *pts, unsigned int n, std::vector<synfig::Point> &work, int left, int right)
 {
        if(right-left < 2) return -1;
-               
+
        int i,j;
-       
+
        //get distances to each point
        Real d,dtemp,dsum;
        //synfig::Vector v,vt;
        //synfig::Point p1,p2;
        synfig::Point pi;
        std::vector<synfig::Point>::const_iterator it;//,end = work.begin()+right;
-       
+
        //unsigned int size = work.size();
-       
+
        //for each line, get distance
        d = 0; //starts at 0
        for(i = 0; i < (int)n; ++i)
-       {               
+       {
                pi = pts[i];
-               
+
                dsum = FLT_MAX;
-               
+
                it = work.begin()+left;
                //p2 = *it++; //put it at left+1
                for(j = left/*+1*/; j < right; ++j,++it)
                {
                        /*p1 = p2;
                        p2 = *it;
-                       
-                       v = p2 - p1;                    
+
+                       v = p2 - p1;
                        vt = pi - p1;
-                       
+
                        dtemp = v.mag_squared() > 1e-12 ? (vt*v)/v.mag_squared() : 0; //get the projected time value for the current line
-                       
-                       //get distance to line segment with the time value clamped 0-1                  
+
+                       //get distance to line segment with the time value clamped 0-1
                        if(dtemp >= 1)  //use p+v
                        {
-                               vt += v; //makes it pp - (p+v)  
+                               vt += v; //makes it pp - (p+v)
                        }else if(dtemp > 0)     //use vt-proj
                        {
                                vt -= v*dtemp; // vt - proj_v(vt)       //must normalize the projection vector to work
                        }
-                       
+
                        //else use p
                        dtemp = vt.mag_squared();*/
-                       
-                       dtemp = (pi - *it).mag_squared();                       
+
+                       dtemp = (pi - *it).mag_squared();
                        if(dtemp < dsum)
                                dsum = dtemp;
                }
-               
+
                //accumulate the points' min distance from the curve
                d += sqrt(dsum);
        }
-       
+
        return d;
 }
 
@@ -330,14 +330,14 @@ int tesselate_curves(const std::vector<cpindex> &inds, const std::vector<Point>
 {
        if(inds.size() < 2)
                return 0;
-       
+
        etl::hermite<Point>     curve;
        int ntess = 0;
-       
+
        std::vector<cpindex>::const_iterator j = inds.begin(),j2, end = inds.end();
-       
+
        unsigned int ibase = inds[0].curind;
-               
+
        j2 = j++;
        for(; j != end; j2 = j++)
        {
@@ -348,34 +348,34 @@ int tesselate_curves(const std::vector<cpindex> &inds, const std::vector<Point>
                        unsigned int n = j->curind - j2->curind + 1; //thats the number of points in the span
                        unsigned int k, kend, i0, i3;
                        //so reset the right chunk
-                       
+
                        Real t, dt = 1/(Real)(n*2-2); //assuming that they own only n points
-                       
+
                        //start at first intermediate
                        t = 0;
 
-                       i0 = j2->curind; i3 = j->curind;                        
+                       i0 = j2->curind; i3 = j->curind;
                        k = (i0-ibase)*2; //start on first intermediary point (2x+1)
                        kend = (i3-ibase)*2; //last point to set (not intermediary)
-                       
+
                        //build hermite curve, it's easier
                        curve.p1() = f[i0];
                        curve.p2() = f[i3];
                        curve.t1() = df[i0]*(df[i0].mag_squared() > 1e-4 ? j2->tangentscale/df[i0].mag() : j2->tangentscale);
                        curve.t2() = df[i3]*(df[i3].mag_squared() > 1e-4 ? j->tangentscale/df[i3].mag() : j->tangentscale);
                        curve.sync();
-                                               
+
                        //MUST include the end point (since we are ignoring left one)
                        for(; k < kend; ++k, t += dt)
                        {
                                work[k] = curve(t);
                        }
-                       
+
                        work[k] = curve(1); //k == kend, t == 1 -> c(t) == p2
                        ++ntess;
                }
        }
-       
+
        return ntess;
 }
 
@@ -386,7 +386,7 @@ synfigapp::BLineConverter::BLineConverter()
        width = 0;
 };
 
-void 
+void
 synfigapp::BLineConverter::clear()
 {
        f.clear();
@@ -403,7 +403,7 @@ synfigapp::BLineConverter::clear()
 
 void
 synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, const std::list<synfig::Point> &in,const std::list<synfig::Real> &in_w)
-{      
+{
        //Profiling information
        /*etl::clock::value_type initialprocess=0, curveval=0, breakeval=0, disteval=0;
        etl::clock::value_type preproceval=0, tesseval=0, erroreval=0, spliteval=0;
@@ -415,29 +415,29 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                return;
 
        clear();
-       
+
        //removing digitization error harder than expected
-       
+
        //intended to fix little pen errors caused by the way people draw (tiny juts in opposite direction)
        //Different solutions
        //      Average at both end points (will probably eliminate many points at each end of the samples)
        //      Average after the break points are found (weird points would still affect the curve)
        //      Just always get rid of breaks at the beginning and end if they are a certain distance apart
        //              This is will be current approach so all we do now is try to remove duplicate points
-       
+
        //remove duplicate points - very bad for fitting
-       
+
        //timer.reset();
-       
+
        {
                std::list<synfig::Point>::const_iterator i = in.begin(), end = in.end();
                std::list<synfig::Real>::const_iterator iw = in_w.begin();
                synfig::Point   c;
-               
+
                if(in.size() == in_w.size())
                {
                        for(;i != end; ++i,++iw)
-                       {       
+                       {
                                //eliminate duplicate points
                                if(*i != c)
                                {
@@ -448,7 +448,7 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                }else
                {
                        for(;i != end; ++i)
-                       {       
+                       {
                                //eliminate duplicate points
                                if(*i != c)
                                {
@@ -458,55 +458,55 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                }
        }
        //initialprocess = timer();
-       
+
        if(f.size()<=6)
                return;
-       
+
        //get curvature information
        //timer.reset();
-       
+
        {
                int i,i0,i1;
                synfig::Vector v1,v2;
-               
+
                cvt.resize(f.size());
-               
+
                cvt.front() = 1;
                cvt.back() = 1;
-               
+
                for(i = 1; i < (int)f.size()-1; ++i)
                {
                        i0 = std::max(0,i - 2);
                        i1 = std::min((int)(f.size()-1),i + 2);
-                       
+
                        v1 = f[i] - f[i0];
                        v2 = f[i1] - f[i];
-       
+
                        cvt[i] = (v1*v2)/(v1.mag()*v2.mag());
                }
        }
-       
+
        //curveval = timer();
        //synfig::info("calculated curvature");
-       
+
        //find corner points and interpolate inside those
        //timer.reset();
-       {               
+       {
                //break at sharp derivative points
                //TODO tolerance should be set based upon digitization resolution (length dependent index selection)
                Real    tol = 0;                //break tolerance, for the cosine of the change in angle (really high curvature or something)
                Real    fixdistsq = 4*width*width; //the distance to ignore breaks at the end points (for fixing stuff)
                unsigned int i = 0;
-               
+
                int             maxi = -1, last=0;
                Real    minc = 1;
-               
+
                brk.push_back(0);
-               
+
                for(i = 1; i < cvt.size()-1; ++i)
-               {                       
+               {
                        //insert if too sharp (we need to break the tangents to insert onto the break list)
-                       
+
                        if(cvt[i] < tol)
                        {
                                if(cvt[i] < minc)
@@ -518,7 +518,7 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                        {
                                if(maxi >= last + 8)
                                {
-                                       //synfig::info("break: %d-%d",maxi+1,cvt.size());                                               
+                                       //synfig::info("break: %d-%d",maxi+1,cvt.size());
                                        brk.push_back(maxi);
                                        last = maxi;
                                }
@@ -526,23 +526,23 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                                minc = 1;
                        }
                }
-               
+
                brk.push_back(i);
-               
+
                //postprocess for breaks too close to eachother
                Real d = 0;
                Point p = f[brk.front()];
-               
+
                //first set
                for(i = 1; i < brk.size()-1; ++i) //do not want to include end point...
                {
                        d = (f[brk[i]] - p).mag_squared();
-                       if(d > fixdistsq) break; //don't want to group breaks if we ever get over the dist... 
+                       if(d > fixdistsq) break; //don't want to group breaks if we ever get over the dist...
                }
                //want to erase all points before...
                if(i != 1)
-                       brk.erase(brk.begin(),brk.begin()+i-1); 
-               
+                       brk.erase(brk.begin(),brk.begin()+i-1);
+
                //end set
                p = f[brk.back()];
                for(i = brk.size()-2; i > 0; --i) //start at one in from the end
@@ -556,102 +556,102 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
        }
        //breakeval = timer();
        //synfig::info("found break points: %d",brk.size());
-       
+
        //get the distance calculation of the entire curve (for tangent scaling)
 
        //timer.reset();
        {
                synfig::Point p1,p2;
-               
+
                p1=p2=f[0];
-               
+
                di.resize(f.size()); d_i.resize(f.size());
                Real d = 0;
                for(unsigned int i = 0; i < f.size();)
                {
                        d += (d_i[i] = (p2-p1).mag());
                        di[i] = d;
-                       
+
                        p1=p2;
                        p2=f[++i];
                }
        }
        //disteval = timer();
        //synfig::info("calculated distance");
-               
+
        //now break at every point - calculate new derivatives each time
-       
+
        //TODO
        //must be sure that the break points are 3 or more apart
        //then must also store the breaks which are not smooth, etc.
        //and figure out tangents between there
-       
+
        //for each pair of break points (as long as they are far enough apart) recursively subdivide stuff
        //ignore the detected intermediate points
        {
                unsigned int i0=0,i3=0,is=0;
                int i=0,j=0;
-               
+
                bool done = false;
-               
+
                Real errortol = smoothness*pixelwidth; //???? what the hell should this value be
-               
+
                BLinePoint a;
                synfig::Vector v;
-               
+
                //intemp = f; //don't want to smooth out the corners
-               
+
                bool breaktan = false, setwidth;
                a.set_split_tangent_flag(false);
                //a.set_width(width);
                a.set_width(1.0f);
-               
+
                setwidth = (f.size() == f_w.size());
-               
+
                for(j = 0; j < (int)brk.size() - 1; ++j)
                {
                        //for b[j] to b[j+1] subdivide and stuff
                        i0 = brk[j];
                        i3 = brk[j+1];
-                       
+
                        unsigned int size = i3-i0+1; //must include the end points
-                       
+
                        //new derivatives
                        //timer.reset();
                        ftemp.assign(f.begin()+i0, f.begin()+i3+1);
                        for(i=0;i<20;++i)
                                gaussian_blur_3(ftemp.begin(),ftemp.end(),false);
-                       
+
                        df.resize(size);
                        GetFirstDerivatives(ftemp,0,size,(char*)&df[0],sizeof(df[0]));
-                       //GetSimpleDerivatives(ftemp,0,size,df,0,di); 
+                       //GetSimpleDerivatives(ftemp,0,size,df,0,di);
                        //< don't have to worry about indexing stuff as it is all being taken car of right now
                        //preproceval += timer();
                        //numpre++;
-                       
+
                        work.resize(size*2-1); //guarantee that all points will be tesselated correctly (one point inbetween every 2 adjacent points)
-                       
+
                        //if size of work is size*2-1, the step size should be 1/(size*2 - 2)
                        //Real step = 1/(Real)(size*2 - 1);
-                       
+
                        //start off with break points as indices
                        curind.clear();
                        curind.push_back(cpindex(i0,di[i3]-di[i0],0)); //0 error because no curve on the left
                        curind.push_back(cpindex(i3,di[i3]-di[i0],-1)); //error needs to be reevaluated
                        done = false; //we want to loop
-                       
+
                        unsigned int dcount = 0;
-                       
-                       //while there are still enough points between us, and the error is too high subdivide (and invalidate neighbors that share tangents)            
+
+                       //while there are still enough points between us, and the error is too high subdivide (and invalidate neighbors that share tangents)
                        while(!done)
-                       {                                       
+                       {
                                //tesselate all curves with invalid error values
                                work[0] = f[i0];
-                               
+
                                //timer.reset();
                                /*numtess += */tesselate_curves(curind,f,df,work);
                                //tesseval += timer();
-                               
+
                                //now get all error values
                                //timer.reset();
                                for(i = 1; i < (int)curind.size(); ++i)
@@ -662,7 +662,7 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                                                int size = curind[i].curind - curind[i-1].curind + 1;
                                                curind[i].error = CurveError(&f[curind[i-1].curind], size,
                                                                                                         work,(curind[i-1].curind - i0)*2,(curind[i].curind - i0)*2+1);
-                                               
+
                                                /*if(curind[i].error > 1.0e5)
                                                {
                                                        synfig::info("Holy crap %d-%d error %f",curind[i-1].curind,curind[i].curind,curind[i].error);
@@ -675,28 +675,28 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                                        }
                                }
                                //erroreval += timer();
-                               
+
                                //assume we're done
                                done = true;
-                               
+
                                //check each error to see if it's too big, if so, then subdivide etc.
                                int indsize = (int)curind.size();
                                Real maxrelerror = 0;
                                int maxi = -1;//, numpoints;
-                               
+
                                //timer.reset();
                                //get the maximum error and split there
                                for(i = 1; i < indsize; ++i)
                                {
                                        //numpoints = curind[i].curind - curind[i-1].curind + 1;
-                                       
+
                                        if(curind[i].error > maxrelerror && curind[i].curind - curind[i-1].curind > 2) //only accept if it's valid
                                        {
                                                maxrelerror = curind[i].error;
                                                maxi = i;
                                        }
                                }
-                               
+
                                //split if error is too great
                                if(maxrelerror > errortol)
                                {
@@ -704,11 +704,11 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                                        unsigned int    ibase = curind[maxi-1].curind, itop = curind[maxi].curind,
                                                                        ibreak = (ibase + itop)/2;
                                        Real scale, scale2;
-                                       
+
                                        assert(ibreak < f.size());
-                                       
+
                                        //synfig::info("Split %d -%d- %d, error: %f", ibase,ibreak,itop,maxrelerror);
-                                       
+
                                        if(ibase != itop)
                                        {
                                                //invalidate current error of the changed tangents and add an extra segment
@@ -716,89 +716,89 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                                                curind[maxi].error = -1;
                                                curind[maxi-1].error = -1;
                                                if(maxi+1 < indsize) curind[maxi+1].error = -1; //if there is a curve segment beyond this it will be effected as well
-                                               
+
                                                scale = di[itop] - di[ibreak];
                                                scale2 = maxi+1 < indsize ? di[curind[maxi+1].curind] - di[itop] : scale; //to the right valid?
                                                curind[maxi].tangentscale = std::min(scale, scale2);
-                                                                                               
+
                                                scale = di[ibreak] - di[ibase];
                                                scale2 = maxi >= 2 ? di[ibase] - di[curind[maxi-2].curind] : scale; // to the left valid -2 ?
                                                curind[maxi-1].tangentscale = std::min(scale, scale2);
-                                               
+
                                                scale = std::min(di[ibreak] - di[ibase], di[itop] - di[ibreak]);
-                                               
+
                                                curind.insert(curind.begin()+maxi,cpindex(ibreak, scale, -1));
                                                //curind.push_back(cpindex(ibreak, scale, -1));
                                                //std::sort(curind.begin(), curind.end());
-                                               
+
                                                done = false;
                                                //numsplit++;
                                        }
                                }
                                //spliteval += timer();
-                               
+
                                dcount++;
                        }
-       
-                       //insert the last point too (just set tangent for now                   
+
+                       //insert the last point too (just set tangent for now
                        is = curind[0].curind;
-                       
-                       //first point inherits current tangent status                   
+
+                       //first point inherits current tangent status
                        v = df[is - i0];
                        if(v.mag_squared() > EPSILON)
                                v *= (curind[0].tangentscale/v.mag());
-                                                       
+
                        if(!breaktan)
                                a.set_tangent(v);
                        else a.set_tangent2(v);
-                       
+
                        a.set_vertex(f[is]);
                        if(setwidth)a.set_width(f_w[is]);
-                       
+
                        out.push_back(a);
                        a.set_split_tangent_flag(false); //won't need to break anymore
                        breaktan = false;
-                       
+
                        for(i = 1; i < (int)curind.size()-1; ++i)
                        {
                                is = curind[i].curind;
-                               
+
                                //first point inherits current tangent status
                                v = df[is-i0];
                                if(v.mag_squared() > EPSILON)
                                        v *= (curind[i].tangentscale/v.mag());
-                                                               
+
                                a.set_tangent(v); // always inside, so guaranteed to be smooth
                                a.set_vertex(f[is]);
                                if(setwidth)a.set_width(f_w[is]);
-                               
+
                                out.push_back(a);
                        }
-                       
+
                        //set the last point's data
                        is = curind.back().curind; //should already be this
-                       
+
                        v = df[is-i0];
                        if(v.mag_squared() > EPSILON)
                                v *= (curind.back().tangentscale/v.mag());
-                       
+
                        a.set_tangent1(v);
                        a.set_split_tangent_flag(true);
                        breaktan = true;
-                       
+
                        //will get the vertex and tangent 2 from next round
                }
-               
+
                a.set_vertex(f[i3]);
                a.set_split_tangent_flag(false);
                if(setwidth)
                        a.set_width(f_w[i3]);
                out.push_back(a);
-               
+
                /*etl::clock::value_type totaltime = total(),
                                                           misctime = totaltime - initialprocess - curveval - breakeval - disteval
                                                                          - preproceval - tesseval - erroreval - spliteval;
-               
+
                synfig::info(
                        "Curve Convert Profile:\n"
                        "\tInitial Preprocess:    %f\n"
@@ -816,7 +816,7 @@ synfigapp::BLineConverter::operator () (std::list<synfig::BLinePoint> &out, cons
                        numpre,preproceval,numtess,tesseval,numerror,erroreval,numsplit,spliteval,
                        in.size(),out.size(),
                        totaltime,misctime);*/
-               
+
                return;
        }
 }
@@ -825,7 +825,7 @@ void synfigapp::BLineConverter::EnforceMinWidth(std::list<synfig::BLinePoint> &b
 {
        std::list<synfig::BLinePoint>::iterator i = bline.begin(),
                                                                                        end = bline.end();
-       
+
        for(i = bline.begin(); i != end; ++i)
        {
                if(i->get_width() < min_pressure)
index 7e5c020..f3fd890 100644 (file)
@@ -39,7 +39,7 @@
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace synfigapp {
-       
+
 class BLineConverter
 {
 public:
@@ -48,15 +48,15 @@ public:
                int             curind;
                synfig::Real    tangentscale;
                synfig::Real    error;  //negative error will indicate invalid;
-               
-               cpindex(int ci, synfig::Real s=0, synfig::Real e=-1) 
-               :curind(ci), tangentscale(s), error(e) 
+
+               cpindex(int ci, synfig::Real s=0, synfig::Real e=-1)
+               :curind(ci), tangentscale(s), error(e)
                {}
-               
+
                cpindex(const cpindex & o)
-               :curind(o.curind), tangentscale(o.tangentscale), error(o.error) 
+               :curind(o.curind), tangentscale(o.tangentscale), error(o.error)
                {}
-               
+
                const cpindex & operator = (const cpindex & rhs)
                {
                        curind = rhs.curind;
@@ -64,12 +64,12 @@ public:
                        error = rhs.error;
                        return *this;
                }
-               
+
                bool operator < (const cpindex &rhs) const
                {
-                       return curind < rhs.curind;             
+                       return curind < rhs.curind;
                }
-               
+
                //point is obviously in[curind]
                //tangent scale will get reset to the smallest (or something else depending on experimentation)
        };
@@ -81,18 +81,18 @@ private:
 
        //temporary point storage for vector calc
        std::vector<synfig::Point>      ftemp;
-       
-       std::vector<synfig::Vector>     df; //the derivative cache      
+
+       std::vector<synfig::Vector>     df; //the derivative cache
        std::vector<synfig::Real>       cvt; //the curvature cache
-       
+
        std::vector<int>                        brk; //the break point cache
-       
+
        std::vector<synfig::Real>       di,     //cumulative distance
                                                                d_i; //distance between adjacent segments
-       
+
        std::vector<synfig::Point>      work; //the working point cache for the entire curve
        std::vector<cpindex>            curind;
-       
+
        //function parameters
        void clear();
 
@@ -108,7 +108,7 @@ public:
        static void EnforceMinWidth(std::list<synfig::BLinePoint> &bline, synfig::Real min_pressure);
        void operator ()(std::list<synfig::BLinePoint> &out, const std::list<synfig::Point> &in,const std::list<synfig::Real> &in_w);
 };
-       
+
 }; // END of namespace synfigapp
 
 /* === E N D =============================================================== */
index e89fff7..e58802f 100644 (file)
@@ -104,18 +104,18 @@ CanvasInterface::set_time(synfig::Time x)
        if(cur_time_.is_equal(x))
                return;
        cur_time_=x;
-       
+
        signal_time_changed()();
        signal_dirty_preview()();
 }
-       
+
 synfig::Time
 CanvasInterface::get_time()const
 {
        return cur_time_;
 }
 
-void 
+void
 CanvasInterface::refresh_current_values()
 {
        get_canvas()->set_time(cur_time_);
@@ -138,20 +138,20 @@ CanvasInterface::set_mode(Mode x)
        Action::Handle  action(Action::EditModeSet::create());
 
        assert(action);
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("edit_mode",x);
-       
+
        if(!action->is_ready())
        {
                get_ui_interface()->error(_("Action Not Ready, unable to change mode"));
                assert(0);
                return;
        }
-       
+
        if(!get_instance()->perform_action(action))
-               get_ui_interface()->error(_("Unable to change mode"));                  
+               get_ui_interface()->error(_("Unable to change mode"));
 
 //     mode_=x;
 //     signal_mode_changed_(x);
@@ -171,9 +171,9 @@ CanvasInterface::add_layer_to(String name, Canvas::Handle canvas, int depth)
        synfigapp::Action::PassiveGrouper group(get_instance().get(),_("Add Layer To"));
 
        Layer::Handle   layer(Layer::create(name));
-       
+
        assert(layer);
-       
+
        if(!layer)
                return 0;
 
@@ -184,7 +184,7 @@ CanvasInterface::add_layer_to(String name, Canvas::Handle canvas, int depth)
        }
 
        layer->set_canvas(canvas);
-       
+
        // Apply some defaults
        if(layer->set_param("fg",synfigapp::Main::get_foreground_color()))
                layer->set_param("bg",synfigapp::Main::get_background_color());
@@ -204,14 +204,14 @@ CanvasInterface::add_layer_to(String name, Canvas::Handle canvas, int depth)
                for(iter=paramlist.begin();iter!=paramlist.end();++iter)
                {
                        ValueNode::Handle value_node;
-                       
+
                        if(iter->second.get_type()==ValueBase::TYPE_LIST)
                                value_node=LinkableValueNode::create("dynamic_list",iter->second);
                        else if(LinkableValueNode::check_type("composite",iter->second.get_type()) &&
                                (iter->second.get_type()!=ValueBase::TYPE_COLOR && iter->second.get_type()!=ValueBase::TYPE_VECTOR)
                        )
                                value_node=LinkableValueNode::create("composite",iter->second);
-                       
+
                        if(value_node)
                                layer->connect_dynamic_param(iter->first,value_node);
                }
@@ -223,20 +223,20 @@ CanvasInterface::add_layer_to(String name, Canvas::Handle canvas, int depth)
        assert(action);
        if(!action)
                return 0;
-       
+
        action->set_param("canvas",canvas);
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("new",layer);
-       
+
        if(!action->is_ready())
        {
-               get_ui_interface()->error(_("Action Not Ready"));                       
+               get_ui_interface()->error(_("Action Not Ready"));
                return 0;
        }
-       
+
        if(!get_instance()->perform_action(action))
        {
-               get_ui_interface()->error(_("Action Failed."));                 
+               get_ui_interface()->error(_("Action Failed."));
                return 0;
        }
 
@@ -245,30 +245,30 @@ CanvasInterface::add_layer_to(String name, Canvas::Handle canvas, int depth)
        if(depth>0)
        {
                Action::Handle  action(Action::create("layer_move"));
-       
+
                assert(action);
                if(!action)
                        return 0;
-               
+
                action->set_param("canvas",canvas);
                action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
                action->set_param("layer",layer);
                action->set_param("new_index",depth);
-               
+
                if(!action->is_ready())
                {
-                       get_ui_interface()->error(_("Move Action Not Ready"));                  
+                       get_ui_interface()->error(_("Move Action Not Ready"));
                        return 0;
                }
-               
+
                if(!get_instance()->perform_action(action))
                {
-                       get_ui_interface()->error(_("Move Action Failed."));                    
+                       get_ui_interface()->error(_("Move Action Failed."));
                        return 0;
                }
-       }       
-       
-       
+       }
+
+
        return layer;
 }
 
@@ -281,22 +281,22 @@ CanvasInterface::convert(ValueDesc value_desc, String type)
        assert(action);
        if(!action)
                return 0;
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("value_desc",value_desc);
        action->set_param("type",type);
-       
+
        if(!action->is_ready())
        {
-               get_ui_interface()->error(_("Action Not Ready"));                       
+               get_ui_interface()->error(_("Action Not Ready"));
                return 0;
        }
-       
+
        if(get_instance()->perform_action(action))
                return true;
-       
-       get_ui_interface()->error(_("Action Failed."));                 
+
+       get_ui_interface()->error(_("Action Failed."));
        return false;
 }
 
@@ -308,28 +308,28 @@ CanvasInterface::add_value_node(synfig::ValueNode::Handle value_node, synfig::St
                get_ui_interface()->error(_("Empty name!"));
                return false;
        }
-       
+
        Action::Handle  action(Action::ValueNodeAdd::create());
 
        assert(action);
        if(!action)
                return 0;
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("new",value_node);
        action->set_param("name",name);
-       
+
        if(!action->is_ready())
        {
-               get_ui_interface()->error(_("Action Not Ready"));                       
+               get_ui_interface()->error(_("Action Not Ready"));
                return 0;
        }
-       
+
        if(get_instance()->perform_action(action))
                return true;
-       
-       get_ui_interface()->error(_("Action Failed."));                 
+
+       get_ui_interface()->error(_("Action Failed."));
        return false;
 }
 
@@ -345,10 +345,10 @@ CanvasInterface::generate_param_list(const ValueDesc &value_desc)
 
        if(value_desc.parent_is_value_node())
                param_list.add("parent_value_node",value_desc.get_parent_value_node());
-       
+
        if(value_desc.is_value_node())
                param_list.add("value_node",value_desc.get_value_node());
-       
+
        if(value_desc.is_const())
                param_list.add("value",value_desc.get_value());
 
@@ -366,7 +366,7 @@ CanvasInterface::generate_param_list(const ValueDesc &value_desc)
                        param_list.add("dest",value_desc);
                        param_list.add("src",children_list.front().get_value_node());
                }
-       }       
+       }
        return param_list;
 }
 
@@ -384,7 +384,7 @@ CanvasInterface::generate_param_list(const std::list<synfigapp::ValueDesc> &valu
                param_list.add("value_desc",*iter);
                if(iter->is_value_node())
                {
-                       param_list.add("value_node",iter->get_value_node());                    
+                       param_list.add("value_node",iter->get_value_node());
                }
        }
 
@@ -400,13 +400,13 @@ CanvasInterface::set_rend_desc(const synfig::RendDesc &rend_desc)
        assert(action);
        if(!action)
                return;
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("rend_desc",rend_desc);
-               
+
        if(!get_instance()->perform_action(action))
-               get_ui_interface()->error(_("Action Failed."));                 
+               get_ui_interface()->error(_("Action Failed."));
 }
 
 bool
@@ -466,7 +466,7 @@ bool
 CanvasInterface::import(const synfig::String &filename, bool copy)
 {
        Action::PassiveGrouper group(get_instance().get(),_("Import Image"));
-       
+
        synfig::info("Attempting to import "+filename);
 
 
@@ -482,7 +482,7 @@ CanvasInterface::import(const synfig::String &filename, bool copy)
        // If this is a SIF file, then we need to do things slightly differently
        if(ext=="sif" || ext=="sifz")try
        {
-               
+
                Canvas::Handle outside_canvas(synfig::open_canvas(filename));
                if(!outside_canvas)
                        throw String(_("Unable to open this composition"));
@@ -507,9 +507,9 @@ CanvasInterface::import(const synfig::String &filename, bool copy)
                get_ui_interface()->error(_("Uncaught exception when attempting\nto open this composition -- ")+filename);
                return false;
        }
-       
-       
-       
+
+
+
        if(!Importer::book().count(ext))
        {
                get_ui_interface()->error(_("I don't know how to open images of this type -- ")+ext);
@@ -559,8 +559,8 @@ CanvasInterface::import(const synfig::String &filename, bool copy)
 
                layer->set_description(basename(filename));
                signal_layer_new_description()(layer,filename);
-       
-               return true;            
+
+               return true;
        }
        catch(...)
        {
@@ -579,20 +579,20 @@ CanvasInterface::waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Wayp
        assert(action);
        if(!action)
                return;
-       
+
        waypoint.make_unique();
        waypoint.set_time(get_time());
 
        ValueNode::Handle value_node(value_desc.get_value_node());
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("waypoint",waypoint);
        action->set_param("time",get_time());
        action->set_param("value_node",value_node);
-               
+
        if(!get_instance()->perform_action(action))
-               get_ui_interface()->error(_("Action Failed."));                 
+               get_ui_interface()->error(_("Action Failed."));
 }
 
 void
@@ -603,16 +603,16 @@ CanvasInterface::waypoint_remove(synfigapp::ValueDesc value_desc,synfig::Waypoin
        assert(action);
        if(!action)
                return;
-       
+
        ValueNode::Handle value_node(value_desc.get_value_node());
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("waypoint",waypoint);
        action->set_param("value_node",value_node);
-               
+
        if(!get_instance()->perform_action(action))
-               get_ui_interface()->error(_("Action Failed."));                 
+               get_ui_interface()->error(_("Action Failed."));
 }
 
 
@@ -629,24 +629,24 @@ CanvasInterface::auto_export(ValueNode::Handle value_node)
        assert(action);
        if(!action)
                return;
-       
+
        String name(strprintf(_("Unnamed%08d"),synfig::UniqueID().get_uid()));
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("new",value_node);
        action->set_param("name",name);
-               
+
        if(!get_instance()->perform_action(action))
-               get_ui_interface()->error(_("Action Failed."));                 
+               get_ui_interface()->error(_("Action Failed."));
 */
 }
 
 void
 CanvasInterface::auto_export(const ValueDesc& value_desc)
-{      
+{
        // THIS FUNCTION IS DEPRECATED, AND IS NOW A STUB.
-#if 0  
+#if 0
        // Check to see if we are already exported.
        if(value_desc.is_exported())
                return;
@@ -656,16 +656,16 @@ CanvasInterface::auto_export(const ValueDesc& value_desc)
        assert(action);
        if(!action)
                return;
-       
+
        String name(strprintf(_("Unnamed%08d"),synfig::UniqueID().get_uid()));
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("value_desc",value_desc);
        action->set_param("name",name);
-               
+
        if(!get_instance()->perform_action(action))
-               get_ui_interface()->error(_("Action Failed."));                 
+               get_ui_interface()->error(_("Action Failed."));
 #endif
 }
 
@@ -675,18 +675,18 @@ CanvasInterface::change_value(synfigapp::ValueDesc value_desc,synfig::ValueBase
        // If this isn't really a change, then don't bother
        if(new_value==value_desc.get_value(get_time()))
                return true;
-               
+
        // If this change needs to take place elsewhere, then so be it.
        if(value_desc.get_canvas() && value_desc.get_canvas()->get_root()!=get_canvas()->get_root())do
        {
                etl::handle<Instance> instance;
                instance=find_instance(value_desc.get_canvas()->get_root());
-               
+
                if(instance)
                        return instance->find_canvas_interface(value_desc.get_canvas())->change_value(value_desc,new_value);
                else
                {
-                       get_ui_interface()->error(_("The value you are trying to edit is in a composition\nwhich doesn't seem to be open. Open that composition and you\nshould be able to edit this value as normal."));                       
+                       get_ui_interface()->error(_("The value you are trying to edit is in a composition\nwhich doesn't seem to be open. Open that composition and you\nshould be able to edit this value as normal."));
                        return false;
                }
        }while(0);
@@ -694,13 +694,13 @@ CanvasInterface::change_value(synfigapp::ValueDesc value_desc,synfig::ValueBase
        else
        { synfig::warning("Can't get canvas from value desc...?"); }
 #endif
-       
+
        synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_set"));
        if(!action)
        {
                return false;
        }
-       
+
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("time",get_time());
@@ -731,7 +731,7 @@ _process_value_desc(const synfigapp::ValueDesc& value_desc,std::vector<synfigapp
                        return ret;
                ret+=CanvasInterface::find_important_value_descs(canvas,out,guid_set);
        }
-       
+
        if(value_desc.is_value_node())
        {
                ValueNode::Handle value_node(value_desc.get_value_node());
@@ -739,7 +739,7 @@ _process_value_desc(const synfigapp::ValueDesc& value_desc,std::vector<synfigapp
                if(guid_set.count(value_node->get_guid()))
                        return ret;
                guid_set.insert(value_node->get_guid());
-               
+
                if(LinkableValueNode::Handle::cast_dynamic(value_node))
                {
                        if(ValueNode_DynamicList::Handle::cast_dynamic(value_node))
@@ -763,7 +763,7 @@ _process_value_desc(const synfigapp::ValueDesc& value_desc,std::vector<synfigapp
                        ret++;
                }
        }
-       
+
        return ret;
 }
 
@@ -774,7 +774,7 @@ CanvasInterface::find_important_value_descs(synfig::Canvas::Handle canvas,std::v
        if(!canvas->is_inline())
        {
                ValueNodeList::const_iterator iter;
-       
+
                for(
                        iter=canvas->value_node_list().begin();
                        iter!=canvas->value_node_list().end();
@@ -783,11 +783,11 @@ CanvasInterface::find_important_value_descs(synfig::Canvas::Handle canvas,std::v
        }
 
        Canvas::const_iterator iter;
-       
+
        for(iter=canvas->begin();iter!=canvas->end();++iter)
        {
                Layer::Handle layer(*iter);
-               
+
                Layer::DynamicParamList::const_iterator iter;
                for(
                        iter=layer->dynamic_param_list().begin();
@@ -801,7 +801,7 @@ CanvasInterface::find_important_value_descs(synfig::Canvas::Handle canvas,std::v
                if(value.is_valid())
                        ret+=_process_value_desc(ValueDesc(layer,"canvas"),out,guid_set);
        }
-       
+
        return ret;
 }
 
@@ -833,7 +833,7 @@ CanvasInterface::seek_time(synfig::Time time)
 {
        if(!time)
                return;
-       
+
        float fps(get_canvas()->rend_desc().get_frame_rate());
 
        if(time>=synfig::Time::end())
@@ -846,7 +846,7 @@ CanvasInterface::seek_time(synfig::Time time)
                set_time(get_canvas()->rend_desc().get_time_end());
                return;
        }
-               
+
        Time newtime(get_time()+time);
        newtime=newtime.round(fps);
 
index 63891d8..38643ac 100644 (file)
@@ -47,16 +47,16 @@ namespace synfig { class ValueNode_DynamicList; class Waypoint; class GUIDSet; c
 
 namespace synfigapp {
 
-namespace Action { class ParamList; class Param; class EditModeSet; }; 
+namespace Action { class ParamList; class Param; class EditModeSet; };
 
 class Instance;
 class ValueDesc;
-       
+
 class CanvasInterface : public etl::shared_object, public sigc::trackable
 {
        friend class Instance;
        friend class Action::EditModeSet;
-               
+
 public:
 
        typedef EditMode Mode;
@@ -82,7 +82,7 @@ private:
        sigc::signal<void,synfig::Layer::Handle,synfig::String> signal_layer_new_description_;
        sigc::signal<void,synfig::Canvas::Handle> signal_canvas_added_;
        sigc::signal<void,synfig::Canvas::Handle> signal_canvas_removed_;
-       
+
        sigc::signal<void,synfig::ValueNode::Handle> signal_value_node_added_;
        sigc::signal<void,synfig::ValueNode::Handle> signal_value_node_deleted_;
        sigc::signal<void,synfig::ValueNode::Handle> signal_value_node_changed_;
@@ -112,10 +112,10 @@ public:   // Signal Interface
 
        //! Signal called when layer is raised.
        sigc::signal<void,synfig::Layer::Handle>& signal_layer_raised() { return signal_layer_raised_; }
-       
+
        //! Signal called when layer is lowered.
        sigc::signal<void,synfig::Layer::Handle>& signal_layer_lowered() { return signal_layer_lowered_; }
-       
+
        //! Signal called when layer has been inserted at a given position.
        sigc::signal<void,synfig::Layer::Handle,int>& signal_layer_inserted() { return signal_layer_inserted_; }
 
@@ -186,21 +186,21 @@ public:
 
        //! Changes the current SelectionManager object
        void set_selection_manager(const etl::handle<SelectionManager> &sm) { selection_manager_=sm; }
-       
+
        //! Disables the selection manager
        void unset_selection_manager() { selection_manager_=new NullSelectionManager(); }
-       
+
        //! Returns a handle to the current SelectionManager
-       const etl::handle<SelectionManager> &get_selection_manager()const { return selection_manager_; }        
+       const etl::handle<SelectionManager> &get_selection_manager()const { return selection_manager_; }
 
        //! Changes the current UIInterface object
        void set_ui_interface(const etl::handle<UIInterface> &uim) { ui_interface_=uim; }
 
        //! Disables the UIInterface
        void unset_ui_interface() { ui_interface_=new DefaultUIInterface(); }
-       
+
        //! Returns a handle to the current UIInterface
-       const etl::handle<UIInterface> &get_ui_interface() { return ui_interface_; }    
+       const etl::handle<UIInterface> &get_ui_interface() { return ui_interface_; }
 
        //! Returns the Canvas associated with this interface
        etl::handle<synfig::Canvas> get_canvas()const { return canvas_; }
@@ -216,7 +216,7 @@ public:
 
        //! Changes the ID of the canvas. Undoable.
        bool set_id(const synfig::String &x);
-       
+
        //! Convience function to retrieve the name of the canvas
        synfig::String get_name()const { return get_canvas()->get_name(); }
 
@@ -228,23 +228,23 @@ public:
 
        //! Sets the current time
        void set_time(synfig::Time x);
-       
+
        //! Retrieves the current time
        synfig::Time get_time()const;
-       
+
        //! Changes the current time to the next keyframe
        void jump_to_next_keyframe();
 
        //! Changes the current time to the next keyframe
        void jump_to_prev_keyframe();
-       
+
        void seek_frame(int frames);
 
        void seek_time(synfig::Time time);
-       
+
        //! \writeme
        void refresh_current_values();
-       
+
        //! Sets the current editing mode
        /*! \see Mode */
        void set_mode(Mode x);
@@ -270,8 +270,8 @@ public:
        void set_rend_desc(const synfig::RendDesc &rend_desc);
 
        bool import(const synfig::String &filename, bool copy=false);
-       
-       
+
+
        void waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Waypoint waypoint);
 
        void waypoint_remove(synfigapp::ValueDesc value_desc,synfig::Waypoint waypoint);
@@ -298,7 +298,7 @@ public:
        PushMode(etl::loose_handle<CanvasInterface> c, CanvasInterface::Mode mode):
                canvas_interface_(c.get()), old_mode_(canvas_interface_->get_mode())
        { canvas_interface_->set_mode(mode); }
-       
+
        ~PushMode() { canvas_interface_->set_mode(old_mode_); }
 }; // END of class PushMode
 
index c1565ca..cd9f1ad 100644 (file)
@@ -90,7 +90,7 @@ void
 CVSInfo::set_file_name(const synfig::String& file_name)
 {
        file_name_=file_name;
-       
+
        std::ifstream file((dirname(file_name_)+"/CVS/Root").c_str());
 
        if(file)
@@ -108,10 +108,10 @@ CVSInfo::calc_repository_info()
 #ifdef _DEBUG
        synfig::info("in_sandbox() = %d",in_sandbox());
 #endif
-       
+
        if(!in_sandbox_)
                return;
-       
+
        std::ifstream file((dirname(file_name_)+"/CVS/Entries").c_str());
 
        while(file)
@@ -122,7 +122,7 @@ CVSInfo::calc_repository_info()
                {
                        in_repository_=true;
                        String::size_type s,f;
-                       
+
                        // Grab the version
                        s=line.find('/',1);
                        assert(s!=String::npos);
@@ -130,7 +130,7 @@ CVSInfo::calc_repository_info()
                        f=line.find('/',s+1);
                        assert(f!=String::npos);
                        cvs_version_=String(line,s,f-s);
-                       
+
                        // Grab the time
 #ifdef HAVE_STRPTIME
                        s=f+1;
@@ -140,7 +140,7 @@ CVSInfo::calc_repository_info()
                        strptime(String(line,s,f-s).c_str(),"%c",&time_struct);
                        original_timestamp_=mktime(&time_struct);
 #endif
-                       
+
                        if(
                                system(strprintf(
                                        "cd '%s' && cvs status '%s' | grep -q -e 'Needs Patch'",
@@ -162,8 +162,8 @@ CVSInfo::calc_repository_info()
                                synfig::info("UPDATE_AVAILABLE=FALSE");
                                update_available_=false;
                        }
-                               
-                       
+
+
 #ifdef _DEBUG
                        synfig::info("in_repository() = %d",in_repository());
                        synfig::info("get_cvs_version() = %s",get_cvs_version().c_str());
@@ -172,7 +172,7 @@ CVSInfo::calc_repository_info()
                        synfig::info("get_current_timestamp() = %s",ctime(&t));
                        synfig::info("get_cvs_root() = %s",get_cvs_root().c_str());
                        synfig::info("get_cvs_module() = %s",get_cvs_module().c_str());
-#endif                 
+#endif
                        return;
                }
        }
@@ -249,7 +249,7 @@ CVSInfo::get_cvs_root()const
 {
        if(!in_sandbox_)
                return synfig::String();
-       
+
        std::ifstream file((dirname(file_name_)+"/CVS/Root").c_str());
 
        if(file)
@@ -305,11 +305,11 @@ CVSInfo::cvs_add(const synfig::String& message)
                throw int();
                return;
        }
-       
+
        synfig::String command(strprintf("cd '%s' && %s add -m '%s' '%s'",dirname(file_name_).c_str(),cvs_command.c_str(),fix_msg(message).c_str(),basename(file_name_).c_str()));
-       
+
        int ret(system(command.c_str()));
-       
+
        calc_repository_info();
 
        switch(ret)
@@ -322,7 +322,7 @@ CVSInfo::cvs_add(const synfig::String& message)
                break;
        }
 }
-       
+
 void
 CVSInfo::cvs_update()
 {
@@ -332,13 +332,13 @@ CVSInfo::cvs_update()
                throw int();
                return;
        }
-       
+
        synfig::String command(strprintf("cd '%s' && %s update '%s'",dirname(file_name_).c_str(),cvs_command.c_str(),basename(file_name_).c_str()));
-       
+
        int ret(system(command.c_str()));
 
        calc_repository_info();
-       
+
        switch(ret)
        {
        case 0:
@@ -349,7 +349,7 @@ CVSInfo::cvs_update()
                break;
        }
 }
-       
+
 void
 CVSInfo::cvs_commit(const synfig::String& message)
 {
@@ -359,13 +359,13 @@ CVSInfo::cvs_commit(const synfig::String& message)
                throw int();
                return;
        }
-       
+
        synfig::String command(strprintf("cd '%s' && %s commit -m '%s' '%s'",dirname(file_name_).c_str(),cvs_command.c_str(),fix_msg(message).c_str(),basename(file_name_).c_str()));
-       
+
        int ret(system(command.c_str()));
 
        calc_repository_info();
-       
+
        switch(ret)
        {
        case 0:
index d33e2cb..aa5fbc9 100644 (file)
@@ -45,14 +45,14 @@ class CVSInfo
        bool in_sandbox_;
        bool in_repository_;
        bool update_available_;
-       
+
        synfig::String cvs_version_;
        time_t original_timestamp_;
-       
-       
+
+
 public:
        void calc_repository_info();
-       
+
        CVSInfo(const synfig::String& file_name);
        CVSInfo();
        ~CVSInfo();
@@ -63,7 +63,7 @@ public:
 
        //! Returns TRUE if \a file_name is in a sandbox
        bool in_sandbox()const;
-       
+
        //! Returns TRUE if \a file_name is in the repository
        bool in_repository()const;
 
@@ -75,7 +75,7 @@ public:
 
        //! Returns the CVS version string
        const synfig::String& get_cvs_version()const;
-       
+
        //! Returns the unix timestamp of the repository file
        const time_t &get_original_timestamp()const;
 
@@ -87,16 +87,16 @@ public:
 
        //! Returns the name of the module
        synfig::String get_cvs_module()const;
-                       
+
 //     WRITE OPERATIONS -------------------------------------------------
-       
+
        void cvs_add(const synfig::String& message=synfig::String());
-       
+
        void cvs_update();
-       
+
        void cvs_commit(const synfig::String& message=synfig::String());
 }; // END of class CVSInfo
-       
+
 }; // END of namespace synfigapp
 
 /* === E N D =============================================================== */
index 3509b10..dc089a0 100644 (file)
@@ -34,7 +34,7 @@
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace synfigapp {
-       
+
 /*!    \enum EditMode
 **     \brief \writeme
 */
index 0919e2a..3886f0b 100644 (file)
@@ -54,7 +54,7 @@ class DeviceSettings : public Settings
 public:
        DeviceSettings(InputDevice* input_device):
                input_device(input_device) { }
-               
+
 
        virtual bool get_value(const synfig::String& key, synfig::String& value)const
        {
@@ -85,10 +85,10 @@ public:
 
                        return true;
                }
-               
+
                return Settings::get_value(key, value);
        }
-       
+
        virtual bool set_value(const synfig::String& key,const synfig::String& value)
        {
                        DEBUGPOINT();
@@ -120,10 +120,10 @@ public:
                        input_device->set_foreground_color(synfig::Color(r,g,b,a));
                        return true;
                }
-               
+
                return Settings::set_value(key, value);
        }
-       
+
        virtual KeyList get_key_list()const
        {
                KeyList ret(Settings::get_key_list());
@@ -172,14 +172,14 @@ InputDevice::InputDevice(const synfig::String id_, Type type_):
                        state_="normal";
                        break;
        }
-       
+
        device_settings=new DeviceSettings(this);
        Main::settings().add_domain(device_settings,"input_device."+id_);
 }
 
 InputDevice::~InputDevice()
 {
-       Main::settings().remove_domain("input_device."+id_);    
+       Main::settings().remove_domain("input_device."+id_);
        delete device_settings;
 }
 
index 302e472..ba828f4 100644 (file)
@@ -44,7 +44,7 @@ class DeviceSettings;
 namespace synfigapp {
 class Settings;
 
-       
+
 class InputDevice : public etl::shared_object
 {
 public:
@@ -57,14 +57,14 @@ public:
        };
 
        typedef etl::handle<InputDevice> Handle;
-       
+
 private:
        synfig::String id_;
        Type type_;
        synfig::String state_;
        synfig::Color foreground_color_;
        synfig::Color background_color_;
-       synfig::Distance        bline_width_;   
+       synfig::Distance        bline_width_;
        synfig::Real opacity_;
        synfig::Color::BlendMethod blend_method_;
 
@@ -82,7 +82,7 @@ public:
        const synfig::Real& get_opacity()const { return opacity_; }
        const synfig::Color::BlendMethod& get_blend_method()const { return blend_method_; }
        Type get_type()const { return type_; }
-       
+
        void set_state(const synfig::String& x) { state_=x; }
        void set_foreground_color(const synfig::Color& x) { foreground_color_=x; }
        void set_background_color(const synfig::Color& x) { background_color_=x; }
@@ -90,7 +90,7 @@ public:
        void set_blend_method(const synfig::Color::BlendMethod& x) { blend_method_=x; }
        void set_opacity(const synfig::Real& x) { opacity_=x; }
        void set_type(Type x) { type_=x; }
-       
+
        Settings& settings();
        const Settings& settings()const;
 }; // END of class InputDevice
index 7a39d9c..0a083bb 100644 (file)
@@ -87,7 +87,7 @@ Instance::Instance(Canvas::Handle canvas):
        assert(canvas->is_root());
 
        unset_selection_manager();
-       
+
        instance_map_[canvas]=this;
 } // END of synfigapp::Instance::Instance()
 
@@ -126,7 +126,7 @@ Instance::find_canvas_interface(handle<Canvas> canvas)
                return 0;
        while(canvas->is_inline())
                canvas=canvas->parent();
-       
+
        CanvasInterfaceList::iterator iter;
 
        for(iter=canvas_interface_list().begin();iter!=canvas_interface_list().end();iter++)
@@ -166,7 +166,7 @@ Instance::save_as(const std::string &file_name)
        bool ret;
 
        String old_file_name(get_file_name());
-       
+
        set_file_name(file_name);
 
        ret=save_canvas(file_name,canvas_);
index 4539a5b..94f62d0 100644 (file)
@@ -68,7 +68,7 @@ public:
        */
 
 public:
-       
+
        /*
  -- ** -- P R I V A T E   D A T A ---------------------------------------------
        */
@@ -83,7 +83,7 @@ private:
        sigc::signal<void> signal_filename_changed_;
        sigc::signal<void> signal_saved_;
        etl::handle<SelectionManager> selection_manager_;
-       
+
 protected:
        Instance(etl::handle<synfig::Canvas>);
 
@@ -97,7 +97,7 @@ public:
 
        void set_selection_manager(const etl::handle<SelectionManager> &sm) { assert(sm); selection_manager_=sm; }
        void unset_selection_manager() { selection_manager_=new NullSelectionManager(); }
-       const etl::handle<SelectionManager> &get_selection_manager() { return selection_manager_; }     
+       const etl::handle<SelectionManager> &get_selection_manager() { return selection_manager_; }
 
 
 
@@ -124,7 +124,7 @@ public:     // Interfaces to internal information
        void set_file_name(const synfig::String &name);
 
 public:
-       
+
 
 public:        // Constructor interfaces
        static etl::handle<Instance> create(etl::handle<synfig::Canvas> canvas);
index 8e82d74..7decee5 100644 (file)
@@ -93,19 +93,19 @@ synfigapp::Main::Main(const synfig::String &basepath,ProgressCallback *cb):
 
        synfigapp_ref_count_.reset();
        ref_count_=synfigapp_ref_count_;
-       
+
        // Add initialization after this point
        action_main=new synfigapp::Action::Main();
 
        settings_.construct();
-       
+
        signal_foreground_color_changed_.construct();
        signal_background_color_changed_.construct();
        signal_gradient_changed_.construct();
        signal_opacity_changed_.construct();
        signal_blend_method_changed_.construct();
        signal_interpolation_changed_.construct();
-       
+
        set_foreground_color(Color::black());
        set_background_color(Color::white());
        set_gradient_default_colors();
@@ -120,14 +120,14 @@ synfigapp::Main::~Main()
        if(!synfigapp_ref_count_.unique())
                return;
        synfigapp_ref_count_.detach();
-       
+
        // Add deinitialization after this point
 
-       delete action_main;     
-       
+       delete action_main;
+
        selected_input_device_=0;
        input_devices_.clear();
-       
+
        settings_.destruct();
        signal_foreground_color_changed_.destruct();
        signal_background_color_changed_.destruct();
@@ -298,7 +298,7 @@ synfigapp::Main::set_interpolation(synfig::Waypoint::Interpolation x)
        if(interpolation_!=x)
        {
                interpolation_=x;
-               
+
                signal_interpolation_changed();
        }
 }
@@ -316,10 +316,10 @@ synfigapp::Main::set_bline_width(synfig::Distance x)
        if(x!=bline_width_)
        {
                bline_width_=x;
-               
+
                if(selected_input_device_)
                        selected_input_device_->set_bline_width(x);
-               
+
                signal_bline_width_changed()();
        }
 }
@@ -375,23 +375,23 @@ bool
 synfigapp::Main::select_input_device(InputDevice::Handle input_device)
 {
        assert(input_device);
-       
+
        synfig::info("Input device changed to \"%s\"",input_device->get_id().c_str());
-       
+
        selected_input_device_=input_device;
 
-       set_bline_width(input_device->get_bline_width());       
+       set_bline_width(input_device->get_bline_width());
        set_foreground_color(input_device->get_foreground_color());
-       set_opacity(input_device->get_opacity());       
-       set_blend_method(input_device->get_blend_method());     
-       
+       set_opacity(input_device->get_opacity());
+       set_blend_method(input_device->get_blend_method());
+
        return true;
 }
 
 InputDevice::Handle
 synfigapp::Main::get_selected_input_device()
 {
-       return selected_input_device_;  
+       return selected_input_device_;
 }
 
 void
index 06fd8e9..045024c 100644 (file)
@@ -51,7 +51,7 @@ namespace synfig {
 };
 
 namespace synfigapp {
-       
+
 /*!    \class synfigapp::Main
 **     \brief \writeme
 **
@@ -65,7 +65,7 @@ public:
        ~Main();
 
        const etl::reference_counter& ref_count()const { return ref_count_; }
-               
+
        static const synfig::Color& get_foreground_color();
        static const synfig::Color& get_background_color();
        static const synfig::Gradient& get_gradient();
@@ -74,12 +74,12 @@ public:
 
 
        static void set_interpolation(synfig::Waypoint::Interpolation x);
-       static void set_bline_width(synfig::Distance x);        
+       static void set_bline_width(synfig::Distance x);
        static void set_foreground_color(synfig::Color color);
        static void set_background_color(synfig::Color color);
        static void set_gradient(synfig::Gradient gradient);
        static void set_gradient_default_colors();
-       static void color_swap();       
+       static void color_swap();
 
        static synfig::Color::BlendMethod get_blend_method();
        static const synfig::Real& get_opacity();
@@ -88,7 +88,7 @@ public:
        static sigc::signal<void>& signal_blend_method_changed();
        static sigc::signal<void>& signal_opacity_changed();
        static sigc::signal<void>& signal_interpolation_changed();
-       
+
        // Input Device stuff
        static InputDevice::Handle add_input_device(const synfig::String id_, InputDevice::Type type_=InputDevice::TYPE_MOUSE);
        static InputDevice::Handle find_input_device(const synfig::String id_);
@@ -98,8 +98,8 @@ public:
        static void set_state(synfig::String state);
 
        static Settings& settings();
-       
-       // Signal interfaces    
+
+       // Signal interfaces
        static sigc::signal<void>& signal_foreground_color_changed();
        static sigc::signal<void>& signal_background_color_changed();
        static sigc::signal<void>& signal_gradient_changed();
index 234ac9a..beac489 100644 (file)
@@ -59,10 +59,10 @@ public:
 
        //! Returns a list of the currently selected layers.
        virtual LayerList get_selected_layers()const=0;
-       
+
        //! Returns the first layer selected or an empty handle if none are selected.
        virtual synfig::Layer::Handle get_selected_layer()const=0;
-       
+
        //! Sets which layers should be selected
        virtual void set_selected_layers(const LayerList &layer_list)=0;
 
@@ -79,10 +79,10 @@ public:
 
        //! Returns a list of the currently selected childrens.
        virtual ChildrenList get_selected_children()const=0;
-       
+
        //! Returns the first children selected or an empty handle if none are selected.
        virtual ChildrenList::value_type get_selected_child()const=0;
-       
+
        //! Sets which childrens should be selected
        virtual void set_selected_children(const ChildrenList &children_list)=0;
 
@@ -98,10 +98,10 @@ public:
 
        //! Returns a list of the currently selected layer parameters.
        virtual LayerParamList get_selected_layer_parameters()const=0;
-       
+
        //! Returns the first layer parameter selected or an empty handle if none are selected.
        virtual LayerParam get_selected_layer_parameter()const=0;
-       
+
        //! Sets which layer parameters should be selected
        virtual void set_selected_layer_parameters(const LayerParamList &layer_param_list)=0;
 
index 891340a..53d3179 100644 (file)
@@ -91,7 +91,7 @@ Settings::get_value(const synfig::String& key, synfig::String& value)const
                if(key.size()>iter->first.size() && String(key.begin(),key.begin()+iter->first.size())==iter->first)
                {
                        synfig::String key_(key.begin()+iter->first.size()+1,key.end());
-                       
+
                        // If the domain has it, then we have got a hit
                        if(iter->second->get_value(key_,value))
                                return true;
@@ -104,7 +104,7 @@ Settings::get_value(const synfig::String& key, synfig::String& value)const
                value=simple_value_map.find(key)->second;
                return true;
        }
-       
+
        // key not found
        return false;
 }
@@ -120,7 +120,7 @@ Settings::set_value(const synfig::String& key,const synfig::String& value)
                if(key.size()>iter->first.size() && String(key.begin(),key.begin()+iter->first.size())==iter->first)
                {
                        synfig::String key_(key.begin()+iter->first.size()+1,key.end());
-                       
+
                        return iter->second->set_value(key_,value);
                }
        }
@@ -145,7 +145,7 @@ Settings::get_key_list()const
                                key_list.push_back(iter->first+'.'+*key_iter);
                }
        }
-       
+
        // Get keys from the simple variables
        {
                ValueBaseMap::const_iterator iter;
@@ -155,7 +155,7 @@ Settings::get_key_list()const
 
        // Sort the keys
        key_list.sort();
-       
+
        return key_list;
 }
 
@@ -163,15 +163,15 @@ bool
 Settings::save_to_file(const synfig::String& filename)const
 {
        synfig::String tmp_filename(filename+".TMP");
-       
+
        try
        {
                std::ofstream file(tmp_filename.c_str());
 
                if(!file)return false;
-       
+
                KeyList key_list(get_key_list());
-               
+
                // Save the keys
                {
                        KeyList::const_iterator iter;
@@ -181,15 +181,15 @@ Settings::save_to_file(const synfig::String& filename)const
                                file<<*iter<<'='<<get_value(*iter)<<endl;
                        }
                }
-       
+
                if(!file)
                        return false;
        }catch(...) { return false; }
-       
+
 #ifdef _WIN32
        char old_file[80]="sif.XXXXXXXX";
        mktemp(old_file);
-       rename(filename.c_str(),old_file);      
+       rename(filename.c_str(),old_file);
        if(rename(tmp_filename.c_str(),filename.c_str())!=0)
        {
                rename(old_file,tmp_filename.c_str());
@@ -200,7 +200,7 @@ Settings::save_to_file(const synfig::String& filename)const
        if(rename(tmp_filename.c_str(),filename.c_str())!=0)
                return false;
 #endif
-       
+
        return true;
 }
 
@@ -221,7 +221,7 @@ Settings::load_from_file(const synfig::String& filename)
                                continue;
                        std::string key(line.begin(),equal);
                        std::string value(equal+1,line.end());
-                       
+
                        //synfig::info("Settings::load_from_file(): Trying Key \"%s\" with a value of \"%s\".",key.c_str(),value.c_str());
                        try{
                        if(!set_value(key,value))
index 4bb7e7f..9af5f72 100644 (file)
@@ -43,11 +43,11 @@ namespace synfigapp {
 class Settings
 {
 public:
-       
+
        typedef std::list<synfig::String> KeyList;
        typedef std::map<synfig::String,synfig::String> ValueBaseMap;
        typedef std::map<synfig::String,Settings*> DomainMap;
-       
+
 private:
        ValueBaseMap simple_value_map;
 
index 9c75bc1..b39a30b 100644 (file)
@@ -59,9 +59,9 @@ void synfigapp::timepoints_ref::insert(synfig::ValueNode_Animated::Handle v, syn
 {
        ValueBaseTimeInfo       vt;
        vt.val = v;
-       
+
        waytracker::iterator i = waypointbiglist.find(vt);
-       
+
        if(i != waypointbiglist.end())
        {
                i->waypoints.insert(w);
@@ -76,9 +76,9 @@ void synfigapp::timepoints_ref::insert(synfigapp::ValueDesc v, synfig::Activepoi
 {
        ActiveTimeInfo  vt;
        vt.val = v;
-       
+
        acttracker::iterator i = actpointbiglist.find(vt);
-       
+
        if(i != actpointbiglist.end())
        {
                i->activepoints.insert(a);
@@ -95,10 +95,10 @@ void synfigapp::timepoints_ref::insert(synfigapp::ValueDesc v, synfig::Activepoi
 }
 
 //recursion functions
-void synfigapp::recurse_canvas(synfig::Canvas::Handle h, const std::set<Time> &tlist, 
+void synfigapp::recurse_canvas(synfig::Canvas::Handle h, const std::set<Time> &tlist,
                                                                timepoints_ref &vals)
 {
-       
+
        //synfig::info("Canvas...\n Recurse through layers");
        // iterate through the layers
 
@@ -114,32 +114,32 @@ void synfigapp::recurse_canvas(synfig::Canvas::Handle h, const std::set<Time> &t
        }
 }
 
-void synfigapp::recurse_layer(synfig::Layer::Handle h, const std::set<Time> &tlist, 
+void synfigapp::recurse_layer(synfig::Layer::Handle h, const std::set<Time> &tlist,
                                                                timepoints_ref &vals)
 {
        // iterate through the layers
        //check for special case of paste canvas
        etl::handle<synfig::Layer_PasteCanvas> p = etl::handle<synfig::Layer_PasteCanvas>::cast_dynamic(h);
-       
+
        //synfig::info("Layer...");
-       
+
        if(p)
        {
                //synfig::info("We are a paste canvas so go into that");
                //recurse into the canvas
                const synfig::Node::time_set &tset = p->get_sub_canvas()->get_times();
-               
+
                if(check_intersect(tset.begin(),tset.end(),tlist.begin(),tlist.end()))
                {
                        //we have to offset the times so it won't wreck havoc if the canvas is imported more than once...
                        // and so we get correct results when offsets are present
-                       std::set<Time>  tlistoff;                       
+                       std::set<Time>  tlistoff;
                        std::set<Time>::iterator i = tlist.begin(), end = tlist.end();
                        for(; i != end; ++i)
                        {
                                tlistoff.insert(*i - p->get_time_offset());
                        }
-                       
+
                        recurse_canvas(p->get_sub_canvas(),tlist,vals);
                }
        }
@@ -151,7 +151,7 @@ void synfigapp::recurse_layer(synfig::Layer::Handle h, const std::set<Time> &tli
        for(; i != end; ++i)
        {
                const synfig::Node::time_set &tset = i->second->get_times();
-               
+
                if(check_intersect(tset.begin(),tset.end(),tlist.begin(),tlist.end()))
                {
                        recurse_valuedesc(ValueDesc(h,i->first),tlist,vals);
@@ -163,47 +163,47 @@ template < typename IT, typename CMP >
 static bool sorted(IT i,IT end, const CMP &cmp = CMP())
 {
        if(i == end) return true;
-               
+
        for(IT last = i++; i != end; last = i++)
        {
                if(!cmp(*last,*i))
                        return false;
        }
-       
+
        return true;
 }
 
-void synfigapp::recurse_valuedesc(synfigapp::ValueDesc h, const std::set<Time> &tlist, 
+void synfigapp::recurse_valuedesc(synfigapp::ValueDesc h, const std::set<Time> &tlist,
                                                                timepoints_ref &vals)
 {
        //special cases for Animated, DynamicList, and Linkable
-       
+
        //synfig::info("ValueBasenode... %p, %s", h.get_value_node().get(),typeid(*h.get_value_node()).name());
-       
-       
+
+
        //animated case
        {
                synfig::ValueNode_Animated::Handle p = synfig::ValueNode_Animated::Handle::cast_dynamic(h.get_value_node());
-               
+
                if(p)
                {
                        //loop through and determine which waypoint we will need to reference
                        const synfig::WaypointList &w = p->waypoint_list();
-                       
+
                        synfig::WaypointList::const_iterator i = w.begin(),
                                                                                                end = w.end();
-                       
+
                        std::set<Time>::const_iterator          j = tlist.begin(),
                                                                                                jend = tlist.end();
-                       for(; i != end && j != jend;) 
+                       for(; i != end && j != jend;)
                        {
                                //synfig::info("tpair t(%.3f) = %.3f", (float)*j, (float)(i->get_time()));
-                               
+
                                if(j->is_equal(i->get_time()))
                                {
                                        vals.insert(p,*i);
                                        ++i,++j;
-                               }else if(*i < *j) 
+                               }else if(*i < *j)
                                {
                                        ++i;
                                }else ++j;
@@ -211,48 +211,48 @@ void synfigapp::recurse_valuedesc(synfigapp::ValueDesc h, const std::set<Time> &
                        return;
                }
        }
-       
+
        //parent dynamiclist case - just for active points for that object...
        if(h.parent_is_value_node())
        {
-               synfig::ValueNode_DynamicList::Handle p = synfig::ValueNode_DynamicList::Handle::cast_dynamic(h.get_parent_value_node());                                               
-                               
+               synfig::ValueNode_DynamicList::Handle p = synfig::ValueNode_DynamicList::Handle::cast_dynamic(h.get_parent_value_node());
+
                if(p)
                {
                        int index = h.get_index();
-                       
+
                        //check all the active points in each list...
                        const synfig::ActivepointList &a = p->list[index].timing_info;
-                       
+
                        //synfig::info("Our parent = dynamic list, searching in %d activepts",a.size());
-                                               
+
                        std::set<Time>::const_iterator                  i = tlist.begin(),
                                                                                                        end = tlist.end();
-                       
+
                        synfig::ActivepointList::const_iterator         j = a.begin(),
                                                                                                        jend = a.end();
-                       
+
                        for(; j != jend && i != end;)
                        {
                                double it = *i;
                                double jt = j->get_time();
                                double diff = (double)(it - jt);
-                               
-                               //synfig::info("\ttpair match(%.4lg) - %.4lg (diff = %lg",it,jt,diff);                          
-                               
+
+                               //synfig::info("\ttpair match(%.4lg) - %.4lg (diff = %lg",it,jt,diff);
+
                                //
                                if(abs(diff) < (double)Time::epsilon())
                                {
                                        //synfig::info("\tActivepoint to add being referenced (%x,%s,%.4lg)",
                                        //                              (int)j->get_uid(),j->state?"true":"false", (double)j->time);
                                        vals.insert(ValueDesc(p,index),*j);
-                                       ++i,++j;                                                
+                                       ++i,++j;
                                }else if(it < jt)
                                {
                                        ++i;
                                        //synfig::info("\tIncrementing time");
                                }
-                               else 
+                               else
                                {
                                        ++j;
                                        //synfig::info("\tIncrementing actpt");
@@ -260,25 +260,25 @@ void synfigapp::recurse_valuedesc(synfigapp::ValueDesc h, const std::set<Time> &
                        }
                }
        }
-       
+
        //dynamiclist case - we must still make sure that we read from the list entries the time values
        //                                              because just the linked valuenodes will not do that
        {
                synfig::ValueNode_DynamicList::Handle p = synfig::ValueNode_DynamicList::Handle::cast_dynamic(h.get_value_node());
-               
+
                if(p)
                {
                        //synfig::info("Process dynamic list valuenode");
                        int index = 0;
-                       
-                       std::vector<synfig::ValueNode_DynamicList::ListEntry>::const_iterator   
+
+                       std::vector<synfig::ValueNode_DynamicList::ListEntry>::const_iterator
                                                        i = p->list.begin(),
                                                        end = p->list.end();
-                       
+
                        for(; i != end; ++i, ++index)
                        {
                                const Node::time_set &tset = i->get_times();
-                               
+
                                if(check_intersect(tset.begin(),tset.end(),tlist.begin(),tlist.end()))
                                {
                                        recurse_valuedesc(ValueDesc(p,index),tlist,vals);
@@ -287,21 +287,21 @@ void synfigapp::recurse_valuedesc(synfigapp::ValueDesc h, const std::set<Time> &
                        return;
                }
        }
-       
+
        //the linkable case...
        {
                etl::handle<synfig::LinkableValueNode> p = etl::handle<synfig::LinkableValueNode>::cast_dynamic(h.get_value_node());
-               
+
                if(p)
                {
                        //synfig::info("Process Linkable ValueBasenode");
                        int i = 0, size = p->link_count();
-                       
+
                        for(; i < size; ++i)
                        {
                                ValueNode::Handle v = p->get_link(i);
                                const Node::time_set &tset = v->get_times();
-                               
+
                                if(check_intersect(tset.begin(),tset.end(),tlist.begin(),tlist.end()))
                                {
                                        recurse_valuedesc(ValueDesc(p,i),tlist,vals);
index becac17..b8df633 100644 (file)
@@ -46,7 +46,7 @@ struct ValueBaseTimeInfo
 {
        synfig::ValueNode_Animated::Handle      val;
        mutable std::set<synfig::Waypoint>      waypoints;
-       
+
        bool operator<(const ValueBaseTimeInfo &rhs) const
        {
                return val < rhs.val;
@@ -60,32 +60,32 @@ struct ActiveTimeInfo
                bool operator()(const synfig::Activepoint &lhs, const synfig::Activepoint &rhs) const
                {
                        return lhs.time < rhs.time;
-               }               
+               }
        };
-       
+
        synfigapp::ValueDesc                                            val;
-       
+
        typedef std::set<synfig::Activepoint,actcmp>    set;
-       
+
        mutable set activepoints;
-       
+
        bool operator<(const ActiveTimeInfo &rhs) const
        {
-               return val.get_parent_value_node() == rhs.val.get_parent_value_node() ? 
-                                               val.get_index() < rhs.val.get_index() : 
+               return val.get_parent_value_node() == rhs.val.get_parent_value_node() ?
+                                               val.get_index() < rhs.val.get_index() :
                                                val.get_parent_value_node() < rhs.val.get_parent_value_node();
        }
 };
 
 struct timepoints_ref
 {
-       typedef std::set<ValueBaseTimeInfo>             waytracker;     
+       typedef std::set<ValueBaseTimeInfo>             waytracker;
        typedef std::set<ActiveTimeInfo>        acttracker;
-       
+
        waytracker              waypointbiglist;
-       acttracker              actpointbiglist;        
-       
-       void insert(synfig::ValueNode_Animated::Handle v, synfig::Waypoint w);  
+       acttracker              actpointbiglist;
+
+       void insert(synfig::ValueNode_Animated::Handle v, synfig::Waypoint w);
        void insert(synfigapp::ValueDesc v, synfig::Activepoint a);
 };
 
@@ -94,9 +94,9 @@ struct timepoints_ref
 template < typename I1, typename I2 >
 bool check_intersect(I1 b1, I1 end1, I2 b2, I2 end2)
 {
-       if(b1 == end1 || b2 == end2) 
+       if(b1 == end1 || b2 == end2)
                return false;
-       
+
        for(; b1 != end1 && b2 != end2;)
        {
                if(*b1 < *b2) ++b1;
@@ -110,21 +110,21 @@ bool check_intersect(I1 b1, I1 end1, I2 b2, I2 end2)
        return false;
 }
 
-//pointer kind of a hack, gets the accurate times from a value desc 
+//pointer kind of a hack, gets the accurate times from a value desc
 //     (deals with dynamic list member correctly... i.e. gathers activepoints)
 const synfig::Node::time_set *get_times_from_vdesc(const synfigapp::ValueDesc &v);
 
 //get's the closest time inside the set
-bool get_closest_time(const synfig::Node::time_set &tset, const synfig::Time &t, 
+bool get_closest_time(const synfig::Node::time_set &tset, const synfig::Time &t,
                                                const synfig::Time &range, synfig::Time &out);
 
 //recursion functions based on time restrictions (can be expanded later)...
 //builds a list of relevant waypoints and activepoints inside the timepoints_ref structure
 void recurse_valuedesc(synfigapp::ValueDesc valdesc, const std::set<synfig::Time> &tlist,
                                                                timepoints_ref &vals);
-void recurse_layer(synfig::Layer::Handle layer, const std::set<synfig::Time> &tlist, 
+void recurse_layer(synfig::Layer::Handle layer, const std::set<synfig::Time> &tlist,
                                                                timepoints_ref &vals);
-void recurse_canvas(synfig::Canvas::Handle canvas, const std::set<synfig::Time> &tlist, 
+void recurse_canvas(synfig::Canvas::Handle canvas, const std::set<synfig::Time> &tlist,
                                                                timepoints_ref &vals);
 
 
index cedb1d0..d228f49 100644 (file)
@@ -126,7 +126,7 @@ ConsoleUIInterface::ok_cancel(const std::string &title, const std::string &messa
                        return RESPONSE_OK;
        }
 }
-       
+
 bool
 ConsoleUIInterface::task(const std::string &task)
 {
index 8b1187f..2f99e18 100644 (file)
@@ -54,7 +54,7 @@ public:
        virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)=0;
        virtual Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)=0;
        virtual Response ok_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_OK)=0;
-};     
+};
 
 class DefaultUIInterface : public UIInterface
 {
@@ -65,7 +65,7 @@ public:
                { return dflt; }
        Response ok_cancel(const std::string &title, const std::string &message,Response dflt)
                { return dflt; }
-       
+
        bool task(const std::string &task)
                { return true; }
        bool error(const std::string &task)
@@ -74,7 +74,7 @@ public:
                { return true; }
        bool amount_complete(int current, int total)
                { return true; }
-};     
+};
 
 class ConfidentUIInterface : public UIInterface
 {
@@ -85,7 +85,7 @@ public:
                { return RESPONSE_YES; }
        Response ok_cancel(const std::string &title, const std::string &message,Response dflt)
                { return RESPONSE_OK; }
-       
+
        bool task(const std::string &task)
                { return true; }
        bool error(const std::string &task)
@@ -94,7 +94,7 @@ public:
                { return true; }
        bool amount_complete(int current, int total)
                { return true; }
-};     
+};
 
 class ConsoleUIInterface : public UIInterface
 {
@@ -102,12 +102,12 @@ public:
        Response yes_no(const std::string &title, const std::string &message,Response dflt);
        Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt);
        Response ok_cancel(const std::string &title, const std::string &message,Response dflt);
-       
+
        bool task(const std::string &task);
        bool error(const std::string &task);
        bool warning(const std::string &task);
        bool amount_complete(int current, int total);
-};     
+};
 
 }; // END of namespace synfigapp
 
index 867306a..86cc25c 100644 (file)
@@ -47,14 +47,14 @@ class ValueDesc
        // Info for Layer parent
        synfig::Layer::Handle layer;
        synfig::String name;
-       
+
        // Info for ValueNode parent
        synfig::ValueNode::Handle parent_value_node;
        int index;
 
        // Info for exported ValueNode
        synfig::Canvas::Handle canvas;
-       
+
 public:
        bool operator==(const ValueDesc &rhs)const
        {
@@ -77,7 +77,7 @@ public:
                return !operator==(rhs);
        }
 
-       
+
        ValueDesc(synfig::Layer::Handle layer,const synfig::String& param_name):
                layer(layer),
                name(param_name) { }
@@ -112,16 +112,16 @@ public:
        bool parent_is_linkable_value_node()const { return parent_is_value_node() && index>=0; }
        bool parent_is_value_node_const()const { return parent_is_value_node() && index==-1; }
        bool parent_is_canvas()const { return (bool)canvas; }
-       
+
        bool is_value_node()const { return parent_is_value_node() || parent_is_canvas() || (parent_is_layer_param() && (bool)layer->dynamic_param_list().count(name)); }
        bool is_const()const { return (parent_is_layer_param() && !layer->dynamic_param_list().count(name)) || parent_is_value_node_const(); }
-       
+
        synfig::Layer::Handle get_layer()const { assert(parent_is_layer_param()); return layer; }
        const synfig::String& get_param_name()const { assert(parent_is_layer_param()); return name; }
-       
+
        synfig::ValueNode::Handle get_parent_value_node()const { assert(parent_is_value_node()); return parent_value_node; }
        int get_index()const { assert(parent_is_linkable_value_node()); return index; }
-       
+
        const synfig::String& get_value_node_id()const { assert(parent_is_canvas()); return name; }
 
        synfig::Canvas::Handle get_canvas()const
@@ -134,7 +134,7 @@ public:
                        return parent_value_node->get_root_canvas();
                return 0;
        }
-       
+
        synfig::ValueNode::Handle
        get_value_node()const
        {
@@ -158,7 +158,7 @@ public:
                if(parent_is_layer_param() && layer)
                        return layer->get_param(name);
                return synfig::ValueBase();
-       }       
+       }
 
        synfig::ValueBase::Type
        get_value_type()const
@@ -168,7 +168,7 @@ public:
                        return value_node->get_type();
                return get_value().get_type();
        }
-       
+
        bool
        is_exported()const
        {
index 580addd..3eae2fc 100644 (file)
@@ -34,7 +34,7 @@
 /* === C L A S S E S & S T R U C T S ======================================= */
 
 namespace studio {
-       
+
 }; // END of namespace studio
 
 /* === E N D =============================================================== */