[Synfig-devl] Konstantin Dmitriev : Synfig Studio Crash Monitor.
Module: synfig Branch: zelgadis_master Commit: e8e10402449a7a1850dd5f4ab3e0e72d04af3f84 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=e8e10402449a7a1850dd5f4ab3e0e72d04af3f84 Author: Konstantin Dmitriev Date: Thu Jul 16 23:38:58 2009 +0700 Synfig Studio Crash Monitor. If it's run in background it collects synfig runtime and crashes statistics. All information collected in ~/.synfig/cph. Later we will use that information to calculate CPH (crash per hour) index and detect commits producing unstability. --- synfig-studio/trunk/synfigstudio-cph-monitor | 138 ++ 1 files changed, 138 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/synfigstudio-cph-monitor b/synfig-studio/trunk/synfigstudio-cph-monitor new file mode 100755 index 000..02fc18a --- /dev/null +++ b/synfig-studio/trunk/synfigstudio-cph-monitor @@ -0,0 +1,138 @@ +#!/bin/bash + +# Synfig Crash Monitor script +# Copyright (c) 2009 Konstantin Dmitriev +# This package is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This package is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +set -e +trap writelog INT + +init() +{ +echo `date +%H:%M` "Synfig Crash Monitor started." +STARTED=0 +RUNTIME=0 +VERSION='' +RELEASE='' +BRANCH='' +CRASH=0 +[ ! -d ~/.synfig/cph ] && mkdir -p ~/.synfig/cph || true +} + +writelog() +{ + if [[ $STARTED != 0 ]]; then + if [[ $CRASH == 0 ]]; then + echo `date +%H:%M` "Synfig exited normally. Session time: $RUNTIME." + else + echo `date +%H:%M` "Crash detected. Version $VERSION.$RELEASE.$BRANCH, session time: $RUNTIME." + fi + if [ -e ~/.synfig/cph/log ]; then + #check if dump needed + CURRENTDATE=`date +%Y-%m-%d` + LOGMODDATE=`stat -c %y ~/.synfig/cph/log` + LOGMODDATE=${LOGMODDATE%% *} + if [[ $LOGMODDATE != $CURRENTDATE ]]; then + dumpstats + fi + fi + #write log + echo $VERSION/$BRANCH/$RELEASE $RUNTIME $CRASH >> ~/.synfig/cph/log + CRASH=0 + RUNTIME=0 + else + echo + fi +} + +dumpstats() +{ + echo `date +%H:%M` 'Dumping stats for previous session...' + LOGMODDATE=`stat -c %y ~/.synfig/cph/log` + LOGMODDATE=${LOGMODDATE%% *} + #get versions + VERSIONS='' + while read LINE; do + FOUND=0 + for VER in $VERSIONS; do + if [[ $VER == ${LINE%% *} ]]; then + FOUND=1 + break + fi + done + [[ $FOUND == 0 ]] && VERSIONS="$VERSIONS ${LINE%% *}" + done < ~/.synfig/cph/log + echo " Logged versions: ${VERSIONS}" + for VER in $VERSIONS; do + #generating random record ID + ID=$( echo `date` `ps` | md5sum | md5sum ) + ID="${ID:2:16}" + #summarizing time and counting crashes + CRASHCOUNT=0 + TIMECOUNT=0 + while read LINE; do + if [[ ${LINE%% *} == $VER ]]; then + TIMECOUNT=`expr $TIMECOUNT + $(echo $LINE| cut -f 2 -d ' ')` || true + CRASHCOUNT=`expr $CRASHCOUNT + $(echo $LINE| cut -f 3 -d ' ')` || true + fi + done < ~/.synfig/cph/log + echo " $LOGMODDATE $ID $VER $TIMECOUNT $CRASHCOUNT" + echo "$LOGMODDATE $ID $VER $TIMECOUNT $CRASHCOUNT" >> ~/.synfig/cph/stats + done + rm -f ~/.synfig/cph/log + echo ' Done.' +} + +mainloop() +{ + while true; do + if ( ps -f -u `whoami`|egrep "synfigstudio$" >/dev/null ) ; then + #synfigstudio process exist + if [[ $STARTED == 0 ]]; then + STARTED=1 + RUNTIME=0 + #get version + P=$(ps -f -u `whoami`|egrep "synfigstudio$"| tr -s ' '| cut -d ' ' -f 8) + echo + if [ ! -e $P ]; then + P=`which $P` + fi + echo $P + P=`dirname
[Synfig-devl] Konstantin Dmitriev : Show git revision information in About dialog.
Module: synfig Branch: zelgadis_master Commit: 9cbca1d4849de760eb768f9a61ba5f4f550d4b9d URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=9cbca1d4849de760eb768f9a61ba5f4f550d4b9d Author: Konstantin Dmitriev Date: Thu Jul 16 22:50:36 2009 +0700 Show git revision information in About dialog. --- synfig-studio/trunk/build_tools/autorevision.sh | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/build_tools/autorevision.sh b/synfig-studio/trunk/build_tools/autorevision.sh index 3de1b2b..d8ee63b 100644 --- a/synfig-studio/trunk/build_tools/autorevision.sh +++ b/synfig-studio/trunk/build_tools/autorevision.sh @@ -1,6 +1,7 @@ #!/bin/sh # Copyright 2008 Paul Wise +# Copyright 2009 Konstantin Dmitriev # # This package is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -12,6 +13,16 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. +get_git_id(){ + export SCM=git + export REVISION_ID=`cd "$1"; git log --no-color -1 | head -n 1 | cut -f 2 -d ' '` + export BRANCH=`cd "$1"; git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` + export REVISION=`git-show --pretty=format:%ci HEAD | head -c 10` + REVISION=${REVISION:0:4}${REVISION:5:2}${REVISION:8:2} + export COMPARE="$1/.git/" + # The extra * at the end is for Modified + #REVISION="$REVISION"`cd "$1"; [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"` +} get_git_svn_id(){ export SCM=git-svn @@ -41,7 +52,9 @@ fi # Extract the revision from SVN/git/etc -if [ -d "$1/.git/svn" ] ; then +if [ -e "$1/../../.git/refs/remotes/origin" ] ; then + get_git_id "$1/../.." +elif [ -d "$1/.git/svn" ] ; then get_git_svn_id "$1" elif [ -d "$1/../.git/svn" ] ; then get_git_svn_id "$1/.." @@ -66,7 +79,6 @@ fi # Abort if the header is newer if [ "$COMPARE" -ot "$HEADER" ] ; then exit; fi - # Set the development version string if [ x = "x$DEVEL_VERSION" ] ; then if [ x != "x$REVISION" ] ; then @@ -74,6 +86,8 @@ if [ x = "x$DEVEL_VERSION" ] ; then DEVEL_VERSION="SVN r$REVISION" elif [ $SCM = git-svn ] ; then DEVEL_VERSION="SVN r$REVISION (via git)" + elif [ $SCM = git ] ; then + DEVEL_VERSION="Revision: $REVISION\\nBranch: ${BRANCH}\\nRevision ID: $REVISION_ID" elif [ $SCM = manual ] ; then DEVEL_VERSION="$REVISION (manually configured)" fi -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add a member to check if the value node is invertible
Module: synfig Branch: zelgadis_master Commit: fb6a93cf220f019cc2128e3b076f9094aa7b463f URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=fb6a93cf220f019cc2128e3b076f9094aa7b463f Author: Carlos Lopez Date: Tue Jul 7 01:49:30 2009 +0200 Add a member to check if the value node is invertible and a member to calculate the inverse. Code in studio is more independent on core modifications. --- synfig-core/trunk/src/synfig/valuenode_scale.cpp | 47 + synfig-core/trunk/src/synfig/valuenode_scale.h |5 ++- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 20 +- 3 files changed, 61 insertions(+), 11 deletions(-) diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.cpp b/synfig-core/trunk/src/synfig/valuenode_scale.cpp index 25b3822..b272d7d 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_scale.cpp @@ -142,20 +142,49 @@ synfig::ValueNode_Scale::operator()(Time t)const } synfig::ValueBase -synfig::ValueNode_Scale::operator()(Time t, const synfig::Point &target_value)const +synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Vector &target_value) const { Real scalar_value((*scalar)(t).get(Real())); if(scalar_value==0) - return (*value_node)(t).get(value_node->get_type()); - switch (get_type()) - case ValueBase::TYPE_REAL: - return target_value.mag() / scalar_value; - case ValueBase::TYPE_ANGLE: - return Angle::tan(target_value[1] / scalar_value ,target_value[0] / scalar_value); - default: - return target_value / scalar_value; + throw runtime_error(strprintf("ValueNode_Scale: %s",_("Attempting to get the inverse of a non invertible Valuenode"))); + else + { + switch (get_type()) + { + case ValueBase::TYPE_REAL: + return target_value.mag() / scalar_value; + case ValueBase::TYPE_ANGLE: + return Angle::tan(target_value[1] / scalar_value ,target_value[0] / scalar_value); + default: + return target_value / scalar_value; + } + } + return ValueBase(); } +synfig::ValueBase +synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Angle &target_value) const +{ + Real scalar_value((*scalar)(t).get(Real())); + if(scalar_value==0) + throw runtime_error(strprintf("ValueNode_Scale: %s",_("Attempting to get the inverse of a non invertible Valuenode"))); + else + { + switch (get_type()) + { + default: + return (*value_node)(t).get(Angle()) + target_value / scalar_value; + } + } + return ValueBase(); +} + +bool +synfig::ValueNode_Scale::is_invertible(Time t) const +{ + Real scalar_value((*scalar)(t).get(Real())); + return (!scalar_value==0); +} bool ValueNode_Scale::set_link_vfunc(int i,ValueNode::Handle value) diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.h b/synfig-core/trunk/src/synfig/valuenode_scale.h index a11f6e0..fba1aa0 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.h +++ b/synfig-core/trunk/src/synfig/valuenode_scale.h @@ -65,7 +65,10 @@ public: virtual ValueBase operator()(Time t)const; //! Returns the modified Link to match the target value at time t - virtual ValueBase operator()(Time t, const synfig::Point &target_value) const; + ValueBase get_inverse(Time t, const synfig::Vector &target_value) const; + ValueBase get_inverse(Time t, const synfig::Angle &target_value) const; + + bool is_invertible(Time t)const; virtual String get_name()const; diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 50789a9..a76b1a0 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2890,7 +2890,13 @@ CanvasView::on_duck_changed(const synfig::Point &value,const synfigapp::ValueDes if (ValueNode_Scale::Handle scale_value_node = ValueNode_Scale::Handle::cast_dynamic(value_desc.get_value_node())) { int link_index(scale_value_node->get_link_index_from_name("link")); - return canvas_interface()->change_value(synfigapp::ValueDesc(scale_value_node,link_index), scale_value_node(t, value)); + if(scale_value_node->is_invertible(get_time())) + return canvas_interface()->change_value( + synfigapp::ValueDesc(scale_value_node,link_ind
[Synfig-devl] Carlos Lopez : Fix two mistakes in the tooltips
Module: synfig Branch: zelgadis_master Commit: 4f78a97e958c881f15cbfdc5ca133d8c1aa25896 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=4f78a97e958c881f15cbfdc5ca133d8c1aa25896 Author: Carlos Lopez Date: Wed Jul 8 17:41:23 2009 +0200 Fix two mistakes in the tooltips --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 34fc7bd..6f3719c 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -1183,7 +1183,7 @@ CanvasView::create_display_bar() snap_grid->add(*icon2); snap_grid->signal_toggled().connect( sigc::mem_fun(*this, &studio::CanvasView::toggle_snap_grid)); - tooltips.set_tip(*snap_grid, _("snap grid when enabled")); + tooltips.set_tip(*snap_grid, _("Snap grid when enabled")); snap_grid->set_relief(Gtk::RELIEF_NONE); snap_grid->show(); @@ -1196,7 +1196,7 @@ CanvasView::create_display_bar() onion_skin->add(*icon3); onion_skin->signal_toggled().connect( sigc::mem_fun(*this, &studio::CanvasView::toggle_onion_skin)); - tooltips.set_tip(*snap_grid, _("Shows onion skin when enabled")); + tooltips.set_tip(*onion_skin, _("Shows onion skin when enabled")); onion_skin->set_relief(Gtk::RELIEF_NONE); onion_skin->show(); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Update copyrights for people who modified the files
Module: synfig Branch: zelgadis_master Commit: 777b2d8282159de60313dd466c86fb906677350b URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=777b2d8282159de60313dd466c86fb906677350b Author: Carlos Lopez Date: Mon Jul 6 13:05:25 2009 +0200 Update copyrights for people who modified the files --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |1 + synfig-studio/trunk/src/gtkmm/canvasview.h |1 + synfig-studio/trunk/src/gtkmm/framedial.cpp |2 ++ synfig-studio/trunk/src/gtkmm/framedial.h|1 + synfig-studio/trunk/src/gtkmm/iconcontroller.cpp |2 ++ 5 files changed, 7 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 6fbf6d5..bbc02ca 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -7,6 +7,7 @@ ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 1ac0991..e2b0c9b 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -7,6 +7,7 @@ ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index 0392f4b..6437930 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -6,7 +6,9 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as diff --git a/synfig-studio/trunk/src/gtkmm/framedial.h b/synfig-studio/trunk/src/gtkmm/framedial.h index 89dfac3..4fc51ca 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.h +++ b/synfig-studio/trunk/src/gtkmm/framedial.h @@ -8,6 +8,7 @@ ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2008 Chris Moore ** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as diff --git a/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp b/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp index 1ee965d..3a29104 100644 --- a/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp +++ b/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp @@ -8,6 +8,8 @@ ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2007, 2008 Chris Moore ** Copyright (c) 2008 Paul Wise +** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add code for multiple onion skins.
Module: synfig Branch: zelgadis_master Commit: 96db5bbae7db6545fbf2a10e903132dbd87bd9a3 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=96db5bbae7db6545fbf2a10e903132dbd87bd9a3 Author: Carlos Lopez Date: Wed Jul 8 15:09:50 2009 +0200 Add code for multiple onion skins. --- synfig-studio/trunk/src/gtkmm/workarea.cpp | 61 synfig-studio/trunk/src/gtkmm/workarea.h |2 + 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/workarea.cpp b/synfig-studio/trunk/src/gtkmm/workarea.cpp index 0ebd729..0d1ce1a 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.cpp +++ b/synfig-studio/trunk/src/gtkmm/workarea.cpp @@ -117,7 +117,7 @@ public: synfig::Mutex mutex; - void set_onion_skin(bool x) + void set_onion_skin(bool x, int *onions) { onionskin=x; @@ -126,26 +126,29 @@ public: if(!onionskin) return; 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( - get_canvas()->keyframe_list().find_prev( - time - )->get_time() - ); + Time thistime=time; + for(int i=0; ikeyframe_list().find_prev(thistime)->get_time(); + onion_skin_queue.push_back(keytime); + thistime=keytime; + } } catch(...) { } try { - onion_skin_queue.push_back( - get_canvas()->keyframe_list().find_next( - time - )->get_time() - ); + Time thistime=time; + for(int i=0; ikeyframe_list().find_next(thistime)->get_time(); + onion_skin_queue.push_back(keytime); + thistime=keytime; + } } catch(...) { } @@ -414,7 +417,7 @@ public: std::list onion_skin_queue; - void set_onion_skin(bool x) + void set_onion_skin(bool x, int *onions) { onionskin=x; @@ -427,22 +430,26 @@ public: //onion_skin_queue.push_back(time+1); try { - onion_skin_queue.push_back( - get_canvas()->keyframe_list().find_prev( - time - )->get_time() - ); + Time thistime=time; + for(int i=0; ikeyframe_list().find_prev(thistime)->get_time(); + onion_skin_queue.push_back(keytime); + thistime=keytime; + } } catch(...) { } try { - onion_skin_queue.push_back( - get_canvas()->keyframe_list().find_next( - time - )->get_time() - ); + Time thistime=time; + for(int i=0; ikeyframe_list().find_next(thistime)->get_time(); + onion_skin_queue.push_back(keytime); + thistime=keytime; + } } catch(...) { } @@ -672,6 +679,8 @@ WorkArea::WorkArea(etl::loose_handle canvas_interfac ph=0.001; last_focus_point=Point(0,0); onion_skin=false; + onion_skins[0]=0; + onion_skins[1]=2; queued=false; dirty_trap_enabled=false; solid_lines=true; @@ -2289,7 +2298,7 @@ studio::WorkArea::async_update_preview() handle trgt(new class WorkAreaTarget(this,w,h)); trgt->set_rend_desc(&desc); - trgt->set_onion_skin(get_onion_skin()); + trgt->set_onion_skin(get_onion_skin(), onion_skins); target=trgt; } else @@ -2298,7 +2307,7 @@ studio::WorkArea::async_update_preview() handle trgt(new class WorkAreaTarget_Full(this,w,h)); trgt->set_rend_desc(&desc); - trgt->set_onion_skin(get_onion_skin()); + trgt->set_onion_skin(get_onion_skin(), onion_skins); target=trgt; } diff --git a/synfig-studio/trunk/src/gtkmm/workarea.h b/synfig-studio/trunk/src/gtkmm/workarea.h index 6e5ab7f..c2ec70e 100644 --- a/sy
[Synfig-devl] Konstantin Dmitriev : Show git revision information on "synfig --info".
Module: synfig Branch: zelgadis_master Commit: eb646e952b600199e2f1a0c27ea1c4fde87a1f50 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=eb646e952b600199e2f1a0c27ea1c4fde87a1f50 Author: Konstantin Dmitriev Date: Thu Jul 16 21:47:30 2009 +0700 Show git revision information on "synfig --info". --- .gitignore|1 + synfig-core/trunk/Makefile.am |1 + synfig-core/trunk/build_tools/Makefile.am |8 ++ synfig-core/trunk/build_tools/autorevision.sh | 101 + synfig-core/trunk/src/tool/main.cpp |5 +- 5 files changed, 115 insertions(+), 1 deletions(-) diff --git a/.gitignore b/.gitignore index 36dc72b..e990be0 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ synfig-core/trunk/src/synfig/proto/nodebase.h synfig-core/trunk/src/tool/synfig synfig-core/trunk/synfig.pc.in +synfig-core/trunk/autorevision.h synfig-core/trunk/m4/codeset.m4 synfig-core/trunk/m4/gettext.m4 synfig-core/trunk/m4/glibc2.m4 diff --git a/synfig-core/trunk/Makefile.am b/synfig-core/trunk/Makefile.am index bb201ca..22ad14d 100644 --- a/synfig-core/trunk/Makefile.am +++ b/synfig-core/trunk/Makefile.am @@ -43,6 +43,7 @@ MAINTAINERCLEANFILES = \ SUBDIRS = \ libltdl \ + build_tools \ src \ examples \ po diff --git a/synfig-core/trunk/build_tools/Makefile.am b/synfig-core/trunk/build_tools/Makefile.am new file mode 100644 index 000..29b053f --- /dev/null +++ b/synfig-core/trunk/build_tools/Makefile.am @@ -0,0 +1,8 @@ +dist_noinst_SCRIPTS = autorevision.sh + +all-local: + sh $(srcdir)/autorevision.sh "$(top_srcdir)" "$(top_builddir)" + +clean-local: + -rm -f $(top_builddir)/autorevision.h + diff --git a/synfig-core/trunk/build_tools/autorevision.sh b/synfig-core/trunk/build_tools/autorevision.sh new file mode 100644 index 000..2ccdb01 --- /dev/null +++ b/synfig-core/trunk/build_tools/autorevision.sh @@ -0,0 +1,101 @@ +#!/bin/sh + +# Copyright 2008 Paul Wise +# Copyright 2009 Konstantin Dmitriev +# +# This package is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This package is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +get_git_id(){ + export SCM=git + export REVISION=`cd "$1"; git log --no-color -1 | head -n 1 | cut -f 2 -d ' '` + export BRANCH=`cd "$1"; git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` + export DATE=`git-show --pretty=format:%ci HEAD | head -c 10` + DATE=${DATE:0:4}${DATE:5:2}${DATE:8:2} + export COMPARE="$1/.git/" + # The extra * at the end is for Modified + #REVISION="$REVISION"`cd "$1"; [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"` +} + +get_git_svn_id(){ + export SCM=git-svn + export REVISION=`cd "$1"; git svn find-rev HEAD` + export COMPARE="$1/.git/" + if [ x = "x$REVISION" ] ; then + # The extra M at the end is for Modified + export REVISION=`cd "$1"; git svn find-rev \`git rev-list --max-count=1 --grep='git-svn-id: ' HEAD\``M + else + export REVISION="$REVISION"`cd "$1"; git diff --quiet HEAD || echo M` + fi +} + +get_svn_id(){ + export SCM=svn + export REVISION=`cd "$1"; svnversion || svn info | sed -n 's/^Revision: \(.*\)/\1/p'` +} + + +HEADER="$2/autorevision.h" +SCM=none + + +if [ ! -f "$HEADER" ] ; then + touch -t 197001010101 "$HEADER" +fi + + +# Extract the revision from SVN/git/etc +if [ -e "$1/../../.git/refs/remotes/origin" ] ; then + get_git_id "$1/../.." +elif [ -d "$1/.git/svn" ] ; then + get_git_svn_id "$1" +elif [ -d "$1/../.git/svn" ] ; then + get_git_svn_id "$1/.." +elif [ -d "$1/../../.git/svn" ] ; then + get_git_svn_id "$1/../.." +elif [ -d "$1/.svn" ] ; then + COMPARE="$1/.svn" + get_svn_id "$1" +elif [ -d "$1/_svn" ] ; then + COMPARE="$1/_svn" + get_svn_id "$1" +fi + + +# Allow overriding both REVISION and DEVEL_VERSION +if [ -f "$2/autorevision.conf" ] ; then + SCM=manual + . "$2/autorevision.conf" +fi + + +# Abort if the header is newer +if [ "$COMPARE" -ot "$HEADER" ] ; then exit; fi + +# Set the development version string +if [ x = "x$DEVEL_VERSION" ] ; then + if [ x != "x$REVISION" ] ; then + if [ $SCM = svn ] ; then + DEVEL_VERSION="SVN r$REVISION" + elif [ $SCM = git-svn ] ; then + DEVEL_VERSION="SVN r$REVISION (via git)" + elif
[Synfig-devl] Konstantin Dmitriev : Merge branch 'master' into zelgadis_master
Module: synfig Branch: zelgadis_master Commit: e9a42a585dec26a8c0aabcfd6e12755f0f0f1156 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=e9a42a585dec26a8c0aabcfd6e12755f0f0f1156 Author: Konstantin Dmitriev Date: Thu Jul 16 20:21:26 2009 +0700 Merge branch 'master' into zelgadis_master --- -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add onion skin icon, and two spin buttons to control past and future onion skins
Module: synfig Branch: zelgadis_master Commit: 6c1f083296e18ba4f16a9b80d2369d9a4272eb12 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=6c1f083296e18ba4f16a9b80d2369d9a4272eb12 Author: Carlos Lopez Date: Wed Jul 8 17:37:27 2009 +0200 Add onion skin icon, and two spin buttons to control past and future onion skins --- synfig-studio/trunk/images/Makefile.am |6 +- synfig-studio/trunk/images/onion_skin_icon.sif | 3897 ++ synfig-studio/trunk/src/gtkmm/canvasview.cpp | 61 +- synfig-studio/trunk/src/gtkmm/canvasview.h | 10 + synfig-studio/trunk/src/gtkmm/iconcontroller.cpp |2 + synfig-studio/trunk/src/gtkmm/workarea.cpp | 10 +- synfig-studio/trunk/src/gtkmm/workarea.h |1 + 7 files changed, 3982 insertions(+), 5 deletions(-) Diff: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commitdiff;h=6c1f083296e18ba4f16a9b80d2369d9a4272eb12 -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Trying to prevent a crash when changing render quality meanwhile updating work area .
Module: synfig Branch: zelgadis_master Commit: 0576e63534a83920fb3a0ce058eb30f4d22cd755 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=0576e63534a83920fb3a0ce058eb30f4d22cd755 Author: Carlos Lopez Date: Sun Jun 28 20:39:33 2009 +0200 Trying to prevent a crash when changing render quality meanwhile updating work area. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 7e77704..0d1112b 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -3187,6 +3187,13 @@ CanvasView::toggle_low_res_pixel_flag() void CanvasView::update_quality() { + if(working_depth) + { + quality_spin->set_sensitive(false); + return; + } + else + quality_spin->set_sensitive(true); if(updating_quality_) return; updating_quality_=true; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add new icons for toggle buttons. Thanks to Gerald Young
Module: synfig Branch: zelgadis_master Commit: 46107da3448007ba863dc7fd01e11edab2deb402 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=46107da3448007ba863dc7fd01e11edab2deb402 Author: Carlos Lopez Date: Mon Jul 13 21:02:20 2009 +0200 Add new icons for toggle buttons. Thanks to Gerald Young --- synfig-studio/trunk/images/duck_angle_icon.sif| 781 ++- synfig-studio/trunk/images/duck_position_icon.sif | 593 ++- synfig-studio/trunk/images/duck_radius_icon.sif | 870 +++- synfig-studio/trunk/images/duck_tangent_icon.sif | 1131 +++-- synfig-studio/trunk/images/duck_vertex_icon.sif | 217 - synfig-studio/trunk/images/duck_width_icon.sif| 1064 +++- 6 files changed, 4406 insertions(+), 250 deletions(-) Diff: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commitdiff;h=46107da3448007ba863dc7fd01e11edab2deb402 -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Synchronise quality spin button and quality action radio buttons.
Module: synfig Branch: zelgadis_master Commit: d299430eb47c770495cb84e0832073a25ea0268f URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=d299430eb47c770495cb84e0832073a25ea0268f Author: Carlos Lopez Date: Mon Jun 29 00:11:51 2009 +0200 Synchronise quality spin button and quality action radio buttons. Do not set insensitive the spin button when working depth is true. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 24 ++-- synfig-studio/trunk/src/gtkmm/canvasview.h |1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 0d1112b..87b4222 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -1423,7 +1423,7 @@ CanvasView::init_menus() } action_group->add( action, sigc::bind( - sigc::mem_fun(*work_area, &studio::WorkArea::set_quality), + sigc::mem_fun(*this, &studio::CanvasView::set_quality), i ) ); @@ -3188,20 +3188,32 @@ void CanvasView::update_quality() { if(working_depth) - { - quality_spin->set_sensitive(false); return; - } - else - quality_spin->set_sensitive(true); if(updating_quality_) return; updating_quality_=true; work_area->set_quality((int) quality_spin->get_value()); + // Update Quality Radio actions + Glib::RefPtr action=Glib::RefPtr::cast_dynamic( + action_group->get_action(strprintf("quality-%02d",(int) quality_spin->get_value())) + ); + action->set_active(); + updating_quality_=false; } void +CanvasView::set_quality(int x) +{ + if(updating_quality_) + return; + work_area->set_quality(x); + // Update the quality spin button + quality_spin->set_value(x); +} + + +void CanvasView::on_dirty_preview() { if(!is_playing_) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index aa43bb8..2f26d7b 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -437,6 +437,7 @@ private: void decrease_low_res_pixel_size(); void increase_low_res_pixel_size(); void toggle_low_res_pixel_flag(); + void set_quality(int x); /* -- ** -- P U B L I C M E T H O D S - -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Simplified version for reverse manipulation Scale convert types ducks
Module: synfig Branch: zelgadis_master Commit: 9ff670a60001e455fa506f6b6292300e8d1cec8f URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=9ff670a60001e455fa506f6b6292300e8d1cec8f Author: Carlos Lopez Date: Mon Jul 6 16:02:03 2009 +0200 Simplified version for reverse manipulation Scale convert types ducks --- synfig-core/trunk/src/synfig/valuenode_scale.cpp | 15 +++ synfig-core/trunk/src/synfig/valuenode_scale.h |3 +++ synfig-studio/trunk/src/gtkmm/canvasview.cpp |6 ++ synfig-studio/trunk/src/synfigapp/instance.cpp |2 ++ 4 files changed, 26 insertions(+), 0 deletions(-) diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.cpp b/synfig-core/trunk/src/synfig/valuenode_scale.cpp index a0bba53..25b3822 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_scale.cpp @@ -141,6 +141,21 @@ synfig::ValueNode_Scale::operator()(Time t)const return ValueBase(); } +synfig::ValueBase +synfig::ValueNode_Scale::operator()(Time t, const synfig::Point &target_value)const +{ + Real scalar_value((*scalar)(t).get(Real())); + if(scalar_value==0) + return (*value_node)(t).get(value_node->get_type()); + switch (get_type()) + case ValueBase::TYPE_REAL: + return target_value.mag() / scalar_value; + case ValueBase::TYPE_ANGLE: + return Angle::tan(target_value[1] / scalar_value ,target_value[0] / scalar_value); + default: + return target_value / scalar_value; +} + bool ValueNode_Scale::set_link_vfunc(int i,ValueNode::Handle value) diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.h b/synfig-core/trunk/src/synfig/valuenode_scale.h index bb1ccd0..a11f6e0 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.h +++ b/synfig-core/trunk/src/synfig/valuenode_scale.h @@ -64,6 +64,9 @@ public: virtual ValueBase operator()(Time t)const; + //! Returns the modified Link to match the target value at time t + virtual ValueBase operator()(Time t, const synfig::Point &target_value) const; + virtual String get_name()const; virtual String get_local_name()const; diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 4a555a8..50789a9 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2887,6 +2887,12 @@ CanvasView::on_duck_changed(const synfig::Point &value,const synfigapp::ValueDes } } + if (ValueNode_Scale::Handle scale_value_node = ValueNode_Scale::Handle::cast_dynamic(value_desc.get_value_node())) + { + int link_index(scale_value_node->get_link_index_from_name("link")); + return canvas_interface()->change_value(synfigapp::ValueDesc(scale_value_node,link_index), scale_value_node(t, value)); + } + switch(value_desc.get_value_type()) { case ValueBase::TYPE_REAL: diff --git a/synfig-studio/trunk/src/synfigapp/instance.cpp b/synfig-studio/trunk/src/synfigapp/instance.cpp index 020d337..c3c542b 100644 --- a/synfig-studio/trunk/src/synfigapp/instance.cpp +++ b/synfig-studio/trunk/src/synfigapp/instance.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include "general.h" @@ -74,6 +75,7 @@ synfigapp::is_editable(synfig::ValueNode::Handle value_node) || ValueNode_BLineCalcVertex::Handle::cast_dynamic(value_node) || ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_node) || ValueNode_BLineCalcWidth::Handle::cast_dynamic(value_node) + || ValueNode_Scale::Handle::cast_dynamic(value_node) ) return true; return false; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Initial version of show grid check button. Needs a proper icon.
Module: synfig Branch: zelgadis_master Commit: b6011ebece2f8d2df0eab728b6f2b5029836b1fa URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=b6011ebece2f8d2df0eab728b6f2b5029836b1fa Author: Carlos Lopez Date: Mon Jun 29 01:41:12 2009 +0200 Initial version of show grid check button. Needs a proper icon. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 32 - synfig-studio/trunk/src/gtkmm/canvasview.h |3 ++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 3fe39e7..ab500e4 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -709,6 +709,7 @@ CanvasView::CanvasView(etl::loose_handle instance,etl::handleshow(); + // Set up the show grid check button + show_grid = Gtk::manage(new class Gtk::CheckButton()); + show_grid->set_active(work_area->grid_status()); + Gtk::Image *icon = manage(new Gtk::Image(Gtk::Stock::REMOVE, Gtk::IconSize::from_name("synfig-small_icon"))); + icon->set_padding(0, 0); + icon->show(); + show_grid->add(*icon); + show_grid->signal_toggled().connect( + sigc::mem_fun(*this, &studio::CanvasView::toggle_show_grid)); + tooltips.set_tip(*show_grid, _("Show grid when enabled")); + show_grid->show(); + displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); displaybar->attach(*separator1, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL); displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK); displaybar->attach(*separator2, 3, 4, 0, 1, Gtk::FILL, Gtk::FILL); displaybar->attach(*quality_spin, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*show_grid, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK); displaybar->show(); @@ -1475,7 +1489,7 @@ CanvasView::init_menus() grid_show_toggle = Gtk::ToggleAction::create("toggle-grid-show", _("Show Grid")); grid_show_toggle->set_active(work_area->grid_status()); - action_group->add(grid_show_toggle, sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid)); + action_group->add(grid_show_toggle, sigc::mem_fun(*this, &studio::CanvasView::toggle_show_grid)); grid_snap_toggle = Gtk::ToggleAction::create("toggle-grid-snap", _("Snap to Grid")); grid_snap_toggle->set_active(work_area->get_grid_snap()); @@ -3213,6 +3227,20 @@ CanvasView::set_quality(int x) quality_spin->set_value(x); } +void +CanvasView::toggle_show_grid() +{ + if(toggling_show_grid) + return; + toggling_show_grid=true; + work_area->toggle_grid(); + // Update the toggle grid show action + set_grid_show_toggle(work_area->grid_status()); + // Update the toggle grid show check button + show_grid->set_active(work_area->grid_status()); + toggling_show_grid=false; +} + void CanvasView::on_dirty_preview() diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 2f26d7b..27cc89f 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -276,6 +276,8 @@ private: Gtk::Adjustment quality_adjustment_; Gtk::SpinButton *quality_spin; bool updating_quality_; + Gtk::CheckButton *show_grid; + bool toggling_show_grid; //! Shows current time and allows edition Widget_Time *current_time_widget; void on_current_time_widget_changed(); @@ -438,6 +440,7 @@ private: void increase_low_res_pixel_size(); void toggle_low_res_pixel_flag(); void set_quality(int x); + void toggle_show_grid(); /* -- ** -- P U B L I C M E T H O D S - -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add snap grid toggle button with proper icon.
Module: synfig Branch: zelgadis_master Commit: d845287cb7b04975efb055cbebcd94074b9b42ca URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=d845287cb7b04975efb055cbebcd94074b9b42ca Author: Carlos Lopez Date: Mon Jun 29 12:38:24 2009 +0200 Add snap grid toggle button with proper icon. Add proper show grid icon. --- synfig-studio/trunk/images/Makefile.am |8 +- synfig-studio/trunk/images/show_grid_icon.sif| 1155 ++ synfig-studio/trunk/images/snap_grid_icon.sif| 1155 ++ synfig-studio/trunk/src/gtkmm/canvasview.cpp | 42 +- synfig-studio/trunk/src/gtkmm/canvasview.h |5 +- synfig-studio/trunk/src/gtkmm/iconcontroller.cpp |3 + 6 files changed, 2360 insertions(+), 8 deletions(-) Diff: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commitdiff;h=d845287cb7b04975efb055cbebcd94074b9b42ca -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add a separator between toggle ducks and low res dials
Module: synfig Branch: zelgadis_master Commit: fb20cf41b1fa50d2c1dad398f23431e3dd719638 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=fb20cf41b1fa50d2c1dad398f23431e3dd719638 Author: Carlos Lopez Date: Sun Jun 28 18:36:52 2009 +0200 Add a separator between toggle ducks and low res dials --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index f67e22a..5f3e389 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -1099,7 +1100,7 @@ CanvasView::create_status_bar() Gtk::Widget* CanvasView::create_display_bar() { - displaybar = manage(new class Gtk::Table(1, 1, false)); + displaybar = manage(new class Gtk::Table(1, 3, false)); // Setup the ToggleDuckDial widget toggleducksdial = Gtk::manage(new class ToggleDucksDial()); @@ -1128,7 +1129,6 @@ CanvasView::create_display_bar() toggleducksdial->show(); // Set up the ResolutionDial widget - resolutiondial=Gtk::manage(new class ResolutionDial()); resolutiondial->update_lowres(work_area->get_low_resolution_flag()); @@ -1140,8 +1140,13 @@ CanvasView::create_display_bar() sigc::mem_fun(*this, &studio::CanvasView::toggle_low_res_pixel_flag)); resolutiondial->show(); - displaybar->attach(*resolutiondial, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + // Set up a separator + Gtk::VSeparator *separator = Gtk::manage(new class Gtk::VSeparator()); + separator->show(); + + displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK); displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*separator, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL); displaybar->show(); return displaybar; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Fix quality spin button feedback. It didn' t update the actions before.
Module: synfig Branch: zelgadis_master Commit: 2a0be61cd8ecbabc8e4103b16f6450eddb8bdd13 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=2a0be61cd8ecbabc8e4103b16f6450eddb8bdd13 Author: Carlos Lopez Date: Wed Jul 8 17:57:02 2009 +0200 Fix quality spin button feedback. It didn't update the actions before. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 6f3719c..4a555a8 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -3253,8 +3253,8 @@ CanvasView::toggle_low_res_pixel_flag() void CanvasView::update_quality() { - if(working_depth) - return; + //if(working_depth) + // return; if(updating_quality_) return; updating_quality_=true; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Change the relief status of the toggle duck buttons
Module: synfig Branch: zelgadis_master Commit: a2b6a6c79dfde84f0bc07a8674da399b1ae6f683 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=a2b6a6c79dfde84f0bc07a8674da399b1ae6f683 Author: Carlos Lopez Date: Sun Jun 28 18:39:30 2009 +0200 Change the relief status of the toggle duck buttons --- synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp index 5474a8b..3f1230a 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp @@ -79,6 +79,7 @@ ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *stockid tbutton->add(*icon); icon->set_padding(0, 0); icon->show(); + tbutton->set_relief(Gtk::RELIEF_NONE); tbutton->show(); return tbutton; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add tooltip to the quality spin button.
Module: synfig Branch: zelgadis_master Commit: c49dae0c6004d96ce5b3c6daf937b0c2d1ebde1f URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=c49dae0c6004d96ce5b3c6daf937b0c2d1ebde1f Author: Carlos Lopez Date: Mon Jun 29 00:28:21 2009 +0200 Add tooltip to the quality spin button. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 87b4222..3fe39e7 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -1152,6 +1152,7 @@ CanvasView::create_display_bar() quality_spin=Gtk::manage(new class Gtk::SpinButton(quality_adjustment_)); quality_spin->signal_value_changed().connect( sigc::mem_fun(*this, &studio::CanvasView::update_quality)); + tooltips.set_tip(*quality_spin, _("Quality (lower is better)")); quality_spin->show(); displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Keep correct size on the animate button after pressed.
Module: synfig Branch: zelgadis_master Commit: a0bdff4fab72eaaf8b719295229ef4e7162a0009 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=a0bdff4fab72eaaf8b719295229ef4e7162a0009 Author: Carlos Lopez Date: Mon Jun 22 22:18:29 2009 +0200 Keep correct size on the animate button after pressed. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 76437b9..a3c42cc 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2580,10 +2580,11 @@ void CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode) { // If the animate flag was set in mode... + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); if(mode&synfigapp::MODE_ANIMATE) { Gtk::Image *icon; - icon=manage(new Gtk::Image(Gtk::StockID("gtk-no"),Gtk::ICON_SIZE_BUTTON)); + icon=manage(new Gtk::Image(Gtk::StockID("gtk-no"),iconsize)); animatebutton->remove(); animatebutton->add(*icon); tooltips.set_tip(*animatebutton,_("In Animate Editing Mode")); @@ -2593,7 +2594,7 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode) else { Gtk::Image *icon; - icon=manage(new Gtk::Image(Gtk::StockID("gtk-yes"),Gtk::ICON_SIZE_BUTTON)); + icon=manage(new Gtk::Image(Gtk::StockID("gtk-yes"),iconsize)); animatebutton->remove(); animatebutton->add(*icon); tooltips.set_tip(*animatebutton,_("Not in Animate Editing Mode")); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Update Toggle Ducks Actions when Toggle Ducks Buttons changes.
Module: synfig Branch: zelgadis_master Commit: c14cfdfa762dafa6cd003efb6d8c8a61d1679c78 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=c14cfdfa762dafa6cd003efb6d8c8a61d1679c78 Author: Carlos Lopez Date: Sun Jun 28 16:08:21 2009 +0200 Update Toggle Ducks Actions when Toggle Ducks Buttons changes. Before this commit the synchronisation was only from actions to buttons and not the opposite. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 92882f7..f67e22a 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -3738,6 +3738,21 @@ CanvasView::toggle_duck_mask(Duckmatic::Type type) work_area->queue_draw(); try { + // Update the toggle ducks actions + Glib::RefPtr action; + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-position-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_POSITION)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-tangent-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_TANGENT)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-vertex-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_VERTEX)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-radius-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_RADIUS)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-width-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_WIDTH)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-angle-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_ANGLE)); + // Update toggle ducks buttons toggleducksdial->update_toggles(work_area->get_type_mask()); } catch(...) -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Change toggle duck icons from numbers to duck icon images.
Module: synfig Branch: zelgadis_master Commit: df3517cbedbb486c3b092f765fe1019649005b73 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=df3517cbedbb486c3b092f765fe1019649005b73 Author: Carlos Lopez Date: Sun Jun 28 17:39:35 2009 +0200 Change toggle duck icons from numbers to duck icon images. --- synfig-studio/trunk/images/Makefile.am| 17 +- synfig-studio/trunk/images/duck_angle_icon.sif| 432 +++ synfig-studio/trunk/images/duck_position_icon.sif | 432 +++ synfig-studio/trunk/images/duck_radius_icon.sif | 432 +++ synfig-studio/trunk/images/duck_tangent_icon.sif | 853 + synfig-studio/trunk/images/duck_vertex_icon.sif | 432 +++ synfig-studio/trunk/images/duck_width_icon.sif| 432 +++ synfig-studio/trunk/src/gtkmm/iconcontroller.cpp |7 + synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp | 20 +- synfig-studio/trunk/src/gtkmm/toggleducksdial.h |2 +- 10 files changed, 3046 insertions(+), 13 deletions(-) Diff: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commitdiff;h=df3517cbedbb486c3b092f765fe1019649005b73 -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Initial trial of toggle ducks dial. Needs re factoring to toggle buttons and place them in the top of the window .
Module: synfig Branch: zelgadis_master Commit: c09ee2ffb936c48edffbce2f86813a72592f724b URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=c09ee2ffb936c48edffbce2f86813a72592f724b Author: Carlos Lopez Date: Wed Jun 24 00:26:45 2009 +0200 Initial trial of toggle ducks dial. Needs re factoring to toggle buttons and place them in the top of the window. --- synfig-studio/trunk/src/gtkmm/Makefile.am |7 +- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 26 ++- synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp | 83 + synfig-studio/trunk/src/gtkmm/toggleducksdial.h | 78 +++ 4 files changed, 190 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/Makefile.am b/synfig-studio/trunk/src/gtkmm/Makefile.am index 39acf8c..42cdd55 100644 --- a/synfig-studio/trunk/src/gtkmm/Makefile.am +++ b/synfig-studio/trunk/src/gtkmm/Makefile.am @@ -294,7 +294,8 @@ OTHER_HH = \ workarea.h \ zoomdial.h \ framedial.h \ - keyframedial.h + keyframedial.h \ + toggleducksdial.h OTHER_CC = \ main.cpp \ @@ -326,8 +327,8 @@ OTHER_CC = \ workarea.cpp \ zoomdial.cpp \ framedial.cpp \ - keyframedial.cpp - + keyframedial.cpp \ + toggleducksdial.cpp INCLUDES = \ -I$(top_srcdir)/src diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index a3c42cc..64bf34a 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -100,6 +100,7 @@ #include "audiocontainer.h" #include "widget_timeslider.h" #include "keyframedial.h" +#include "toggleducksdial.h" #include #include @@ -1021,7 +1022,29 @@ CanvasView::create_time_bar() keyframedial->show(); keyframebutton=keyframedial->get_lock_button(); - Gtk::Table *table = manage(new class Gtk::Table(5, 3, false)); + // Setup the ToggleDuckDial widget + ToggleDucksDial *toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + toggleducksdial->signal_ducks_position().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) + ); + toggleducksdial->signal_ducks_vertex().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_VERTEX) + ); + toggleducksdial->signal_ducks_tangent().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_TANGENT) + ); + toggleducksdial->signal_ducks_radius().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_RADIUS) + ); + toggleducksdial->signal_ducks_width().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_WIDTH) + ); + toggleducksdial->signal_ducks_angle().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_ANGLE) + ); + toggleducksdial->show(); + + Gtk::Table *table = manage(new class Gtk::Table(5, 4, false)); timebar = table; //Attach widgets to the time bar table @@ -1033,6 +1056,7 @@ CanvasView::create_time_bar() table->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); table->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*toggleducksdial, 0, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); table->show(); diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp new file mode 100644 index 000..b23acde --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp @@ -0,0 +1,83 @@ +/* === S Y N F I G = */ +/*!\file toggleducksdial.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos Lopez +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public Lic
[Synfig-devl] Carlos Lopez : Comment a line that produced a bad render of the HScroll and seems to do nothing special .
Module: synfig Branch: zelgadis_master Commit: b53b886325d6dff458e1e30b5d9469728e9af076 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=b53b886325d6dff458e1e30b5d9469728e9af076 Author: Carlos Lopez Date: Mon Jun 22 21:54:01 2009 +0200 Comment a line that produced a bad render of the HScroll and seems to do nothing special. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 0b532cd..76437b9 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -959,7 +959,7 @@ CanvasView::create_time_bar() tooltips.set_tip(*timeslider,_("Changes the current time")); time_window_scroll->show(); timeslider->show(); - time_window_scroll->set_flags(Gtk::CAN_FOCUS); + //time_window_scroll->set_flags(Gtk::CAN_FOCUS); // Uncomment this produce bad render of the HScroll timeslider->set_flags(Gtk::CAN_FOCUS); //time_scroll->signal_value_changed().connect(sigc::mem_fun(*work_area, &studio::WorkArea::render_preview_hook)); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Use toogleducksdial member pointer and do not expose the toggle buttons pointers outide . Create member methods instead
Module: synfig Branch: zelgadis_master Commit: b11817a7154a704ce068400f22e7894e2e362ae0 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=b11817a7154a704ce068400f22e7894e2e362ae0 Author: Carlos Lopez Date: Sat Jun 27 09:30:59 2009 +0200 Use toogleducksdial member pointer and do not expose the toggle buttons pointers outide. Create member methods instead --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 13 - synfig-studio/trunk/src/gtkmm/canvasview.h|2 ++ synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp | 11 +++ synfig-studio/trunk/src/gtkmm/toggleducksdial.h | 10 +++--- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 72ce50a..c7db107 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -100,7 +100,6 @@ #include "audiocontainer.h" #include "widget_timeslider.h" #include "keyframedial.h" -#include "toggleducksdial.h" #include #include @@ -1023,14 +1022,10 @@ CanvasView::create_time_bar() keyframebutton=keyframedial->get_lock_button(); // Setup the ToggleDuckDial widget - ToggleDucksDial *toggleducksdial = Gtk::manage(new class ToggleDucksDial()); - - toggleducksdial->get_position_toggle()-> set_active(work_area->get_type_mask()&Duck::TYPE_POSITION); - toggleducksdial->get_vertex_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_VERTEX); - toggleducksdial->get_tangent_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_TANGENT); - toggleducksdial->get_radius_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_RADIUS); - toggleducksdial->get_width_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_WIDTH); - toggleducksdial->get_angle_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_ANGLE); + toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + + Duck::Type m = work_area->get_type_mask(); + toggleducksdial->update_toggles(m); toggleducksdial->signal_ducks_position().connect( sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 2ed261e..182d3e6 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -66,6 +66,7 @@ #include "dialog_waypoint.h" #include "dialog_keyframe.h" #include "framedial.h" +#include "toggleducksdial.h" #include "duckmatic.h" #include @@ -265,6 +266,7 @@ private: Gtk::Button *animatebutton; Gtk::Button *keyframebutton; FrameDial *framedial; + ToggleDucksDial *toggleducksdial; //! Shows current time and allows edition diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp index 78aeab5..6dd67bc 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp @@ -81,3 +81,14 @@ ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *label, return tbutton; } + +void +ToggleDucksDial::initiate_toggles(Duck::Type mask) +{ + ducks_position-> set_active((mask & Duck::TYPE_POSITION)); + ducks_vertex -> set_active((mask & Duck::TYPE_VERTEX)); + ducks_tangent -> set_active((mask & Duck::TYPE_TANGENT)); + ducks_radius -> set_active((mask & Duck::TYPE_RADIUS)); + ducks_width -> set_active((mask & Duck::TYPE_WIDTH)); + ducks_angle -> set_active((mask & Duck::TYPE_ANGLE)); +} diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.h b/synfig-studio/trunk/src/gtkmm/toggleducksdial.h index d2e50f2..312e3fd 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.h +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.h @@ -33,9 +33,11 @@ #include #include #include +#include "duckmatic.h" #include "general.h" + /* === M A C R O S = */ /* === T Y P E D E F S = */ @@ -61,6 +63,7 @@ class ToggleDucksDial : public Gtk::Table public: ToggleDucksDial(); + void initiate_toggles(Duck::Type mask); Glib::SignalProxy0 signal_ducks_position() { return ducks_position->signal_toggled(); } Glib::SignalProxy0 signal_ducks_vertex(){ return ducks_vertex-> signal_toggled(); } Glib::SignalProxy0 signal_ducks_tangent() { return ducks_tangent-> signal_toggled(); } @@ -68,13 +71,6 @@ public: Glib::SignalProxy0 signal_ducks_width() { return ducks_width-> signal_toggled(); } Glib::SignalProxy0 signal_ducks_angle() { return ducks_angle-> signal_toggl
[Synfig-devl] Carlos Lopez : Add render quality spin button. WIP
Module: synfig Branch: zelgadis_master Commit: 4a5036c12bc268713be0509278c9b303c953e02b URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=4a5036c12bc268713be0509278c9b303c953e02b Author: Carlos Lopez Date: Sun Jun 28 19:55:36 2009 +0200 Add render quality spin button. WIP --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 33 ++ synfig-studio/trunk/src/gtkmm/canvasview.h |8 - 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 5f3e389..7e77704 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -683,6 +683,7 @@ CanvasView::CanvasView(etl::loose_handle instance,etl::handle instance,etl::handleshow(); // Set up a separator - Gtk::VSeparator *separator = Gtk::manage(new class Gtk::VSeparator()); - separator->show(); + Gtk::VSeparator *separator1 = Gtk::manage(new class Gtk::VSeparator()); + separator1->show(); + Gtk::VSeparator *separator2 = Gtk::manage(new class Gtk::VSeparator()); + separator2->show(); + + // Set up quality spin button + quality_spin=Gtk::manage(new class Gtk::SpinButton(quality_adjustment_)); + quality_spin->signal_value_changed().connect( + sigc::mem_fun(*this, &studio::CanvasView::update_quality)); + quality_spin->show(); - displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK); displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); - displaybar->attach(*separator, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL); + displaybar->attach(*separator1, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL); + displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*separator2, 3, 4, 0, 1, Gtk::FILL, Gtk::FILL); + displaybar->attach(*quality_spin, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->show(); return displaybar; @@ -3172,6 +3185,16 @@ CanvasView::toggle_low_res_pixel_flag() } void +CanvasView::update_quality() +{ + if(updating_quality_) + return; + updating_quality_=true; + work_area->set_quality((int) quality_spin->get_value()); + updating_quality_=false; +} + +void CanvasView::on_dirty_preview() { if(!is_playing_) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index ea3fae7..aa43bb8 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -272,8 +273,9 @@ private: bool toggling_ducks_; ResolutionDial *resolutiondial; bool changing_resolution_; - - + Gtk::Adjustment quality_adjustment_; + Gtk::SpinButton *quality_spin; + bool updating_quality_; //! Shows current time and allows edition Widget_Time *current_time_widget; void on_current_time_widget_changed(); @@ -606,6 +608,8 @@ public: bool is_playing() { return is_playing_; } + void update_quality(); + /* -- ** -- S I G N A L T E R M I N A L S - */ -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Move the toggle ducks dial to the new display bar at the top of the window .
Module: synfig Branch: zelgadis_master Commit: a230fed9d2b4f70e80b9f4898d27cc7f87947a8a URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=a230fed9d2b4f70e80b9f4898d27cc7f87947a8a Author: Carlos Lopez Date: Sat Jun 27 12:05:56 2009 +0200 Move the toggle ducks dial to the new display bar at the top of the window. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 68 +++--- synfig-studio/trunk/src/gtkmm/canvasview.h |3 + 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 2207d24..e8e3a4d 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -736,9 +736,10 @@ CanvasView::CanvasView(etl::loose_handle instance,etl::handleattach(*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); + layout_table->attach(*create_display_bar(), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 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); @@ -1022,32 +1023,6 @@ CanvasView::create_time_bar() keyframedial->show(); keyframebutton=keyframedial->get_lock_button(); - // Setup the ToggleDuckDial widget - toggleducksdial = Gtk::manage(new class ToggleDucksDial()); - - Duck::Type m = work_area->get_type_mask(); - toggleducksdial->update_toggles(m); - - toggleducksdial->signal_ducks_position().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) - ); - toggleducksdial->signal_ducks_vertex().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_VERTEX) - ); - toggleducksdial->signal_ducks_tangent().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_TANGENT) - ); - toggleducksdial->signal_ducks_radius().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_RADIUS) - ); - toggleducksdial->signal_ducks_width().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_WIDTH) - ); - toggleducksdial->signal_ducks_angle().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_ANGLE) - ); - toggleducksdial->show(); - timebar = manage(new class Gtk::Table(5, 4, false)); //Attach widgets to the timebar @@ -1059,8 +1034,6 @@ CanvasView::create_time_bar() timebar->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); timebar->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); //timebar->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - timebar->attach(*toggleducksdial, 0, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); - timebar->show(); @@ -1122,6 +1095,43 @@ CanvasView::create_status_bar() return statusbartable; } +Gtk::Widget* +CanvasView::create_display_bar() +{ + displaybar = manage(new class Gtk::Table(1, 1, false)); + // Setup the ToggleDuckDial widget + toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + + Duck::Type m = work_area->get_type_mask(); + toggleducksdial->update_toggles(m); + + toggleducksdial->signal_ducks_position().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) + ); + toggleducksdial->signal_ducks_vertex().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_VERTEX) + ); + toggleducksdial->signal_ducks_tangent().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_TANGENT) + ); + toggleducksdial->signal_ducks_radius().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_RADIUS) + ); + toggleducksdial->signal_ducks_width().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_WIDTH) + ); + toggleducksdial->signal_ducks_angle().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_
[Synfig-devl] Carlos Lopez : Use Gtkmm stock items instead of Gtk ones for Keyframe Dial buttons.
Module: synfig Branch: zelgadis_master Commit: 38134c93640054cbf5a92f778c0cedb3fa7b4733 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=38134c93640054cbf5a92f778c0cedb3fa7b4733 Author: Carlos Lopez Date: Tue Jun 23 16:27:06 2009 +0200 Use Gtkmm stock items instead of Gtk ones for Keyframe Dial buttons. --- synfig-studio/trunk/src/gtkmm/keyframedial.cpp | 21 +++-- synfig-studio/trunk/src/gtkmm/keyframedial.h |1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp index a9bf328..c7b5c56 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -33,6 +33,7 @@ #include "keyframedial.h" #include +#include #endif @@ -53,8 +54,8 @@ KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 3, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); - seek_prev_keyframe = create_icon(iconsize, GTK_STOCK_GO_BACK, _("Previous KeyFrame")); - seek_next_keyframe = create_icon(iconsize, GTK_STOCK_GO_FORWARD, _("Next KeyFrame")); + seek_prev_keyframe = create_icon(iconsize, Gtk::Stock::GO_BACK, _("Previous KeyFrame")); + seek_next_keyframe = create_icon(iconsize, Gtk::Stock::GO_FORWARD, _("Next KeyFrame")); lock_keyframe = create_icon(Gtk::ICON_SIZE_BUTTON, "synfig-keyframe_lock_all",_("All Keyframes Locked")); attach(*seek_prev_keyframe, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); @@ -77,3 +78,19 @@ KeyFrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, return button; } + +Gtk::Button * +KeyFrameDial::create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid, + const char * tooltip) +{ + Gtk::Button *button = manage(new class Gtk::Button()); + Gtk::Image *icon = manage(new Gtk::Image(stockid, iconsize)); + button->add(*icon); + tooltips.set_tip(*button, tooltip); + icon->set_padding(0, 0); + icon->show(); + button->set_relief(Gtk::RELIEF_NONE); + button->show(); + + return button; +} diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.h b/synfig-studio/trunk/src/gtkmm/keyframedial.h index 41dfc57..a6491c9 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.h +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.h @@ -54,6 +54,7 @@ class KeyFrameDial : public Gtk::Table Gtk::Button *lock_keyframe; Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip); + Gtk::Button *create_icon(Gtk::IconSize iconsize, const Gtk::BuiltinStockID & stockid, const char * tooltip); public: -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Remove unneeded member call.
Module: synfig Branch: zelgadis_master Commit: 71deecdc651fe51c2c6a930502d86db2871f7a1c URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=71deecdc651fe51c2c6a930502d86db2871f7a1c Author: Carlos Lopez Date: Mon Jun 22 21:02:42 2009 +0200 Remove unneeded member call. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 7c3aa0a..0b532cd 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -951,7 +951,6 @@ CanvasView::create_time_bar() //Gtk::HScrollbar *time_scroll = manage(new class Gtk::HScrollbar(time_adjustment())); //TIME BAR TEMPORARY POSITION //Widget_Timeslider *time_scroll = manage(new Widget_Timeslider); - timeslider->show(); 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); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add Resolution Dial widget. Synchronise Low res check button with low res action and vice-versa. Also Increase/ Decrease resolution buttons change low res check button sta
Module: synfig Branch: zelgadis_master Commit: 3a2a20f4d04c9a1791b6e1997e75d729326a422b URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=3a2a20f4d04c9a1791b6e1997e75d729326a422b Author: Carlos Lopez Date: Sun Jun 28 15:05:28 2009 +0200 Add Resolution Dial widget. Synchronise Low res check button with low res action and vice-versa.Also Increase/Decrease resolution buttons change low res check button status and low res action. --- synfig-studio/trunk/src/gtkmm/Makefile.am|6 +- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 60 +- synfig-studio/trunk/src/gtkmm/canvasview.h |4 + synfig-studio/trunk/src/gtkmm/resolutiondial.cpp | 97 ++ synfig-studio/trunk/src/gtkmm/resolutiondial.h | 77 + 5 files changed, 239 insertions(+), 5 deletions(-) Diff: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commitdiff;h=3a2a20f4d04c9a1791b6e1997e75d729326a422b -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Remove uneeded code
Module: synfig Branch: zelgadis_master Commit: d411557e3219a623a663058fcaf494fc3540991d URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=d411557e3219a623a663058fcaf494fc3540991d Author: Carlos Lopez Date: Sun Jun 21 12:46:20 2009 +0200 Remove uneeded code --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 7223410..d877e6d 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -972,12 +972,7 @@ CanvasView::create_time_bar() SMALL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); -/* - 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(); - keyframebutton->set_relief(Gtk::RELIEF_NONE); -*/ + //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Deprecate intermediate Gtk::Table variable 'table'. Not needed.
Module: synfig Branch: zelgadis_master Commit: 37e70ada40533e1d3a623c5ebb560d7e88f83809 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=37e70ada40533e1d3a623c5ebb560d7e88f83809 Author: Carlos Lopez Date: Wed Jun 24 22:24:31 2009 +0200 Deprecate intermediate Gtk::Table variable 'table'. Not needed. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 27 - synfig-studio/trunk/src/gtkmm/canvasview.h |2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 64bf34a..caeb737 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -1044,24 +1044,23 @@ CanvasView::create_time_bar() ); toggleducksdial->show(); - Gtk::Table *table = manage(new class Gtk::Table(5, 4, false)); - timebar = table; + timebar = manage(new class Gtk::Table(5, 4, false)); - //Attach widgets to the time bar table - table->attach(*manage(disp_audio), 1, 5, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*framedial, 0, 1, 2, 3,Gtk::SHRINK, Gtk::SHRINK); - table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - table->attach(*timeslider, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*time_window_scroll, 1, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); - //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*toggleducksdial, 0, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + //Attach widgets to the timebar + timebar->attach(*manage(disp_audio), 1, 5, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + timebar->attach(*framedial, 0, 1, 2, 3,Gtk::SHRINK, Gtk::SHRINK); + timebar->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + timebar->attach(*timeslider, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + timebar->attach(*time_window_scroll, 1, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + timebar->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + timebar->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + //timebar->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + timebar->attach(*toggleducksdial, 0, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); - table->show(); + timebar->show(); - return table; + return timebar; } Gtk::Widget * diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 844a57f..2ed261e 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -261,7 +261,7 @@ private: Gtk::Button *refreshbutton; Gtk::Button *treetogglebutton; // not used Gtk::Notebook *notebook; // not used - Gtk::Widget *timebar; + Gtk::Table *timebar; Gtk::Button *animatebutton; Gtk::Button *keyframebutton; FrameDial *framedial; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Synchronise toggle buttons with keyboard and menu actions.
Module: synfig Branch: zelgadis_master Commit: 7b90fa6d64864aba582c3e8d4e0f2e8add8bd6c5 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=7b90fa6d64864aba582c3e8d4e0f2e8add8bd6c5 Author: Carlos Lopez Date: Sat Jun 27 10:20:11 2009 +0200 Synchronise toggle buttons with keyboard and menu actions. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 13 + synfig-studio/trunk/src/gtkmm/canvasview.h|1 + synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp |2 +- synfig-studio/trunk/src/gtkmm/toggleducksdial.h |2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index c7db107..2207d24 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -704,6 +704,7 @@ CanvasView::CanvasView(etl::loose_handle instance,etl::handleget_type_mask()&type); if(is_currently_on) @@ -3668,6 +3672,15 @@ CanvasView::toggle_duck_mask(Duckmatic::Type type) work_area->set_type_mask(work_area->get_type_mask()|type); work_area->queue_draw(); + try + { + toggleducksdial->update_toggles(work_area->get_type_mask()); + } + catch(...) + { + toggling_ducks_=false; + } + toggling_ducks_=false; } void diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 182d3e6..826c8ea 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -267,6 +267,7 @@ private: Gtk::Button *keyframebutton; FrameDial *framedial; ToggleDucksDial *toggleducksdial; + bool toggling_ducks_; //! Shows current time and allows edition diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp index 6dd67bc..8e07816 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp @@ -83,7 +83,7 @@ ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *label, } void -ToggleDucksDial::initiate_toggles(Duck::Type mask) +ToggleDucksDial::update_toggles(Duck::Type mask) { ducks_position-> set_active((mask & Duck::TYPE_POSITION)); ducks_vertex -> set_active((mask & Duck::TYPE_VERTEX)); diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.h b/synfig-studio/trunk/src/gtkmm/toggleducksdial.h index 312e3fd..919b01a 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.h +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.h @@ -63,7 +63,7 @@ class ToggleDucksDial : public Gtk::Table public: ToggleDucksDial(); - void initiate_toggles(Duck::Type mask); + void update_toggles(Duck::Type mask); Glib::SignalProxy0 signal_ducks_position() { return ducks_position->signal_toggled(); } Glib::SignalProxy0 signal_ducks_vertex(){ return ducks_vertex-> signal_toggled(); } Glib::SignalProxy0 signal_ducks_tangent() { return ducks_tangent-> signal_toggled(); } -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Use Toggle buttons instead of Buttons for toggle ducks.
Module: synfig Branch: zelgadis_master Commit: aa4b17d5d7bdbe76278ea25df74873007aaca852 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=aa4b17d5d7bdbe76278ea25df74873007aaca852 Author: Carlos Lopez Date: Wed Jun 24 23:01:35 2009 +0200 Use Toggle buttons instead of Buttons for toggle ducks. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |8 + synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp | 14 synfig-studio/trunk/src/gtkmm/toggleducksdial.h | 35 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index caeb737..72ce50a 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -1024,6 +1024,14 @@ CanvasView::create_time_bar() // Setup the ToggleDuckDial widget ToggleDucksDial *toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + + toggleducksdial->get_position_toggle()-> set_active(work_area->get_type_mask()&Duck::TYPE_POSITION); + toggleducksdial->get_vertex_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_VERTEX); + toggleducksdial->get_tangent_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_TANGENT); + toggleducksdial->get_radius_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_RADIUS); + toggleducksdial->get_width_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_WIDTH); + toggleducksdial->get_angle_toggle() -> set_active(work_area->get_type_mask()&Duck::TYPE_ANGLE); + toggleducksdial->signal_ducks_position().connect( sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) ); diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp index b23acde..78aeab5 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp @@ -69,15 +69,15 @@ ToggleDucksDial::ToggleDucksDial(): Gtk::Table(1, 6, false) attach(*ducks_angle, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); } -Gtk::Button * +Gtk::ToggleButton * ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *label, const char * tooltip) { - Gtk::Button *button = manage(new class Gtk::Button()); - button->set_label(label); - tooltips.set_tip(*button, tooltip); - button->set_relief(Gtk::RELIEF_NONE); - button->show(); + Gtk::ToggleButton *tbutton = manage(new class Gtk::ToggleButton()); + tbutton->set_label(label); + tooltips.set_tip(*tbutton, tooltip); + //tbutton->set_relief(Gtk::RELIEF_NONE); + tbutton->show(); - return button; + return tbutton; } diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.h b/synfig-studio/trunk/src/gtkmm/toggleducksdial.h index 510806f..d2e50f2 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.h +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.h @@ -32,7 +32,7 @@ #include #include -#include +#include #include "general.h" @@ -49,24 +49,31 @@ class ToggleDucksDial : public Gtk::Table { Gtk::Tooltips tooltips; - Gtk::Button *ducks_position; - Gtk::Button *ducks_vertex; - Gtk::Button *ducks_tangent; - Gtk::Button *ducks_radius; - Gtk::Button *ducks_width; - Gtk::Button *ducks_angle; + Gtk::ToggleButton *ducks_position; + Gtk::ToggleButton *ducks_vertex; + Gtk::ToggleButton *ducks_tangent; + Gtk::ToggleButton *ducks_radius; + Gtk::ToggleButton *ducks_width; + Gtk::ToggleButton *ducks_angle; - Gtk::Button *create_label_button(Gtk::IconSize iconsize, const char * label, const char * tooltip); + Gtk::ToggleButton *create_label_button(Gtk::IconSize iconsize, const char * label, const char * tooltip); public: ToggleDucksDial(); - Glib::SignalProxy0 signal_ducks_position() { return ducks_position->signal_clicked(); } - Glib::SignalProxy0 signal_ducks_vertex() { return ducks_vertex->signal_clicked(); } - Glib::SignalProxy0 signal_ducks_tangent() { return ducks_tangent->signal_clicked(); } - Glib::SignalProxy0 signal_ducks_radius() { return ducks_radius->signal_clicked(); } - Glib::SignalProxy0 signal_ducks_width() { return ducks_width->signal_clicked(); } - Glib::SignalProxy0 signal_ducks_angle() { return ducks_angle->signal_clicked(); } + Glib::SignalProxy0 signal_ducks_position() { return ducks_position->signal_toggled(); } + Glib::SignalProxy0 signal_ducks_vertex(){ return ducks_vertex-> signal_toggled(); } + Glib::SignalProxy0 signal_ducks_tangent() { return ducks_tangent-> signal_toggled(); } + Glib::SignalProxy0 signal_du
[Synfig-devl] Carlos Lopez : Add Keyframe Dial initial layout
Module: synfig Branch: zelgadis_master Commit: 7bca451a7f43f49570cefb2decbd4ef1bd711eea URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=7bca451a7f43f49570cefb2decbd4ef1bd711eea Author: Carlos Lopez Date: Sun Jun 21 11:57:18 2009 +0200 Add Keyframe Dial initial layout --- synfig-studio/trunk/src/gtkmm/Makefile.am |6 +- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 12 +++- synfig-studio/trunk/src/gtkmm/keyframedial.cpp | 77 synfig-studio/trunk/src/gtkmm/keyframedial.h | 70 + 4 files changed, 161 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/Makefile.am b/synfig-studio/trunk/src/gtkmm/Makefile.am index 4742357..39acf8c 100644 --- a/synfig-studio/trunk/src/gtkmm/Makefile.am +++ b/synfig-studio/trunk/src/gtkmm/Makefile.am @@ -293,7 +293,8 @@ OTHER_HH = \ valuelink.h \ workarea.h \ zoomdial.h \ - framedial.h + framedial.h \ + keyframedial.h OTHER_CC = \ main.cpp \ @@ -324,7 +325,8 @@ OTHER_CC = \ valuelink.cpp \ workarea.cpp \ zoomdial.cpp \ - framedial.cpp + framedial.cpp \ + keyframedial.cpp INCLUDES = \ diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 23407b0..89bad1b 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -100,6 +100,7 @@ #include "audiocontainer.h" #include "widget_timeslider.h" #include "framedial.h" +#include "keyframedial.h" #include #include @@ -1011,6 +1012,12 @@ CanvasView::create_time_bar() ); framedial->show(); + //Setup the KeyFrameDial widget + KeyFrameDial *keyframedial = Gtk::manage(new class KeyFrameDial()); + keyframedial->signal_seek_prev_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); + keyframedial->signal_seek_next_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + keyframedial->show(); + Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; @@ -1020,8 +1027,9 @@ CanvasView::create_time_bar() table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); table->attach(*timeslider, 1, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*animatebutton, 2, 3, 3, 4, Gtk::FILL, Gtk::SHRINK); - table->attach(*keyframebutton, 3, 4, 3, 4, Gtk::FILL, Gtk::SHRINK); + table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->show(); diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp new file mode 100644 index 000..ba60717 --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -0,0 +1,77 @@ +/* === S Y N F I G = */ +/*!\file keyframedial.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos Lopez +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* = */ + +/* === H E A D E R S === */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "keyframedial.h" +#include + +#endif + +/* === U S I N G === */ + +using namespace std; +using namespace studio; + +/* === M A C R O S = */ + +/* === G L O B A L S === */ + +/* === P R O C E D U R E S = */ + +/* === M E T H O D S === */ + +KeyFrameDial::KeyFrameDial(): Gtk::T
[Synfig-devl] Carlos Lopez : Add Play/Stop button to the Frame Dial.
Module: synfig Branch: zelgadis_master Commit: 44a6e894eaa7af4bcebb7c317a303f547878e01c URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=44a6e894eaa7af4bcebb7c317a303f547878e01c Author: Carlos Lopez Date: Mon Jun 22 20:08:36 2009 +0200 Add Play/Stop button to the Frame Dial. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 35 +++-- synfig-studio/trunk/src/gtkmm/canvasview.h |4 +++ synfig-studio/trunk/src/gtkmm/framedial.cpp |9 -- synfig-studio/trunk/src/gtkmm/framedial.h| 12 ++--- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 32530cd..7c3aa0a 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -99,7 +99,6 @@ #include "preview.h" #include "audiocontainer.h" #include "widget_timeslider.h" -#include "framedial.h" #include "keyframedial.h" #include @@ -997,13 +996,16 @@ CanvasView::create_time_bar() current_time_widget->show(); //Setup the FrameDial widget - FrameDial *framedial = manage(new class FrameDial()); + framedial = manage(new class FrameDial()); framedial->signal_seek_begin().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::begin()) ); framedial->signal_seek_prev_frame().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), -1) ); + framedial->signal_play_stop().connect( + sigc::mem_fun(*this, &studio::CanvasView::on_play_stop_pressed) + ); framedial->signal_seek_next_frame().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), 1) ); @@ -3154,8 +3156,8 @@ CanvasView::play() return; } } + on_play_stop_pressed(); is_playing_=false; - time_adjustment().set_value(endtime); time_adjustment().value_changed(); } @@ -3919,3 +3921,30 @@ CanvasView::on_delete_event(GdkEventAny* event __attribute__ ((unused))) return true; } + +//! Modify the play stop button apearence and play stop the animation +void +CanvasView::on_play_stop_pressed() +{ + Gtk::Image *icon; + Gtk::Button *stop_button; + stop_button=framedial->get_play_button(); + bool play_flag; + if(!is_playing()) + { + icon = manage(new Gtk::Image(Gtk::Stock::MEDIA_STOP, Gtk::IconSize::from_name("synfig-small_icon"))); + stop_button->set_relief(Gtk::RELIEF_NORMAL); + play_flag=true; + } + else + { + icon = manage(new Gtk::Image(Gtk::Stock::MEDIA_PLAY, Gtk::IconSize::from_name("synfig-small_icon"))); + stop_button->set_relief(Gtk::RELIEF_NONE); + play_flag=false; + } + stop_button->remove(); + stop_button->add(*icon); + icon->set_padding(0, 0); + icon->show(); + if(play_flag) play(); else stop(); +} diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 6f1f87e..844a57f 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -65,6 +65,7 @@ #include "dialog_waypoint.h" #include "dialog_keyframe.h" +#include "framedial.h" #include "duckmatic.h" #include @@ -263,6 +264,7 @@ private: Gtk::Widget *timebar; Gtk::Button *animatebutton; Gtk::Button *keyframebutton; + FrameDial *framedial; //! Shows current time and allows edition @@ -679,6 +681,8 @@ private: //void on_audio_play(); bool on_audio_scrub(); + void on_play_stop_pressed(); + protected: bool close_instance_when_safe(); bool on_delete_event(GdkEventAny* event); diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index a361bd3..0392f4b 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -49,7 +49,7 @@ using namespace studio; /* === M E T H O D S === */ -FrameDial::FrameDial(): Gtk::Table(3, 1, false) +FrameDial::FrameDial(): Gtk::Table(5, 1, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); @@ -57,6 +57,8 @@ FrameDial::FrameDial(): Gtk::Table(3, 1, false) _("Seek to Begin")); seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND, _("Previous Frame")); + play_stop = create_icon(iconsize, Gtk::Stock::MEDIA_PLAY, +
[Synfig-devl] Carlos Lopez : Show the current_time_widget in the proper function and request minimum horizontal size
Module: synfig Branch: zelgadis_master Commit: 13dbd5e744738bc01ec52e030aa05b76c6099b21 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=13dbd5e744738bc01ec52e030aa05b76c6099b21 Author: Carlos Lopez Date: Mon Jun 22 00:42:37 2009 +0200 Show the current_time_widget in the proper function and request minimum horizontal size --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index d877e6d..b3e243f 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -992,6 +992,8 @@ CanvasView::create_time_bar() current_time_widget->signal_value_changed().connect( sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) ); + current_time_widget->set_size_request(0,-1); // request horizontal shrink + current_time_widget->show(); //Setup the FrameDial widget FrameDial *framedial = manage(new class FrameDial()); @@ -3209,7 +3211,7 @@ void CanvasView::show_timebar() { timebar->show(); - current_time_widget->show(); + //current_time_widget->show(); // not needed now that belongs to the timebar //keyframe_tab_child->show(); if(layer_tree) -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Revert modifications for Fedora compatibility due to stability problems.
Module: synfig Branch: zelgadis_master Commit: 4cfe2b68ebd2556f9926965dcea2ca8f3fc050ea URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=4cfe2b68ebd2556f9926965dcea2ca8f3fc050ea Author: Carlos Lopez Date: Mon Jul 6 11:42:01 2009 +0200 Revert modifications for Fedora compatibility due to stability problems. --- ETL/trunk/ETL.pbproj/etl_profile.h | 28 ETL/trunk/ETL.pc.in|2 +- ETL/trunk/ETL/Makefile.am | 10 -- ETL/trunk/ETL/_mutex_pthreads.h|2 +- ETL/trunk/ETL/_stringf.h | 21 ETL/trunk/ETL/_thread.h| 22 ++-- ETL/trunk/ETL/clock|2 +- ETL/trunk/ETL/etl_config.h |2 +- ETL/trunk/ETL/etl_profile.h.in | 42 --- ETL/trunk/ETL/handle |6 ++-- ETL/trunk/ETL/mutex|2 +- ETL/trunk/Makefile.am |2 + ETL/trunk/configure.ac | 64 ETL/trunk/m4/ETL.m4| 32 ++ 14 files changed, 95 insertions(+), 142 deletions(-) Diff: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commitdiff;h=4cfe2b68ebd2556f9926965dcea2ca8f3fc050ea -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Moved keyframedial to the first row as well as the animate button
Module: synfig Branch: zelgadis_master Commit: f95ea50783dff336317c7a4fe381a97c45adc6b8 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=f95ea50783dff336317c7a4fe381a97c45adc6b8 Author: Carlos Lopez Date: Mon Jun 22 01:11:15 2009 +0200 Moved keyframedial to the first row as well as the animate button to save space. Added tooltip to the Current time --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index b3e243f..32530cd 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -993,6 +993,7 @@ CanvasView::create_time_bar() sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) ); current_time_widget->set_size_request(0,-1); // request horizontal shrink + tooltips.set_tip(*current_time_widget,_("Current time")); current_time_widget->show(); //Setup the FrameDial widget @@ -1019,17 +1020,17 @@ CanvasView::create_time_bar() keyframedial->show(); keyframebutton=keyframedial->get_lock_button(); - Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); + Gtk::Table *table = manage(new class Gtk::Table(5, 3, false)); timebar = table; //Attach widgets to the time bar table - table->attach(*manage(disp_audio), 1, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*manage(disp_audio), 1, 5, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*framedial, 0, 1, 2, 3,Gtk::SHRINK, Gtk::SHRINK); table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - table->attach(*timeslider, 1, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*timeslider, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*time_window_scroll, 1, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Reorder the code a bit and add some comments
Module: synfig Branch: zelgadis_master Commit: cb8203d4a2196e403c959cc154e027cc269fca68 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=cb8203d4a2196e403c959cc154e027cc269fca68 Author: Carlos Lopez Date: Mon Jun 22 19:05:34 2009 +0200 Reorder the code a bit and add some comments --- synfig-studio/trunk/src/gtkmm/canvasview.h | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 3b27e8b..6f1f87e 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -258,20 +258,22 @@ private: Gtk::Button *stopbutton; Gtk::Button *refreshbutton; - Gtk::Button *treetogglebutton; - Gtk::Notebook *notebook; + Gtk::Button *treetogglebutton; // not used + Gtk::Notebook *notebook; // not used Gtk::Widget *timebar; + Gtk::Button *animatebutton; + Gtk::Button *keyframebutton; + + //! Shows current time and allows edition Widget_Time *current_time_widget; void on_current_time_widget_changed(); - std::auto_ptrtimeslider; + //! Time slider class. Same than the Time track panel + std::auto_ptr timeslider; std::list duck_changed_connections; - Gtk::Button *animatebutton; - Gtk::Button *keyframebutton; - /* DEBUGPOINT_CLASS(8); Gtk::Menu duckmaskmenu; @@ -308,6 +310,7 @@ private: Gtk::CheckMenuItem* duck_mask_width; Gtk::CheckMenuItem* duck_mask_angle; */ + //! Menu members Gtk::Menu parammenu; Glib::RefPtr grid_snap_toggle; @@ -400,9 +403,11 @@ private: Gtk::Widget *create_time_bar(); + //! Pop up menu for the bezier (bline, draw) tool (?) void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc) { popup_param_menu(value_desc,location,true); } + //! Pop up menu for the tools but not the bezier ones. void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0, bool bezier=false); void workarea_layer_selected(synfig::Layer::Handle layer); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Comment a line that produced a bad render of the HScroll and seems to do nothing special .
Module: synfig Branch: zelgadis_master Commit: 70eafd12bd61c47015b2ee21d87e93e5a38eb61e URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=70eafd12bd61c47015b2ee21d87e93e5a38eb61e Author: Carlos Lopez Date: Mon Jun 22 21:54:01 2009 +0200 Comment a line that produced a bad render of the HScroll and seems to do nothing special. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 0b532cd..76437b9 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -959,7 +959,7 @@ CanvasView::create_time_bar() tooltips.set_tip(*timeslider,_("Changes the current time")); time_window_scroll->show(); timeslider->show(); - time_window_scroll->set_flags(Gtk::CAN_FOCUS); + //time_window_scroll->set_flags(Gtk::CAN_FOCUS); // Uncomment this produce bad render of the HScroll timeslider->set_flags(Gtk::CAN_FOCUS); //time_scroll->signal_value_changed().connect(sigc::mem_fun(*work_area, &studio::WorkArea::render_preview_hook)); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Move Lock keyframe button to the KeyFrameDial
Module: synfig Branch: zelgadis_master Commit: 5aa08267da13439daab566f02fb3a20104511752 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=5aa08267da13439daab566f02fb3a20104511752 Author: Carlos Lopez Date: Sun Jun 21 12:45:00 2009 +0200 Move Lock keyframe button to the KeyFrameDial --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 12 synfig-studio/trunk/src/gtkmm/keyframedial.cpp |4 +++- synfig-studio/trunk/src/gtkmm/keyframedial.h |3 +++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 89bad1b..7223410 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -968,14 +968,16 @@ CanvasView::create_time_bar() //time_scroll->set_update_policy(Gtk::UPDATE_DISCONTINUOUS); //Setup the Animation Mode Button and the Keyframe Lock button - NORMAL_BUTTON(animatebutton,"gtk-yes",_("Animate")); + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + SMALL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); - +/* 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(); - + keyframebutton->set_relief(Gtk::RELIEF_NONE); +*/ //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); @@ -1016,7 +1018,9 @@ CanvasView::create_time_bar() KeyFrameDial *keyframedial = Gtk::manage(new class KeyFrameDial()); keyframedial->signal_seek_prev_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); keyframedial->signal_seek_next_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + keyframedial->signal_lock_keyframe().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); keyframedial->show(); + keyframebutton=keyframedial->get_lock_button(); Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; @@ -1029,7 +1033,7 @@ CanvasView::create_time_bar() table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->show(); diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp index ba60717..a9bf328 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -49,15 +49,17 @@ using namespace studio; /* === M E T H O D S === */ -KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 2, false) +KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 3, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); seek_prev_keyframe = create_icon(iconsize, GTK_STOCK_GO_BACK, _("Previous KeyFrame")); seek_next_keyframe = create_icon(iconsize, GTK_STOCK_GO_FORWARD, _("Next KeyFrame")); + lock_keyframe = create_icon(Gtk::ICON_SIZE_BUTTON, "synfig-keyframe_lock_all",_("All Keyframes Locked")); attach(*seek_prev_keyframe, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*seek_next_keyframe, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + attach(*lock_keyframe, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); } Gtk::Button * diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.h b/synfig-studio/trunk/src/gtkmm/keyframedial.h index 6636590..41dfc57 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.h +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.h @@ -51,6 +51,7 @@ class KeyFrameDial : public Gtk::Table Gtk::Button *seek_prev_keyframe; Gtk::Button *seek_next_keyframe; + Gtk::Button *lock_keyframe; Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip); @@ -59,6 +60,8 @@ public: KeyFrameDial(); Glib::SignalProxy0 signal_seek_prev_keyframe() { return seek_prev_keyframe->signal_clicked(); } Glib::SignalProxy0 signal_seek_next_keyframe() { return seek_next_keyframe->signal_clicked(); } + Glib::SignalProxy0 sig
[Synfig-devl] Carlos Lopez : New Canvas view layout. WIP
Module: synfig Branch: zelgadis_master Commit: 660549d2828f033c28b0e0874565b32d1a052750 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=660549d2828f033c28b0e0874565b32d1a052750 Author: Carlos Lopez Date: Sun Jun 21 08:47:49 2009 +0200 New Canvas view layout. WIP -Move the Current time widget from the status to the timebar. -Add a new row at the bottom of the time bar and move there the animate and lock keyframe buttons. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 52 ++--- 1 files changed, 29 insertions(+), 23 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 44c8340..23407b0 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -946,6 +946,7 @@ CanvasView::create_time_bar() { Gtk::Image *icon; + //Setup the Time Slider and the Time window scroll Gtk::HScrollbar *time_window_scroll = manage(new class Gtk::HScrollbar(time_window_adjustment())); //Gtk::HScrollbar *time_scroll = manage(new class Gtk::HScrollbar(time_adjustment())); //TIME BAR TEMPORARY POSITION @@ -965,6 +966,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); + //Setup the Animation Mode Button and the Keyframe Lock button NORMAL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); @@ -973,7 +975,7 @@ CanvasView::create_time_bar() keyframebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); keyframebutton->show(); - //setup the audio display + //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); disp_audio->signal_start_scrubbing().connect( @@ -985,7 +987,15 @@ CanvasView::create_time_bar() disp_audio->signal_stop_scrubbing().connect( sigc::mem_fun(*audio,&AudioContainer::stop_scrubbing) ); + //Setup the current time widget + current_time_widget=manage(new Widget_Time); + current_time_widget->set_value(get_time()); + current_time_widget->set_fps(get_canvas()->rend_desc().get_frame_rate()); + current_time_widget->signal_value_changed().connect( + sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) + ); + //Setup the FrameDial widget FrameDial *framedial = manage(new class FrameDial()); framedial->signal_seek_begin().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::begin()) @@ -1001,15 +1011,19 @@ CanvasView::create_time_bar() ); framedial->show(); - Gtk::Table *table = manage(new class Gtk::Table(4, 3, false)); + Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; - table->attach(*manage(disp_audio), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*framedial, 0, 1, 1, 2,Gtk::SHRINK, Gtk::SHRINK); - table->attach(*timeslider, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*time_window_scroll, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*animatebutton, 2, 3, 0, 3, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*keyframebutton, 3, 4, 0, 3, Gtk::SHRINK, Gtk::SHRINK); + //Attach widgets to the time bar table + table->attach(*manage(disp_audio), 1, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*framedial, 0, 1, 2, 3,Gtk::SHRINK, Gtk::SHRINK); + table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + table->attach(*timeslider, 1, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*animatebutton, 2, 3, 3, 4, Gtk::FILL, Gtk::SHRINK); + table->attach(*keyframebutton, 3, 4, 3, 4, Gtk::FILL, Gtk::SHRINK); + + table->show(); return table; @@ -1036,7 +1050,7 @@ CanvasView::create_status_bar() cancel=false; // Create the status bar at the bottom of the window - Gtk::Table *statusbartable= manage(new class Gtk::Table(7, 1, false)); + Gtk::Table *statusbartable= manage(new class Gtk::Table(5, 1, false)); // statusbar = manage(new class Gtk::Statusbar()); // This is already done at construction progressbar =manage(new class Gtk::ProgressBar()); SMALL_BUTTON(stopbutton,"g
[Synfig-devl] Carlos Lopez : Fix bug: 2175043. Crash when destination file not writable or path doesn't exists.
Module: synfig Branch: zelgadis_master Commit: d41fc97f23cfdf7ad6a162f084bd740cd82c75b5 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=d41fc97f23cfdf7ad6a162f084bd740cd82c75b5 Author: Carlos Lopez Date: Sun Jul 12 19:45:10 2009 +0200 Fix bug: 2175043. Crash when destination file not writable or path doesn't exists. --- synfig-studio/trunk/src/gtkmm/render.cpp | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/render.cpp b/synfig-studio/trunk/src/gtkmm/render.cpp index 4696a47..cec4215 100644 --- a/synfig-studio/trunk/src/gtkmm/render.cpp +++ b/synfig-studio/trunk/src/gtkmm/render.cpp @@ -40,6 +40,8 @@ #include "general.h" +#include + #endif /* === U S I N G === */ @@ -287,6 +289,14 @@ RenderSettings::on_render_pressed() canvas_interface_->get_ui_interface()->error(_("Unable to create target for ")+filename); return; } + // This is the only way I've found to avoid send a non writable + // filename path to the renderer. + fstream filetest (filename.c_str(), fstream::out); + if (filetest.fail()) + { + canvas_interface_->get_ui_interface()->error(_("Unable to create file for ")+filename); + return; + } hide(); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Gerco Ballintijn : Added several generated files and directories that were ignored in Subversion
Module: synfig Branch: zelgadis_master Commit: da6fcda6350fe1a6a444f01f870fe0237bc9ca80 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=da6fcda6350fe1a6a444f01f870fe0237bc9ca80 Author: Gerco Ballintijn Date: Mon Jun 29 11:10:11 2009 +0200 Added several generated files and directories that were ignored in Subversion and that should also be ignored by git. --- .gitignore | 99 +-- 1 files changed, 95 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b43aba7..36dc72b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,16 +24,30 @@ synfig-studio/src # # generated in ETL, core and studio +*-config +ABOUT-NLS +Makefile.in.in +Makevars.template +POTFILES +Rules-quot aclocal.m4 +autom4te.cache +boldquot.sed config.* configure -*-config depcomp +...@boldquot.header +...@quot.header +insert-header.sin install-sh libtool ltmain.sh missing +quot.sed +remove-potcdate.sed +remove-potcdate.sin stamp-h1 +stamp-po # @@ -43,18 +57,95 @@ ETL/trunk/ETL/etl_profile_.h synfig-core/trunk/libltdl synfig-core/trunk/pkg-info/macosx/synfig-core.info +synfig-core/trunk/po/*.gmo +synfig-core/trunk/po/synfig.pot synfig-core/trunk/src/modules/synfig_modules.cfg synfig-core/trunk/src/synfig/proto/nodebase.h synfig-core/trunk/src/tool/synfig synfig-core/trunk/synfig.pc.in +synfig-core/trunk/m4/codeset.m4 +synfig-core/trunk/m4/gettext.m4 +synfig-core/trunk/m4/glibc2.m4 +synfig-core/trunk/m4/glibc21.m4 +synfig-core/trunk/m4/iconv.m4 +synfig-core/trunk/m4/intdiv0.m4 +synfig-core/trunk/m4/inttypes.m4 +synfig-core/trunk/m4/inttypes-h.m4 +synfig-core/trunk/m4/inttypes_h.m4 +synfig-core/trunk/m4/inttypes-pri.m4 +synfig-core/trunk/m4/intmax.m4 +synfig-core/trunk/m4/isc-posix.m4 +synfig-core/trunk/m4/lcmessage.m4 +synfig-core/trunk/m4/lib-ld.m4 +synfig-core/trunk/m4/lib-link.m4 +synfig-core/trunk/m4/lib-prefix.m4 +synfig-core/trunk/m4/lock.m4 +synfig-core/trunk/m4/longdouble.m4 +synfig-core/trunk/m4/longlong.m4 +synfig-core/trunk/m4/po.m4 +synfig-core/trunk/m4/progtest.m4 +synfig-core/trunk/m4/nls.m4 +synfig-core/trunk/m4/printf-posix.m4 +synfig-core/trunk/m4/uintmax_t.m4 +synfig-core/trunk/m4/ulonglong.m4 +synfig-core/trunk/m4/signed.m4 +synfig-core/trunk/m4/size_max.m4 +synfig-core/trunk/m4/stdint_h.m4 +synfig-core/trunk/m4/visibility.m4 +synfig-core/trunk/m4/wchar_t.m4 +synfig-core/trunk/m4/wint_t.m4 +synfig-core/trunk/m4/xsize.m4 + +synfig-studio/trunk/autorevision.h +synfig-studio/trunk/images/128x128 +synfig-studio/trunk/images/16x16 +synfig-studio/trunk/images/22x22 +synfig-studio/trunk/images/24x24 +synfig-studio/trunk/images/32x32 +synfig-studio/trunk/images/48x48 +synfig-studio/trunk/images/64x64 +synfig-studio/trunk/images/*.png +synfig-studio/trunk/images/images.nsh +synfig-studio/trunk/images/unimages.nsh +synfig-studio/trunk/m4/codeset.m4 +synfig-studio/trunk/m4/gettext.m4 +synfig-studio/trunk/m4/glibc21.m4 +synfig-studio/trunk/m4/glibc2.m4 +synfig-studio/trunk/m4/iconv.m4 +synfig-studio/trunk/m4/intdiv0.m4 +synfig-studio/trunk/m4/intmax.m4 +synfig-studio/trunk/m4/inttypes-h.m4 +synfig-studio/trunk/m4/inttypes_h.m4 +synfig-studio/trunk/m4/inttypes.m4 +synfig-studio/trunk/m4/inttypes-pri.m4 +synfig-studio/trunk/m4/isc-posix.m4 +synfig-studio/trunk/m4/lcmessage.m4 +synfig-studio/trunk/m4/lib-ld.m4 +synfig-studio/trunk/m4/lib-link.m4 +synfig-studio/trunk/m4/lib-prefix.m4 +synfig-studio/trunk/m4/lock.m4 +synfig-studio/trunk/m4/longdouble.m4 +synfig-studio/trunk/m4/longlong.m4 +synfig-studio/trunk/m4/nls.m4 +synfig-studio/trunk/m4/po.m4 +synfig-studio/trunk/m4/printf-posix.m4 +synfig-studio/trunk/m4/progtest.m4 +synfig-studio/trunk/m4/signed.m4 +synfig-studio/trunk/m4/size_max.m4 +synfig-studio/trunk/m4/stdint_h.m4 +synfig-studio/trunk/m4/uintmax_t.m4 +synfig-studio/trunk/m4/ulonglong.m4 +synfig-studio/trunk/m4/visibility.m4 +synfig-studio/trunk/m4/wchar_t.m4 +synfig-studio/trunk/m4/wint_t.m4 +synfig-studio/trunk/m4/xsize.m4 synfig-studio/trunk/pkg-info/macosx/synfig-studio.info +synfig-studio/trunk/po/*.gmo +synfig-studio/trunk/po/synfigstudio.pot synfig-studio/trunk/src/gtkmm/synfigstudio synfig-studio/trunk/synfigstudio-thumbnailer.schemas synfig-studio/trunk/synfigstudio.desktop -synfig-studio/trunk/images/*.png -synfig-studio/trunk/images/images.nsh -synfig-studio/trunk/images/unimages.nsh # -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Ch
[Synfig-devl] unknown : Test commit - please feel free ro revert
Module: synfig Branch: zelgadis_master Commit: 1fbe1b247f7b91cac58809c30fc92543e7ed363e URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=1fbe1b247f7b91cac58809c30fc92543e7ed363e Author: unknown Date: Fri Jul 3 19:50:46 2009 -0700 Test commit - please feel free ro revert Signed-off-by: pxe.g...@gmail.com --- synfig-studio/trunk/test.txt |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/test.txt b/synfig-studio/trunk/test.txt new file mode 100644 index 000..1c999d2 --- /dev/null +++ b/synfig-studio/trunk/test.txt @@ -0,0 +1 @@ +Deleteme... Just checking Git commit \ No newline at end of file -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Merge branch 'genete_setup_dialog'
Module: synfig Branch: zelgadis_master Commit: f869a457651ca7b7e1bbd8cbe57b92b79ca253a4 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=f869a457651ca7b7e1bbd8cbe57b92b79ca253a4 Author: Carlos Lopez Date: Mon Jun 29 17:51:11 2009 +0200 Merge branch 'genete_setup_dialog' --- -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add Play/Stop button to the Frame Dial.
Module: synfig Branch: zelgadis_master Commit: f2a5ca9cf3c770c4eb236d0c5c1ae7ecab242787 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=f2a5ca9cf3c770c4eb236d0c5c1ae7ecab242787 Author: Carlos Lopez Date: Mon Jun 22 20:08:36 2009 +0200 Add Play/Stop button to the Frame Dial. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 35 +++-- synfig-studio/trunk/src/gtkmm/canvasview.h |4 +++ synfig-studio/trunk/src/gtkmm/framedial.cpp |9 -- synfig-studio/trunk/src/gtkmm/framedial.h| 12 ++--- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 32530cd..7c3aa0a 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -99,7 +99,6 @@ #include "preview.h" #include "audiocontainer.h" #include "widget_timeslider.h" -#include "framedial.h" #include "keyframedial.h" #include @@ -997,13 +996,16 @@ CanvasView::create_time_bar() current_time_widget->show(); //Setup the FrameDial widget - FrameDial *framedial = manage(new class FrameDial()); + framedial = manage(new class FrameDial()); framedial->signal_seek_begin().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::begin()) ); framedial->signal_seek_prev_frame().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), -1) ); + framedial->signal_play_stop().connect( + sigc::mem_fun(*this, &studio::CanvasView::on_play_stop_pressed) + ); framedial->signal_seek_next_frame().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), 1) ); @@ -3154,8 +3156,8 @@ CanvasView::play() return; } } + on_play_stop_pressed(); is_playing_=false; - time_adjustment().set_value(endtime); time_adjustment().value_changed(); } @@ -3919,3 +3921,30 @@ CanvasView::on_delete_event(GdkEventAny* event __attribute__ ((unused))) return true; } + +//! Modify the play stop button apearence and play stop the animation +void +CanvasView::on_play_stop_pressed() +{ + Gtk::Image *icon; + Gtk::Button *stop_button; + stop_button=framedial->get_play_button(); + bool play_flag; + if(!is_playing()) + { + icon = manage(new Gtk::Image(Gtk::Stock::MEDIA_STOP, Gtk::IconSize::from_name("synfig-small_icon"))); + stop_button->set_relief(Gtk::RELIEF_NORMAL); + play_flag=true; + } + else + { + icon = manage(new Gtk::Image(Gtk::Stock::MEDIA_PLAY, Gtk::IconSize::from_name("synfig-small_icon"))); + stop_button->set_relief(Gtk::RELIEF_NONE); + play_flag=false; + } + stop_button->remove(); + stop_button->add(*icon); + icon->set_padding(0, 0); + icon->show(); + if(play_flag) play(); else stop(); +} diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 6f1f87e..844a57f 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -65,6 +65,7 @@ #include "dialog_waypoint.h" #include "dialog_keyframe.h" +#include "framedial.h" #include "duckmatic.h" #include @@ -263,6 +264,7 @@ private: Gtk::Widget *timebar; Gtk::Button *animatebutton; Gtk::Button *keyframebutton; + FrameDial *framedial; //! Shows current time and allows edition @@ -679,6 +681,8 @@ private: //void on_audio_play(); bool on_audio_scrub(); + void on_play_stop_pressed(); + protected: bool close_instance_when_safe(); bool on_delete_event(GdkEventAny* event); diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index a361bd3..0392f4b 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -49,7 +49,7 @@ using namespace studio; /* === M E T H O D S === */ -FrameDial::FrameDial(): Gtk::Table(3, 1, false) +FrameDial::FrameDial(): Gtk::Table(5, 1, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); @@ -57,6 +57,8 @@ FrameDial::FrameDial(): Gtk::Table(3, 1, false) _("Seek to Begin")); seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND, _("Previous Frame")); + play_stop = create_icon(iconsize, Gtk::Stock::MEDIA_PLAY, +
[Synfig-devl] Chris Norman : Fixing user name...
Module: synfig Branch: zelgadis_master Commit: 9b193ca30b3f4912d45fa8c4a55ad8fc6cff1e25 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=9b193ca30b3f4912d45fa8c4a55ad8fc6cff1e25 Author: Chris Norman Date: Fri Jul 3 19:56:18 2009 -0700 Fixing user name... Signed-off-by: Chris Norman --- synfig-studio/trunk/test.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/test.txt b/synfig-studio/trunk/test.txt index 1c999d2..d52c75c 100644 --- a/synfig-studio/trunk/test.txt +++ b/synfig-studio/trunk/test.txt @@ -1 +1 @@ -Deleteme... Just checking Git commit \ No newline at end of file +Deleteme... Just checking Git commit... fixing username \ No newline at end of file -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Delete unneeded test file from pixelgeek git test.
Module: synfig Branch: zelgadis_master Commit: 697bc5a5331b2750271bb68d401adb329ed7d95e URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=697bc5a5331b2750271bb68d401adb329ed7d95e Author: Carlos Lopez Date: Mon Jul 6 11:29:05 2009 +0200 Delete unneeded test file from pixelgeek git test. --- synfig-studio/trunk/test.txt |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/test.txt b/synfig-studio/trunk/test.txt deleted file mode 100644 index d52c75c..000 --- a/synfig-studio/trunk/test.txt +++ /dev/null @@ -1 +0,0 @@ -Deleteme... Just checking Git commit... fixing username \ No newline at end of file -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add Keyframe Dial initial layout
Module: synfig Branch: zelgadis_master Commit: 29dc41d9953bf08068615a30abcf687615ffdb08 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=29dc41d9953bf08068615a30abcf687615ffdb08 Author: Carlos Lopez Date: Sun Jun 21 11:57:18 2009 +0200 Add Keyframe Dial initial layout --- synfig-studio/trunk/src/gtkmm/Makefile.am |6 +- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 12 +++- synfig-studio/trunk/src/gtkmm/keyframedial.cpp | 77 synfig-studio/trunk/src/gtkmm/keyframedial.h | 70 + 4 files changed, 161 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/Makefile.am b/synfig-studio/trunk/src/gtkmm/Makefile.am index 4742357..39acf8c 100644 --- a/synfig-studio/trunk/src/gtkmm/Makefile.am +++ b/synfig-studio/trunk/src/gtkmm/Makefile.am @@ -293,7 +293,8 @@ OTHER_HH = \ valuelink.h \ workarea.h \ zoomdial.h \ - framedial.h + framedial.h \ + keyframedial.h OTHER_CC = \ main.cpp \ @@ -324,7 +325,8 @@ OTHER_CC = \ valuelink.cpp \ workarea.cpp \ zoomdial.cpp \ - framedial.cpp + framedial.cpp \ + keyframedial.cpp INCLUDES = \ diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 23407b0..89bad1b 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -100,6 +100,7 @@ #include "audiocontainer.h" #include "widget_timeslider.h" #include "framedial.h" +#include "keyframedial.h" #include #include @@ -1011,6 +1012,12 @@ CanvasView::create_time_bar() ); framedial->show(); + //Setup the KeyFrameDial widget + KeyFrameDial *keyframedial = Gtk::manage(new class KeyFrameDial()); + keyframedial->signal_seek_prev_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); + keyframedial->signal_seek_next_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + keyframedial->show(); + Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; @@ -1020,8 +1027,9 @@ CanvasView::create_time_bar() table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); table->attach(*timeslider, 1, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*animatebutton, 2, 3, 3, 4, Gtk::FILL, Gtk::SHRINK); - table->attach(*keyframebutton, 3, 4, 3, 4, Gtk::FILL, Gtk::SHRINK); + table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->show(); diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp new file mode 100644 index 000..ba60717 --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -0,0 +1,77 @@ +/* === S Y N F I G = */ +/*!\file keyframedial.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2009 Gerco Ballintijn +** Copyright (c) 2009 Carlos Lopez +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* = */ + +/* === H E A D E R S === */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "keyframedial.h" +#include + +#endif + +/* === U S I N G === */ + +using namespace std; +using namespace studio; + +/* === M A C R O S = */ + +/* === G L O B A L S === */ + +/* === P R O C E D U R E S = */ + +/* === M E T H O D S === */ + +KeyFrameDial::KeyFrameDial(): Gtk::T
[Synfig-devl] Carlos Lopez : Remove unneeded member call.
Module: synfig Branch: zelgadis_master Commit: b4dbf420eee03a47b270864cfeeae984856b2a3b URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=b4dbf420eee03a47b270864cfeeae984856b2a3b Author: Carlos Lopez Date: Mon Jun 22 21:02:42 2009 +0200 Remove unneeded member call. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 7c3aa0a..0b532cd 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -951,7 +951,6 @@ CanvasView::create_time_bar() //Gtk::HScrollbar *time_scroll = manage(new class Gtk::HScrollbar(time_adjustment())); //TIME BAR TEMPORARY POSITION //Widget_Timeslider *time_scroll = manage(new Widget_Timeslider); - timeslider->show(); 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); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Reformat code a bit. No changes.
Module: synfig Branch: zelgadis_master Commit: 13674a3200c086cb4ac7539b2f7114be9faed9a7 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=13674a3200c086cb4ac7539b2f7114be9faed9a7 Author: Carlos Lopez Date: Wed Jun 24 20:32:11 2009 +0200 Reformat code a bit. No changes. --- synfig-studio/trunk/src/gtkmm/dialog_setup.cpp | 57 1 files changed, 29 insertions(+), 28 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 37eef72..89199c9 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -219,33 +219,33 @@ Dialog_Setup::Dialog_Setup(): misc_table->attach(textbox_browser_command, 1, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); // Document - Gtk::Table *document_table=manage(new Gtk::Table(2,4,false)); - notebook->append_page(*document_table,_("Document")); + Gtk::Table *document_table = manage(new Gtk::Table(2, 4, false)); + notebook->append_page(*document_table, _("Document")); // Document - Preferred file name prefix attach_label(document_table, _("New Document filename prefix"), 0, xpadding, ypadding); document_table->attach(textbox_custom_filename_prefix, 1, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); - tooltips_.set_tip(textbox_custom_filename_prefix,_("File name prefix for the new created document")); + tooltips_.set_tip(textbox_custom_filename_prefix, _("File name prefix for the new created document")); // Document - New Document X size - pref_x_size_spinbutton=Gtk::manage(new Gtk::SpinButton(adj_pref_x_size,1,0)); - attach_label(document_table,_("New Document X size"),1, xpadding, ypadding); - document_table->attach(*pref_x_size_spinbutton, 1, 2, 1, 2,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); - tooltips_.set_tip(*pref_x_size_spinbutton,_("Width in pixels of the new created document")); + pref_x_size_spinbutton = Gtk::manage(new Gtk::SpinButton(adj_pref_x_size, 1, 0)); + attach_label(document_table, _("New Document X size"),1, xpadding, ypadding); + document_table->attach(*pref_x_size_spinbutton, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); + tooltips_.set_tip(*pref_x_size_spinbutton, _("Width in pixels of the new created document")); // Document - New Document Y size - pref_y_size_spinbutton=Gtk::manage(new Gtk::SpinButton(adj_pref_y_size,1,0)); - attach_label(document_table,_("New Document Y size"),2, xpadding, ypadding); + pref_y_size_spinbutton = Gtk::manage(new Gtk::SpinButton(adj_pref_y_size, 1, 0)); + attach_label(document_table,_("New Document Y size"), 2, xpadding, ypadding); document_table->attach(*pref_y_size_spinbutton, 1, 2, 2, 3,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); - tooltips_.set_tip(*pref_y_size_spinbutton,_("High in pixels of the new created document")); + tooltips_.set_tip(*pref_y_size_spinbutton, _("High in pixels of the new created document")); //Document - Template for predefined sizes of canvases. - size_template_combo=Gtk::manage(new Gtk::ComboBoxText()); + size_template_combo = Gtk::manage(new Gtk::ComboBoxText()); Gtk::Label* label(manage(new Gtk::Label(_("Predefined Resolutions:"; label->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); document_table->attach(*label, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); - document_table->attach(*size_template_combo,2, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); - size_template_combo->signal_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_size_template_combo_change)); + document_table->attach(*size_template_combo, 2, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); + size_template_combo->signal_changed().connect(sigc::mem_fun(*this, &studio::Dialog_Setup::on_size_template_combo_change)); size_template_combo->prepend_text(_("4096x3112 Full Aperture 4K")); size_template_combo->prepend_text(_("2048x1556 Full Aperture Native 2K")); size_template_combo->prepend_text(_("1920x1080 HDTV 1080p/i")); @@ -263,31 +263,32 @@ Dialog_Setup::Dialog_Setup(): size_template_combo->prepend_text(DEFAULT_PREDEFINED_SIZE); //Document - Template for predefined fps - fps_template_combo=Gtk::manage(new Gtk::ComboBoxText()); + fps_template_combo = Gtk::manage(new Gtk::ComboBoxText()); Gtk::Label* label1(manage(new Gtk::Label(_("Predefined FPS:"; label1->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); document_table->attach(*label1, 2, 3, 3,
[Synfig-devl] Carlos Lopez : Assure to call Gtk::manage instead of any other version.
Module: synfig Branch: zelgadis_master Commit: ed01e07e5df0c7a99b97b16e3e892e8f2cc98a9e URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=ed01e07e5df0c7a99b97b16e3e892e8f2cc98a9e Author: Carlos Lopez Date: Thu Jun 18 00:58:43 2009 +0200 Assure to call Gtk::manage instead of any other version. --- synfig-studio/trunk/src/gtkmm/dialog_setup.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 175ab36..3931dd3 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -228,13 +228,13 @@ Dialog_Setup::Dialog_Setup(): tooltips_.set_tip(textbox_custom_filename_prefix,_("File name prefix for the new created document")); // Document - New Document X size - Gtk::SpinButton* pref_x_size_spinbutton(manage(new Gtk::SpinButton(adj_pref_x_size,1,0))); + Gtk::SpinButton* pref_x_size_spinbutton(Gtk::manage(new Gtk::SpinButton(adj_pref_x_size,1,0))); attach_label(document_table,_("New Document X size"),1, xpadding, ypadding); document_table->attach(*pref_x_size_spinbutton, 1, 2, 1, 2,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); tooltips_.set_tip(*pref_x_size_spinbutton,_("Width in pixels of the new created document")); // Document - New Document Y size - Gtk::SpinButton* pref_y_size_spinbutton(manage(new Gtk::SpinButton(adj_pref_y_size,1,0))); + Gtk::SpinButton* pref_y_size_spinbutton(Gtk::manage(new Gtk::SpinButton(adj_pref_y_size,1,0))); attach_label(document_table,_("New Document Y size"),2, xpadding, ypadding); document_table->attach(*pref_y_size_spinbutton, 1, 2, 2, 3,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); tooltips_.set_tip(*pref_y_size_spinbutton,_("High in pixels of the new created document")); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Show the current_time_widget in the proper function and request minimum horizontal size
Module: synfig Branch: zelgadis_master Commit: c449d860f40a811c2faf19e823744ff7960202c4 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=c449d860f40a811c2faf19e823744ff7960202c4 Author: Carlos Lopez Date: Mon Jun 22 00:42:37 2009 +0200 Show the current_time_widget in the proper function and request minimum horizontal size --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index d877e6d..b3e243f 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -992,6 +992,8 @@ CanvasView::create_time_bar() current_time_widget->signal_value_changed().connect( sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) ); + current_time_widget->set_size_request(0,-1); // request horizontal shrink + current_time_widget->show(); //Setup the FrameDial widget FrameDial *framedial = manage(new class FrameDial()); @@ -3209,7 +3211,7 @@ void CanvasView::show_timebar() { timebar->show(); - current_time_widget->show(); + //current_time_widget->show(); // not needed now that belongs to the timebar //keyframe_tab_child->show(); if(layer_tree) -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Remove uneeded code
Module: synfig Branch: zelgadis_master Commit: 548f791bdcf8b69caae961c7ea63f67b10f742df URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=548f791bdcf8b69caae961c7ea63f67b10f742df Author: Carlos Lopez Date: Sun Jun 21 12:46:20 2009 +0200 Remove uneeded code --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 7223410..d877e6d 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -972,12 +972,7 @@ CanvasView::create_time_bar() SMALL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); -/* - 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(); - keyframebutton->set_relief(Gtk::RELIEF_NONE); -*/ + //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Keep correct size on the animate button after pressed.
Module: synfig Branch: zelgadis_master Commit: 62c72bf0bc6482003ae7423ecf727b2576fd5c46 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=62c72bf0bc6482003ae7423ecf727b2576fd5c46 Author: Carlos Lopez Date: Mon Jun 22 22:18:29 2009 +0200 Keep correct size on the animate button after pressed. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 76437b9..a3c42cc 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2580,10 +2580,11 @@ void CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode) { // If the animate flag was set in mode... + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); if(mode&synfigapp::MODE_ANIMATE) { Gtk::Image *icon; - icon=manage(new Gtk::Image(Gtk::StockID("gtk-no"),Gtk::ICON_SIZE_BUTTON)); + icon=manage(new Gtk::Image(Gtk::StockID("gtk-no"),iconsize)); animatebutton->remove(); animatebutton->add(*icon); tooltips.set_tip(*animatebutton,_("In Animate Editing Mode")); @@ -2593,7 +2594,7 @@ CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode) else { Gtk::Image *icon; - icon=manage(new Gtk::Image(Gtk::StockID("gtk-yes"),Gtk::ICON_SIZE_BUTTON)); + icon=manage(new Gtk::Image(Gtk::StockID("gtk-yes"),iconsize)); animatebutton->remove(); animatebutton->add(*icon); tooltips.set_tip(*animatebutton,_("Not in Animate Editing Mode")); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Do not use localised decimal separators for float number strings.
Module: synfig Branch: zelgadis_master Commit: 961f6306c4c142369a2e2d208515c9bb1fe935c3 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=961f6306c4c142369a2e2d208515c9bb1fe935c3 Author: Carlos Lopez Date: Wed Jun 24 20:07:35 2009 +0200 Do not use localised decimal separators for float number strings. --- synfig-studio/trunk/src/gtkmm/dialog_setup.cpp | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 7f6d835..37eef72 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -269,14 +269,18 @@ Dialog_Setup::Dialog_Setup(): document_table->attach(*label1, 2, 3, 3, 4, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); document_table->attach(*fps_template_combo,2, 3, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); fps_template_combo->signal_changed().connect(sigc::mem_fun(*this,&studio::Dialog_Setup::on_fps_template_combo_change)); - fps_template_combo->prepend_text("60,0"); // It seems that the period is a ',' instead of a '.' for GTK. - fps_template_combo->prepend_text("50,0"); - fps_template_combo->prepend_text("30,0"); - fps_template_combo->prepend_text("25,0"); - fps_template_combo->prepend_text("24,976"); - fps_template_combo->prepend_text("24,0"); - fps_template_combo->prepend_text("15,0"); - fps_template_combo->prepend_text("12,0"); + float f[8]; + f[0]=60; + f[1]=50; + f[2]=30; + f[3]=25; + f[4]=24.967; + f[5]=24; + f[6]=15; + f[7]=12; + for (int i=0; i<8; i++) + fps_template_combo->prepend_text(strprintf("%5.3f",f[i])); // It seems that the period is a ',' instead of a '.' for GTK. + fps_template_combo->prepend_text(DEFAULT_PREDEFINED_FPS); // Document - New Document FPS -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Disable fps spin button when combo box selection is a predefined one.
Module: synfig Branch: zelgadis_master Commit: f6d225414c538a10ee0f5e8f94d15bb3554da249 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=f6d225414c538a10ee0f5e8f94d15bb3554da249 Author: Carlos Lopez Date: Thu Jun 18 00:54:50 2009 +0200 Disable fps spin button when combo box selection is a predefined one. Enable in other case. --- synfig-studio/trunk/src/gtkmm/dialog_setup.cpp |5 +++-- synfig-studio/trunk/src/gtkmm/dialog_setup.h |2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 7406566..175ab36 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include "widget_enum.h" #include "autorecover.h" @@ -281,7 +280,7 @@ Dialog_Setup::Dialog_Setup(): fps_template_combo->prepend_text(DEFAULT_PREDEFINED_FPS); // Document - New Document FPS - Gtk::SpinButton* pref_fps_spinbutton(manage(new Gtk::SpinButton(adj_pref_fps,1,3))); + pref_fps_spinbutton=Gtk::manage(new Gtk::SpinButton(adj_pref_fps,1,3)); attach_label(document_table,_("New Document FPS"),4, xpadding, ypadding); document_table->attach(*pref_fps_spinbutton, 1, 2, 4, 5,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); tooltips_.set_tip(*pref_fps_spinbutton,_("Frames per second of the new created document")); @@ -418,9 +417,11 @@ Dialog_Setup::on_fps_template_combo_change() String selection(fps_template_combo->get_active_text()); if(selection==DEFAULT_PREDEFINED_FPS) { + pref_fps_spinbutton->set_sensitive(true); return; } adj_pref_fps.set_value(atof(selection.c_str())); + pref_fps_spinbutton->set_sensitive(false); return; } diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.h b/synfig-studio/trunk/src/gtkmm/dialog_setup.h index b9c8c98..36342ae 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.h +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -197,6 +198,7 @@ class Dialog_Setup : public Gtk::Dialog Gtk::Adjustment adj_pref_x_size; Gtk::Adjustment adj_pref_y_size; Gtk::Adjustment adj_pref_fps; + Gtk::SpinButton* pref_fps_spinbutton; Gtk::Tooltips tooltips_; public: -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Reorder the code a bit and add some comments
Module: synfig Branch: zelgadis_master Commit: 1a680abfce7422f6b44756fea9b047a9244ed697 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=1a680abfce7422f6b44756fea9b047a9244ed697 Author: Carlos Lopez Date: Mon Jun 22 19:05:34 2009 +0200 Reorder the code a bit and add some comments --- synfig-studio/trunk/src/gtkmm/canvasview.h | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 3b27e8b..6f1f87e 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -258,20 +258,22 @@ private: Gtk::Button *stopbutton; Gtk::Button *refreshbutton; - Gtk::Button *treetogglebutton; - Gtk::Notebook *notebook; + Gtk::Button *treetogglebutton; // not used + Gtk::Notebook *notebook; // not used Gtk::Widget *timebar; + Gtk::Button *animatebutton; + Gtk::Button *keyframebutton; + + //! Shows current time and allows edition Widget_Time *current_time_widget; void on_current_time_widget_changed(); - std::auto_ptrtimeslider; + //! Time slider class. Same than the Time track panel + std::auto_ptr timeslider; std::list duck_changed_connections; - Gtk::Button *animatebutton; - Gtk::Button *keyframebutton; - /* DEBUGPOINT_CLASS(8); Gtk::Menu duckmaskmenu; @@ -308,6 +310,7 @@ private: Gtk::CheckMenuItem* duck_mask_width; Gtk::CheckMenuItem* duck_mask_angle; */ + //! Menu members Gtk::Menu parammenu; Glib::RefPtr grid_snap_toggle; @@ -400,9 +403,11 @@ private: Gtk::Widget *create_time_bar(); + //! Pop up menu for the bezier (bline, draw) tool (?) void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc) { popup_param_menu(value_desc,location,true); } + //! Pop up menu for the tools but not the bezier ones. void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0, bool bezier=false); void workarea_layer_selected(synfig::Layer::Handle layer); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : New Canvas view layout. WIP
Module: synfig Branch: zelgadis_master Commit: 15a3beef527c4f114f9d42836517accc8bd4db7a URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=15a3beef527c4f114f9d42836517accc8bd4db7a Author: Carlos Lopez Date: Sun Jun 21 08:47:49 2009 +0200 New Canvas view layout. WIP -Move the Current time widget from the status to the timebar. -Add a new row at the bottom of the time bar and move there the animate and lock keyframe buttons. --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 52 ++--- 1 files changed, 29 insertions(+), 23 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 44c8340..23407b0 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -946,6 +946,7 @@ CanvasView::create_time_bar() { Gtk::Image *icon; + //Setup the Time Slider and the Time window scroll Gtk::HScrollbar *time_window_scroll = manage(new class Gtk::HScrollbar(time_window_adjustment())); //Gtk::HScrollbar *time_scroll = manage(new class Gtk::HScrollbar(time_adjustment())); //TIME BAR TEMPORARY POSITION @@ -965,6 +966,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); + //Setup the Animation Mode Button and the Keyframe Lock button NORMAL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); @@ -973,7 +975,7 @@ CanvasView::create_time_bar() keyframebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); keyframebutton->show(); - //setup the audio display + //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); disp_audio->signal_start_scrubbing().connect( @@ -985,7 +987,15 @@ CanvasView::create_time_bar() disp_audio->signal_stop_scrubbing().connect( sigc::mem_fun(*audio,&AudioContainer::stop_scrubbing) ); + //Setup the current time widget + current_time_widget=manage(new Widget_Time); + current_time_widget->set_value(get_time()); + current_time_widget->set_fps(get_canvas()->rend_desc().get_frame_rate()); + current_time_widget->signal_value_changed().connect( + sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) + ); + //Setup the FrameDial widget FrameDial *framedial = manage(new class FrameDial()); framedial->signal_seek_begin().connect( sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::begin()) @@ -1001,15 +1011,19 @@ CanvasView::create_time_bar() ); framedial->show(); - Gtk::Table *table = manage(new class Gtk::Table(4, 3, false)); + Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; - table->attach(*manage(disp_audio), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*framedial, 0, 1, 1, 2,Gtk::SHRINK, Gtk::SHRINK); - table->attach(*timeslider, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*time_window_scroll, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*animatebutton, 2, 3, 0, 3, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*keyframebutton, 3, 4, 0, 3, Gtk::SHRINK, Gtk::SHRINK); + //Attach widgets to the time bar table + table->attach(*manage(disp_audio), 1, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*framedial, 0, 1, 2, 3,Gtk::SHRINK, Gtk::SHRINK); + table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + table->attach(*timeslider, 1, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*animatebutton, 2, 3, 3, 4, Gtk::FILL, Gtk::SHRINK); + table->attach(*keyframebutton, 3, 4, 3, 4, Gtk::FILL, Gtk::SHRINK); + + table->show(); return table; @@ -1036,7 +1050,7 @@ CanvasView::create_status_bar() cancel=false; // Create the status bar at the bottom of the window - Gtk::Table *statusbartable= manage(new class Gtk::Table(7, 1, false)); + Gtk::Table *statusbartable= manage(new class Gtk::Table(5, 1, false)); // statusbar = manage(new class Gtk::Statusbar()); // This is already done at construction progressbar =manage(new class Gtk::ProgressBar()); SMALL_BUTTON(stopbutton,"g
[Synfig-devl] Carlos Lopez : Move Lock keyframe button to the KeyFrameDial
Module: synfig Branch: zelgadis_master Commit: 53234d21a3a6351e70772d8a5c7621c99f2eff3a URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=53234d21a3a6351e70772d8a5c7621c99f2eff3a Author: Carlos Lopez Date: Sun Jun 21 12:45:00 2009 +0200 Move Lock keyframe button to the KeyFrameDial --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 12 synfig-studio/trunk/src/gtkmm/keyframedial.cpp |4 +++- synfig-studio/trunk/src/gtkmm/keyframedial.h |3 +++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 89bad1b..7223410 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -968,14 +968,16 @@ CanvasView::create_time_bar() //time_scroll->set_update_policy(Gtk::UPDATE_DISCONTINUOUS); //Setup the Animation Mode Button and the Keyframe Lock button - NORMAL_BUTTON(animatebutton,"gtk-yes",_("Animate")); + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + SMALL_BUTTON(animatebutton,"gtk-yes",_("Animate")); animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); animatebutton->show(); - +/* 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(); - + keyframebutton->set_relief(Gtk::RELIEF_NONE); +*/ //Setup the audio display disp_audio->set_size_request(-1,32); //disp_audio->show(); disp_audio->set_time_adjustment(&time_adjustment()); @@ -1016,7 +1018,9 @@ CanvasView::create_time_bar() KeyFrameDial *keyframedial = Gtk::manage(new class KeyFrameDial()); keyframedial->signal_seek_prev_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); keyframedial->signal_seek_next_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + keyframedial->signal_lock_keyframe().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); keyframedial->show(); + keyframebutton=keyframedial->get_lock_button(); Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); timebar = table; @@ -1029,7 +1033,7 @@ CanvasView::create_time_bar() table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); table->show(); diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp index ba60717..a9bf328 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.cpp @@ -49,15 +49,17 @@ using namespace studio; /* === M E T H O D S === */ -KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 2, false) +KeyFrameDial::KeyFrameDial(): Gtk::Table(1, 3, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); seek_prev_keyframe = create_icon(iconsize, GTK_STOCK_GO_BACK, _("Previous KeyFrame")); seek_next_keyframe = create_icon(iconsize, GTK_STOCK_GO_FORWARD, _("Next KeyFrame")); + lock_keyframe = create_icon(Gtk::ICON_SIZE_BUTTON, "synfig-keyframe_lock_all",_("All Keyframes Locked")); attach(*seek_prev_keyframe, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*seek_next_keyframe, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + attach(*lock_keyframe, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); } Gtk::Button * diff --git a/synfig-studio/trunk/src/gtkmm/keyframedial.h b/synfig-studio/trunk/src/gtkmm/keyframedial.h index 6636590..41dfc57 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframedial.h +++ b/synfig-studio/trunk/src/gtkmm/keyframedial.h @@ -51,6 +51,7 @@ class KeyFrameDial : public Gtk::Table Gtk::Button *seek_prev_keyframe; Gtk::Button *seek_next_keyframe; + Gtk::Button *lock_keyframe; Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip); @@ -59,6 +60,8 @@ public: KeyFrameDial(); Glib::SignalProxy0 signal_seek_prev_keyframe() { return seek_prev_keyframe->signal_clicked(); } Glib::SignalProxy0 signal_seek_next_keyframe() { return seek_next_keyframe->signal_clicked(); } + Glib::SignalProxy0 sig
[Synfig-devl] Carlos Lopez : Use GTK icons for Zoom Dial buttons
Module: synfig Branch: zelgadis_master Commit: 1e38f2edd694159be2e2f3b00ef9845a2ef0fc30 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=1e38f2edd694159be2e2f3b00ef9845a2ef0fc30 Author: Carlos Lopez Date: Sat Jun 20 20:03:38 2009 +0200 Use GTK icons for Zoom Dial buttons --- synfig-studio/trunk/src/gtkmm/zoomdial.cpp |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/zoomdial.cpp b/synfig-studio/trunk/src/gtkmm/zoomdial.cpp index 78c76c1..aa42f1c 100644 --- a/synfig-studio/trunk/src/gtkmm/zoomdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/zoomdial.cpp @@ -51,10 +51,10 @@ using namespace studio; ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false) { - zoom_in = create_icon(size, "gtk-add", _("Zoom In")); - zoom_out = create_icon(size, "gtk-remove", _("Zoom Out")); - zoom_fit = create_icon(size, "gtk-zoom-fit", _("Zoom to Fit")); - zoom_norm = create_icon(size, "gtk-zoom-100", _("Zoom to 100%")); + zoom_in = create_icon(size, GTK_STOCK_ZOOM_IN, _("Zoom In")); + zoom_out = create_icon(size, GTK_STOCK_ZOOM_OUT, _("Zoom Out")); + zoom_fit = create_icon(size, GTK_STOCK_ZOOM_FIT, _("Zoom to Fit")); + zoom_norm = create_icon(size, GTK_STOCK_ZOOM_100, _("Zoom to 100%")); attach(*zoom_out, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*zoom_norm, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Moved keyframedial to the first row as well as the animate button
Module: synfig Branch: zelgadis_master Commit: 9c73091357a9e0c1b3fe30fe2445b4d71996882e URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=9c73091357a9e0c1b3fe30fe2445b4d71996882e Author: Carlos Lopez Date: Mon Jun 22 01:11:15 2009 +0200 Moved keyframedial to the first row as well as the animate button to save space. Added tooltip to the Current time --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index b3e243f..32530cd 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -993,6 +993,7 @@ CanvasView::create_time_bar() sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) ); current_time_widget->set_size_request(0,-1); // request horizontal shrink + tooltips.set_tip(*current_time_widget,_("Current time")); current_time_widget->show(); //Setup the FrameDial widget @@ -1019,17 +1020,17 @@ CanvasView::create_time_bar() keyframedial->show(); keyframebutton=keyframedial->get_lock_button(); - Gtk::Table *table = manage(new class Gtk::Table(4, 4, false)); + Gtk::Table *table = manage(new class Gtk::Table(5, 3, false)); timebar = table; //Attach widgets to the time bar table - table->attach(*manage(disp_audio), 1, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*manage(disp_audio), 1, 5, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); table->attach(*framedial, 0, 1, 2, 3,Gtk::SHRINK, Gtk::SHRINK); table->attach(*current_time_widget, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - table->attach(*timeslider, 1, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*time_window_scroll, 1, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); - table->attach(*keyframedial, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - table->attach(*animatebutton, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*timeslider, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*time_window_scroll, 1, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + table->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + table->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); //table->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Gerco Ballintijn : Use the GTKmm (instead of GTK) icon specifications for the Zoom and Frame
Module: synfig Branch: zelgadis_master Commit: 2d3216db7740f8155429914c17af1edb04a032bb URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=2d3216db7740f8155429914c17af1edb04a032bb Author: Gerco Ballintijn Date: Mon Jun 22 14:02:52 2009 +0200 Use the GTKmm (instead of GTK) icon specifications for the Zoom and Frame Navigation buttons. --- synfig-studio/trunk/src/gtkmm/framedial.cpp | 18 -- synfig-studio/trunk/src/gtkmm/framedial.h |3 ++- synfig-studio/trunk/src/gtkmm/zoomdial.cpp | 14 +++--- synfig-studio/trunk/src/gtkmm/zoomdial.h|2 +- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index f892b60..a361bd3 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -32,6 +32,7 @@ #include "framedial.h" #include +#include #endif @@ -52,10 +53,14 @@ FrameDial::FrameDial(): Gtk::Table(3, 1, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); - seek_begin = create_icon(iconsize, GTK_STOCK_MEDIA_PREVIOUS, _("Seek to Begin")); - seek_prev_frame = create_icon(iconsize, GTK_STOCK_MEDIA_REWIND, _("Previous Frame")); - seek_next_frame = create_icon(iconsize, GTK_STOCK_MEDIA_FORWARD, _("Next Frame")); - seek_end = create_icon(iconsize, GTK_STOCK_MEDIA_NEXT, _("Seek to End")); + seek_begin = create_icon(iconsize, Gtk::Stock::MEDIA_PREVIOUS, + _("Seek to Begin")); + seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND, + _("Previous Frame")); + seek_next_frame = create_icon(iconsize, Gtk::Stock::MEDIA_FORWARD, + _("Next Frame")); + seek_end = create_icon(iconsize, Gtk::Stock::MEDIA_NEXT, + _("Seek to End")); attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); @@ -64,11 +69,11 @@ FrameDial::FrameDial(): Gtk::Table(3, 1, false) } Gtk::Button * -FrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, +FrameDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid, const char * tooltip) { Gtk::Button *button = manage(new class Gtk::Button()); - Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize)); + Gtk::Image *icon = manage(new Gtk::Image(stockid, size)); button->add(*icon); tooltips.set_tip(*button, tooltip); icon->set_padding(0, 0); @@ -78,3 +83,4 @@ FrameDial::create_icon(Gtk::IconSize iconsize, const char * stockid, return button; } + diff --git a/synfig-studio/trunk/src/gtkmm/framedial.h b/synfig-studio/trunk/src/gtkmm/framedial.h index 58136b7..01f2be0 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.h +++ b/synfig-studio/trunk/src/gtkmm/framedial.h @@ -53,7 +53,8 @@ class FrameDial : public Gtk::Table Gtk::Button *seek_next_frame; Gtk::Button *seek_end; - Gtk::Button *create_icon(Gtk::IconSize iconsize, const char * stockid, const char * tooltip); + Gtk::Button *create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid, + const char * tooltip); public: FrameDial(); diff --git a/synfig-studio/trunk/src/gtkmm/zoomdial.cpp b/synfig-studio/trunk/src/gtkmm/zoomdial.cpp index aa42f1c..ae2f4a4 100644 --- a/synfig-studio/trunk/src/gtkmm/zoomdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/zoomdial.cpp @@ -31,6 +31,7 @@ #include "zoomdial.h" #include +#include #include "general.h" @@ -51,10 +52,10 @@ using namespace studio; ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false) { - zoom_in = create_icon(size, GTK_STOCK_ZOOM_IN, _("Zoom In")); - zoom_out = create_icon(size, GTK_STOCK_ZOOM_OUT, _("Zoom Out")); - zoom_fit = create_icon(size, GTK_STOCK_ZOOM_FIT, _("Zoom to Fit")); - zoom_norm = create_icon(size, GTK_STOCK_ZOOM_100, _("Zoom to 100%")); + zoom_in = create_icon(size, Gtk::Stock::ZOOM_IN, _("Zoom In")); + zoom_out = create_icon(size, Gtk::Stock::ZOOM_OUT, _("Zoom Out")); + zoom_fit = create_icon(size, Gtk::Stock::ZOOM_FIT, _("Zoom to Fit")); + zoom_norm = create_icon(size, Gtk::Stock::ZOOM_100, _("Zoom to 100%")); attach(*zoom_out, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*zoom_norm, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); @@ -63,11 +64,11 @@ ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false) } Gtk::Button * -ZoomDial::create_icon(Gtk::IconSize size, const char * stockid, +ZoomDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid, const char * tooltip) { Gtk:
[Synfig-devl] Carlos Lopez : Update my copyright
Module: synfig Branch: zelgadis_master Commit: 970dffd6d364d177f772abccaffaad7a7d0d5bd6 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=970dffd6d364d177f772abccaffaad7a7d0d5bd6 Author: Carlos Lopez Date: Thu Jun 18 23:36:50 2009 +0200 Update my copyright --- synfig-studio/trunk/src/gtkmm/dialog_setup.cpp |2 +- synfig-studio/trunk/src/gtkmm/dialog_setup.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index dfe377e..7f6d835 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -7,7 +7,7 @@ ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2008 Carlos López +** Copyright (c) 2008, 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.h b/synfig-studio/trunk/src/gtkmm/dialog_setup.h index c1cb994..530e4fa 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.h +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.h @@ -7,7 +7,7 @@ ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2008 Carlos López +** Copyright (c) 2008, 2009 Carlos López ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Merge branch 'master' into genete_setup_dialog
Module: synfig Branch: zelgadis_master Commit: b0212b80e88492fb1fb98086dabb519ea901045e URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=b0212b80e88492fb1fb98086dabb519ea901045e Author: Carlos Lopez Date: Sat Jun 20 10:11:27 2009 +0200 Merge branch 'master' into genete_setup_dialog --- -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Use GTK media icons for Frame Dial navigation buttons
Module: synfig Branch: zelgadis_master Commit: 85041620c2c84b2b5c46207483c3441e8b0330d9 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=85041620c2c84b2b5c46207483c3441e8b0330d9 Author: Carlos Lopez Date: Sat Jun 20 19:56:40 2009 +0200 Use GTK media icons for Frame Dial navigation buttons --- synfig-studio/trunk/src/gtkmm/framedial.cpp |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/framedial.cpp b/synfig-studio/trunk/src/gtkmm/framedial.cpp index a88af27..f892b60 100644 --- a/synfig-studio/trunk/src/gtkmm/framedial.cpp +++ b/synfig-studio/trunk/src/gtkmm/framedial.cpp @@ -52,10 +52,10 @@ FrameDial::FrameDial(): Gtk::Table(3, 1, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); - seek_begin = create_icon(iconsize, "synfig-seek_begin", _("Seek to Begin")); - seek_prev_frame = create_icon(iconsize, "synfig-seek_prev_frame", _("Previous Frame")); - seek_next_frame = create_icon(iconsize, "synfig-seek_next_frame", _("Next Frame")); - seek_end = create_icon(iconsize, "synfig-seek_end", _("Seek to End")); + seek_begin = create_icon(iconsize, GTK_STOCK_MEDIA_PREVIOUS, _("Seek to Begin")); + seek_prev_frame = create_icon(iconsize, GTK_STOCK_MEDIA_REWIND, _("Previous Frame")); + seek_next_frame = create_icon(iconsize, GTK_STOCK_MEDIA_FORWARD, _("Next Frame")); + seek_end = create_icon(iconsize, GTK_STOCK_MEDIA_NEXT, _("Seek to End")); attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Merge branch 'master' into genete_setup_dialog
Module: synfig Branch: zelgadis_master Commit: 429a714273c61bfadf0f8f373403760910f75eef URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=429a714273c61bfadf0f8f373403760910f75eef Author: Carlos Lopez Date: Sat Jun 20 14:15:37 2009 +0200 Merge branch 'master' into genete_setup_dialog --- -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Add preferred and predefined FPS options in the Setup Dialog
Module: synfig Branch: zelgadis_master Commit: 01ac0bd92a2342a4cdc10ad5e8300a1bf79a0f4b URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=01ac0bd92a2342a4cdc10ad5e8300a1bf79a0f4b Author: Carlos Lopez Date: Thu Jun 18 00:32:38 2009 +0200 Add preferred and predefined FPS options in the Setup Dialog --- synfig-studio/trunk/src/gtkmm/app.cpp | 30 ++- synfig-studio/trunk/src/gtkmm/app.h|2 + synfig-studio/trunk/src/gtkmm/dialog_setup.cpp | 50 +++- synfig-studio/trunk/src/gtkmm/dialog_setup.h |7 +++ 4 files changed, 87 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index ffca6fd..ee4cfde 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -280,6 +280,8 @@ String studio::App::custom_filename_prefix(DEFAULT_FILENAME_PREFIX); int studio::App::preferred_x_size=480; int studio::App::preferred_y_size=270; String studio::App::predefined_size(DEFAULT_PREDEFINED_SIZE); +String studio::App::predefined_fps(DEFAULT_PREDEFINED_FPS); +float studio::App::preferred_fps=24.0; #ifdef USE_OPEN_FOR_URLS String studio::App::browser_command("open"); // MacOS only #else @@ -542,6 +544,16 @@ public: value=strprintf("%s",App::predefined_size.c_str()); return true; } + if(key=="preferred_fps") + { + value=strprintf("%f",App::preferred_fps); + return true; + } + if(key=="predefined_fps") + { + value=strprintf("%s",App::predefined_fps.c_str()); + return true; + } return synfigapp::Settings::get_value(key,value); } @@ -639,6 +651,18 @@ public: App::predefined_size=value; return true; } + if(key=="preferred_fps") + { + float i(atof(value.c_str())); + App::preferred_fps=i; + return true; + } + if(key=="predefined_fps") + { + App::predefined_fps=value; + return true; + } + return synfigapp::Settings::set_value(key,value); } @@ -661,6 +685,8 @@ public: ret.push_back("preferred_x_size"); ret.push_back("preferred_y_size"); ret.push_back("predefined_size"); + ret.push_back("preferred_fps"); + ret.push_back("predefined_fps"); return ret; } }; @@ -1739,6 +1765,8 @@ App::reset_initial_window_configuration() synfigapp::Main::settings().set_value("pref.preferred_x_size","480"); synfigapp::Main::settings().set_value("pref.preferred_y_size","270"); synfigapp::Main::settings().set_value("pref.predefined_size",DEFAULT_PREDEFINED_SIZE); + synfigapp::Main::settings().set_value("pref.preferred_fps","24.0"); + synfigapp::Main::settings().set_value("pref.predefined_fps",DEFAULT_PREDEFINED_FPS); synfigapp::Main::settings().set_value("window.toolbox.pos","4 4"); } @@ -2409,7 +2437,7 @@ App::new_instance() canvas->set_name(file_name); file_name += ".sifz"; - canvas->rend_desc().set_frame_rate(24.0); + canvas->rend_desc().set_frame_rate(preferred_fps); canvas->rend_desc().set_time_start(0.0); canvas->rend_desc().set_time_end(5.0); canvas->rend_desc().set_x_res(DPI2DPM(72.0f)); diff --git a/synfig-studio/trunk/src/gtkmm/app.h b/synfig-studio/trunk/src/gtkmm/app.h index 507bc75..89cd528 100644 --- a/synfig-studio/trunk/src/gtkmm/app.h +++ b/synfig-studio/trunk/src/gtkmm/app.h @@ -204,6 +204,8 @@ public: static int preferred_x_size; static int preferred_y_size; static synfig::String predefined_size; + static synfig::String predefined_fps; + static float preferred_fps; /* -- ** -- S I G N A L S --- */ diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 9f849b0..7406566 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -84,7 +84,8 @@ Dialog_Setup::Dialog_Setup(): toggle_restrict_radius_ducks(_("Restrict Real-Valued Ducks to Top Right Quadrant")), toggle_resize_imported_images(_("Scale New Imported Images to Fit Canvas")), adj_pref_x_size(480,1,1,1,10,0), - adj_pref_y_size(270,1,1,1,10,0) + adj_pref_y_size(270,1,1,1,10,0), + adj_pref_fps(24.0,1.0,100,0.1,1,0) { // Setup the buttons @@ -262,6 +263,29
[Synfig-devl] Carlos Lopez : Merge branch 'master' into genete_setup_dialog
Module: synfig Branch: zelgadis_master Commit: 6965ba8940707105d613447e60f072549bde4ad4 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=6965ba8940707105d613447e60f072549bde4ad4 Author: Carlos Lopez Date: Sat Jun 20 14:22:02 2009 +0200 Merge branch 'master' into genete_setup_dialog --- -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Disable spin buttons for x and y size of new Documents
Module: synfig Branch: zelgadis_master Commit: e41a7cf093a3518d7cbb5919698a5a67b60fc900 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=e41a7cf093a3518d7cbb5919698a5a67b60fc900 Author: Carlos Lopez Date: Thu Jun 18 23:26:28 2009 +0200 Disable spin buttons for x and y size of new Documents when a predefined size is selected. --- synfig-studio/trunk/src/gtkmm/dialog_setup.cpp |9 +++-- synfig-studio/trunk/src/gtkmm/dialog_setup.h |2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp index 3931dd3..dfe377e 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.cpp @@ -228,13 +228,13 @@ Dialog_Setup::Dialog_Setup(): tooltips_.set_tip(textbox_custom_filename_prefix,_("File name prefix for the new created document")); // Document - New Document X size - Gtk::SpinButton* pref_x_size_spinbutton(Gtk::manage(new Gtk::SpinButton(adj_pref_x_size,1,0))); + pref_x_size_spinbutton=Gtk::manage(new Gtk::SpinButton(adj_pref_x_size,1,0)); attach_label(document_table,_("New Document X size"),1, xpadding, ypadding); document_table->attach(*pref_x_size_spinbutton, 1, 2, 1, 2,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); tooltips_.set_tip(*pref_x_size_spinbutton,_("Width in pixels of the new created document")); // Document - New Document Y size - Gtk::SpinButton* pref_y_size_spinbutton(Gtk::manage(new Gtk::SpinButton(adj_pref_y_size,1,0))); + pref_y_size_spinbutton=Gtk::manage(new Gtk::SpinButton(adj_pref_y_size,1,0)); attach_label(document_table,_("New Document Y size"),2, xpadding, ypadding); document_table->attach(*pref_y_size_spinbutton, 1, 2, 2, 3,Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, xpadding, ypadding); tooltips_.set_tip(*pref_y_size_spinbutton,_("High in pixels of the new created document")); @@ -398,6 +398,8 @@ Dialog_Setup::on_size_template_combo_change() String selection(size_template_combo->get_active_text()); if(selection==DEFAULT_PREDEFINED_SIZE) { + pref_y_size_spinbutton->set_sensitive(true); + pref_x_size_spinbutton->set_sensitive(true); return; } String::size_type locx=selection.find_first_of("x"); // here should be some comparison with string::npos @@ -408,6 +410,9 @@ Dialog_Setup::on_size_template_combo_change() int y=atoi(y_size.c_str()); adj_pref_x_size.set_value(x); adj_pref_y_size.set_value(y); + pref_y_size_spinbutton->set_sensitive(false); + pref_x_size_spinbutton->set_sensitive(false); + return; } diff --git a/synfig-studio/trunk/src/gtkmm/dialog_setup.h b/synfig-studio/trunk/src/gtkmm/dialog_setup.h index 36342ae..c1cb994 100644 --- a/synfig-studio/trunk/src/gtkmm/dialog_setup.h +++ b/synfig-studio/trunk/src/gtkmm/dialog_setup.h @@ -199,6 +199,8 @@ class Dialog_Setup : public Gtk::Dialog Gtk::Adjustment adj_pref_y_size; Gtk::Adjustment adj_pref_fps; Gtk::SpinButton* pref_fps_spinbutton; + Gtk::SpinButton* pref_y_size_spinbutton; + Gtk::SpinButton* pref_x_size_spinbutton; Gtk::Tooltips tooltips_; public: -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Draw time cursor always last.
Module: synfig Branch: genete_curves_dock Commit: 365ed5c5144c19a00b5dd71965f821086b3ab8eb URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=365ed5c5144c19a00b5dd71965f821086b3ab8eb Author: Carlos Lopez Date: Thu Jul 16 15:29:54 2009 +0200 Draw time cursor always last. --- synfig-studio/trunk/src/gtkmm/widget_curves.cpp |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp index 602..2260dad 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp @@ -500,10 +500,6 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/) gc->set_rgb_fg_color(Gdk::Color("#4f4f4f")); get_window()->draw_rectangle(gc, false, 0, round_to_int((0-r_bottom)/dr), w, 0); - // Draw current time - gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user selectable - get_window()->draw_rectangle(gc, false, round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h); - // This try to find a valid vanvas to show the keyframes of those // valuenodes. If not canvas found then no keyframes marks are shown. synfig::Canvas::Handle canvas=0; @@ -533,6 +529,11 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/) } } } + + // Draw current time + gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user selectable + get_window()->draw_rectangle(gc, false, round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h); + // Draw curves for the valuenodes stored in the curve list for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter) { -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Better solution to find a valid canvas for the displayed valuenodes
Module: synfig Branch: genete_curves_dock Commit: a109a797a2a1dbae8457cb65c905e44f4847b0ad URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=a109a797a2a1dbae8457cb65c905e44f4847b0ad Author: Carlos Lopez Date: Thu Jul 16 15:13:22 2009 +0200 Better solution to find a valid canvas for the displayed valuenodes --- synfig-studio/trunk/src/gtkmm/widget_curves.cpp | 15 +++ 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp index cf44f76..602 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp @@ -504,12 +504,19 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/) gc->set_rgb_fg_color(Gdk::Color("#ff")); // It should be user selectable get_window()->draw_rectangle(gc, false, round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h); - // This is not the best solution but I guess that if the first valuenode - // has canvas then show the keyframes. Maybe I can loop all them until I find - // a valid canvas and use it for look to the keyframes. - synfig::Canvas::Handle canvas(curve_list_.begin()->value_desc.get_canvas()); + // This try to find a valid vanvas to show the keyframes of those + // valuenodes. If not canvas found then no keyframes marks are shown. + synfig::Canvas::Handle canvas=0; + for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter) + { + canvas=curve_iter->value_desc.get_canvas(); + if(canvas) + break; + } + if(canvas) { + // Draw vertical lines for the keyframes marks. const synfig::KeyframeList& keyframe_list(canvas->keyframe_list()); synfig::KeyframeList::const_iterator iter; -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] Carlos Lopez : Initial trial of keyframe list. It doesn't compile.
Module: synfig Branch: genete_keyframe_list Commit: d984a091f5a0cb0c903d4abfcf7a7afb57ec82e3 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=d984a091f5a0cb0c903d4abfcf7a7afb57ec82e3 Author: Carlos Lopez Date: Thu Jul 16 16:35:13 2009 +0200 Initial trial of keyframe list. It doesn't compile. --- .../trunk/src/gtkmm/widget_keyframe_list.cpp | 270 .../trunk/src/gtkmm/widget_keyframe_list.h | 101 2 files changed, 371 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp b/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp new file mode 100644 index 000..e0f372f --- /dev/null +++ b/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp @@ -0,0 +1,270 @@ +/* === S Y N F I G = */ +/*!\file widget_keyframe_list.cpp +** \brief A custom widget to manage keyframes in the timeline. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** Copyright (c) 2009 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* = */ + +/* === H E A D E R S === */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "widget_keyframe_list.h" +#include "app.h" +#include +#include +#include + +#include "general.h" + +#endif + +/* === U S I N G === */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S = */ + +/* === G L O B A L S === */ + +/* === P R O C E D U R E S = */ + +/* === M E T H O D S === */ + +Widget_Keyframe_List::Widget_Keyframe_List(): + editable_(false) +{ + set_size_request(-1,64); + signal_expose_event().connect(sigc::mem_fun(*this, &studio::Widget_Keyframe_List::redraw)); + add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK); + add_events(Gdk::BUTTON1_MOTION_MASK); + +} + +Widget_Keyframe_List::~Widget_Keyframe_List() +{ +} + +bool +Widget_Gradient::redraw(GdkEventExpose */*bleh*/) +{ + const int h(get_height()); + const int w(get_width()); + + Glib::RefPtr gc(Gdk::GC::create(get_window())); + Gdk::Rectangle area(0,0,w,h); + if(!editable_) + { + return true; + } + + gc->set_rgb_fg_color(Gdk::Color("#7f7f7f")); + get_window()->draw_rectangle(gc, false, 0, 0, w, h); + + KeyframeList::iterator iter,selected_iter; + bool show_selected(false); + for(iter=kf_list_.begin();iter!=kf_list_.end();iter++) + { + if(*iter!=selected_kf) + get_style()->paint_arrow( + get_window(), + (*iter==selected_kf)?Gtk::STATE_SELECTED:Gtk::STATE_ACTIVE, + Gtk::SHADOW_OUT, + area, + *this, + " ", + Gtk::ARROW_DOWN, + 1, + int(iter->get_time()*w)-h/2+1, /// to be fixed + 0, + h, + h + ); + else + { + selected_iter=iter; + show_selected=true; + } + } + + // we do this so that we can be sure that + // the selected marker is shown on top + if(show_selected) + { + get_style()->paint_arrow( + get_window(), + Gtk::STATE_SELECTED, + Gtk::SHADOW_OUT, + area, + *this, + " ", + Gtk::ARROW_DOWN, + 1, + round_to_int(selected_iter->get_time()*w)-h/2+1, + 0, + h, + h + ); + } + + return true; +} + +
[Synfig-devl] Carlos Lopez : Prevent a crash if there are not parameters selected.
Module: synfig Branch: genete_curves_dock Commit: 04e736f96597bb36dbd6b8059d785269369b3321 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=04e736f96597bb36dbd6b8059d785269369b3321 Author: Carlos Lopez Date: Thu Jul 16 01:22:02 2009 +0200 Prevent a crash if there are not parameters selected. --- synfig-studio/trunk/src/gtkmm/widget_curves.cpp |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp index efd2cd1..cf44f76 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp @@ -474,6 +474,9 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/) if(!time_adjustment_ || !range_adjustment_ || !h || !w) return false; + if(!curve_list_.size()) + return false; + Glib::RefPtr gc(Gdk::GC::create(get_window())); const Real t_begin(time_adjustment_->get_lower()); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
[Synfig-devl] pxegeek : Correcting 'Toogle' spelling mistake on tooltips - Chris Norman
Module: synfig Branch: master Commit: b276de9343a3cc69c8651abcc82e489302b2ece1 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=b276de9343a3cc69c8651abcc82e489302b2ece1 Author: pxegeek Date: Wed Jul 15 17:48:38 2009 -0700 Correcting 'Toogle' spelling mistake on tooltips - Chris Norman --- synfig-studio/trunk/src/gtkmm/iconcontroller.cpp | 12 ++-- synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp b/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp index 8af9357..05301a7 100644 --- a/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp +++ b/synfig-studio/trunk/src/gtkmm/iconcontroller.cpp @@ -195,12 +195,12 @@ IconController::IconController(const synfig::String& /*basepath*/) INIT_STOCK_ICON(seek_next_frame,"seek_next_frame."IMAGE_EXT,_("Next Frame")); INIT_STOCK_ICON(seek_end,"seek_end."IMAGE_EXT,_("Seek to End")); - INIT_STOCK_ICON(toggle_duck_position,"duck_position_icon."IMAGE_EXT,_("Toogle position ducks")); - INIT_STOCK_ICON(toggle_duck_vertex,"duck_vertex_icon."IMAGE_EXT,_("Toogle vertex ducks")); - INIT_STOCK_ICON(toggle_duck_tangent,"duck_tangent_icon."IMAGE_EXT,_("Toogle tangent ducks")); - INIT_STOCK_ICON(toggle_duck_radius,"duck_radius_icon."IMAGE_EXT,_("Toogle radius ducks")); - INIT_STOCK_ICON(toggle_duck_width,"duck_width_icon."IMAGE_EXT,_("Toogle width ducks")); - INIT_STOCK_ICON(toggle_duck_angle,"duck_angle_icon."IMAGE_EXT,_("Toogle angle ducks")); + INIT_STOCK_ICON(toggle_duck_position,"duck_position_icon."IMAGE_EXT,_("Toggle position ducks")); + INIT_STOCK_ICON(toggle_duck_vertex,"duck_vertex_icon."IMAGE_EXT,_("Toggle vertex ducks")); + INIT_STOCK_ICON(toggle_duck_tangent,"duck_tangent_icon."IMAGE_EXT,_("Toggle tangent ducks")); + INIT_STOCK_ICON(toggle_duck_radius,"duck_radius_icon."IMAGE_EXT,_("Toggle radius ducks")); + INIT_STOCK_ICON(toggle_duck_width,"duck_width_icon."IMAGE_EXT,_("Toggle width ducks")); + INIT_STOCK_ICON(toggle_duck_angle,"duck_angle_icon."IMAGE_EXT,_("Toggle angle ducks")); INIT_STOCK_ICON(toggle_show_grid,"show_grid_icon."IMAGE_EXT,_("Toggle show grid")); INIT_STOCK_ICON(toggle_snap_grid,"snap_grid_icon."IMAGE_EXT,_("Toggle snap grid")); diff --git a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp index 3f1230a..358923a 100644 --- a/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp +++ b/synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp @@ -54,12 +54,12 @@ ToggleDucksDial::ToggleDucksDial(): Gtk::Table(1, 6, false) { Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon"); - ducks_position = create_label_button(iconsize, "synfig-toggle_duck_position", _("Toogle position ducks")); - ducks_vertex = create_label_button(iconsize, "synfig-toggle_duck_vertex", _("Toogle vertex ducks")); - ducks_tangent = create_label_button(iconsize, "synfig-toggle_duck_tangent", _("Toogle tangent ducks")); - ducks_radius = create_label_button(iconsize, "synfig-toggle_duck_radius", _("Toogle radius ducks")); - ducks_width = create_label_button(iconsize, "synfig-toggle_duck_width", _("Toogle width ducks")); - ducks_angle = create_label_button(iconsize, "synfig-toggle_duck_angle", _("Toogle angle ducks")); + ducks_position = create_label_button(iconsize, "synfig-toggle_duck_position", _("Toggle position ducks")); + ducks_vertex = create_label_button(iconsize, "synfig-toggle_duck_vertex", _("Toggle vertex ducks")); + ducks_tangent = create_label_button(iconsize, "synfig-toggle_duck_tangent", _("Toggle tangent ducks")); + ducks_radius = create_label_button(iconsize, "synfig-toggle_duck_radius", _("Toggle radius ducks")); + ducks_width = create_label_button(iconsize, "synfig-toggle_duck_width", _("Toggle width ducks")); + ducks_angle = create_label_button(iconsize, "synfig-toggle_duck_angle", _("Toggle angle ducks")); attach(*ducks_position, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); attach(*ducks_vertex, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl