[niepce] Require C++ 11 now



commit c2f598b1c372df2e459590e2e83539c342ed2366
Author: Hubert Figuière <hub figuiere net>
Date:   Wed Jun 5 19:22:35 2013 -0400

    Require C++ 11 now

 README                                            |    4 +-
 camerawire/README                                 |    2 +-
 camerawire/configure.ac                           |    4 +-
 camerawire/m4/ax_cxx_compile_stdcxx_11.m4         |  133 +++++++++++++++++++++
 configure.ac                                      |    4 +-
 m4/ax_cxx_compile_stdcxx_11.m4                    |  133 +++++++++++++++++++++
 src/engine/db/filebundle.cpp                      |    2 +-
 src/engine/db/filebundle.hpp                      |    8 +-
 src/engine/db/library.cpp                         |   10 +-
 src/engine/db/library.hpp                         |    8 +-
 src/engine/library/commands.cpp                   |   13 +-
 src/engine/library/op.cpp                         |    2 +-
 src/engine/library/op.hpp                         |    8 +-
 src/engine/library/thumbnailcache.cpp             |    6 +-
 src/engine/library/thumbnailcache.hpp             |    8 +-
 src/fwk/toolkit/application.cpp                   |   12 +-
 src/fwk/toolkit/application.hpp                   |    4 +-
 src/fwk/toolkit/command.hpp                       |   14 +-
 src/fwk/toolkit/controller.cpp                    |    7 +-
 src/fwk/toolkit/controller.hpp                    |   10 +-
 src/fwk/toolkit/dialog.cpp                        |    2 +-
 src/fwk/toolkit/dialog.hpp                        |    4 +-
 src/fwk/toolkit/frame.cpp                         |   40 +++----
 src/fwk/toolkit/frame.hpp                         |    9 +-
 src/fwk/toolkit/notificationcenter.hpp            |    6 +-
 src/fwk/toolkit/uicontroller.hpp                  |    4 +-
 src/fwk/toolkit/undo.cpp                          |   33 ++---
 src/fwk/utils/databinder.hpp                      |    1 -
 src/libraryclient/libraryclient.hpp               |    6 +-
 src/niepce/modules/darkroom/darkroommodule.hpp    |    4 +-
 src/niepce/modules/darkroom/toolboxcontroller.hpp |    4 +-
 src/niepce/notificationcenter.hpp                 |    6 +-
 src/niepce/ui/dialogs/editlabels.cpp              |   12 +-
 src/niepce/ui/dialogs/editlabels.hpp              |   12 +-
 src/niepce/ui/dialogs/preferencesdialog.cpp       |    9 +-
 src/niepce/ui/filmstripcontroller.hpp             |    6 +-
 src/niepce/ui/gridviewmodule.hpp                  |    4 +-
 src/niepce/ui/ilibrarymodule.hpp                  |    6 +-
 src/niepce/ui/imageliststore.cpp                  |    4 +-
 src/niepce/ui/metadatapanecontroller.hpp          |    4 +-
 src/niepce/ui/moduleshell.cpp                     |    2 +-
 src/niepce/ui/moduleshell.hpp                     |    6 +-
 src/niepce/ui/niepceapplication.cpp               |    2 +-
 src/niepce/ui/niepcewindow.cpp                    |    2 +-
 src/niepce/ui/selectioncontroller.cpp             |   30 +++---
 src/niepce/ui/selectioncontroller.hpp             |    4 +-
 src/niepce/ui/workspacecontroller.cpp             |    2 +-
 src/niepce/ui/workspacecontroller.hpp             |    8 +-
 48 files changed, 439 insertions(+), 185 deletions(-)
---
diff --git a/README b/README
index bdb7b7b..aae8716 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ This software is licensed under GPL version 3. See file
 COPYING for details.
 Some files maybe under GPL version 2 or later.
 
-(c) 2006-2012 Hubert Figuière
+(c) 2006-2013 Hubert Figuière
 Some portions are written by other people.
 
 What is this?
@@ -18,7 +18,7 @@ It is currently work in progress.
 To build is you need the following:
 -----------------------------------
 
-A C++ compiler
+A C++11 compiler
 gtk+ 3.2
 cairo 1.1
 glibmm 2.32
diff --git a/camerawire/README b/camerawire/README
index 4e9701d..5283571 100644
--- a/camerawire/README
+++ b/camerawire/README
@@ -23,7 +23,7 @@ It is currently work in progress.
 To build is you need the following:
 -----------------------------------
 
-A C++ compiler
+A C++11 compiler
 gtk+ 2.8
 cairo 1.1
 gtkmm 2.12
diff --git a/camerawire/configure.ac b/camerawire/configure.ac
index 7fd7b19..50d92c3 100644
--- a/camerawire/configure.ac
+++ b/camerawire/configure.ac
@@ -35,6 +35,7 @@ BOOST_VERSION=1.34
 
 AC_PROG_CXX
 AC_GNU_SOURCE
+AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
 
 AC_ARG_ENABLE(debug,[  --enable-debug    Turn on debugging],[
         case "${enableval}" in
@@ -83,11 +84,8 @@ AC_SUBST(GEGLMM_LIBS)
 
 
 BOOST_REQUIRE([$BOOST_VERSION])
-BOOST_BIND
 BOOST_CONVERSION
 BOOST_FORMAT
-BOOST_FUNCTION
-BOOST_SMART_PTR
 BOOST_TEST([s])
 
 AC_LANG_PUSH(C++)
diff --git a/camerawire/m4/ax_cxx_compile_stdcxx_11.m4 b/camerawire/m4/ax_cxx_compile_stdcxx_11.m4
new file mode 100644
index 0000000..af37acd
--- /dev/null
+++ b/camerawire/m4/ax_cxx_compile_stdcxx_11.m4
@@ -0,0 +1,133 @@
+# ============================================================================
+#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
+# ============================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
+#
+# DESCRIPTION
+#
+#   Check for baseline language coverage in the compiler for the C++11
+#   standard; if necessary, add switches to CXXFLAGS to enable support.
+#
+#   The first argument, if specified, indicates whether you insist on an
+#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+#   -std=c++11).  If neither is specified, you get whatever works, with
+#   preference for an extended mode.
+#
+#   The second argument, if specified 'mandatory' or if left unspecified,
+#   indicates that baseline C++11 support is required and that the macro
+#   should error out if no mode with that support is found.  If specified
+#   'optional', then configuration proceeds regardless, after defining
+#   HAVE_CXX11 if and only if a supporting mode is found.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Benjamin Kosnik <bkoz redhat com>
+#   Copyright (c) 2012 Zack Weinberg <zackw panix com>
+#   Copyright (c) 2013 Roy Stogner <roystgnr ices utexas edu>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 3
+
+m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = static_cast<check_type&&>(c);
+
+    auto d = a;
+])
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
+  m4_if([$1], [], [],
+        [$1], [ext], [],
+        [$1], [noext], [],
+        [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
+  m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
+        [$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
+        [$2], [optional], [ax_cxx_compile_cxx11_required=false],
+        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl
+  AC_LANG_PUSH([C++])dnl
+  ac_success=no
+  AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
+  ax_cv_cxx_compile_cxx11,
+  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+    [ax_cv_cxx_compile_cxx11=yes],
+    [ax_cv_cxx_compile_cxx11=no])])
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
+
+  m4_if([$1], [noext], [], [dnl
+  if test x$ac_success = xno; then
+    for switch in -std=gnu++11 -std=gnu++0x; do
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
+                     $cachevar,
+        [ac_save_CXXFLAGS="$CXXFLAGS"
+         CXXFLAGS="$CXXFLAGS $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXXFLAGS="$ac_save_CXXFLAGS"])
+      if eval test x\$$cachevar = xyes; then
+        CXXFLAGS="$CXXFLAGS $switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+
+  m4_if([$1], [ext], [], [dnl
+  if test x$ac_success = xno; then
+    for switch in -std=c++11 -std=c++0x; do
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
+                     $cachevar,
+        [ac_save_CXXFLAGS="$CXXFLAGS"
+         CXXFLAGS="$CXXFLAGS $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXXFLAGS="$ac_save_CXXFLAGS"])
+      if eval test x\$$cachevar = xyes; then
+        CXXFLAGS="$CXXFLAGS $switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+  AC_LANG_POP([C++])
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
+    fi
+  else
+    if test x$ac_success = xno; then
+      HAVE_CXX11=0
+      AC_MSG_NOTICE([No compiler with C++11 support was found])
+    else
+      HAVE_CXX11=1
+      AC_DEFINE(HAVE_CXX11,1,
+                [define if the compiler supports basic C++11 syntax])
+    fi
+
+    AC_SUBST(HAVE_CXX11)
+  fi
+])
diff --git a/configure.ac b/configure.ac
index d5bcdaa..3fc19e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@ BOOST_VERSION=1.34
 
 AC_PROG_CXX
 AC_GNU_SOURCE
+AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
 
 AC_ARG_ENABLE(debug,[  --enable-debug    Turn on debugging],[
         case "${enableval}" in
@@ -81,11 +82,8 @@ AC_SUBST(GEGL_LIBS)
 
 
 BOOST_REQUIRE([$BOOST_VERSION])
-BOOST_BIND
 BOOST_CONVERSION
 BOOST_FORMAT
-BOOST_FUNCTION
-BOOST_SMART_PTR
 BOOST_TEST([s])
 
 AC_LANG_PUSH(C++)
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4
new file mode 100644
index 0000000..af37acd
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx_11.m4
@@ -0,0 +1,133 @@
+# ============================================================================
+#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
+# ============================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
+#
+# DESCRIPTION
+#
+#   Check for baseline language coverage in the compiler for the C++11
+#   standard; if necessary, add switches to CXXFLAGS to enable support.
+#
+#   The first argument, if specified, indicates whether you insist on an
+#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+#   -std=c++11).  If neither is specified, you get whatever works, with
+#   preference for an extended mode.
+#
+#   The second argument, if specified 'mandatory' or if left unspecified,
+#   indicates that baseline C++11 support is required and that the macro
+#   should error out if no mode with that support is found.  If specified
+#   'optional', then configuration proceeds regardless, after defining
+#   HAVE_CXX11 if and only if a supporting mode is found.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Benjamin Kosnik <bkoz redhat com>
+#   Copyright (c) 2012 Zack Weinberg <zackw panix com>
+#   Copyright (c) 2013 Roy Stogner <roystgnr ices utexas edu>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 3
+
+m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = static_cast<check_type&&>(c);
+
+    auto d = a;
+])
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
+  m4_if([$1], [], [],
+        [$1], [ext], [],
+        [$1], [noext], [],
+        [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
+  m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
+        [$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
+        [$2], [optional], [ax_cxx_compile_cxx11_required=false],
+        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl
+  AC_LANG_PUSH([C++])dnl
+  ac_success=no
+  AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
+  ax_cv_cxx_compile_cxx11,
+  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+    [ax_cv_cxx_compile_cxx11=yes],
+    [ax_cv_cxx_compile_cxx11=no])])
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
+
+  m4_if([$1], [noext], [], [dnl
+  if test x$ac_success = xno; then
+    for switch in -std=gnu++11 -std=gnu++0x; do
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
+                     $cachevar,
+        [ac_save_CXXFLAGS="$CXXFLAGS"
+         CXXFLAGS="$CXXFLAGS $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXXFLAGS="$ac_save_CXXFLAGS"])
+      if eval test x\$$cachevar = xyes; then
+        CXXFLAGS="$CXXFLAGS $switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+
+  m4_if([$1], [ext], [], [dnl
+  if test x$ac_success = xno; then
+    for switch in -std=c++11 -std=c++0x; do
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
+                     $cachevar,
+        [ac_save_CXXFLAGS="$CXXFLAGS"
+         CXXFLAGS="$CXXFLAGS $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+          [eval $cachevar=yes],
+          [eval $cachevar=no])
+         CXXFLAGS="$ac_save_CXXFLAGS"])
+      if eval test x\$$cachevar = xyes; then
+        CXXFLAGS="$CXXFLAGS $switch"
+        ac_success=yes
+        break
+      fi
+    done
+  fi])
+  AC_LANG_POP([C++])
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
+    fi
+  else
+    if test x$ac_success = xno; then
+      HAVE_CXX11=0
+      AC_MSG_NOTICE([No compiler with C++11 support was found])
+    else
+      HAVE_CXX11=1
+      AC_DEFINE(HAVE_CXX11,1,
+                [define if the compiler supports basic C++11 syntax])
+    fi
+
+    AC_SUBST(HAVE_CXX11)
+  fi
+])
diff --git a/src/engine/db/filebundle.cpp b/src/engine/db/filebundle.cpp
index b513623..192f80a 100644
--- a/src/engine/db/filebundle.cpp
+++ b/src/engine/db/filebundle.cpp
@@ -80,7 +80,7 @@ FileBundle::filter_bundles(const fwk::FileList::Ptr & files)
 
     files->sort();
 
-    for(fwk::FileList::const_iterator iter = files->begin();
+    for(auto iter = files->begin();
         iter != files->end(); ++iter)
     {
         std::string basename = fwk::path_stem(*iter);
diff --git a/src/engine/db/filebundle.hpp b/src/engine/db/filebundle.hpp
index d241051..19ff4df 100644
--- a/src/engine/db/filebundle.hpp
+++ b/src/engine/db/filebundle.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - engine/db/filebundle.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 
 #include <list>
 #include <string>
-#include <tr1/memory>
+#include <memory>
 
 #include "fwk/utils/files.hpp"
 #include "engine/db/libfile.hpp"
@@ -33,9 +33,9 @@ namespace eng {
 class FileBundle
 {
 public:
-    typedef std::tr1::shared_ptr<FileBundle> Ptr;
+    typedef std::shared_ptr<FileBundle> Ptr;
     typedef std::list<Ptr> List;
-    typedef std::tr1::shared_ptr<List> ListPtr;
+    typedef std::shared_ptr<List> ListPtr;
 
     FileBundle()
         : m_type(LibFile::FILE_TYPE_UNKNOWN)
diff --git a/src/engine/db/library.cpp b/src/engine/db/library.cpp
index f97541c..76f2eac 100644
--- a/src/engine/db/library.cpp
+++ b/src/engine/db/library.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - engine/db/library.cpp
  *
- * Copyright (C) 2007-2009,2011 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,11 +19,12 @@
 
 #include <time.h>
 #include <stdio.h>
+
 #include <iostream>
+#include <functional>
 
 #include <boost/lexical_cast.hpp>
 #include <boost/format.hpp>
-#include <boost/bind.hpp>
 
 #include <glibmm/i18n.h>
 
@@ -63,7 +64,7 @@ Library::Library(const std::string & dir, const NotificationCenter::Ptr & nc)
     m_inited = init();
 
     m_dbdrv->create_function0("rewrite_xmp",
-                              boost::bind(&Library::triggerRewriteXmp,
+                              std::bind(&Library::triggerRewriteXmp,
                                           this));
 }
 
@@ -968,8 +969,9 @@ bool Library::processXmpUpdateQueue(bool write_xmp)
     std::vector<library_id_t> ids;
     retval = getXmpIdsInQueue(ids);
     if(retval) {
+        using std::placeholders::_1;
         std::for_each(ids.begin(), ids.end(),
-                     boost::bind(&Library::rewriteXmpForId,
+                     std::bind(&Library::rewriteXmpForId,
                                  this, _1, write_xmp));
     }
     return retval;
diff --git a/src/engine/db/library.hpp b/src/engine/db/library.hpp
index 7c82366..dc63aa0 100644
--- a/src/engine/db/library.hpp
+++ b/src/engine/db/library.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - engine/db/library.h
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 
 #include <string>
 
-#include <tr1/memory>
+#include <memory>
 #include <boost/any.hpp>
 
 #include "fwk/toolkit/notificationcenter.hpp"
@@ -51,7 +51,7 @@ namespace eng {
 class Library
 {
 public:
-    typedef std::tr1::shared_ptr<Library> Ptr;
+    typedef std::shared_ptr<Library> Ptr;
 
     typedef enum {
         NOTIFY_NONE = 0,
@@ -216,7 +216,7 @@ private:
     std::string                       m_dbname;
     db::IConnectionManagerDriver::Ptr m_dbmgr;
     db::IConnectionDriver::Ptr        m_dbdrv;
-    std::tr1::weak_ptr<fwk::NotificationCenter>  m_notif_center;
+    std::weak_ptr<fwk::NotificationCenter>  m_notif_center;
     bool                              m_inited;
 };
 
diff --git a/src/engine/library/commands.cpp b/src/engine/library/commands.cpp
index d945f62..7d7c0fa 100644
--- a/src/engine/library/commands.cpp
+++ b/src/engine/library/commands.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - library/commands.cpp
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,13 +18,11 @@
  */
 
 
-#include <tr1/array>
+#include <array>
+#include <functional>
 
 #include <boost/any.hpp>
-#include <boost/bind.hpp>
 
-
-#include "fwk/utils/boost.hpp"
 #include "fwk/base/debug.hpp"
 #include "engine/db/library.hpp"
 #include "engine/db/libfolder.hpp"
@@ -75,11 +73,12 @@ void Commands::cmdImportFiles(const Library::Ptr & lib,
         lib->notify(Library::NOTIFY_ADDED_FOLDERS,
                     boost::any(l));
     }
+    using std::placeholders::_1;
     std::for_each( bundles->begin(), bundles->end(),
-                   bind(&Library::addBundle, boost::ref(lib),
+                   std::bind(&Library::addBundle, std::ref(lib),
                         pf->id(), _1, manage) );
     lib->notify(Library::NOTIFY_ADDED_FILES,
-                boost::any()); 
+                boost::any());
 }
 
 
diff --git a/src/engine/library/op.cpp b/src/engine/library/op.cpp
index 4863984..d3afaa1 100644
--- a/src/engine/library/op.cpp
+++ b/src/engine/library/op.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - engine/library/op.cpp
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/engine/library/op.hpp b/src/engine/library/op.hpp
index 7f697d5..841fec0 100644
--- a/src/engine/library/op.hpp
+++ b/src/engine/library/op.hpp
@@ -21,8 +21,8 @@
 #ifndef __NIEPCE_LIBRARY_OP_H__
 #define __NIEPCE_LIBRARY_OP_H__
 
-#include <tr1/memory>
-#include <boost/function.hpp>
+#include <memory>
+#include <functional>
 
 #include "engine/library/clienttypes.hpp"
 #include "engine/db/library.hpp"
@@ -33,8 +33,8 @@ namespace eng {
        class Op
        {
        public:
-               typedef std::tr1::shared_ptr< Op > Ptr;
-               typedef boost::function<void (const Library::Ptr &)> function_t;
+               typedef std::shared_ptr< Op > Ptr;
+               typedef std::function<void (const Library::Ptr &)> function_t;
 
                Op(tid_t id, const function_t & func);
 
diff --git a/src/engine/library/thumbnailcache.cpp b/src/engine/library/thumbnailcache.cpp
index 1fa87c8..665ae41 100644
--- a/src/engine/library/thumbnailcache.cpp
+++ b/src/engine/library/thumbnailcache.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - library/thumbnailcache.cpp
  *
- * Copyright (C) 2007-2008,2011 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
 #include <string.h>
 
 #include <functional>
-#include <boost/bind.hpp>
 #include <boost/any.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/format.hpp>
@@ -54,8 +53,9 @@ ThumbnailCache::~ThumbnailCache()
 void ThumbnailCache::request(const LibFile::ListPtr & fl)
 {
     clear();
+    using std::placeholders::_1;
     std::for_each(fl->begin(), fl->end(),
-                  boost::bind(&ThumbnailCache::requestForFile, this, 
+                  std::bind(&ThumbnailCache::requestForFile, this,
                               _1));
 }
 
diff --git a/src/engine/library/thumbnailcache.hpp b/src/engine/library/thumbnailcache.hpp
index de3b9eb..6663112 100644
--- a/src/engine/library/thumbnailcache.hpp
+++ b/src/engine/library/thumbnailcache.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - library/thumbnailcache.h
  *
- * Copyright (C) 2007,2011 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 #ifndef _LIBRARY_THUMBNAILCACHE_H__
 #define _LIBRARY_THUMBNAILCACHE_H__
 
-#include <tr1/memory>
+#include <memory>
 
 #include "fwk/utils/worker.hpp"
 #include "fwk/toolkit/notificationcenter.hpp"
@@ -33,7 +33,7 @@ namespace eng {
 class ThumbnailTask
 {
 public:
-    typedef std::tr1::shared_ptr< ThumbnailTask > Ptr;
+    typedef std::shared_ptr< ThumbnailTask > Ptr;
                
     ThumbnailTask(const LibFile::Ptr & f, int w, int h)
         : m_file(f), m_width(w), m_height(h)
@@ -69,7 +69,7 @@ protected:
     virtual void execute(const  ThumbnailTask::Ptr & task);
 private:
     std::string                                 m_cacheDir;
-    std::tr1::weak_ptr<fwk::NotificationCenter> m_notif_center;
+    std::weak_ptr<fwk::NotificationCenter> m_notif_center;
 
     std::string path_for_thumbnail(const std::string & filename, library_id_t id, int size) const;
     std::string dir_for_thumbnail(int size) const;
diff --git a/src/fwk/toolkit/application.cpp b/src/fwk/toolkit/application.cpp
index 9c88413..c0993ee 100644
--- a/src/fwk/toolkit/application.cpp
+++ b/src/fwk/toolkit/application.cpp
@@ -18,8 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
+#include <functional>
 #include <boost/lexical_cast.hpp>
 
 #include <glibmm/i18n.h>
@@ -28,7 +27,7 @@
 #include <gtkmm/settings.h>
 
 #include "fwk/base/debug.hpp"
-#include "fwk/utils/boost.hpp"
+//#include "fwk/utils/boost.hpp"
 #include "fwk/utils/modulemanager.hpp"
 #include "application.hpp"
 #include "uicontroller.hpp"
@@ -109,10 +108,11 @@ int Application::main(const Application::Ptr & app,
 
 void Application::terminate()
 {
+    using std::placeholders::_1;
     std::for_each(m_subs.begin(), m_subs.end(),
-                  boost::bind(&Controller::terminate, _1));
+                  std::bind(&Controller::terminate, _1));
     std::for_each(m_subs.begin(), m_subs.end(),
-                  boost::bind(&Controller::clearParent, _1));
+                  std::bind(&Controller::clearParent, _1));
     m_subs.clear();
 }
 
@@ -139,7 +139,7 @@ void Application::add(const Controller::Ptr & sub)
 void Application::_add(const Controller::Ptr & sub, bool attach)
 {
     Controller::add(sub);
-    UiController::Ptr uictrl = std::tr1::dynamic_pointer_cast<UiController>(sub);
+    UiController::Ptr uictrl = std::dynamic_pointer_cast<UiController>(sub);
     if(uictrl) {
         Gtk::Widget *w = uictrl->buildWidget(uiManager());
         Gtk::Window *win = NULL;
diff --git a/src/fwk/toolkit/application.hpp b/src/fwk/toolkit/application.hpp
index b427314..6a826c8 100644
--- a/src/fwk/toolkit/application.hpp
+++ b/src/fwk/toolkit/application.hpp
@@ -21,7 +21,7 @@
 #ifndef _FRAMEWORK_APPLICATION_H_
 #define _FRAMEWORK_APPLICATION_H_
 
-#include <boost/function.hpp>
+#include <functional>
 
 #include <glibmm/refptr.h>
 #include <gtkmm/application.h>
@@ -41,7 +41,7 @@ class Application
     : public Controller
 {
 public:
-    typedef std::tr1::shared_ptr<Application> Ptr;
+    typedef std::shared_ptr<Application> Ptr;
     typedef std::pair<std::string, std::string> ThemeDesc;
 
     virtual ~Application();
diff --git a/src/fwk/toolkit/command.hpp b/src/fwk/toolkit/command.hpp
index 045ad8e..b577d58 100644
--- a/src/fwk/toolkit/command.hpp
+++ b/src/fwk/toolkit/command.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/command.h
  *
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 #ifndef __FWK_COMMAND_H_
 #define __FWK_COMMAND_H_
 
-#include <boost/function.hpp>
+#include <functional>
 
 namespace fwk {
 
@@ -29,7 +29,7 @@ class Command
 {
 public:
        virtual ~Command() {}
-    typedef boost::function<void (void)> Function;
+    typedef std::function<void (void)> Function;
     virtual void undo() = 0;
     virtual void redo() = 0;
 };
@@ -39,8 +39,8 @@ class CommandWithArg
     : public Command
 {
 public:
-    typedef boost::function<void (_ArgType)> UndoFunction;
-    typedef boost::function<_ArgType (void)> RedoFunction;
+    typedef std::function<void (_ArgType)> UndoFunction;
+    typedef std::function<_ArgType (void)> RedoFunction;
     CommandWithArg(const RedoFunction & _redo,
                    const UndoFunction & _undo)
         : m_redo(_redo)
@@ -67,8 +67,8 @@ class CommandWithArg<void>
     : public Command
 {
 public:
-    typedef boost::function<void (void)> UndoFunction;
-    typedef boost::function<void (void)> RedoFunction;
+    typedef std::function<void (void)> UndoFunction;
+    typedef std::function<void (void)> RedoFunction;
     CommandWithArg(const RedoFunction & _redo,
                    const UndoFunction & _undo)
         : m_redo(_redo)
diff --git a/src/fwk/toolkit/controller.cpp b/src/fwk/toolkit/controller.cpp
index efa1b79..55e8124 100644
--- a/src/fwk/toolkit/controller.cpp
+++ b/src/fwk/toolkit/controller.cpp
@@ -17,12 +17,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <boost/bind.hpp>
+#include <functional>
 
 #include <gtkmm/widget.h>
 
 #include "fwk/base/debug.hpp"
-#include "fwk/utils/boost.hpp"
 #include "controller.hpp"
 
 
@@ -72,8 +71,10 @@ void Controller::_added()
 
 void Controller::_ready()
 {
+    using std::placeholders::_1;
+
     std::for_each(m_subs.begin(), m_subs.end(),
-                  boost::bind(&Controller::_ready, _1));
+                  std::bind(&Controller::_ready, _1));
     on_ready();
 }
 
diff --git a/src/fwk/toolkit/controller.hpp b/src/fwk/toolkit/controller.hpp
index 1c21fcc..cd84b78 100644
--- a/src/fwk/toolkit/controller.hpp
+++ b/src/fwk/toolkit/controller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - framework/controller.h
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 
 
 #include <list>
-#include <tr1/memory>
+#include <memory>
 
 #include <sigc++/trackable.h>
 
@@ -36,12 +36,12 @@ namespace fwk {
 /** Generic controller class
  */
 class Controller
-    : public std::tr1::enable_shared_from_this<Controller>
+    : public std::enable_shared_from_this<Controller>
     , public sigc::trackable
 {
 public:
-               typedef std::tr1::shared_ptr<Controller> Ptr;
-               typedef std::tr1::weak_ptr<Controller> WeakPtr;
+               typedef std::shared_ptr<Controller> Ptr;
+               typedef std::weak_ptr<Controller> WeakPtr;
 
                Controller();
                virtual ~Controller();
diff --git a/src/fwk/toolkit/dialog.cpp b/src/fwk/toolkit/dialog.cpp
index 3609414..0318c63 100644
--- a/src/fwk/toolkit/dialog.cpp
+++ b/src/fwk/toolkit/dialog.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/toolkit/dialog.cpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/fwk/toolkit/dialog.hpp b/src/fwk/toolkit/dialog.hpp
index 56ef3ff..86bd258 100644
--- a/src/fwk/toolkit/dialog.hpp
+++ b/src/fwk/toolkit/dialog.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/toolkit/dialog.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ class Dialog
        : public fwk::Frame
 {
 public:
-    typedef std::tr1::shared_ptr<Dialog> Ptr;
+    typedef std::shared_ptr<Dialog> Ptr;
 
                Dialog(const std::string & gladeFile, const Glib::ustring & widgetName,
           const std::string & layout_cfg_key = "")
diff --git a/src/fwk/toolkit/frame.cpp b/src/fwk/toolkit/frame.cpp
index 516ff01..36788ad 100644
--- a/src/fwk/toolkit/frame.cpp
+++ b/src/fwk/toolkit/frame.cpp
@@ -19,7 +19,7 @@
 
 #include <list>
 #include <vector>
-#include <boost/bind.hpp>
+#include <functional>
 
 #include <glibmm/i18n.h>
 #include <gtkmm/dialog.h>
@@ -78,26 +78,24 @@ Frame::~Frame()
 
 void Frame::set_icon_from_theme(const Glib::ustring & name)
 {
-               using Glib::RefPtr;
-               using Gtk::IconTheme;
-               using std::vector;
-               using std::list;
-               
-               RefPtr< IconTheme > icon_theme(Application::app()->getIconTheme());
-               vector<int> icon_sizes(icon_theme->get_icon_sizes(name));
-               
-               vector< RefPtr <Gdk::Pixbuf> > icons;
-
-               for_each(icon_sizes.begin(), icon_sizes.end(),
-             // store the icon
-             bind(&std::vector< RefPtr<Gdk::Pixbuf> >::push_back, 
-                  boost::ref(icons), 
-                  // load the icon
-                  bind( &IconTheme::load_icon, 
-                        boost::ref(icon_theme), 
-                        boost::ref(name), _1, 
-                        Gtk::ICON_LOOKUP_USE_BUILTIN)));
-               gtkWindow().set_icon_list(icons);
+    using Glib::RefPtr;
+    using Gtk::IconTheme;
+    using std::vector;
+    using std::list;
+
+    RefPtr< IconTheme > icon_theme(Application::app()->getIconTheme());
+    vector<int> icon_sizes(icon_theme->get_icon_sizes(name));
+
+    vector< RefPtr <Gdk::Pixbuf> > icons;
+
+    for_each(icon_sizes.begin(), icon_sizes.end(),
+             [&icons, icon_theme, name](int s) {
+                 icons.push_back(
+                     icon_theme->load_icon(name, s,
+                                           Gtk::ICON_LOOKUP_USE_BUILTIN));
+             }
+        );
+    gtkWindow().set_icon_list(icons);
 }
 
 void Frame::set_title(const std::string & title)
diff --git a/src/fwk/toolkit/frame.hpp b/src/fwk/toolkit/frame.hpp
index 0f07f8e..6f4713f 100644
--- a/src/fwk/toolkit/frame.hpp
+++ b/src/fwk/toolkit/frame.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/toolkit/frame.hpp
  *
- * Copyright (C) 2007-2008 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,8 +21,9 @@
 #ifndef _FRAMEWORK_FRAME_H_
 #define _FRAMEWORK_FRAME_H_
 
+#include <memory>
 #include <string>
-#include <boost/function.hpp>
+#include <functional>
 
 #include <sigc++/signal.h>
 #include <gtkmm/toggleaction.h>
@@ -40,7 +41,7 @@ class Frame
                : public UiController
 {
 public:
-               typedef std::tr1::shared_ptr<Frame> Ptr;
+               typedef std::shared_ptr<Frame> Ptr;
 
                Frame(const std::string & gladeFile, const Glib::ustring & widgetName,
           const std::string & layout_cfg_key = "");
@@ -50,7 +51,7 @@ public:
     /** convenience to return the Frame::Ptr from this */
     Ptr shared_frame_ptr()
         {
-            return std::tr1::static_pointer_cast<Frame>(shared_from_this());
+            return std::static_pointer_cast<Frame>(shared_from_this());
         }
 
                Gtk::Window & gtkWindow()
diff --git a/src/fwk/toolkit/notificationcenter.hpp b/src/fwk/toolkit/notificationcenter.hpp
index 237d9c5..865cd85 100644
--- a/src/fwk/toolkit/notificationcenter.hpp
+++ b/src/fwk/toolkit/notificationcenter.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/toolkit/notification.hpp
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 #ifndef __FWK_NOTIFICATIONCENTER_H__
 #define __FWK_NOTIFICATIONCENTER_H__
 
-#include <tr1/memory>
+#include <memory>
 
 #include "fwk/toolkit/notification.hpp"
 
@@ -31,7 +31,7 @@ class NotificationCenter
     : public sigc::trackable
 {
 public:
-    typedef std::tr1::shared_ptr< NotificationCenter > Ptr;
+    typedef std::shared_ptr< NotificationCenter > Ptr;
     typedef sigc::slot<void, Notification::Ptr> subscriber_t;
 
     NotificationCenter();
diff --git a/src/fwk/toolkit/uicontroller.hpp b/src/fwk/toolkit/uicontroller.hpp
index 75d8873..c019980 100644
--- a/src/fwk/toolkit/uicontroller.hpp
+++ b/src/fwk/toolkit/uicontroller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - fwk/toolkit/uicontroller.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ class UiController
   : public Controller
 {
 public:
-    typedef std::tr1::shared_ptr<UiController> Ptr;
+    typedef std::shared_ptr<UiController> Ptr;
 
     UiController();
     virtual ~UiController();
diff --git a/src/fwk/toolkit/undo.cpp b/src/fwk/toolkit/undo.cpp
index aac7a25..b1869fd 100644
--- a/src/fwk/toolkit/undo.cpp
+++ b/src/fwk/toolkit/undo.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - framework/undo.cpp
  *
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,8 @@
  */
 
 
-#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
 #include <boost/checked_delete.hpp>
 
 #include "fwk/base/debug.hpp"
@@ -34,8 +35,9 @@ UndoTransaction::UndoTransaction(const std::string & n)
 
 UndoTransaction::~UndoTransaction()
 {
+    using std::placeholders::_1;
     std::for_each(m_operations.begin(), m_operations.end(),
-                  boost::bind(&boost::checked_delete<Command>, _1));
+                  std::bind(&boost::checked_delete<Command>, _1));
 }
 
 
@@ -47,27 +49,17 @@ void UndoTransaction::add(Command * cmd)
 void UndoTransaction::undo()
 {
     DBG_OUT("undo transaction %lu cmd", (unsigned long)m_operations.size());
-// I have no idea why this do not work
-//    std::for_each(m_operations.rbegin(), m_operations.rend(),
-//                  boost::bind(&Command::undo, _1));
-    for(std::list<Command *>::reverse_iterator iter = m_operations.rbegin();
-        iter != m_operations.rend(); iter++)
-    {
-        (*iter)->undo();
-    }
+    using std::placeholders::_1;
+    std::for_each(m_operations.rbegin(), m_operations.rend(),
+                  std::bind(&Command::undo, _1));
 }
 
 void UndoTransaction::redo()
 {
     DBG_OUT("redo transaction %lu cmd", (unsigned long)m_operations.size());
-// I have no idea why this do not work
-//    std::for_each(m_operations.begin(), m_operations.end(),
-//                  boost::bind(&Command::redo, _1));
-    for(std::list<Command *>::iterator iter = m_operations.begin();
-        iter != m_operations.end(); iter++)
-    {
-        (*iter)->redo();
-    }
+    using std::placeholders::_1;
+    std::for_each(m_operations.begin(), m_operations.end(),
+                  std::bind(&Command::redo, _1));
 }
 
 UndoHistory::~UndoHistory()
@@ -145,8 +137,9 @@ std::string UndoHistory::next_redo() const
        
 void UndoHistory::clear(std::list<UndoTransaction*> & l)
 {
+    using std::placeholders::_1;
     std::for_each(l.begin(), l.end(), 
-                  boost::bind(&boost::checked_delete<UndoTransaction>, _1));
+                  std::bind(&boost::checked_delete<UndoTransaction>, _1));
     l.clear();
 }
 
diff --git a/src/fwk/utils/databinder.hpp b/src/fwk/utils/databinder.hpp
index c099b17..1df093a 100644
--- a/src/fwk/utils/databinder.hpp
+++ b/src/fwk/utils/databinder.hpp
@@ -27,7 +27,6 @@
 
 #include <boost/utility.hpp>
 
-
 namespace fwk {
 
 /** @brief the base class for all the data binders */
diff --git a/src/libraryclient/libraryclient.hpp b/src/libraryclient/libraryclient.hpp
index e5022c0..35f8dca 100644
--- a/src/libraryclient/libraryclient.hpp
+++ b/src/libraryclient/libraryclient.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - libraryclient/libraryclient.hpp
  *
- * Copyright (C) 2007-2009,2012 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 #define _LIBRARYCLIENT_H_
 
 #include <string>
-#include <tr1/memory>
+#include <memory>
 
 #include "fwk/base/propertybag.hpp"
 #include "engine/library/clienttypes.hpp"
@@ -44,7 +44,7 @@ class LibraryClient
     : public eng::Storage
 {
 public:
-    typedef std::tr1::shared_ptr< LibraryClient > Ptr;
+    typedef std::shared_ptr< LibraryClient > Ptr;
     
     LibraryClient(const fwk::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
     virtual ~LibraryClient();
diff --git a/src/niepce/modules/darkroom/darkroommodule.hpp b/src/niepce/modules/darkroom/darkroommodule.hpp
index 98739b3..462fe6d 100644
--- a/src/niepce/modules/darkroom/darkroommodule.hpp
+++ b/src/niepce/modules/darkroom/darkroommodule.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - modules/darkroom/darkroommodule.h
  *
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ class DarkroomModule
     : public ui::ILibraryModule
 {
 public:
-    typedef std::tr1::shared_ptr<DarkroomModule> Ptr;
+    typedef std::shared_ptr<DarkroomModule> Ptr;
     
     DarkroomModule(const ui::IModuleShell & shell, 
                    const Glib::RefPtr<Gtk::ActionGroup> & action_group);
diff --git a/src/niepce/modules/darkroom/toolboxcontroller.hpp 
b/src/niepce/modules/darkroom/toolboxcontroller.hpp
index be8c89f..dac955d 100644
--- a/src/niepce/modules/darkroom/toolboxcontroller.hpp
+++ b/src/niepce/modules/darkroom/toolboxcontroller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - modules/darkroom/toolboxcontroller.h
  *
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ class ToolboxController
     : public fwk::Dockable
 {
 public:
-    typedef std::tr1::shared_ptr<ToolboxController> Ptr;
+    typedef std::shared_ptr<ToolboxController> Ptr;
     ToolboxController();
     virtual Gtk::Widget * buildWidget(const Glib::RefPtr<Gtk::UIManager> &);
 };
diff --git a/src/niepce/notificationcenter.hpp b/src/niepce/notificationcenter.hpp
index 2548c13..622137d 100644
--- a/src/niepce/notificationcenter.hpp
+++ b/src/niepce/notificationcenter.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - niepce/notificationcenter.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 #ifndef __NIEPCE_NOTIFICATIONCENTER_HPP_
 #define __NIEPCE_NOTIFICATIONCENTER_HPP_
 
-#include <tr1/memory>
+#include <memory>
 #include <sigc++/signal.h>
 
 #include "fwk/toolkit/notificationcenter.hpp"
@@ -36,7 +36,7 @@ class NotificationCenter
   : public fwk::NotificationCenter
 {
 public:
-  typedef std::tr1::shared_ptr<NotificationCenter> Ptr;
+  typedef std::shared_ptr<NotificationCenter> Ptr;
   NotificationCenter();
 
   sigc::signal<void, const eng::LibNotification &> signal_lib_notification;
diff --git a/src/niepce/ui/dialogs/editlabels.cpp b/src/niepce/ui/dialogs/editlabels.cpp
index 1402774..bbff78a 100644
--- a/src/niepce/ui/dialogs/editlabels.cpp
+++ b/src/niepce/ui/dialogs/editlabels.cpp
@@ -19,15 +19,14 @@
 
 
 #include <algorithm>
+#include <functional>
 
-#include <boost/bind.hpp>
 #include <boost/format.hpp>
 
 #include <glibmm/i18n.h>
 #include <gtkmm/entry.h>
 #include <gtkmm/label.h>
 
-#include "fwk/utils/boost.hpp"
 #include "fwk/base/debug.hpp"
 #include "fwk/toolkit/application.hpp"
 #include "fwk/toolkit/gdkutils.hpp"
@@ -119,18 +118,19 @@ void EditLabels::update_labels(int /*response*/)
                 std::string current_colour = m_labels[i]->colour().to_string();
 
                 undo->new_command<void>(
-                    boost::bind(&libraryclient::LibraryClient::updateLabel,
+                    std::bind(&libraryclient::LibraryClient::updateLabel,
                                 m_lib_client, m_labels[i]->id(), new_name,
                                 new_colour),
-                    boost::bind(&libraryclient::LibraryClient::updateLabel,
+                    std::bind(&libraryclient::LibraryClient::updateLabel,
                                 m_lib_client, m_labels[i]->id(), current_name,
                                 current_colour));
             }
             else {
+                using std::placeholders::_1;
                 undo->new_command<int>(
-                    boost::bind(&libraryclient::LibraryClient::createLabel,
+                    std::bind(&libraryclient::LibraryClient::createLabel,
                                 m_lib_client, new_name, new_colour),
-                    boost::bind(&libraryclient::LibraryClient::deleteLabel,
+                    std::bind(&libraryclient::LibraryClient::deleteLabel,
                                 m_lib_client, _1));
             }
         }
diff --git a/src/niepce/ui/dialogs/editlabels.hpp b/src/niepce/ui/dialogs/editlabels.hpp
index 2b86285..f5d77dc 100644
--- a/src/niepce/ui/dialogs/editlabels.hpp
+++ b/src/niepce/ui/dialogs/editlabels.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - niepce/ui/dialogs/editlabels.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 #ifndef __UI_EDITLABELS_HPP__
 #define __UI_EDITLABELS_HPP__
 
-#include <tr1/array>
+#include <array>
 
 #include <gtkmm/colorbutton.h>
 #include <gtkmm/entry.h>
@@ -38,7 +38,7 @@ class EditLabels
     : public fwk::Dialog
 {
 public:
-    typedef std::tr1::shared_ptr<EditLabels> Ptr;
+    typedef std::shared_ptr<EditLabels> Ptr;
     EditLabels(const libraryclient::LibraryClient::Ptr &);
 
     virtual void setup_widget();
@@ -47,9 +47,9 @@ private:
     void label_colour_changed(size_t idx);
     void update_labels(int /*response*/);
     const eng::Label::List            & m_labels;
-    std::tr1::array<Gtk::ColorButton*, 5> m_colours;
-    std::tr1::array<Gtk::Entry*, 5>   m_entries;
-    std::tr1::array<bool, 5>          m_status;
+    std::array<Gtk::ColorButton*, 5> m_colours;
+    std::array<Gtk::Entry*, 5>   m_entries;
+    std::array<bool, 5>          m_status;
     libraryclient::LibraryClient::Ptr m_lib_client;
 };
 
diff --git a/src/niepce/ui/dialogs/preferencesdialog.cpp b/src/niepce/ui/dialogs/preferencesdialog.cpp
index 4921538..0b4ade9 100644
--- a/src/niepce/ui/dialogs/preferencesdialog.cpp
+++ b/src/niepce/ui/dialogs/preferencesdialog.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/dialogs/preferencesdialog.cpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,14 +17,13 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <boost/bind.hpp>
+#include <functional>
 
 #include <glibmm/i18n.h>
 #include <gtkmm/combobox.h>
 #include <gtkmm/liststore.h>
 #include <gtkmm/checkbutton.h>
 
-#include "fwk/utils/boost.hpp"
 #include "fwk/toolkit/configdatabinder.hpp"
 #include "fwk/toolkit/application.hpp"
 #include "fwk/toolkit/gtkutils.hpp"
@@ -47,7 +46,7 @@ void PreferencesDialog::setup_widget()
     Gtk::CheckButton* write_xmp_checkbutton = NULL;
     fwk::DataBinderPool* binder_pool = new fwk::DataBinderPool();
 
-    gtkDialog().signal_hide().connect(boost::bind(&fwk::DataBinderPool::destroy, 
+    gtkDialog().signal_hide().connect(std::bind(&fwk::DataBinderPool::destroy,
                                               binder_pool));
                
     builder()->get_widget("dark_theme_checkbox", theme_checkbutton);
@@ -55,7 +54,7 @@ void PreferencesDialog::setup_widget()
     theme_checkbutton->set_active(fwk::Application::app()
                             ->get_use_dark_theme());
     theme_checkbutton->signal_toggled().connect(
-           boost::bind(&fwk::Application::set_use_dark_theme,
+           std::bind(&fwk::Application::set_use_dark_theme,
                        fwk::Application::app(),
                        theme_checkbutton->property_active()));
 
diff --git a/src/niepce/ui/filmstripcontroller.hpp b/src/niepce/ui/filmstripcontroller.hpp
index a189453..a5b4562 100644
--- a/src/niepce/ui/filmstripcontroller.hpp
+++ b/src/niepce/ui/filmstripcontroller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - niepce/ui/filmstripcontroller.h
  *
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -38,8 +38,8 @@ class FilmStripController
          public IImageSelectable
 {
 public:
-       typedef std::tr1::shared_ptr<FilmStripController> Ptr;
-       typedef std::tr1::weak_ptr<FilmStripController> WeakPtr;
+       typedef std::shared_ptr<FilmStripController> Ptr;
+       typedef std::weak_ptr<FilmStripController> WeakPtr;
 
        FilmStripController(const Glib::RefPtr<ImageListStore> & store);
 
diff --git a/src/niepce/ui/gridviewmodule.hpp b/src/niepce/ui/gridviewmodule.hpp
index ecec50a..6b77efd 100644
--- a/src/niepce/ui/gridviewmodule.hpp
+++ b/src/niepce/ui/gridviewmodule.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/gridviewmodule.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ class GridViewModule
     , public IImageSelectable
 {
 public:
-  typedef std::tr1::shared_ptr<GridViewModule> Ptr;
+  typedef std::shared_ptr<GridViewModule> Ptr;
 
   GridViewModule(const IModuleShell & shell,
                  const Glib::RefPtr<ImageListStore> & store);
diff --git a/src/niepce/ui/ilibrarymodule.hpp b/src/niepce/ui/ilibrarymodule.hpp
index 5fc64fe..8f6d9e2 100644
--- a/src/niepce/ui/ilibrarymodule.hpp
+++ b/src/niepce/ui/ilibrarymodule.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - niepce/ui/niepcelibrarymodule.hpp
  *
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 #define __NIEPCE_UI_ILIBRARYMODULE_HPP_
 
 #include <string>
-#include <tr1/memory>
+#include <memory>
 
 #include "fwk/toolkit/uicontroller.hpp"
 
@@ -33,7 +33,7 @@ class ILibraryModule
   : public fwk::UiController
 {
 public:
-  typedef std::tr1::shared_ptr<ILibraryModule> Ptr;
+  typedef std::shared_ptr<ILibraryModule> Ptr;
 
   /** dispatch action by name to the controller */
   virtual void dispatch_action(const std::string & action_name) = 0;
diff --git a/src/niepce/ui/imageliststore.cpp b/src/niepce/ui/imageliststore.cpp
index e94e52f..3f7b415 100644
--- a/src/niepce/ui/imageliststore.cpp
+++ b/src/niepce/ui/imageliststore.cpp
@@ -148,8 +148,8 @@ void ImageListStore::on_tnail_notification(const eng::ThumbnailNotification &tn)
 
 libraryclient::LibraryClient::Ptr ImageListStore::getLibraryClient()
 {
-    ModuleShell::Ptr shell = std::tr1::dynamic_pointer_cast<ModuleShell>(m_controller.lock());
-    DBG_ASSERT(shell, "parent not a ModuleShell");
+    ModuleShell::Ptr shell = std::dynamic_pointer_cast<ModuleShell>(m_controller.lock());
+    DBG_ASSERT(static_cast<bool>(shell), "parent not a ModuleShell");
     return     shell->getLibraryClient();
 }
 
diff --git a/src/niepce/ui/metadatapanecontroller.hpp b/src/niepce/ui/metadatapanecontroller.hpp
index cae35e0..dfc501e 100644
--- a/src/niepce/ui/metadatapanecontroller.hpp
+++ b/src/niepce/ui/metadatapanecontroller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/metadatapanecontroller.h
  *
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ class MetaDataPaneController
     : public fwk::Dockable
 {
 public:
-    typedef std::tr1::shared_ptr<MetaDataPaneController> Ptr;
+    typedef std::shared_ptr<MetaDataPaneController> Ptr;
     MetaDataPaneController();
     ~MetaDataPaneController();
     virtual Gtk::Widget * buildWidget(const Glib::RefPtr<Gtk::UIManager> &);
diff --git a/src/niepce/ui/moduleshell.cpp b/src/niepce/ui/moduleshell.cpp
index 4f98b20..3906abc 100644
--- a/src/niepce/ui/moduleshell.cpp
+++ b/src/niepce/ui/moduleshell.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - niepce/ui/moduleshell.cpp
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/niepce/ui/moduleshell.hpp b/src/niepce/ui/moduleshell.hpp
index 00f160a..cf5c2b2 100644
--- a/src/niepce/ui/moduleshell.hpp
+++ b/src/niepce/ui/moduleshell.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/moduleshell.hpp
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -43,8 +43,8 @@ class ModuleShell
     , public IModuleShell
 {
 public:
-    typedef std::tr1::shared_ptr<ModuleShell> Ptr;
-    typedef std::tr1::weak_ptr<ModuleShell> WeakPtr;
+    typedef std::shared_ptr<ModuleShell> Ptr;
+    typedef std::weak_ptr<ModuleShell> WeakPtr;
     
     ModuleShell(const libraryclient::LibraryClient::Ptr & libclient)
         : m_libraryclient(libclient)
diff --git a/src/niepce/ui/niepceapplication.cpp b/src/niepce/ui/niepceapplication.cpp
index 8311640..7959ec5 100644
--- a/src/niepce/ui/niepceapplication.cpp
+++ b/src/niepce/ui/niepceapplication.cpp
@@ -40,7 +40,7 @@ NiepceApplication::NiepceApplication(int & argc, char** & argv)
     fwk::ModuleManager * modmgr = module_manager();
     DBG_ASSERT(modmgr != NULL, "module manager is NULL.");
     // path for modules is $PREFIX/share/niepce/modules/$VERSION
-    modmgr->add_path(DATADIR"/"PACKAGE"/modules/"VERSION);
+    modmgr->add_path(DATADIR "/" PACKAGE "/modules/" VERSION);
 }
 
 Application::Ptr NiepceApplication::create(int & argc, char** & argv)
diff --git a/src/niepce/ui/niepcewindow.cpp b/src/niepce/ui/niepcewindow.cpp
index 4a5edd6..937250c 100644
--- a/src/niepce/ui/niepcewindow.cpp
+++ b/src/niepce/ui/niepcewindow.cpp
@@ -73,7 +73,7 @@ void
 NiepceWindow::_createModuleShell()
 {
     DBG_ASSERT(m_uimanager, "UI manager NULL");
-    DBG_ASSERT(m_libClient, "libclient not initialized");
+    DBG_ASSERT(static_cast<bool>(m_libClient), "libclient not initialized");
     DBG_ASSERT(m_widget, "widget not built");
 
     DBG_OUT("creating module shell");
diff --git a/src/niepce/ui/selectioncontroller.cpp b/src/niepce/ui/selectioncontroller.cpp
index b63a310..b158355 100644
--- a/src/niepce/ui/selectioncontroller.cpp
+++ b/src/niepce/ui/selectioncontroller.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - niepce/ui/selectioncontroller.cpp
  *
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,14 +17,13 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <boost/bind.hpp>
+#include <functional>
 
 #include <gtkmm/iconview.h>
 #include <gtkmm/treeiter.h>
 #include <glibmm/i18n.h>
 
 #include "fwk/base/autoflag.hpp"
-#include "fwk/utils/boost.hpp"
 #include "fwk/base/debug.hpp"
 #include "fwk/toolkit/undo.hpp"
 #include "fwk/toolkit/command.hpp"
@@ -99,8 +98,8 @@ void SelectionController::selected(IImageSelectable * selectable)
 
 libraryclient::LibraryClient::Ptr SelectionController::getLibraryClient()
 {
-    ModuleShell::Ptr shell = std::tr1::dynamic_pointer_cast<ModuleShell>(m_parent.lock());
-    DBG_ASSERT(shell, "parent not a ModuleShell");
+    ModuleShell::Ptr shell = std::dynamic_pointer_cast<ModuleShell>(m_parent.lock());
+    DBG_ASSERT(static_cast<bool>(shell), "parent not a ModuleShell");
     return     shell->getLibraryClient();
 }
 
@@ -139,9 +138,10 @@ void SelectionController::_selection_move(bool backwards)
             selection = libfile->id();
 
             fwk::AutoFlag f(m_in_handler);
-        
+
+            using std::placeholders::_1;
             std::for_each(m_selectables.begin(), m_selectables.end(),
-                          boost::bind(&IImageSelectable::select_image, _1,  
+                          std::bind(&IImageSelectable::select_image, _1,
                                       selection));
             signal_selected(selection);
         }
@@ -182,9 +182,9 @@ bool SelectionController::_set_metadata(const std::string & undo_label,
 {
     fwk::UndoTransaction *undo = fwk::Application::app()->begin_undo(undo_label);
     undo->new_command<void>(
-        boost::bind(&libraryclient::LibraryClient::setMetadata,
+        std::bind(&libraryclient::LibraryClient::setMetadata,
                     getLibraryClient(), file->id(), meta, fwk::PropertyValue(new_value)),
-        boost::bind(&libraryclient::LibraryClient::setMetadata,
+        std::bind(&libraryclient::LibraryClient::setMetadata,
                     getLibraryClient(), file->id(), meta, fwk::PropertyValue(old_value))
         );
     undo->execute();
@@ -206,14 +206,14 @@ bool SelectionController::_set_metadata(const std::string & undo_label,
         DBG_ASSERT(value.type() == iter->second.type(), "Value type mismatch");
 
         undo->new_command<void>(
-            boost::bind(&libraryclient::LibraryClient::setMetadata,
+            std::bind(&libraryclient::LibraryClient::setMetadata,
                         getLibraryClient(), file->id(), iter->first, iter->second),
-            boost::bind(&libraryclient::LibraryClient::setMetadata,
+            std::bind(&libraryclient::LibraryClient::setMetadata,
                         getLibraryClient(), file->id(), iter->first, value)
             );
     }
     undo->execute();
-    return true;    
+    return true;
 }
 
 void SelectionController::set_label(int label)
@@ -289,13 +289,13 @@ void SelectionController::move_to_trash()
             eng::library_id_t from_folder = file->folderId();
             fwk::UndoTransaction *undo = fwk::Application::app()->begin_undo(_("Move to Trash"));
             undo->new_command<void>(
-                boost::bind(&libraryclient::LibraryClient::moveFileToFolder,
+                std::bind(&libraryclient::LibraryClient::moveFileToFolder,
                             getLibraryClient(), selection, from_folder, trash_folder),
-                boost::bind(&libraryclient::LibraryClient::moveFileToFolder,
+                std::bind(&libraryclient::LibraryClient::moveFileToFolder,
                             getLibraryClient(), selection, trash_folder, from_folder )
                 );
             undo->execute();
-        }        
+        }
     }
 }
 
diff --git a/src/niepce/ui/selectioncontroller.hpp b/src/niepce/ui/selectioncontroller.hpp
index 7e7fbd3..2d2d57b 100644
--- a/src/niepce/ui/selectioncontroller.hpp
+++ b/src/niepce/ui/selectioncontroller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/selectioncontroller.h
  *
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ class SelectionController
        : public fwk::Controller
 {
 public:
-       typedef std::tr1::shared_ptr<SelectionController> Ptr;
+       typedef std::shared_ptr<SelectionController> Ptr;
        SelectionController();
 
        void add_selectable(IImageSelectable *);
diff --git a/src/niepce/ui/workspacecontroller.cpp b/src/niepce/ui/workspacecontroller.cpp
index 155cbc8..41b127a 100644
--- a/src/niepce/ui/workspacecontroller.cpp
+++ b/src/niepce/ui/workspacecontroller.cpp
@@ -71,7 +71,7 @@ WorkspaceController::WorkspaceController()
 
 libraryclient::LibraryClient::Ptr WorkspaceController::getLibraryClient()
 {
-    return     std::tr1::dynamic_pointer_cast<NiepceWindow>(m_parent.lock())->getLibraryClient();
+    return     std::dynamic_pointer_cast<NiepceWindow>(m_parent.lock())->getLibraryClient();
 }
 
 
diff --git a/src/niepce/ui/workspacecontroller.hpp b/src/niepce/ui/workspacecontroller.hpp
index 8c0cbcb..a8202e7 100644
--- a/src/niepce/ui/workspacecontroller.hpp
+++ b/src/niepce/ui/workspacecontroller.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/workspacecontroller.h
  *
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 #ifndef __UI_WORKSPACECONTROLLER_H__
 #define __UI_WORKSPACECONTROLLER_H__
 
-#include <tr1/array>
+#include <array>
 
 #include <glibmm/ustring.h>
 
@@ -44,7 +44,7 @@ class WorkspaceController
     : public fwk::UiController
 {
 public:
-    typedef std::tr1::shared_ptr<WorkspaceController> Ptr;
+    typedef std::shared_ptr<WorkspaceController> Ptr;
     
     enum {
         FOLDERS_ITEM,
@@ -113,7 +113,7 @@ private:
         ICON_KEYWORD,
         _ICON_SIZE
     };
-    std::tr1::array< Glib::RefPtr<Gdk::Pixbuf>, _ICON_SIZE > m_icons;
+    std::array< Glib::RefPtr<Gdk::Pixbuf>, _ICON_SIZE > m_icons;
     WorkspaceTreeColumns           m_librarycolumns;
     Gtk::VBox                      m_vbox;
     Gtk::Label                     m_label;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]