#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_gnomecanvasmm.dpatch by  <gaudenz@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: build with gnomecanvasmm-2.6, gtkmm-2.4 and sigc++-2.0

@DPATCH@
diff -urNad passepartout-0.6-3~/configure.ac passepartout-0.6-3/configure.ac
--- passepartout-0.6-3~/configure.ac	2005-12-21 02:16:06.000000000 +0100
+++ configure.ac	2005-12-21 02:24:59.000000000 +0100
@@ -42,12 +42,12 @@
 
 AC_SUBST([GTKMM_LIBS])
 AC_SUBST([GTKMM_CFLAGS])
-PKG_CHECK_MODULES(GTKMM, gtkmm-2.0)
+PKG_CHECK_MODULES(GTKMM, gtkmm-2.4)
 AC_APPLY_RPATH([GTKMM_LIBS])
 
 AC_SUBST([GNOMECANVAS_LIBS])
 AC_SUBST([GNOMECANVAS_CFLAGS])
-PKG_CHECK_MODULES(GNOMECANVAS, libgnomecanvasmm-2.0)
+PKG_CHECK_MODULES(GNOMECANVAS, libgnomecanvasmm-2.6)
 AC_APPLY_RPATH([XMLPP_LIBS])
 
 AC_SUBST([GTHREAD_LIBS])
@@ -57,7 +57,7 @@
 
 AC_SUBST([SIGC_LIBS])
 AC_SUBST([SIGC_CFLAGS])
-PKG_CHECK_MODULES([SIGC], [sigc++-1.2])
+PKG_CHECK_MODULES([SIGC], [sigc++-2.0])
 AC_APPLY_RPATH([SIGC_LIBS])
 
 AC_SUBST([FREETYPE_LIBS])
diff -urNad passepartout-0.6-3~/src/pptout/aboutdialog.cc passepartout-0.6-3/src/pptout/aboutdialog.cc
--- passepartout-0.6-3~/src/pptout/aboutdialog.cc	2005-12-21 02:16:06.000000000 +0100
+++ src/pptout/aboutdialog.cc	2005-12-21 02:24:59.000000000 +0100
@@ -61,9 +61,11 @@
   webpage->set_relief(Gtk::RELIEF_NONE);
   webpage->set_border_width(0);
   webpage->signal_clicked().connect
-    (bind(slot(*this, &AboutDialog::on_response), OPEN_WEBPAGE));
+    (sigc::bind(sigc::mem_fun(*this, &AboutDialog::on_response),
+                int(OPEN_WEBPAGE)));
   webpage->signal_activate().connect
-    (bind(slot(*this, &AboutDialog::on_response), OPEN_WEBPAGE));
+    (sigc::bind(sigc::mem_fun(*this, &AboutDialog::on_response),
+                int(OPEN_WEBPAGE)));
   message->pack_start(*webpage, Gtk::PACK_SHRINK);
 
   label =
diff -urNad passepartout-0.6-3~/src/pptout/config.cc passepartout-0.6-3/src/pptout/config.cc
--- passepartout-0.6-3~/src/pptout/config.cc	2005-12-21 02:16:06.000000000 +0100
+++ src/pptout/config.cc	2005-12-21 02:24:59.000000000 +0100
@@ -136,7 +136,7 @@
   if(dialog)
     return *dialog;
   dialog = new PreferencesDialog();
-  dialog->signal_hide().connect(slot(*this, &PFile::dialog_done));
+  dialog->signal_hide().connect(sigc::mem_fun(*this, &PFile::dialog_done));
   return *dialog;
 }
 
diff -urNad passepartout-0.6-3~/src/pptout/config.h passepartout-0.6-3/src/pptout/config.h
--- passepartout-0.6-3~/src/pptout/config.h	2005-12-21 02:16:06.000000000 +0100
+++ src/pptout/config.h	2005-12-21 02:24:59.000000000 +0100
@@ -34,7 +34,7 @@
 };
 
 /// Passepartout-specific config file reader.
