X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fhistorytreestore.cpp;h=1f0eb9c0cee2944b531c00b5740eff9a232a044e;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=460b100c2e9b55911e3cb444b71ed359ed6a31bf;hpb=c34eaa5441242b3e9a7b7645e9ee4983d14eae85;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/historytreestore.cpp b/synfig-studio/trunk/src/gtkmm/historytreestore.cpp index 460b100..1f0eb9c 100644 --- a/synfig-studio/trunk/src/gtkmm/historytreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/historytreestore.cpp @@ -2,10 +2,11 @@ /*! \file historytreestore.cpp ** \brief Template File ** -** $Id: historytreestore.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -31,12 +32,14 @@ #include "historytreestore.h" #include -#include "iconcontroler.h" +#include "iconcontroller.h" #include #include #include #include "instance.h" +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -75,7 +78,8 @@ HistoryTreeStore::HistoryTreeStore(etl::loose_handle instance_ HistoryTreeStore::~HistoryTreeStore() { - synfig::info("HistoryTreeStore::~HistoryTreeStore(): Deleted"); + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("HistoryTreeStore::~HistoryTreeStore(): Deleted"); } Glib::RefPtr @@ -100,10 +104,12 @@ HistoryTreeStore::rebuild() { insert_action(*(append()),*iter,true,false,true); } + + signal_undo_tree_changed()(); } void -HistoryTreeStore::insert_action(Gtk::TreeRow row,etl::handle action, bool is_active, bool is_undo, bool is_redo) +HistoryTreeStore::insert_action(Gtk::TreeRow row,etl::handle action, bool /*is_active*/, bool is_undo, bool is_redo) { assert(action); @@ -195,6 +201,8 @@ HistoryTreeStore::on_new_action(etl::handle action) row=*insert(iter); insert_action(row,action); + + signal_undo_tree_changed()(); } void @@ -213,3 +221,15 @@ HistoryTreeStore::on_action_status_changed(etl::handle&,int,const Glib::ustring& x,const Gtk::TreeModel::iterator& iter) +{ + const Model model; + + Glib::ustring substr(x.uppercase()); + Glib::ustring name((*iter)[model.name]); + name=name.uppercase(); + + return name.find(substr)==Glib::ustring::npos; +}