From 0c2b7e48750351e8f3d39885dd1e2c2b73551523 Mon Sep 17 00:00:00 2001 From: darco Date: Tue, 6 Jun 2006 03:21:49 +0000 Subject: [PATCH] Added support for SYNFIG_ROOT environment variable Fixed an uncaught exception bug, which may have been causing silent crashes Removed some unused code Misc other things git-svn-id: http://svn.voria.com/code@180 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/macosxbuild.sh | 23 ++++++-- synfig-studio/trunk/src/gtkmm/about.cpp | 7 +++ synfig-studio/trunk/src/gtkmm/iconcontroler.cpp | 8 +++ .../trunk/src/gtkmm/keyframetreestore.cpp | 63 ---------------------- .../trunk/src/gtkmm/renderer_timecode.cpp | 4 ++ 5 files changed, 38 insertions(+), 67 deletions(-) diff --git a/synfig-studio/trunk/macosxbuild.sh b/synfig-studio/trunk/macosxbuild.sh index 963e62b..7b80edc 100755 --- a/synfig-studio/trunk/macosxbuild.sh +++ b/synfig-studio/trunk/macosxbuild.sh @@ -1,19 +1,33 @@ #!/bin/sh +#PREFIX=/Applications/SynfigStudio.app/Contents/synfig +PREFIX=/Users/darco/Projects/Voria/synfig-build #OPTIONS="--disable-optimization --enable-debug" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig +export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig export MACOSX_DEPLOYMENT_TARGET=10.4 -OPTIONS="" +OPTIONS="--prefix=$PREFIX" #OPTIONS="$OPTIONS --enable-timelimit=120" OPTIONS="$OPTIONS --enable-optimization=2" #OPTIONS="$OPTIONS --enable-optimization=3 --enable-g5opt" #OPTIONS="$OPTIONS --disable-optimization" OPTIONS="$OPTIONS --disable-debug" +OPTIONS="$OPTIONS --disable-dependency-tracking" #OPTIONS="$OPTIONS --enable-debug" #export LDFLAGS='-undefined dynamic-lookup' LDFLAGS="-prebind -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load -undefined dynamic_lookup" BUILDDIR=macosxbuild +ARCH_FLAGS="" +#ARCH_FLAGS="$ARCH_FLAGS -arch ppc" +ARCH_FLAGS="$ARCH_FLAGS -arch i386" + +CC="gcc $ARCH_FLAGS" +CXX="g++ $ARCH_FLAGS" + +CPP="gcc -E" +CXXCPP="g++ -E" + + [ -e configure ] || ./bootstrap || exit 1 [ -d $BUILDDIR ] && rm -fr $BUILDDIR @@ -24,10 +38,11 @@ cd $BUILDDIR set -x -../configure $OPTIONS LDFLAGS="$LDFLAGS" || exit 1 +../configure $OPTIONS LDFLAGS="$LDFLAGS" CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" || exit 1 make -j2 -make package +make install-strip +#make package #make installer diff --git a/synfig-studio/trunk/src/gtkmm/about.cpp b/synfig-studio/trunk/src/gtkmm/about.cpp index 9cce729..eba53e6 100644 --- a/synfig-studio/trunk/src/gtkmm/about.cpp +++ b/synfig-studio/trunk/src/gtkmm/about.cpp @@ -166,6 +166,13 @@ About::About(): #else imagepath=IMAGE_DIR; #endif + char* synfig_root=getenv("SYNFIG_ROOT"); + if(synfig_root) { + imagepath=synfig_root; + imagepath+=ETL_DIRECTORY_SEPERATOR; + + imagepath+="share/pixmaps"; + } imagepath+=ETL_DIRECTORY_SEPERATOR; diff --git a/synfig-studio/trunk/src/gtkmm/iconcontroler.cpp b/synfig-studio/trunk/src/gtkmm/iconcontroler.cpp index 7f740a3..68a8190 100644 --- a/synfig-studio/trunk/src/gtkmm/iconcontroler.cpp +++ b/synfig-studio/trunk/src/gtkmm/iconcontroler.cpp @@ -86,6 +86,14 @@ IconControler::IconControler(const synfig::String& basepath) #else path_to_icons=IMAGE_DIR; #endif + + char* synfig_root=getenv("SYNFIG_ROOT"); + 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; try{ diff --git a/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp b/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp index edd6a3e..24d980d 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp @@ -357,7 +357,6 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum return; } - // New Method { Keyframe keyframe((*row)[model.keyframe]); synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set_delta")); @@ -372,68 +371,6 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum canvas_interface()->get_instance()->perform_action(action); } - - if(0) - { // Old Method The slowest method EVER!!! - OneMoment one_moment; - - // Create the action group - synfigapp::Action::PassiveGrouper group(canvas_interface()->get_instance().get(),_("Adjust Time")); - synfigapp::PushMode push_mode(canvas_interface(), synfigapp::MODE_NORMAL); - - Gtk::TreeModel::iterator iter(row); - if(change_delta<0) - { - //DEBUGPOINT(); - KeyframeList keyframe_list(get_canvas()->keyframe_list()); - synfig::KeyframeList::iterator iter(keyframe_list.find((*row)[model.keyframe])); - //DEBUGPOINT(); - for(;iter!=keyframe_list.end();++iter) - { - //DEBUGPOINT(); - synfig::Keyframe keyframe(*iter); - - keyframe.set_time(keyframe.get_time()+change_delta); - - 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 - { - //DEBUGPOINT(); - KeyframeList keyframe_list(get_canvas()->keyframe_list()); - synfig::KeyframeList::reverse_iterator end(keyframe_list.find((*row)[model.keyframe])); - synfig::KeyframeList::reverse_iterator iter(keyframe_list.rbegin()); - //end++; - //DEBUGPOINT(); - for(;iter!=end;++iter) - { - //DEBUGPOINT(); - synfig::Keyframe keyframe(*iter); - - keyframe.set_time(keyframe.get_time()+change_delta); - - 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); - } - } - } - return; } else diff --git a/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp b/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp index 56be96b..21fcbaa 100644 --- a/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp +++ b/synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp @@ -35,6 +35,7 @@ #include #include #include "app.h" +#include #endif @@ -151,6 +152,9 @@ Renderer_Timecode::render_vfunc( { return; } + catch(...) { + assert(0); + } drawable->draw_layout(gc, 4, 4, layout); } -- 2.7.4