-class PFile: public Config::File, public SigC::Object {
+class PFile: public Config::File, public sigc::trackable {
 public:
 
   /// The global instance.
diff -urNad passepartout-0.6-3~/src/pptout/docmeta.cc passepartout-0.6-3/src/pptout/docmeta.cc
--- passepartout-0.6-3~/src/pptout/docmeta.cc	2005-12-21 02:16:06.000000000 +0100
+++ src/pptout/docmeta.cc	2005-12-21 02:24:59.000000000 +0100
@@ -19,7 +19,7 @@
 //   document = orig.document;
 // }
 
-SigC::Signal0<void>& DocMeta::changed_signal() {
+sigc::signal<void>& DocMeta::changed_signal() {
   return data->changed_signal;
 }
 
diff -urNad passepartout-0.6-3~/src/pptout/docmeta.h passepartout-0.6-3/src/pptout/docmeta.h
--- passepartout-0.6-3~/src/pptout/docmeta.h	2005-12-21 02:16:06.000000000 +0100
+++ src/pptout/docmeta.h	2005-12-21 02:24:59.000000000 +0100
@@ -18,7 +18,7 @@
   Document* operator->() const { return document.operator->(); }
 
   /** Returns a signal that is emitted when the data has changed. */
-  SigC::Signal0<void>& changed_signal();
+  sigc::signal<void>& changed_signal();
 
   const Glib::ustring& get_filename() const { return data->filename; }
   void set_filename(const Glib::ustring &filename);
@@ -28,7 +28,7 @@
 private:
   class DocData: public RefCounted {
   public:
-    SigC::Signal0<void> changed_signal;
+    sigc::signal<void> changed_signal;
     Glib::ustring filename;
   };
   Glib::RefPtr<DocData> data;
diff -urNad passepartout-0.6-3~/src/pptout/docpropsdialog.cc passepartout-0.6-3/src/pptout/docpropsdialog.cc
--- passepartout-0.6-3~/src/pptout/docpropsdialog.cc	2005-12-21 02:16:06.000000000 +0100
+++ src/pptout/docpropsdialog.cc	2005-12-21 02:24:59.000000000 +0100
@@ -142,7 +142,7 @@
   create_button = add_button(Gtk::Stock::NEW, 1);
 
   template_button->signal_clicked().connect
-    (slot(*this, &DocPropsDialog::update_mode));
+    (sigc::mem_fun(*this, &DocPropsDialog::update_mode));
   update_mode();
 
   get_vbox()->show_all();
diff -urNad passepartout-0.6-3~/src/pptout/document/document.cc passepartout-0.6-3/src/pptout/document/document.cc
--- passepartout-0.6-3~/src/pptout/document/document.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/document.cc	2005-12-21 02:24:59.000000000 +0100
@@ -24,10 +24,10 @@
 #include "ps/type42.h"
 #include "ps/pdf.h"
 
-SigC::Signal1<void, DocRef> Document::changed_signal;
-SigC::Signal1<void, DocRef> Document::size_changed_signal;
-SigC::Signal1<void, DocRef> Document::selection_changed_signal;
-SigC::Signal1<void, DocRef> Document::streams_changed_signal;
+sigc::signal<void, DocRef> Document::changed_signal;
+sigc::signal<void, DocRef> Document::size_changed_signal;
+sigc::signal<void, DocRef> Document::selection_changed_signal;
+sigc::signal<void, DocRef> Document::streams_changed_signal;
 
 namespace {			// local
   class NameOrder {
diff -urNad passepartout-0.6-3~/src/pptout/document/document.h passepartout-0.6-3/src/pptout/document/document.h
--- passepartout-0.6-3~/src/pptout/document/document.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/document.h	2005-12-21 02:24:59.000000000 +0100
@@ -38,10 +38,10 @@
   typedef std::list<Pagent*> Selection;
   typedef std::list<TextStream*> StreamVec;
 
-  static SigC::Signal1<void, DocRef> changed_signal;
-  static SigC::Signal1<void, DocRef> size_changed_signal;
-  static SigC::Signal1<void, DocRef> selection_changed_signal;
-  static SigC::Signal1<void, DocRef> streams_changed_signal;
+  static sigc::signal<void, DocRef> changed_signal;
+  static sigc::signal<void, DocRef> size_changed_signal;
+  static sigc::signal<void, DocRef> selection_changed_signal;
+  static sigc::signal<void, DocRef> streams_changed_signal;
 
   static DocRef null() { return DocRef(); }
 
diff -urNad passepartout-0.6-3~/src/pptout/document/group.h passepartout-0.6-3/src/pptout/document/group.h
--- passepartout-0.6-3~/src/pptout/document/group.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/group.h	2005-12-21 02:24:59.000000000 +0100
@@ -53,7 +53,7 @@
   virtual void child_geometry_changed(Pagent *pagent);
   
   /** Raised on direct changes to the group (i.e. new / ungrouped member) */
-  SigC::Signal1<void, Pagent*> group_changed_signal; 
+  sigc::signal<void, Pagent*> group_changed_signal; 
 private:
   Boundary Group::get_untransformed_box() const;
   
diff -urNad passepartout-0.6-3~/src/pptout/document/imageframe.cc passepartout-0.6-3/src/pptout/document/imageframe.cc
--- passepartout-0.6-3~/src/pptout/document/imageframe.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/imageframe.cc	2005-12-21 02:24:59.000000000 +0100
@@ -28,8 +28,8 @@
   : CachedFrame(parent, "Image " + basename(assoc)),
   association(assoc), filewatcher(association)
 {
-  filewatcher.modified_signal.connect(slot(*this, 
-					   &ImageFrame::on_file_modified));
+  filewatcher.modified_signal.connect
+    (sigc::mem_fun(*this, &ImageFrame::on_file_modified));
   read_size();
 }
 
@@ -38,8 +38,8 @@
     association(xml.get_filename("file")),
     filewatcher(association)
 {
-  filewatcher.modified_signal.connect(slot(*this, 
-					   &ImageFrame::on_file_modified));
+  filewatcher.modified_signal.connect
+    (sigc::mem_fun(*this, &ImageFrame::on_file_modified));
   
   if(association.empty()) {
     warning << "No or empty \"file\" attribute found in image frame"
diff -urNad passepartout-0.6-3~/src/pptout/document/pagent.cc passepartout-0.6-3/src/pptout/document/pagent.cc
--- passepartout-0.6-3~/src/pptout/document/pagent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/pagent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -19,7 +19,7 @@
   obstacle_margin(0)
 {
   // a geometry change implies a properties change
-  geometry_changed_signal.connect(props_changed_signal.slot());
+  geometry_changed_signal.connect(props_changed_signal.make_slot());
   // a geometry change does NOT imply a redraw
 
   connect_to_parent();
@@ -119,13 +119,12 @@
   // a group would need to maintain a list of connections.
   // Note: we will get multible implicit signals.
   if(parent) {
-    using SigC::slot;
-      geometry_connection = geometry_changed_signal.connect
-	(slot(*parent, &Group::child_geometry_changed));
-
-      props_connection = props_changed_signal.connect
-	(slot(*parent, &Group::child_props_changed));
-    }
+    geometry_connection = geometry_changed_signal.connect
+      (sigc::mem_fun(*parent, &Group::child_geometry_changed));
+    
+    props_connection = props_changed_signal.connect
+      (sigc::mem_fun(*parent, &Group::child_props_changed));
+  }
 }
 
 Pagent::Resizable::~Resizable() {}
diff -urNad passepartout-0.6-3~/src/pptout/document/pagent.h passepartout-0.6-3/src/pptout/document/pagent.h
--- passepartout-0.6-3~/src/pptout/document/pagent.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/pagent.h	2005-12-21 02:24:59.000000000 +0100
@@ -6,7 +6,7 @@
 #include "util/matrix.h"
 #include "util/boundary.h"
 #include "ps/pdf.h"
-#include <sigc++/object.h>
+#include <sigc++/connection.h>
 #include <sigc++/signal.h>
 #include <libxml++/nodes/element.h>
 #include <string>
@@ -30,7 +30,7 @@
  * A Pagent has a size and a transformation matrix that defines where on the
  * Page it is.
  */
-class Pagent: public SigC::Object {
+class Pagent: public sigc::trackable {
 public:
   Pagent(Group *_parent, const std::string& _name);
   virtual ~Pagent();
@@ -103,13 +103,13 @@
   Group& get_parent();
 
   /** There was a change in the source object for this Pagent. */
-  SigC::Signal1<void, Pagent*> object_changed_signal;
+  sigc::signal<void, Pagent*> object_changed_signal;
   
   /** Anything has changed, anything at all, including position and shape. */
-  SigC::Signal1<void, Pagent*> props_changed_signal; 
+  sigc::signal<void, Pagent*> props_changed_signal; 
 
   /** the pagent has changed shape / position */
-  SigC::Signal1<void, Pagent*> geometry_changed_signal; 
+  sigc::signal<void, Pagent*> geometry_changed_signal; 
   
   /**
    * Resizability contract for Pagents.  That a Pagent inherits Resizable
@@ -132,7 +132,7 @@
   float obstacle_margin;
   
   // connections to parent
-  SigC::Connection draw_connection, geometry_connection, props_connection;
+  sigc::connection draw_connection, geometry_connection, props_connection;
   void connect_to_parent();
 
 private:  
diff -urNad passepartout-0.6-3~/src/pptout/document/rasterframe.cc passepartout-0.6-3/src/pptout/document/rasterframe.cc
--- passepartout-0.6-3~/src/pptout/document/rasterframe.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/rasterframe.cc	2005-12-21 02:24:59.000000000 +0100
@@ -20,8 +20,8 @@
   if(association.empty())
     throw Error::Read("\"file\" attribute missing or empty in RasterFrame");
   
-  filewatcher.modified_signal.connect(slot(*this, 
-					   &RasterFrame::on_file_modified));
+  filewatcher.modified_signal.connect
+    (sigc::mem_fun(*this, &RasterFrame::on_file_modified));
   on_file_modified();
   
   // Handle widht and height for backwards compatibility
@@ -40,8 +40,8 @@
   : BasicFrame(parent, "Raster " + basename(filename)),
    association(filename), filewatcher(association)
 {
-  filewatcher.modified_signal.connect(slot(*this, 
-					   &RasterFrame::on_file_modified));
+  filewatcher.modified_signal.connect
+    (sigc::mem_fun(*this, &RasterFrame::on_file_modified));
  
   try {
     filepixbuf = Gdk::Pixbuf::create_from_file(association);
diff -urNad passepartout-0.6-3~/src/pptout/document/textframe.cc passepartout-0.6-3/src/pptout/document/textframe.cc
--- passepartout-0.6-3~/src/pptout/document/textframe.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/textframe.cc	2005-12-21 02:24:59.000000000 +0100
@@ -30,7 +30,7 @@
   if(text_stream)
     text_stream->add_frame(this);
   signal_end_write_ps.connect
-    (slot(*this,  &TextFrame::_end_write_ps));
+    (sigc::mem_fun(*this,  &TextFrame::_end_write_ps));
 }
 
 TextFrame::TextFrame(const ElementWrap& xml, Group *parent)
@@ -54,7 +54,7 @@
 			+ "\" for text frame");
   } // If stream is not present text_stream is null. This is ok.
   signal_end_write_ps.connect
-    (slot(*this,  &TextFrame::_end_write_ps));
+    (sigc::mem_fun(*this,  &TextFrame::_end_write_ps));
 }
 
 TextFrame::~TextFrame() {
diff -urNad passepartout-0.6-3~/src/pptout/document/textframe.h passepartout-0.6-3/src/pptout/document/textframe.h
--- passepartout-0.6-3~/src/pptout/document/textframe.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/textframe.h	2005-12-21 02:24:59.000000000 +0100
@@ -47,7 +47,7 @@
   
   /** Emitted when the frame is or stops being the last frame of a
    * truncated stream. */
-  SigC::Signal1<void, bool> truncated_state_changed_signal;
+  sigc::signal<void, bool> truncated_state_changed_signal;
 
   // the frame will not try to read the ps between calls to
   // begin- and end_write_ps
diff -urNad passepartout-0.6-3~/src/pptout/document/textstream.cc passepartout-0.6-3/src/pptout/document/textstream.cc
--- passepartout-0.6-3~/src/pptout/document/textstream.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/textstream.cc	2005-12-21 02:24:59.000000000 +0100
@@ -86,7 +86,7 @@
 }
 
 
-class TextStream::WorkerThread : public SigC::Object {
+class TextStream::WorkerThread : public sigc::trackable {
 public:
   static Glib::RefPtr<WorkerThread> create(TextStream& stream,
                                            const Frames& frames) {
@@ -96,9 +96,7 @@
     return tmp;
   }
   
-  /// replaces SigC::Object::reference
   void reference() const { ++count_; }
-  /// replaces SigC::Object::unreference
   void unreference() const { if(--count_ == 0) delete this; }
 
   bool is_done();
@@ -130,7 +128,7 @@
   Frames sorted_frames;
   bool truncated;
   Glib::Dispatcher signal_done, signal_error;
-  SigC::Connection proc_stop_connection;
+  sigc::connection proc_stop_connection;
   Glib::Thread* thread;
   Process xformproc;
   Glib::RefPtr<xml2ps::PsCanvas> new_canvas;
@@ -139,15 +137,15 @@
 TextStream::WorkerThread::WorkerThread(TextStream& s, const Frames& frames)
   : count_(0), stream(s), sorted_frames(frames), truncated(false),
     proc_stop_connection(ProcessManager::instance().process_stopped.connect
-			 (SigC::slot(*this, 
+			 (sigc::mem_fun(*this, 
 				     &WorkerThread::process_stopped)))
 {
   sorted_frames.sort(SortingPredicate());
   
-  signal_done.connect(SigC::slot(*this, &WorkerThread::on_done));
-  signal_error.connect(SigC::slot(*this,  &WorkerThread::on_error));
+  signal_done.connect(sigc::mem_fun(*this, &WorkerThread::on_done));
+  signal_error.connect(sigc::mem_fun(*this,  &WorkerThread::on_error));
   
-  thread = Glib::Thread::create(SigC::slot(*this, &WorkerThread::run), false);
+  thread = Glib::Thread::create(sigc::mem_fun(*this, &WorkerThread::run), false);
   debug << "Started thread " << thread << " from " << Glib::Thread::self()
 	<< std::endl;
   
@@ -181,12 +179,12 @@
     parameters[*i] = "";
   
   association_watcher.modified_signal.connect
-    (SigC::slot(*this, &TextStream::on_file_modified));
+    (sigc::mem_fun(*this, &TextStream::on_file_modified));
   transform_watcher.modified_signal.connect
-    (SigC::slot(*this, &TextStream::on_file_modified));
+    (sigc::mem_fun(*this, &TextStream::on_file_modified));
 
   // make sure Gtk::main() is running 
-  Glib::signal_idle().connect(SigC::slot(*this, &TextStream::on_idle));
+  Glib::signal_idle().connect(sigc::mem_fun(*this, &TextStream::on_idle));
 }
 
 TextStream::TextStream(const ElementWrap& xml)
@@ -218,12 +216,12 @@
     }
 
   association_watcher.modified_signal.connect
-    (SigC::slot(*this, &TextStream::on_file_modified));
+    (sigc::mem_fun(*this, &TextStream::on_file_modified));
   transform_watcher.modified_signal.connect
-    (SigC::slot(*this, &TextStream::on_file_modified));
+    (sigc::mem_fun(*this, &TextStream::on_file_modified));
 
   // make sure Gtk::main() is running 
-  Glib::signal_idle().connect(SigC::slot(*this, &TextStream::on_idle));
+  Glib::signal_idle().connect(sigc::mem_fun(*this, &TextStream::on_idle));
 }
 
 TextStream::~TextStream() {
@@ -399,7 +397,10 @@
   started.open();
   
   debug << "running internal xml2ps ..." << std::endl;
-  new_canvas = (new xml2ps::PsCanvas(pages, false /* no extra pages */));
+  xml2ps::PsCanvas *tmp =
+    new xml2ps::PsCanvas(pages, false /* no extra pages */);
+  tmp->reference(); // refcount starts at 0
+  new_canvas = Glib::RefPtr<xml2ps::PsCanvas>(tmp);
   new_canvas->setSubstituteFontAliases(true);
   xml2ps::PsConverter parser(*new_canvas.operator->());
   try {
diff -urNad passepartout-0.6-3~/src/pptout/document/textstream.h passepartout-0.6-3/src/pptout/document/textstream.h
--- passepartout-0.6-3~/src/pptout/document/textstream.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/document/textstream.h	2005-12-21 02:24:59.000000000 +0100
@@ -29,7 +29,7 @@
  * TextStream::generate_ps_request which will run xml2ps if
  * necessary. This also happens when a frame is resized.
  */
-class TextStream: public SigC::Object {
+class TextStream: public sigc::trackable {
 public:
   /**
    * Create a new TextStream.
diff -urNad passepartout-0.6-3~/src/pptout/docview.cc passepartout-0.6-3/src/pptout/docview.cc
--- passepartout-0.6-3~/src/pptout/docview.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/docview.cc	2005-12-21 02:24:59.000000000 +0100
@@ -230,11 +230,11 @@
     current_page_num = document->get_first_page_num();
     
     Document::size_changed_signal.connect
-      (slot(*this, &DocumentView::update_document_size));
+      (sigc::mem_fun(*this, &DocumentView::update_document_size));
     Document::changed_signal.connect
-      (slot(*this, &DocumentView::act_on_document_change));
+      (sigc::mem_fun(*this, &DocumentView::act_on_document_change));
     Document::selection_changed_signal.connect
-      (slot(*this, &DocumentView::act_on_selection_change));
+      (sigc::mem_fun(*this, &DocumentView::act_on_selection_change));
   } else {
     no_pages_group.hide();
   }
@@ -313,7 +313,7 @@
 
   // Update handles when we turn pages
   current_page_num_changed_signal.connect
-    (slot(*this, &DocumentView::update_handles));
+    (sigc::mem_fun(*this, &DocumentView::update_handles));
 }
 
 DocumentView::~DocumentView() {
@@ -446,8 +446,8 @@
   std::list<Gtk::TargetEntry> target_list;
   target_list.push_back(Gtk::TargetEntry(pptout_target)); 
   clipboard->set(target_list, 
-		 SigC::slot(*this, &DocumentView::on_clipboard_get), 
-		 SigC::slot(*this, &DocumentView::on_clipboard_clear));
+		 sigc::mem_fun(*this, &DocumentView::on_clipboard_get), 
+		 sigc::mem_fun(*this, &DocumentView::on_clipboard_clear));
 
   // store an XML representation of the selected pagents
   xmlpp::Document rep;
@@ -504,7 +504,7 @@
 
   Glib::RefPtr<Gtk::Clipboard> clipboard = Gtk::Clipboard::get();
   clipboard->request_contents
-    (pptout_target, SigC::slot(*this, &DocumentView::on_clipboard_received));
+    (pptout_target, sigc::mem_fun(*this, &DocumentView::on_clipboard_received));
 }
 
 void 
@@ -682,7 +682,7 @@
   return true;
 }
 
-Gdk::Cursor DocumentView::get_cursor(int x, int y) {
+Gdk::CursorType DocumentView::get_cursor(int x, int y) {
   DocRef document = get_document();
   if(!document)
     return Gdk::LEFT_PTR;
@@ -721,7 +721,7 @@
 }
 
 void DocumentView::update_cursor(int x, int y) {
-  win->set_cursor(get_cursor(x, y));
+  win->set_cursor(Gdk::Cursor(get_cursor(x, y)));
 }
 
 namespace {
@@ -997,10 +997,10 @@
     selected_geometry_connection.disconnect();
     selected_props_connection.disconnect();
     selected_geometry_connection = pagent->geometry_changed_signal.connect
-      (SigC::hide<Pagent*>(slot(*this, &DocumentView::update_handles)));
+      (sigc::hide(sigc::mem_fun(*this, &DocumentView::update_handles)));
     // this is for noticing if the pagent is being locked/unlocked
     selected_props_connection = pagent->props_changed_signal.connect
-      (SigC::hide<Pagent*>(slot(*this, &DocumentView::update_handles)));
+      (sigc::hide(sigc::mem_fun(*this, &DocumentView::update_handles)));
   }
   ResizeHandles pos = get_resize_handles(*pagent);
   assert(pos.size() == 8);
diff -urNad passepartout-0.6-3~/src/pptout/docview.h passepartout-0.6-3/src/pptout/docview.h
--- passepartout-0.6-3~/src/pptout/docview.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/docview.h	2005-12-21 02:24:59.000000000 +0100
@@ -21,10 +21,10 @@
 
 class DocumentView: public Gnome::Canvas::Canvas, public View {
 public:
-  SigC::Signal0<void> current_page_num_changed_signal;
-  SigC::Signal0<void> document_changed_signal;
-  SigC::Signal0<void> document_set_signal;
-  SigC::Signal1<void, float> zoom_change_signal;
+  sigc::signal<void> current_page_num_changed_signal;
+  sigc::signal<void> document_changed_signal;
+  sigc::signal<void> document_set_signal;
+  sigc::signal<void, float> zoom_change_signal;
 
   Gdk::Color white, black, gray, red;
 
@@ -90,9 +90,9 @@
   Gnome::Canvas::Rect *handles[8]; /// managed by the canvas
 
   /// a connection to the selected pagents geometry_changed_signal
-  SigC::Connection selected_geometry_connection;
+  sigc::connection selected_geometry_connection;
   /// a connection to the selected pagents props_changed_signal
-  SigC::Connection selected_props_connection;
+  sigc::connection selected_props_connection;
   /// keep track of which pagent the connection is to
   Pagent *last_selected;
 
@@ -138,12 +138,12 @@
   void act_on_document_change(DocRef document_);
   void act_on_selection_change(DocRef document_);
   void update_document_size(DocRef document_);
-  Gdk::Cursor get_cursor(int x, int y);
+  Gdk::CursorType get_cursor(int x, int y);
   void update_cursor(int x, int y);
   bool in_move_area(int x, int y);
   Pagent* in_select_area(int x, int y);
 
-  SigC::Connection connect_zoom_change(SigC::Slot1<void, float> slot) {
+  sigc::connection connect_zoom_change(sigc::slot<void, float> slot) {
     return zoom_change_signal.connect(slot);
   }
 };
diff -urNad passepartout-0.6-3~/src/pptout/groupmeta.cc passepartout-0.6-3/src/pptout/groupmeta.cc
--- passepartout-0.6-3~/src/pptout/groupmeta.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/groupmeta.cc	2005-12-21 02:24:59.000000000 +0100
@@ -15,7 +15,6 @@
 Viewent::Ref GroupMeta::create_viewent(View& view, Pagent& node) {
   Viewent::Ref result(new GroupViewent
 		      (view, &dynamic_cast<Group&>(node)));
-  result->set_manage(); // turn refcounting on
   result->reference();
   return result;
 }
diff -urNad passepartout-0.6-3~/src/pptout/groupviewent.cc passepartout-0.6-3/src/pptout/groupviewent.cc
--- passepartout-0.6-3~/src/pptout/groupviewent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/groupviewent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -39,7 +39,7 @@
   const Gdk::Color &get_color(Color::Id color) const { 
     return parent.get_color(color); 
   }
-  SigC::Connection connect_zoom_change(SigC::Slot1<void, float> slot) {
+  sigc::connection connect_zoom_change(sigc::slot<void, float> slot) {
     return parent.connect_zoom_change(slot);
   }
 private:
@@ -53,7 +53,7 @@
     subview(new SubView(view, groupframe->get_matrix(), *content_group)),
     frame(groupframe),
     groupcon(frame->group_changed_signal.connect
-	     (SigC::hide<Pagent*>(slot(*this, &GroupViewent::group_changed))))
+	     (sigc::hide(sigc::mem_fun(*this, &GroupViewent::group_changed))))
 {
   // Create the initial content, just as if it was added after this object.
   group_changed();
diff -urNad passepartout-0.6-3~/src/pptout/groupviewent.h passepartout-0.6-3/src/pptout/groupviewent.h
--- passepartout-0.6-3~/src/pptout/groupviewent.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/groupviewent.h	2005-12-21 02:24:59.000000000 +0100
@@ -26,7 +26,7 @@
 
   View* subview;
   FrameRef frame;
-  SigC::Connection groupcon;
+  sigc::connection groupcon;
   ChildVec childvec;
 };
 
diff -urNad passepartout-0.6-3~/src/pptout/imagemeta.cc passepartout-0.6-3/src/pptout/imagemeta.cc
--- passepartout-0.6-3~/src/pptout/imagemeta.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/imagemeta.cc	2005-12-21 02:24:59.000000000 +0100
@@ -18,13 +18,12 @@
   PostscriptViewent* rawresult
     = new PostscriptViewent(view, &dynamic_cast<ImageFrame&>(node));
   Viewent::Ref result(rawresult);
-  result->set_manage(); // turn refcounting on
   result->reference();
 
   // Images should be re-rastered when geometry changes, but not text frames,
   // so connect this signal here rather than in the result.
   node.geometry_changed_signal.connect
-    (SigC::hide<Pagent*>(slot(*rawresult, &PostscriptViewent::regenerate)));
+    (sigc::hide(sigc::mem_fun(*rawresult, &PostscriptViewent::regenerate)));
 
   return result;
 }
@@ -45,11 +44,11 @@
       line->pack_start(*label, Gtk::PACK_SHRINK);
       line->pack_start(e_fname);
       e_fname.entry.get_entry()->signal_activate().connect
-	(slot(*this, &PropImage::on_change));
+	(sigc::mem_fun(*this, &PropImage::on_change));
       e_fname.entry.get_entry()->signal_focus_out_event().connect
-	(SigC::hide<GdkEventFocus*>(bind_return(slot(*this, 
-                                                     &PropImage::on_change),
-                                                true)));
+	(sigc::hide(bind_return(sigc::mem_fun(*this, 
+                                              &PropImage::on_change),
+                                true)));
       pack_start(*line, Gtk::PACK_SHRINK);
       set_sensitive(false);
       update();
diff -urNad passepartout-0.6-3~/src/pptout/inspiration.cc passepartout-0.6-3/src/pptout/inspiration.cc
--- passepartout-0.6-3~/src/pptout/inspiration.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/inspiration.cc	2005-12-21 02:24:59.000000000 +0100
@@ -19,7 +19,7 @@
 #endif
 
 class Game: public Gtk::DrawingArea {
-  SigC::Connection connection;
+  sigc::connection connection;
   Glib::RefPtr<Gdk::Window> win;
   Glib::RefPtr<Gdk::Visual> visual;
   Glib::RefPtr<Gdk::GC> gc;
@@ -44,7 +44,7 @@
   void put_pixel(Glib::RefPtr<Gdk::Image>, int x, int y, Gdk::Color &color);
   void draw_rect(Gdk::Color &color, bool filled, int x, int y, int w, int h);
 public:
-  SigC::Signal1<void, long> score_change_signal;
+  sigc::signal<void, long> score_change_signal;
   Game();
   bool on_key_press_event(GdkEventKey*);
   void new_game();
@@ -207,7 +207,7 @@
     grow();
   candy_found();
   connection = Glib::signal_timeout().connect
-    (slot(*this, &Game::update), 20);  
+    (sigc::mem_fun(*this, &Game::update), 20);  
 }
 
 void Game::stop_game() {
@@ -292,7 +292,8 @@
   add_button(Gtk::Stock::CLOSE, 0);
   add_button(Gtk::Stock::EXECUTE, 1);
 
-  game->score_change_signal.connect(slot(*this, &Inspiration::score_change));
+  game->score_change_signal.connect
+    (sigc::mem_fun(*this, &Inspiration::score_change));
 }
 
 Inspiration::~Inspiration() {}
diff -urNad passepartout-0.6-3~/src/pptout/pagemeta.cc passepartout-0.6-3/src/pptout/pagemeta.cc
--- passepartout-0.6-3~/src/pptout/pagemeta.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/pagemeta.cc	2005-12-21 02:24:59.000000000 +0100
@@ -11,7 +11,6 @@
 Viewent::Ref PageMeta::create_viewent(View& view, Pagent& node) {
   Viewent::Ref result(new PageViewent
 		      (view, &dynamic_cast<Page&>(node)));
-  result->set_manage(); // turn refcounting on
   result->reference();
   return result;
 }
diff -urNad passepartout-0.6-3~/src/pptout/pagesel.cc passepartout-0.6-3/src/pptout/pagesel.cc
--- passepartout-0.6-3~/src/pptout/pagesel.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/pagesel.cc	2005-12-21 02:24:59.000000000 +0100
@@ -98,9 +98,9 @@
   document_view(docview)
 {
   document_view.current_page_num_changed_signal.connect
-    (slot(*this, &Pagesel::update));
+    (sigc::mem_fun(*this, &Pagesel::update));
   document_view.document_changed_signal.connect
-    (slot(*this, &Pagesel::update));
+    (sigc::mem_fun(*this, &Pagesel::update));
 
   left.add(*manage(new Gtk::Arrow(Gtk::ARROW_LEFT, Gtk::SHADOW_NONE)));
   right.add(*manage(new Gtk::Arrow(Gtk::ARROW_RIGHT, Gtk::SHADOW_NONE)));
@@ -112,10 +112,10 @@
   pack_start(pages);
   pack_start(right);
 
-  left.signal_clicked().connect(slot(*this, &Pagesel::prev));
-  right.signal_clicked().connect(slot(*this, &Pagesel::next));
+  left.signal_clicked().connect(sigc::mem_fun(*this, &Pagesel::prev));
+  right.signal_clicked().connect(sigc::mem_fun(*this, &Pagesel::next));
   pages.get_menu()->signal_selection_done().connect
-    (slot(*this, &Pagesel::page_selected_action));
+    (sigc::mem_fun(*this, &Pagesel::page_selected_action));
 
   show_all();
 }
diff -urNad passepartout-0.6-3~/src/pptout/pageviewent.cc passepartout-0.6-3/src/pptout/pageviewent.cc
--- passepartout-0.6-3~/src/pptout/pageviewent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/pageviewent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -9,10 +9,10 @@
     guide_group(view.get_guide_group())
 {
   Document::selection_changed_signal.connect
-    (slot(*this, &PageViewent::on_selection_changed));
+    (sigc::mem_fun(*this, &PageViewent::on_selection_changed));
   /// \todo maybe let Page throw a size_changed_signal instead?
   Document::size_changed_signal.connect
-    (slot(*this, &PageViewent::on_size_changed));
+    (sigc::mem_fun(*this, &PageViewent::on_size_changed));
   
   using namespace Gnome::Canvas;
 
diff -urNad passepartout-0.6-3~/src/pptout/postscriptviewent.cc passepartout-0.6-3/src/pptout/postscriptviewent.cc
--- passepartout-0.6-3~/src/pptout/postscriptviewent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/postscriptviewent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -51,12 +51,12 @@
     scale_factor = 1;
   
   ProcessManager::instance().process_stopped.connect
-    (slot(*this, &PostscriptViewent::process_stopped));
+    (sigc::mem_fun(*this, &PostscriptViewent::process_stopped));
   /// \todo  Only regenerate when necessary, i.e. not when just moving ...
   frame->object_changed_signal.connect
-    (SigC::hide<Pagent*>(slot(*this, &PostscriptViewent::regenerate)));
+    (sigc::hide(sigc::mem_fun(*this, &PostscriptViewent::regenerate)));
   view.connect_zoom_change
-    (SigC::hide<float>(slot(*this, &PostscriptViewent::regenerate)));
+    (sigc::hide(sigc::mem_fun(*this, &PostscriptViewent::regenerate)));
 
   canvas_pixbuf.reset(new Gnome::Canvas::Pixbuf(*content_group));
   canvas_pixbuf->property_anchor() = Gtk::ANCHOR_SOUTH_WEST;
@@ -110,7 +110,7 @@
     pid = P_STARTUP;
     
     Glib::signal_timeout().connect
-      (SigC::slot(*this, &PostscriptViewent::regenerate_bg),
+      (sigc::mem_fun(*this, &PostscriptViewent::regenerate_bg),
        200, Glib::PRIORITY_DEFAULT_IDLE);
   }
 }
diff -urNad passepartout-0.6-3~/src/pptout/preferencesdialog.cc passepartout-0.6-3/src/pptout/preferencesdialog.cc
--- passepartout-0.6-3~/src/pptout/preferencesdialog.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/preferencesdialog.cc	2005-12-21 02:24:59.000000000 +0100
@@ -136,11 +136,11 @@
     cancel_button->set_flags(Gtk::CAN_DEFAULT);
     cancel_button->grab_default();
     cancel_button->signal_clicked().
-      connect(SigC::slot(*this, &PreferencesDialog::dialog_cancel));
+      connect(sigc::mem_fun(*this, &PreferencesDialog::dialog_cancel));
     apply_button->signal_clicked().
-      connect(SigC::slot(*this, &PreferencesDialog::dialog_apply));
+      connect(sigc::mem_fun(*this, &PreferencesDialog::dialog_apply));
     signal_delete_event().
-      connect(SigC::slot(*this, &PreferencesDialog::dialog_delete));
+      connect(sigc::mem_fun(*this, &PreferencesDialog::dialog_delete));
 
 
     //Add the notebook pages
diff -urNad passepartout-0.6-3~/src/pptout/printdialog.cc passepartout-0.6-3/src/pptout/printdialog.cc
--- passepartout-0.6-3~/src/pptout/printdialog.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/printdialog.cc	2005-12-21 02:24:59.000000000 +0100
@@ -76,7 +76,7 @@
     format_menu.set_menu(*menu);
   }
   format_menu.get_menu()->signal_selection_done().connect
-    (slot(*this, &PrintDialog::update));
+    (sigc::mem_fun(*this, &PrintDialog::update));
   format_menu_box->pack_start(format_menu, Gtk::PACK_EXPAND_WIDGET);
 
   Gtk::HBox *using_box = manage(new Gtk::HBox(false, double_space));
@@ -126,12 +126,16 @@
   using_entry.set_text(config.PrintCommand.values.front());
   using_button.set_active(true);
 
-  using_button.signal_clicked().connect(slot(*this, &PrintDialog::update));
+  using_button.signal_clicked().connect
+    (sigc::mem_fun(*this, &PrintDialog::update));
   // If there are only two buttons in a group, you only need to connect one.
   // If there are more, you need to connect them all. That is annoying.
-  all_button.signal_clicked().connect(slot(*this, &PrintDialog::update));
-  current_button.signal_clicked().connect(slot(*this, &PrintDialog::update));
-  from_button.signal_clicked().connect(slot(*this, &PrintDialog::update));
+  all_button.signal_clicked().connect
+    (sigc::mem_fun(*this, &PrintDialog::update));
+  current_button.signal_clicked().connect
+    (sigc::mem_fun(*this, &PrintDialog::update));
+  from_button.signal_clicked().connect
+    (sigc::mem_fun(*this, &PrintDialog::update));
 
   add_button(Gtk::Stock::CANCEL, 0);
   add_button(Gtk::Stock::PRINT, 1)->grab_default();
@@ -221,7 +225,7 @@
                                  + file_entry.entry.get_text(),
                                  "Check if you have permission "
                                  "to write to this file");
-        window->set_cursor(Gdk::WATCH);
+        window->set_cursor(Gdk::Cursor(Gdk::WATCH));
         // make sure the cursor is updated
         while(Gtk::Main::events_pending())
           Gtk::Main::iteration();
diff -urNad passepartout-0.6-3~/src/pptout/propbase.cc passepartout-0.6-3/src/pptout/propbase.cc
--- passepartout-0.6-3~/src/pptout/propbase.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/propbase.cc	2005-12-21 02:24:59.000000000 +0100
@@ -23,7 +23,7 @@
   // one. I think this has to do with Gtk::Entry having its own
   // window.
   if(!sensitive)
-    foreach(slot(hide_widget));
+    foreach(sigc::ptr_fun(hide_widget));
 }
 
 void PropBase::right_justify(Gtk::Label &label) {
diff -urNad passepartout-0.6-3~/src/pptout/propertiesdialog.cc passepartout-0.6-3/src/pptout/propertiesdialog.cc
--- passepartout-0.6-3~/src/pptout/propertiesdialog.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/propertiesdialog.cc	2005-12-21 02:24:59.000000000 +0100
@@ -27,7 +27,7 @@
 // Currently that means some kind of name, and the position and size of the
 // object.
 class PropBasic : public PropBase {
-  enum ChangeId { NAME, LEFT, BOTTOM, WIDTH, HEIGHT, ROTATE,
+  enum ChangeId { NAME, LEFT, BOTTOM, WIDTH, HEIGHT, SCALEX, SCALEY, ROTATE,
 		  LOCKED, FLOWAROUND, MARGIN };
 public:
   // | name:  | "name of object"             |
@@ -40,6 +40,7 @@
      e_bottom(0, true, &length_units, default_unit), 
      e_width(0, true, &length_units, default_unit),
      e_height(0, true, &length_units, default_unit), 
+     e_scalex(0, true), e_scaley(0, true),
      e_rotate(0, true, &angle_units), 
      e_margin(0, true, &length_units, default_unit),
      c_flow("Text avoids object", 0), c_locked("Locked", 0)
@@ -53,10 +54,11 @@
       line->pack_start(e_name);
       // not sure if connecting to signal_activate adds anything
       e_name.signal_activate().connect
-	(bind(slot(*this, &PropBasic::on_change), NAME));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), NAME));
       e_name.signal_focus_out_event().connect
-        (SigC::hide<GdkEventFocus*>
-         (bind_return(bind(slot(*this, &PropBasic::on_change), NAME), true)));
+        (sigc::hide
+         (bind_return(bind(sigc::mem_fun(*this, &PropBasic::on_change),
+                           NAME), true)));
       pack_start(*line, Gtk::PACK_SHRINK);
       
       SubPanel *box = manage(new SubPanel("Geometry"));
@@ -69,7 +71,7 @@
       line->pack_start(*label, Gtk::PACK_SHRINK);
       line->pack_start(e_left, Gtk::PACK_SHRINK);
       e_left.signal_value_changed().connect
-	(bind(slot(*this, &PropBasic::on_change), LEFT));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), LEFT));
       label->set_mnemonic_widget(e_left);
 
       sizegroup->add_widget(*(label = manage(new Gtk::Label("_Width:",
@@ -78,7 +80,7 @@
       line->pack_start(e_width, Gtk::PACK_SHRINK);
       label->set_mnemonic_widget(e_width);
       e_width.signal_value_changed().connect
-	(bind(slot(*this, &PropBasic::on_change), WIDTH));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), WIDTH));
       box->pack_start(*line, Gtk::PACK_SHRINK);
       
       line = manage(new Gtk::HBox(false, double_space));
@@ -87,7 +89,7 @@
       line->pack_start(*label, Gtk::PACK_SHRINK);
       line->pack_start(e_bottom, Gtk::PACK_SHRINK);
       e_bottom.signal_value_changed().connect
-	(bind(slot(*this, &PropBasic::on_change), BOTTOM));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), BOTTOM));
       label->set_mnemonic_widget(e_bottom);
 
       sizegroup->add_widget(*(label = manage(new Gtk::Label("_Height:",
@@ -96,19 +98,39 @@
       line->pack_start(e_height, Gtk::PACK_SHRINK);
       label->set_mnemonic_widget(e_height);
       e_height.signal_value_changed().connect
-	(bind(slot(*this, &PropBasic::on_change), HEIGHT));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), HEIGHT));
       box->pack_start(*line, Gtk::PACK_SHRINK);
+      pack_start(*box, Gtk::PACK_SHRINK);
       
+      box = manage(new SubPanel("Transform"));
       line = manage(new Gtk::HBox(false, double_space));
+      sizegroup->add_widget(*(label = manage(new Gtk::Label("Scale _X",
+							    0.0, 0.5, true))));
+      line->pack_start(*label, Gtk::PACK_SHRINK);
+      line->pack_start(e_scalex, Gtk::PACK_SHRINK);
+      label->set_mnemonic_widget(e_scalex);
+      e_scalex.signal_value_changed().connect
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), SCALEX));
+      
       sizegroup->add_widget(*(label = manage(new Gtk::Label("R_otate:",
 							    0.0, 0.5, true))));
       line->pack_start(*label, Gtk::PACK_SHRINK);
       line->pack_start(e_rotate, Gtk::PACK_SHRINK);
       label->set_mnemonic_widget(e_rotate);
       e_rotate.signal_value_changed().connect
-	(bind(slot(*this, &PropBasic::on_change), ROTATE));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), ROTATE));
       
       box->pack_start(*line, Gtk::PACK_SHRINK);
+      line = manage(new Gtk::HBox(false, double_space));
+      sizegroup->add_widget(*(label = manage(new Gtk::Label("Scale _Y",
+							    0.0, 0.5, true))));
+      line->pack_start(*label, Gtk::PACK_SHRINK);
+      line->pack_start(e_scaley, Gtk::PACK_SHRINK);
+      label->set_mnemonic_widget(e_scaley);
+      e_scaley.signal_value_changed().connect
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), SCALEY));
+      box->pack_start(*line, Gtk::PACK_SHRINK);
+      
       pack_start(*box, Gtk::PACK_SHRINK);
       
       pack_start(hsep2, Gtk::PACK_SHRINK);
@@ -116,13 +138,13 @@
       Gtk::HBox *flow_box = manage(new Gtk::HBox(false, double_space));
       flow_box->pack_start(c_locked, Gtk::PACK_SHRINK, triple_space);
       c_locked.signal_toggled().connect
-	(bind(slot(*this, &PropBasic::on_change), LOCKED));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), LOCKED));
       flow_box->pack_start(c_flow, Gtk::PACK_SHRINK, 0);
       c_flow.signal_toggled().connect
-	(bind(slot(*this, &PropBasic::on_change), FLOWAROUND));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), FLOWAROUND));
       flow_box->pack_start(e_margin, Gtk::PACK_SHRINK, 0);
       e_margin.signal_value_changed().connect
-	(bind(slot(*this, &PropBasic::on_change), MARGIN));
+	(bind(sigc::mem_fun(*this, &PropBasic::on_change), MARGIN));
       pack_start(*flow_box, Gtk::PACK_SHRINK);
 
       set_sensitive(false);
@@ -139,9 +161,9 @@
     object = pagent;
     if(object) {
       geometry_changed_connection = object->geometry_changed_signal.connect
-	(slot(*this, &PropBasic::on_geometry_changed));
+	(sigc::mem_fun(*this, &PropBasic::on_geometry_changed));
       props_changed_connection = object->props_changed_signal.connect
-	(slot(*this, &PropBasic::on_props_changed));
+	(sigc::mem_fun(*this, &PropBasic::on_props_changed));
     }
     set_sensitive(object);
     if(is_visible())
@@ -165,6 +187,10 @@
       e_bottom.set(m.tr_y());
       e_width.set(size.x * m.sc_x());
       e_height.set(size.y * m.sc_y());
+      
+      // transform
+      e_scalex.set(m.sc_x());
+      e_scaley.set(m.sc_y());
       e_rotate.set(Matrix::rad2deg(m.rot()));
 
       const bool flowaround = obj->get_flow_around();
@@ -195,6 +221,11 @@
 			    e_height.get() / size.y);
       }
       break;
+
+    case SCALEX:
+    case SCALEY:
+      object->set_scaling(e_scalex.get(), e_scaley.get());
+      break;
       
     case ROTATE:
       object->set_rotation(Matrix::deg2rad(e_rotate.get()));
@@ -223,9 +254,10 @@
   Pagent* object;
   Gtk::HSeparator hsep1, hsep2;
   Gtk::Entry e_name;
-  Spinner e_left, e_bottom, e_width, e_height, e_rotate, e_margin;
+  Spinner e_left, e_bottom, e_width, e_height,
+	      e_scalex, e_scaley, e_rotate, e_margin;
   Gtk::CheckButton c_flow, c_locked;
-  SigC::Connection geometry_changed_connection, props_changed_connection;
+  sigc::connection geometry_changed_connection, props_changed_connection;
 };
 
 // - - - - back to the actual PropertiesDialog implementation - - - -
@@ -245,7 +277,7 @@
   add(book);
 
   book.signal_switch_page().connect
-    (slot(*this, &PropertiesDialog::show_page_contents));
+    (sigc::mem_fun(*this, &PropertiesDialog::show_page_contents));
 
   PropBase* prop = new PropBasic(config.LengthUnit.values.front());
   pages.push_back(prop);
@@ -260,7 +292,7 @@
   
   // listen to selection change signals:
   Document::selection_changed_signal.connect
-    (slot(*this, &PropertiesDialog::select_change));
+    (sigc::mem_fun(*this, &PropertiesDialog::select_change));
 }
 
 PropertiesDialog::~PropertiesDialog() {}
diff -urNad passepartout-0.6-3~/src/pptout/rastermeta.cc passepartout-0.6-3/src/pptout/rastermeta.cc
--- passepartout-0.6-3~/src/pptout/rastermeta.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/rastermeta.cc	2005-12-21 02:24:59.000000000 +0100
@@ -21,7 +21,6 @@
 Viewent::Ref RasterMeta::create_viewent(View& view, Pagent& node) {
   Viewent::Ref result(new RasterViewent
 		      (view, &dynamic_cast<RasterFrame&>(node)));
-  result->set_manage(); // turn refcounting on
   result->reference();
   return result;
 }
@@ -44,7 +43,7 @@
     Spinner e_ppix, e_ppiy;
     Gtk::ToggleButton b_ppic;
     Gtk::HSeparator hsep;
-    SigC::Connection geometry_changed_connection, props_changed_connection;
+    sigc::connection geometry_changed_connection, props_changed_connection;
   };
 };
 
@@ -63,12 +62,12 @@
   line->pack_start(*label, Gtk::PACK_SHRINK);
   line->pack_start(e_fname);
   e_fname.entry.get_entry()->signal_activate().connect
-    (bind(slot(*this, &PropRaster::on_change), FILENAME));
+    (bind(sigc::mem_fun(*this, &PropRaster::on_change), FILENAME));
   e_fname.entry.get_entry()->signal_focus_out_event().connect
-    (SigC::hide<GdkEventFocus*>(bind_return(bind(slot(*this, 
-                                                      &PropRaster::on_change), 
-                                                 FILENAME), 
-                                            true)));
+    (sigc::hide(bind_return(bind(sigc::mem_fun(*this, 
+                                      &PropRaster::on_change), 
+                                 FILENAME), 
+                            true)));
   pack_start(*line, Gtk::PACK_SHRINK);
   
   Glib::RefPtr<Gtk::SizeGroup>  sizegroup = 
@@ -108,11 +107,11 @@
   pack_start(*rezpanel, Gtk::PACK_SHRINK);
   
   e_ppix.signal_value_changed().connect
-    (bind(slot(*this, &PropRaster::on_change), HRES));
+    (bind(sigc::mem_fun(*this, &PropRaster::on_change), HRES));
   e_ppiy.signal_value_changed().connect
-    (bind(slot(*this, &PropRaster::on_change), VRES));
+    (bind(sigc::mem_fun(*this, &PropRaster::on_change), VRES));
   b_ppic.signal_toggled().connect
-    (bind(slot(*this, &PropRaster::on_change), ASPECT));
+    (bind(sigc::mem_fun(*this, &PropRaster::on_change), ASPECT));
   set_sensitive(false);
   update();
 }
@@ -123,10 +122,10 @@
   if(object) {
     // Switch raster resolution
     geometry_changed_connection = object->geometry_changed_signal.connect
-      (SigC::hide<Pagent*>(slot(*this, &PropRaster::update)));
+      (sigc::hide(sigc::mem_fun(*this, &PropRaster::update)));
     // Switched file
     props_changed_connection = object->props_changed_signal.connect
-      (SigC::hide<Pagent*>(slot(*this, &PropRaster::update)));
+      (sigc::hide(sigc::mem_fun(*this, &PropRaster::update)));
   }
 }
 
diff -urNad passepartout-0.6-3~/src/pptout/rasterviewent.cc passepartout-0.6-3/src/pptout/rasterviewent.cc
--- passepartout-0.6-3~/src/pptout/rasterviewent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/rasterviewent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -7,9 +7,9 @@
   : Viewent(view, rasterframe), frame(rasterframe)
 {
   frame->props_changed_signal.connect
-    (slot(*this, &RasterViewent::on_geometry_changed));
+    (sigc::mem_fun(*this, &RasterViewent::on_geometry_changed));
   frame->object_changed_signal.connect
-    (slot(*this, &RasterViewent::on_object_changed));
+    (sigc::mem_fun(*this, &RasterViewent::on_object_changed));
 
   canvas_pixbuf.reset(new Gnome::Canvas::Pixbuf(*content_group));
   canvas_pixbuf->property_x() = 0; canvas_pixbuf->property_y() = 0;
diff -urNad passepartout-0.6-3~/src/pptout/streamdialog.cc passepartout-0.6-3/src/pptout/streamdialog.cc
--- passepartout-0.6-3~/src/pptout/streamdialog.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/streamdialog.cc	2005-12-21 02:24:59.000000000 +0100
@@ -61,10 +61,10 @@
 }
 
 namespace {
-  SigC::Slot1<bool, GdkEventFocus*> 
-  adapt_focus_out(SigC::Slot1<void, int> slot, int response_id) {
-    return SigC::hide<GdkEventFocus*>(SigC::bind_return
-                                      (SigC::bind(slot, response_id), true));
+  sigc::slot<bool, GdkEventFocus*> 
+  adapt_focus_out(sigc::slot<void, int> slot, int response_id) {
+    return sigc::hide(sigc::bind_return(sigc::bind(slot, response_id), 
+                                        true));
   }
 }
 
@@ -90,7 +90,7 @@
     
     Glib::RefPtr<Gtk::TreeSelection> selection = stream_list.get_selection();
     selection->signal_changed().connect
-      (slot(*this, &StreamDialog::on_selection_changed));
+      (sigc::mem_fun(*this, &StreamDialog::on_selection_changed));
     
     Gtk::ScrolledWindow *scroll = manage(new Gtk::ScrolledWindow());
     scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -159,7 +159,7 @@
       param_list.append_column_editable("Value", param_columns.value);
       param_list.property_height_request() = 90;
       param_model->signal_row_changed().connect
-	(slot(*this, &StreamDialog::on_param_row_changed));
+	(sigc::mem_fun(*this, &StreamDialog::on_param_row_changed));
       Gtk::ScrolledWindow *scroll = manage(new Gtk::ScrolledWindow());
       scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
       scroll->set_shadow_type(Gtk::SHADOW_IN);
@@ -174,24 +174,24 @@
   show_all_children();
 
   Document::streams_changed_signal.connect
-    (slot(*this, &StreamDialog::_update));
+    (sigc::mem_fun(*this, &StreamDialog::_update));
    
   name_entry.signal_activate().connect
-    (bind(slot(*this, &StreamDialog::on_response), Response::SETNAME));
+    (bind(sigc::mem_fun(*this, &StreamDialog::on_response), Response::SETNAME));
   name_entry.signal_focus_out_event().connect
-    (adapt_focus_out(slot(*this, &StreamDialog::on_response),
+    (adapt_focus_out(sigc::mem_fun(*this, &StreamDialog::on_response),
                      Response::SETNAME));
   
   file_entry.entry.get_entry()->signal_activate().connect
-    (bind(slot(*this, &StreamDialog::on_response), Response::SETFILE));
+    (bind(sigc::mem_fun(*this, &StreamDialog::on_response), Response::SETFILE));
   file_entry.entry.get_entry()->signal_focus_out_event().connect
-    (adapt_focus_out(slot(*this, &StreamDialog::on_response),
+    (adapt_focus_out(sigc::mem_fun(*this, &StreamDialog::on_response),
                      Response::SETFILE));
   
   xfrm_entry.entry.get_entry()->signal_activate().connect
-    (bind(slot(*this, &StreamDialog::on_response), Response::SETXFRM));
+    (bind(sigc::mem_fun(*this, &StreamDialog::on_response), Response::SETXFRM));
   xfrm_entry.entry.get_entry()->signal_focus_out_event().connect
-    (adapt_focus_out(slot(*this, &StreamDialog::on_response),
+    (adapt_focus_out(sigc::mem_fun(*this, &StreamDialog::on_response),
                      Response::SETXFRM));
 }
 
@@ -224,10 +224,10 @@
   Gtk::Button *b = manage(button);
   // Note: It seems that activate means "in any way except a simple click".
   // So we have to add callbacks for both activate and clicked.
-  b->signal_clicked().connect(bind(slot(*this, &StreamDialog::on_response),
-                                   action_id));
-  b->signal_activate().connect(bind(slot(*this, &StreamDialog::on_response),
-				    action_id));
+  b->signal_clicked().connect
+    (bind(sigc::mem_fun(*this, &StreamDialog::on_response), action_id));
+  b->signal_activate().connect
+    (bind(sigc::mem_fun(*this, &StreamDialog::on_response), action_id));
   return b;
 }
 
@@ -360,7 +360,7 @@
 }
 
 void StreamDialog::on_param_row_changed(const Gtk::TreeModel::Path& path,
-					 const Gtk::TreeModel::iterator& iter)
+                                        const Gtk::TreeModel::iterator& iter)
 {
   if(current_stream && iter)
     current_stream->set_parameter(iter->get_value(param_columns.name),
@@ -402,11 +402,11 @@
   MenuList& menu_list = menu.items();
   menu_list.clear();
   if(!document) {
-      menu.items().push_back(MenuElem("")); // cosmetic fix
-      menu.set_active(0);
-      set_menu(menu);
-      return;
-    }
+    menu.items().push_back(MenuElem("")); // cosmetic fix
+    menu.set_active(0);
+    set_menu(menu);
+    return;
+  }
   int index = 0;
   Document::StreamVec streams = document->get_text_streams();
   for(Document::StreamVec::iterator i = streams.begin();
@@ -491,7 +491,7 @@
 
   get_vbox()->pack_start(*main_box);
 
-  Gtk::RadioButton_Helpers::Group group = old_button->get_group();
+  Gtk::RadioButton::Group group = old_button->get_group();
   new_button->set_group(group);
   old_button->set_active();
   fix_button(new_button, RESPONSE_TOGGLE_MODE);
diff -urNad passepartout-0.6-3~/src/pptout/textmeta.cc passepartout-0.6-3/src/pptout/textmeta.cc
--- passepartout-0.6-3~/src/pptout/textmeta.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/textmeta.cc	2005-12-21 02:24:59.000000000 +0100
@@ -21,7 +21,6 @@
 Viewent::Ref TextMeta::create_viewent(View& view, Pagent& node) {
   Viewent::Ref result(new TextViewent
 		      (view, &dynamic_cast<TextFrame&>(node), 2));
-  result->set_manage(); // turn refcounting on
   result->reference();
   return result;
 }
@@ -41,10 +40,10 @@
     label->set_mnemonic_widget(e_stream);
     line->pack_start(e_stream, Gtk::PACK_EXPAND_WIDGET);
     e_stream.signal_changed().connect
-      (bind(slot(*this, &PropText::on_change), STREAM));
+      (bind(sigc::mem_fun(*this, &PropText::on_change), STREAM));
     Gtk::Button *b_streams = manage(new Gtk::Button("E_dit streams", true));
-    b_streams->signal_clicked().connect(slot(StreamDialog::instance(),
-					     &StreamDialog::show_raise));
+    b_streams->signal_clicked().connect
+      (sigc::mem_fun(StreamDialog::instance(), &StreamDialog::show_raise));
     line->pack_start(*b_streams, Gtk::PACK_SHRINK);
     pack_start(*line, Gtk::PACK_SHRINK);
     
@@ -57,7 +56,7 @@
     label->set_mnemonic_widget(e_columns);
     e_columns.limits(1, 64);	// Note: The upper limit is rather arbitrary.
     e_columns.signal_value_changed().connect
-      (bind(slot(*this, &PropText::on_change), COLUMNS));
+      (bind(sigc::mem_fun(*this, &PropText::on_change), COLUMNS));
     line->pack_start(e_columns, Gtk::PACK_SHRINK);
     box->pack_start(*line);
     
@@ -69,13 +68,13 @@
     label->set_mnemonic_widget(e_gutter);
     line->pack_start(e_gutter, Gtk::PACK_SHRINK);
     e_gutter.signal_value_changed().connect
-      (bind(slot(*this, &PropText::on_change), GUTTER));
+      (bind(sigc::mem_fun(*this, &PropText::on_change), GUTTER));
     box->pack_start(*line);
     pack_start(*box, Gtk::PACK_SHRINK);
     
     // perhaps this should go into the StreamMenu class
     Document::streams_changed_signal.connect
-      (slot(*this, &PropText::on_streams_changed));
+      (sigc::mem_fun(*this, &PropText::on_streams_changed));
 
     set_sensitive(false);
     update();
diff -urNad passepartout-0.6-3~/src/pptout/textviewent.cc passepartout-0.6-3/src/pptout/textviewent.cc
--- passepartout-0.6-3~/src/pptout/textviewent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/textviewent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -19,7 +19,7 @@
   trunc_ind->hide();
   on_geometry_changed(cachedframe);
   dynamic_cast<TextFrame*>(cachedframe)->truncated_state_changed_signal.connect
-    (slot(*this, &TextViewent::on_truncated_state_changed));
+    (sigc::mem_fun(*this, &TextViewent::on_truncated_state_changed));
 }
 
 void TextViewent::on_truncated_state_changed(bool truncated) {
diff -urNad passepartout-0.6-3~/src/pptout/viewent.cc passepartout-0.6-3/src/pptout/viewent.cc
--- passepartout-0.6-3~/src/pptout/viewent.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/viewent.cc	2005-12-21 02:24:59.000000000 +0100
@@ -17,9 +17,9 @@
   : view(the_view)
 {
   pagent->props_changed_signal.connect
-    (slot(*this, &Viewent::on_properties_changed));
+    (sigc::mem_fun(*this, &Viewent::on_properties_changed));
   pagent->geometry_changed_signal.connect
-    (slot(*this, &Viewent::on_geometry_changed));
+    (sigc::mem_fun(*this, &Viewent::on_geometry_changed));
 
   // can't create pixbuf until glib (or whatever) is initialized 
   if(!broken_pixbuf) {
diff -urNad passepartout-0.6-3~/src/pptout/viewent.h passepartout-0.6-3/src/pptout/viewent.h
--- passepartout-0.6-3~/src/pptout/viewent.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/viewent.h	2005-12-21 02:24:59.000000000 +0100
@@ -5,6 +5,7 @@
 ///
 #include "view.h"
 #include "document/pagent.h"
+#include "util/refcount.h"
 #include <memory> // auto_ptr
 
 /**
@@ -13,7 +14,7 @@
  * Pagent.  When a View is rescaled etc, all its Viewent s are dropped
  * and new ones created.
  */
-class Viewent : public SigC::Object {
+class Viewent : public sigc::trackable, public RefCounted {
 public:
   typedef Glib::RefPtr<const Gdk::Pixmap> PixmapRef;
   typedef Glib::RefPtr<Viewent> Ref;
diff -urNad passepartout-0.6-3~/src/pptout/view.h passepartout-0.6-3/src/pptout/view.h
--- passepartout-0.6-3~/src/pptout/view.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/view.h	2005-12-21 02:24:59.000000000 +0100
@@ -27,7 +27,7 @@
   virtual const Gdk::Color& get_color(Color::Id color) const = 0;
 
   /** Register a callback for the signal raised on rescaling the view */
-  virtual SigC::Connection connect_zoom_change(SigC::Slot1<void, float>) = 0;
+  virtual sigc::connection connect_zoom_change(sigc::slot<void, float>) = 0;
 };
 
 #endif
diff -urNad passepartout-0.6-3~/src/pptout/widget/dialogwrap.cc passepartout-0.6-3/src/pptout/widget/dialogwrap.cc
--- passepartout-0.6-3~/src/pptout/widget/dialogwrap.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/widget/dialogwrap.cc	2005-12-21 02:24:59.000000000 +0100
@@ -23,10 +23,10 @@
   Gtk::Button *b = manage(button);
   // Note: It seems that activate means "in any way except a simple click".
   // So we have to add callbacks for both activate and clicked.
-  b->signal_clicked().connect(bind(slot(*this, &Gtk::Dialog::on_response),
-				   action_id));
-  b->signal_activate().connect(bind(slot(*this, &Gtk::Dialog::on_response),
-				    action_id));
+  b->signal_clicked().connect
+    (bind(sigc::mem_fun(*this, &Gtk::Dialog::on_response), action_id));
+  b->signal_activate().connect
+    (bind(sigc::mem_fun(*this, &Gtk::Dialog::on_response), action_id));
   return b;
 }
 
diff -urNad passepartout-0.6-3~/src/pptout/widget/filesel.cc passepartout-0.6-3/src/pptout/widget/filesel.cc
--- passepartout-0.6-3~/src/pptout/widget/filesel.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/widget/filesel.cc	2005-12-21 02:24:59.000000000 +0100
@@ -74,7 +74,8 @@
 
   entry.show();
   button.set_size_request(-1, entry.get_height());
-  button.signal_clicked().connect(slot(*this, &FileEntry::show_filesel));
+  button.signal_clicked().connect
+    (sigc::mem_fun(*this, &FileEntry::show_filesel));
 }
 
 bool FileEntry::on_mnemonic_activate(bool group_cycling) {
@@ -115,7 +116,8 @@
   } else {
     filesel.reset(new Filesel(*toplevel, window_title, true, false));
   }
-  filesel->signal_hide().connect(slot(*this, &FileEntry::filesel_done));
+  filesel->signal_hide().connect
+    (sigc::mem_fun(*this, &FileEntry::filesel_done));
   if(entry.get_text() != *default_value) { //If non-default entry
     filesel->set_filename(entry.get_text().empty() 
 			  ? default_path 
diff -urNad passepartout-0.6-3~/src/pptout/widget/imagefilesel.cc passepartout-0.6-3/src/pptout/widget/imagefilesel.cc
--- passepartout-0.6-3~/src/pptout/widget/imagefilesel.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/widget/imagefilesel.cc	2005-12-21 02:24:59.000000000 +0100
@@ -58,11 +58,11 @@
   box->show_all();
 
   get_selection_entry()->signal_changed().connect
-    (slot(*this, &ImageFilesel::update_preview));
+    (sigc::mem_fun(*this, &ImageFilesel::update_preview));
   show_preview.signal_clicked().connect
-    (slot(*this, &ImageFilesel::update_preview));
+    (sigc::mem_fun(*this, &ImageFilesel::update_preview));
   res.signal_value_changed().connect
-    (slot(*this, &ImageFilesel::update_size));
+    (sigc::mem_fun(*this, &ImageFilesel::update_size));
 }
 
 void ImageFilesel::update_size() {
diff -urNad passepartout-0.6-3~/src/pptout/widget/spinner.cc passepartout-0.6-3/src/pptout/widget/spinner.cc
--- passepartout-0.6-3~/src/pptout/widget/spinner.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/widget/spinner.cc	2005-12-21 02:24:59.000000000 +0100
@@ -83,7 +83,7 @@
     optionmenu = manage(new Gtk::OptionMenu());
     optionmenu->set_menu(*menu);
     menu->signal_selection_done().connect
-      (slot(*this, &Spinner::on_unit_select));
+      (sigc::mem_fun(*this, &Spinner::on_unit_select));
 
     optionmenu->set_size_request(-1, spinbutton->get_height());
     pack_start(*optionmenu);
diff -urNad passepartout-0.6-3~/src/pptout/window.cc passepartout-0.6-3/src/pptout/window.cc
--- passepartout-0.6-3~/src/pptout/window.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/window.cc	2005-12-21 02:24:59.000000000 +0100
@@ -160,75 +160,68 @@
   scroller->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
 
   {
-    using namespace Gtk::Toolbar_Helpers;
-    ToolList &tools = toolbar->tools();
-
-    tools.push_back(StockElem(Gtk::Stock::SAVE,
-			      slot(*this, &FrameWindow::save),
-			      "Save file"));
-    save_button = static_cast<Gtk::Button*>(tools.back().get_widget());
-    tools.push_back(Space());
-    tools.push_back(StockElem(Gtk::Stock::PRINT_PREVIEW,
-			      slot(*this, &FrameWindow::print_to_viewer),
-			      "Print to external viewer"));
-    preview_button = static_cast<Gtk::Button*>(tools.back().get_widget());
-    tools.push_back(Space());
-    tools.push_back(ButtonElem("Text frame", 
-			       icons->new_frame, 
-			       slot(*text_frame_dialog, 
-				    &TextFrameDialog::show_raise),
-			       "Create new text frame"));
-    text_frame_button = static_cast<Gtk::Button*>(tools.back().get_widget());
-    tools.push_back(ButtonElem("Image",
-			       icons->moose, 
-			       slot(*import_dialog, &ImageFilesel::show),
-			       "Import image file"));
-    image_frame_button = static_cast<Gtk::Button*>(tools.back().get_widget());
-    tools.push_back(Space());
-    tools.push_back(StockElem(Gtk::Stock::PROPERTIES,
-			      slot(PropertiesDialog::instance(),
-				   &PropertiesDialog::show_raise),
-			       "Show object properties"));
-    properties_button = static_cast<Gtk::Button*>(tools.back().get_widget());
-    tools.push_back(ButtonElem("Streams", 
-			       icons->streams, 
-			       slot(StreamDialog::instance(),
-				    &StreamDialog::show_raise),
-			       "Show list of text streams"));
-    tools.push_back(Space());
-    tools.push_back(ToggleElem("Snap to grid", 
-			       icons->grid, 
-			       slot(*this, 
-				    &FrameWindow::on_grid_button_clicked),
-			       "Align objects with grid"));
-    grid_button = 
-      static_cast<Gtk::ToggleButton*>(tools.back().get_widget());
-    tools.push_back(Space());
-    tools.push_back(StockElem(Gtk::Stock::GOTO_TOP,
-			      bind(slot(document_view, 
-					&DocumentView::rearrange_selected), 
-				   TOP),
-			      "Move object(s) to top"));
-
-    tools.push_back(StockElem(Gtk::Stock::GO_UP,
-			      bind(slot(document_view, 
-					&DocumentView::rearrange_selected), 
-				   UP),
-		    "Move object(s) up"));
+    toolbar->append(*manage(save_button =
+                            new Gtk::ToolButton(Gtk::Stock::SAVE)),
+                    sigc::mem_fun(*this, &FrameWindow::save));
+    toolbar->append(*manage(new Gtk::SeparatorToolItem()));
+    toolbar->append(*manage(preview_button =
+                            new Gtk::ToolButton(Gtk::Stock::PRINT_PREVIEW)),
+                    sigc::mem_fun(*this, &FrameWindow::print_to_viewer));
+    //      "Print to external viewer"));
+    toolbar->append(*manage(new Gtk::SeparatorToolItem()));
+    toolbar->append(*manage(text_frame_button =
+                            new Gtk::ToolButton(icons->new_frame,
+                                                "Text frame")),
+                    sigc::mem_fun(*text_frame_dialog,
+                                  &TextFrameDialog::show_raise));
+    //			       "Create new text frame"));
+    toolbar->append(*manage(image_frame_button =
+                            new Gtk::ToolButton(icons->moose,
+                                                ("Image"))),
+                    sigc::mem_fun(*import_dialog, &ImageFilesel::show));
+    //			       "Import image file"));
+    toolbar->append(*manage(new Gtk::SeparatorToolItem()));
+    toolbar->append(*manage(properties_button =
+                            new Gtk::ToolButton(Gtk::Stock::PROPERTIES)),
+                    sigc::mem_fun(PropertiesDialog::instance(),
+                                  &PropertiesDialog::show_raise));
+    //			       "Show object properties"));
+    toolbar->append(*manage(streams_button =
+                            new Gtk::ToolButton(icons->streams, "Streams")),
+                    sigc::mem_fun(StreamDialog::instance(),
+                                  &StreamDialog::show_raise));
+    //			       "Show list of text streams"));
+    toolbar->append(*manage(new Gtk::SeparatorToolItem()));
+    toolbar->append(*manage(grid_button =
+                            new Gtk::ToggleToolButton(icons->grid,
+                                                      "Snap to grid")),
+                    mem_fun(*this,
+                            &FrameWindow::on_grid_button_clicked));
+    //                    "Align objects with grid"));
+    toolbar->append(*manage(new Gtk::SeparatorToolItem()));
+    toolbar->append(*manage(new Gtk::ToolButton(Gtk::Stock::GOTO_TOP)),
+                    bind(sigc::mem_fun(document_view,
+                                       &DocumentView::rearrange_selected),
+                         TOP));
+    //			      "Move object(s) to top"));
 
-    tools.push_back(StockElem(Gtk::Stock::GO_DOWN,
-			      bind(slot(document_view, 
-					&DocumentView::rearrange_selected), 
-				   DOWN),
-		    "Move object(s) down"));
+    toolbar->append(*manage(new Gtk::ToolButton(Gtk::Stock::GO_UP)),
+                    bind(sigc::mem_fun(document_view,
+                                       &DocumentView::rearrange_selected),
+                         UP));
+    //		    "Move object(s) up"));
 
-    tools.push_back(StockElem(Gtk::Stock::GOTO_BOTTOM,
-			      bind(slot(document_view, 
-					&DocumentView::rearrange_selected), 
-				   BOTTOM),
-		    "Move object(s) to bottom"));
+    toolbar->append(*manage(new Gtk::ToolButton(Gtk::Stock::GO_DOWN)),
+                    bind(sigc::mem_fun(document_view,
+                                       &DocumentView::rearrange_selected), 
+                         DOWN));
+    //		    "Move object(s) down"));
 
-    streams_button = static_cast<Gtk::Button*>(tools.back().get_widget());
+    toolbar->append(*manage(new Gtk::ToolButton(Gtk::Stock::GOTO_BOTTOM)),
+                    bind(sigc::mem_fun(document_view, 
+                                       &DocumentView::rearrange_selected), 
+                         BOTTOM));
+    //    "Move object(s) to bottom"));
   }
   
   cafe_opera = manage(new Gtk::Statusbar());
@@ -250,23 +243,23 @@
   mainbox->pack_end(*cafe_opera, Gtk::PACK_SHRINK);
   
   document_view.zoom_change_signal.connect
-    (slot(*this, &FrameWindow::zoom_change_action));
+    (sigc::mem_fun(*this, &FrameWindow::zoom_change_action));
   zoom_factor->set_menu(*create_zoom_menu());
   zoom_factor->get_menu()->signal_selection_done().connect
-    (slot(*this, &FrameWindow::zoom_factor_changed_action));
+    (sigc::mem_fun(*this, &FrameWindow::zoom_factor_changed_action));
   
   open_dialog->signal_hide().connect
-    (slot(*this, &FrameWindow::open_dialog_done));
+    (sigc::mem_fun(*this, &FrameWindow::open_dialog_done));
   save_dialog->signal_hide().connect
-    (slot(*this, &FrameWindow::save_dialog_done));
+    (sigc::mem_fun(*this, &FrameWindow::save_dialog_done));
   import_dialog->signal_hide().connect
-    (slot(*this, &FrameWindow::import_dialog_done));
+    (sigc::mem_fun(*this, &FrameWindow::import_dialog_done));
 
   document_view.document_set_signal.connect
-    (slot(*this, &FrameWindow::on_document_changed));
+    (sigc::mem_fun(*this, &FrameWindow::on_document_changed));
 
   Document::changed_signal.connect
-    (slot(*this, &FrameWindow::on_document_updated));
+    (sigc::mem_fun(*this, &FrameWindow::on_document_updated));
 
   // put window in global list
   windows.insert(this);
@@ -420,7 +413,7 @@
   // We may have a new DocMeta in view, so connect to the new signal
   DocMeta docmeta = document_view.get_document_meta();
   docmeta.changed_signal().connect
-    (slot(*this, &FrameWindow::on_document_filename_changed));
+    (sigc::mem_fun(*this, &FrameWindow::on_document_filename_changed));
   set_filename(basename(docmeta.get_filename()));
 
 }
diff -urNad passepartout-0.6-3~/src/pptout/window.h passepartout-0.6-3/src/pptout/window.h
--- passepartout-0.6-3~/src/pptout/window.h	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/window.h	2005-12-21 02:24:59.000000000 +0100
@@ -51,9 +51,9 @@
   Gtk::MenuItem *new_view_item, *save_item, *save_as_item, 
     *print_item, *preview_item, 
     *delete_page_item, *undo_item, *redo_item, *props_item, *prefs_item;
-  Gtk::Button *save_button, *text_frame_button, *image_frame_button;
-  Gtk::Button *streams_button, *preview_button, *properties_button;
-  Gtk::ToggleButton *grid_button;
+  Gtk::ToolButton *save_button, *text_frame_button, *image_frame_button,
+    *streams_button, *preview_button, *properties_button;
+  Gtk::ToggleToolButton *grid_button;
 
   // We need to create separate copies of the icons for each window since each
   // icon can only have one parent
diff -urNad passepartout-0.6-3~/src/pptout/windowmenus.cc passepartout-0.6-3/src/pptout/windowmenus.cc
--- passepartout-0.6-3~/src/pptout/windowmenus.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/pptout/windowmenus.cc	2005-12-21 02:24:59.000000000 +0100
@@ -18,8 +18,8 @@
 void FrameWindow::create_menus() {
   using namespace Gtk;
   using namespace Menu_Helpers;
-  using SigC::bind;
-  using SigC::slot;
+  using sigc::bind;
+  using sigc::mem_fun;
 
   /// *** file menu ***
 
@@ -29,50 +29,50 @@
     (ImageMenuElem("_New ...", AccelKey("<control>N"),
 		   *manage(new Gtk::Image(Gtk::Stock::NEW, 
 					  Gtk::ICON_SIZE_MENU)),
-		   slot(*this, &FrameWindow::new_document)));
+		   mem_fun(*this, &FrameWindow::new_document)));
   list_file.push_back
     (ImageMenuElem("New Vi_ew", 
 		   *manage(new Gtk::Image(Gtk::Stock::NEW, 
 					  Gtk::ICON_SIZE_MENU)),
-		   slot(*this, &FrameWindow::duplicate_view)));
+		   mem_fun(*this, &FrameWindow::duplicate_view)));
   new_view_item = &list_file.back();
   list_file.push_back
     (ImageMenuElem("_Open ...", AccelKey("<control>O"),
 		   *manage(new Gtk::Image(Gtk::Stock::OPEN, 
 					  Gtk::ICON_SIZE_MENU)),
-		   slot(*open_dialog, &Filesel::show_all)));
+		   mem_fun(*open_dialog, &Filesel::show_all)));
   list_file.push_back(SeparatorElem());
   list_file.push_back(StockMenuElem(Gtk::Stock::SAVE,
-				    slot(*this, &FrameWindow::save)));
+				    mem_fun(*this, &FrameWindow::save)));
   save_item = &list_file.back();
   list_file.push_back
     (ImageMenuElem("Save _As ...", AccelKey("<shift><control>S"),
 		   *manage(new Gtk::Image(Gtk::Stock::PRINT, 
 					  Gtk::ICON_SIZE_MENU)),
-		   slot(*save_dialog, &Filesel::show_all)));
+		   mem_fun(*save_dialog, &Filesel::show_all)));
   save_as_item = &list_file.back();
   list_file.push_back(SeparatorElem());
   list_file.push_back
     (ImageMenuElem("_Print ...", AccelKey("<control>P"),
 		   *manage(new Gtk::Image(Gtk::Stock::PRINT, 
 					  Gtk::ICON_SIZE_MENU)),
-		   slot(*print_dialog, &PrintDialog::show_it)));
+		   mem_fun(*print_dialog, &PrintDialog::show_it)));
   print_item = &list_file.back();
   list_file.push_back(StockMenuElem(Gtk::Stock::PRINT_PREVIEW,
 				    AccelKey("<shift><control>P"),
-				    slot(*this, 
-					 &FrameWindow::print_to_viewer)));
+				    mem_fun(*this, 
+                                            &FrameWindow::print_to_viewer)));
   preview_item = &list_file.back();
   list_file.push_back(SeparatorElem());
   list_file.push_back
     (MenuElem("P_roperties ...",
-	      slot(*this, &FrameWindow::show_doc_props_dialog)));
+	      mem_fun(*this, &FrameWindow::show_doc_props_dialog)));
   props_item = &list_file.back();
   list_file.push_back(SeparatorElem());
   list_file.push_back(StockMenuElem(Gtk::Stock::CLOSE,
-				    slot(*this, &FrameWindow::close)));
+				    mem_fun(*this, &FrameWindow::close)));
   list_file.push_back(StockMenuElem(Gtk::Stock::QUIT,
-				    SigC::slot(&FrameWindow::quit)));
+				    sigc::ptr_fun(&FrameWindow::quit)));
   menubar->items().push_back(MenuElem("_File", AccelKey("<alt>f"), 
 				      *file_menu));
 
