Applied the following dooglus patches from the sourceforge tracker:
[synfig.git] / synfig-studio / trunk / src / gtkmm / compview.cpp
index 58dd236..9913202 100644 (file)
@@ -1,18 +1,19 @@
 /*! ========================================================================
-** Sinfg
+** Synfig
 ** Template File
 ** $Id: compview.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
 **
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+**     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.
 **
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+**     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.
 **
 ** === N O T E S ===========================================================
 **
@@ -37,7 +38,7 @@
 #include <sigc++/hide.h>
 #include <sigc++/slot.h>
 #include "canvasview.h"
-#include <sinfgapp/action.h>
+#include <synfigapp/action.h>
 
 #endif
 
@@ -51,7 +52,7 @@
 
 using namespace std;
 using namespace etl;
-using namespace sinfg;
+using namespace synfig;
 using namespace studio;
 
 #define COLUMNID_JUMP          (787584)
@@ -341,15 +342,15 @@ void
 CompView::init_menu()
 {
        menu.items().push_back(Gtk::Menu_Helpers::SeparatorElem());
-       menu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("sinfg-canvas_new"),
+       menu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-canvas_new"),
                sigc::mem_fun(*this,&CompView::menu_new_canvas)));
        menu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-delete"),
                sigc::mem_fun(*this,&CompView::menu_delete)));
-       menu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("sinfg-rename"),
+       menu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-rename"),
                sigc::mem_fun(*this,&CompView::menu_rename)));
 }
 
-etl::loose_handle<sinfg::Canvas>
+etl::loose_handle<synfig::Canvas>
 CompView::get_selected_canvas()
 {
        Glib::RefPtr<Gtk::TreeSelection> selection=canvas_tree->get_selection();
@@ -359,7 +360,7 @@ CompView::get_selected_canvas()
 
        studio::Instance::CanvasTreeModel canvas_tree_model;
 
-       return static_cast<etl::handle<sinfg::Canvas> >((*selection->get_selected())[canvas_tree_model.canvas]);
+       return static_cast<etl::handle<synfig::Canvas> >((*selection->get_selected())[canvas_tree_model.canvas]);
 }
 
 void
@@ -449,8 +450,8 @@ CompView::new_instance(etl::handle<studio::Instance> instance)
        
        etl::loose_handle<studio::Instance> loose_instance(instance);
        
-       instance->sinfgapp::Instance::signal_filename_changed().connect(sigc::mem_fun(*this,&CompView::refresh_instances));
-       instance->sinfgapp::Instance::signal_filename_changed().connect(
+       instance->synfigapp::Instance::signal_filename_changed().connect(sigc::mem_fun(*this,&CompView::refresh_instances));
+       instance->synfigapp::Instance::signal_filename_changed().connect(
                sigc::bind<etl::loose_handle<studio::Instance> >(
                        sigc::mem_fun(*this,&CompView::set_selected_instance),
                        loose_instance
@@ -536,7 +537,7 @@ CompView::on_action_event(GdkEvent *event)
                        //signal_user_click()(event->button.button,row,(ColumnID)column->get_sort_column_id());
                        if((ColumnID)column->get_sort_column_id()==COLUMNID_JUMP)
                        {
-                               etl::handle<sinfgapp::Action::Undoable> action(row[model.action]);
+                               etl::handle<synfigapp::Action::Undoable> action(row[model.action]);
                                if((bool)row[model.is_undo])
                                {
                                        while(get_selected_instance()->undo_action_stack().size() && get_selected_instance()->undo_action_stack().front()!=action)
@@ -571,10 +572,10 @@ CompView::on_tree_event(GdkEvent *event)
                {
                        menu.items().clear();
 
-                       sinfgapp::Action::ParamList param_list;
-                       param_list.add("canvas",sinfg::Canvas::Handle(get_selected_canvas()));
+                       synfigapp::Action::ParamList param_list;
+                       param_list.add("canvas",synfig::Canvas::Handle(get_selected_canvas()));
                        param_list.add("canvas_interface",get_selected_instance()->find_canvas_interface(get_selected_canvas()));
-                       get_selected_instance()->find_canvas_view(get_selected_canvas())->add_actions_to_menu(&menu, param_list,sinfgapp::Action::CATEGORY_CANVAS);                                     
+                       get_selected_instance()->find_canvas_view(get_selected_canvas())->add_actions_to_menu(&menu, param_list,synfigapp::Action::CATEGORY_CANVAS);                                    
                        menu.popup(0,0);
                        menu.show();
                        break;
@@ -602,7 +603,7 @@ CompView::on_action_toggle(const Glib::ustring& path_string)
        
        const Gtk::TreeRow row = *(selected_instance->history_tree_store()->get_iter(path));
 
-       handle<sinfgapp::Action::Undoable> action=row[history_tree_model.action];
+       handle<synfigapp::Action::Undoable> action=row[history_tree_model.action];
        
-       selected_instance->sinfgapp::Instance::set_action_status(action,!action->is_active());
+       selected_instance->synfigapp::Instance::set_action_status(action,!action->is_active());
 }