@@ -92,64 +92,64 @@
 #endif
   
   list_edit.push_back(StockMenuElem(Gtk::Stock::COPY,
-				    slot(document_view, 
-					 &DocumentView::copy)));
+				    mem_fun(document_view, 
+                                            &DocumentView::copy)));
   list_edit.push_back(StockMenuElem(Gtk::Stock::CUT,
-				    slot(document_view, 
-					 &DocumentView::cut)));
+				    mem_fun(document_view, 
+                                            &DocumentView::cut)));
   list_edit.push_back(StockMenuElem(Gtk::Stock::PASTE,
-				    slot(document_view, 
-					 &DocumentView::paste)));
+				    mem_fun(document_view, 
+                                            &DocumentView::paste)));
   list_edit.push_back
     (StockMenuElem(Gtk::Stock::DELETE,
 		   AccelKey(guint(GDK_Delete), 
 			    Gdk::ModifierType(0)),
-		   slot(document_view, &DocumentView::delete_selected)));
+		   mem_fun(document_view, &DocumentView::delete_selected)));
 
   list_edit.push_back(SeparatorElem());
   list_edit.push_back(MenuElem("Select _All", AccelKey("<control>A"),
-			       slot(document_view, 
-				    &DocumentView::select_all_frames)));
+			       mem_fun(document_view, 
+                                       &DocumentView::select_all_frames)));
   list_edit.push_back
     (MenuElem("Dese_lect All",	AccelKey("<shift><control>A"),
-	      slot(document_view, &DocumentView::unselect_all_frames)));
+	      mem_fun(document_view, &DocumentView::unselect_all_frames)));
   list_edit.push_back(SeparatorElem());
   // *** arrange submenu ***
   Menu *arrange_menu = manage(new Menu());
   MenuList& list_arrange = arrange_menu->items();
   list_arrange.push_back(MenuElem("_Group", AccelKey("<control>G"),
-				  slot(document_view, 
-				       &DocumentView::group_selected)));
+				  mem_fun(document_view, 
+                                          &DocumentView::group_selected)));
   list_arrange.push_back
     (MenuElem("_Ungroup", AccelKey("<control>U"),
-	      slot(document_view, &DocumentView::ungroup_selected)));
+	      mem_fun(document_view, &DocumentView::ungroup_selected)));
   list_arrange.push_back(SeparatorElem());
   list_arrange.push_back
     (MenuElem("Move to _top", AccelKey("<control>Home"),
-	      bind(slot(document_view, 
-			&DocumentView::rearrange_selected), TOP)));
+	      bind(mem_fun(document_view, 
+                           &DocumentView::rearrange_selected), TOP)));
   list_arrange.push_back
     (MenuElem("Move _up", AccelKey("<control>Page_Up"),
-	      bind(slot(document_view, 
-			&DocumentView::rearrange_selected), UP)));
+	      bind(mem_fun(document_view, 
+                           &DocumentView::rearrange_selected), UP)));
   list_arrange.push_back
     (MenuElem("Move _down", AccelKey("<control>Page_Down"),
-	      bind(slot(document_view, 
-			&DocumentView::rearrange_selected), DOWN)));
+	      bind(mem_fun(document_view, 
+                           &DocumentView::rearrange_selected), DOWN)));
   list_arrange.push_back
     (MenuElem("Move to _bottom", AccelKey("<control>End"),
-	      bind(slot(document_view, 
-			&DocumentView::rearrange_selected), BOTTOM)));
+	      bind(mem_fun(document_view, 
+                           &DocumentView::rearrange_selected), BOTTOM)));
   list_edit.push_back(MenuElem("A_rrange", *arrange_menu));
   list_edit.push_back(SeparatorElem());
   list_edit.push_back(MenuElem("Insert Te_xt Frame ...", 
-			       slot(*text_frame_dialog,
-				    &TextFrameDialog::show_raise)));
+			       mem_fun(*text_frame_dialog,
+                                       &TextFrameDialog::show_raise)));
   list_edit.push_back(MenuElem("Insert _Image ...", 
-			       slot(*import_dialog, &Filesel::show_all)));
+			       mem_fun(*import_dialog, &Filesel::show_all)));
   list_edit.push_back(SeparatorElem());
   list_edit.push_back(MenuElem("Pre_ferences ...", 
-			       slot(config, &PFile::dialog_show)));
+			       mem_fun(config, &PFile::dialog_show)));
   prefs_item = &list_edit.back();
   menubar->items().push_back(MenuElem("_Edit", AccelKey("<alt>e"), 
 				      *edit_menu));
@@ -160,18 +160,18 @@
   page_menu = manage(new Menu());
   MenuList& list_page = page_menu->items();
   list_page.push_back(MenuElem("_Delete", 
-			       slot(document_view, 
-				    &DocumentView::delete_page)));
+			       mem_fun(document_view, 
+                                       &DocumentView::delete_page)));
   list_page.push_back(SeparatorElem());
   list_page.push_back(MenuElem("Insert _Before ...", 
-			       slot(document_view, 
-				    &DocumentView::insert_page_before)));
+			       mem_fun(document_view, 
+                                       &DocumentView::insert_page_before)));
   list_page.push_back(MenuElem("Insert _After ...", 
-			       slot(document_view, 
-				    &DocumentView::insert_page_after)));
+			       mem_fun(document_view, 
+                                       &DocumentView::insert_page_after)));
   delete_page_item = &list_page.back();
   //  list_page.push_back(SeparatorElem());
-  //  list_page.push_back(MenuElem("_Template Page ...", slot(this, &FrameWindow::show_template_page_dialog)));
+  //  list_page.push_back(MenuElem("_Template Page ...", mem_fun(this, &FrameWindow::show_template_page_dialog)));
   // it is not yet possible to change the template of an existing page
   menubar->items().push_back(MenuElem("_Page", AccelKey("<alt>p"),*page_menu));
 
@@ -182,20 +182,20 @@
   MenuList& list_view = view_menu->items();
   list_view.push_back
     (CheckMenuElem("_Toolbar", 
-		   slot(*this, &FrameWindow::toggle_toolbar)));
+		   mem_fun(*this, &FrameWindow::toggle_toolbar)));
   static_cast<CheckMenuItem*>(&list_view.back())->set_active(true);
   list_view.push_back(SeparatorElem());
   list_view.push_back
     (StockMenuElem(Gtk::Stock::PROPERTIES,
-		   slot(PropertiesDialog::instance(),
-			&PropertiesDialog::show_raise)));
+		   mem_fun(PropertiesDialog::instance(),
+                           &PropertiesDialog::show_raise)));
   list_view.push_back(MenuElem("_Streams", 
-			       slot(StreamDialog::instance(),
-				    &StreamDialog::show_raise)));
+			       mem_fun(StreamDialog::instance(),
+                                       &StreamDialog::show_raise)));
 #ifdef ENABLE_UNDO
   list_view.push_back(MenuElem("_Undo history", 
-			       slot(UndoDialog::instance(),
-				    &UndoDialog::show_raise)));
+			       mem_fun(UndoDialog::instance(),
+                                       &UndoDialog::show_raise)));
 #endif
   menubar->items().push_back(MenuElem("_View", 
 				      AccelKey("<alt>v"), 
@@ -207,16 +207,16 @@
   Menu *help_menu = manage(new Menu());
   MenuList& list_help = help_menu->items();
   list_help.push_back(MenuElem("_User's guide", AccelKey("F1"),
-			       SigC::slot(&open_docs)));
+			       sigc::ptr_fun(&open_docs)));
   list_help.push_back(MenuElem("_About", 
-			       slot(AboutDialog::instance(), 
-				    &AboutDialog::show_all)));
+			       mem_fun(AboutDialog::instance(), 
+                                       &AboutDialog::show_all)));
   list_help.push_back(SeparatorElem());
   list_help.push_back(MenuElem("_Homepage", 
-			       SigC::slot(&open_homepage)));
+			       sigc::ptr_fun(&open_homepage)));
   list_help.push_back(MenuElem("_Inspiration", 
-			       slot(Inspiration::instance(),
-				    &Inspiration::show_all)));
+			       sigc::mem_fun(Inspiration::instance(),
+                                             &Inspiration::show_all)));
   menubar->items().push_back(MenuElem("_Help", AccelKey("<alt>h"), 
 				      *help_menu));
   menubar->items().back().set_right_justified();
diff -urNad passepartout-0.6-3~/src/util/filewatcher.cc passepartout-0.6-3/src/util/filewatcher.cc
--- passepartout-0.6-3~/src/util/filewatcher.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/util/filewatcher.cc	2005-12-21 02:24:59.000000000 +0100
@@ -27,7 +27,7 @@
     ~File();
 
     /// Signal emitted every time a change is detected.
-    SigC::Signal0<void> signal;
+    sigc::signal<void> signal;
 
   private:
     std::string filename;
@@ -35,7 +35,7 @@
   };
 
   /** A singleton with no public methods. Used only by File. */
-  class Server: public SigC::Object {
+  class Server: public sigc::trackable {
     friend class File;
     static Server *_instance;
     bool ok;
@@ -55,7 +55,7 @@
       verbose << "Contact with FAM server established" << std::endl;
       fd = FAMCONNECTION_GETFD(&fc);
       /// \todo don't poll
-      Glib::signal_timeout().connect(slot(*this, &Server::poll), 
+      Glib::signal_timeout().connect(sigc::mem_fun(*this, &Server::poll), 
 				     100);
     }
     ~Server() {
@@ -118,7 +118,7 @@
 #ifdef HAVE_LIBFAM
   try {
     famfile.reset(new FAM::File(file));
-    famfile->signal.connect(modified_signal.slot());
+    famfile->signal.connect(modified_signal.make_slot());
   }
   catch(const std::exception&) { famfile.reset(); }
 #endif
@@ -127,8 +127,8 @@
     if(!connection.connected()) {
       debug << "Connecting to timeout" << std::endl;
       connection = 
-	Glib::signal_timeout().connect(slot(*this, &FileWatcher::check_file),
-				       100);
+	Glib::signal_timeout().connect
+        (sigc::mem_fun(*this, &FileWatcher::check_file), 100);
     }
   } else connection.disconnect();
 }
diff -urNad passepartout-0.6-3~/src/util/filewatcher.h passepartout-0.6-3/src/util/filewatcher.h
--- passepartout-0.6-3~/src/util/filewatcher.h	2005-12-21 02:16:07.000000000 +0100
+++ src/util/filewatcher.h	2005-12-21 02:24:59.000000000 +0100
@@ -13,7 +13,7 @@
 /// Monitor a file for changes.
 /** Uses the File Alteration Monitor from SGI if available, otherwise
  * it calls stat(2) on the file at regular intervals. */
-class FileWatcher: public SigC::Object {
+class FileWatcher: public sigc::trackable {
 public:
   /**
    * \param filename File to watch. Must be an absolute path.
@@ -23,13 +23,13 @@
   void set_file(const std::string &filename);
 
   /// Signal emitted each time a change is detected.
-  SigC::Signal0<void> modified_signal;
+  sigc::signal<void> modified_signal;
 
 protected:
   std::string file;
   time_t last_time;
   std::auto_ptr<FAM::File> famfile;
-  SigC::Connection connection;
+  sigc::connection connection;
   bool check_file();
 
 private:
diff -urNad passepartout-0.6-3~/src/util/processman.cc passepartout-0.6-3/src/util/processman.cc
--- passepartout-0.6-3~/src/util/processman.cc	2005-12-21 02:16:07.000000000 +0100
+++ src/util/processman.cc	2005-12-21 02:24:59.000000000 +0100
@@ -125,11 +125,10 @@
   return *_instance;
 }
 
-ProcessManager::ProcessManager()
-{
+ProcessManager::ProcessManager() {
   // Get a callback to run_check every 100ms.
   Glib::signal_timeout().connect
-    (slot(*this, &ProcessManager::run_check), 100);
+    (sigc::mem_fun(*this, &ProcessManager::run_check), 100);
 }
 
 ProcessManager::~ProcessManager() {
diff -urNad passepartout-0.6-3~/src/util/processman.h passepartout-0.6-3/src/util/processman.h
--- passepartout-0.6-3~/src/util/processman.h	2005-12-21 02:16:07.000000000 +0100
+++ src/util/processman.h	2005-12-21 02:24:59.000000000 +0100
@@ -67,12 +67,12 @@
 typedef Glib::RefPtr<ProcessRecord> Process;
 
 //This is a singleton
-class ProcessManager: public SigC::Object {
+class ProcessManager: public sigc::trackable {
 public:
   // Signal that a process has stopped,
   // attach process id, a bool to signify normal termination
   // and an exit code that is only meaningful if the bool is true:
-  SigC::Signal3<void, pid_t, bool, int> process_stopped;
+  sigc::signal<void, pid_t, bool, int> process_stopped;
 
   static ProcessManager &instance();
 
diff -urNad passepartout-0.6-3~/src/xml2ps/xcanvas.hh passepartout-0.6-3/src/xml2ps/xcanvas.hh
--- passepartout-0.6-3~/src/xml2ps/xcanvas.hh	2005-12-21 02:16:07.000000000 +0100
+++ src/xml2ps/xcanvas.hh	2005-12-21 02:24:59.000000000 +0100
@@ -29,7 +29,7 @@
 };
 typedef std::vector<Part> Parts;
 
-class XCanvas: public Canvas, public SigC::Object {
+class XCanvas: public Canvas, public sigc::trackable {
 public:
   explicit XCanvas(const PageVec& pages, bool allow_extra_pages);
   virtual ~XCanvas();
