[gnote] Enable C++11 features, use override if possible



commit abbd9543ac8879f2943ee53d7d26be05ed9b4bdc
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Jul 14 21:35:03 2013 +0300

    Enable C++11 features, use override if possible
    
    Use C++11, if compiler supports it.
    If available, use override keyword for virtual methods, that override
    parents version.

 configure.ac                                       |    1 +
 m4/ax_cxx_compile_stdcxx_11.m4                     |  133 ++++++++++++++++++++
 src/actionmanager.hpp                              |   21 ++--
 src/addinpreferencefactory.hpp                     |    3 +-
 src/addins/backlinks/backlinkmenuitem.hpp          |    7 +-
 src/addins/backlinks/backlinksnoteaddin.hpp        |    7 +-
 src/addins/bugzilla/bugzillalink.hpp               |    9 +-
 src/addins/bugzilla/bugzillanoteaddin.hpp          |    7 +-
 src/addins/bugzilla/bugzillapreferences.hpp        |    4 +-
 src/addins/exporttohtml/exporttohtmlnoteaddin.hpp  |    7 +-
 .../filesystemsyncserviceaddin.hpp                 |   27 ++--
 src/addins/fixedwidth/fixedwidthmenuitem.hpp       |    6 +-
 src/addins/fixedwidth/fixedwidthnoteaddin.hpp      |    7 +-
 .../inserttimestamp/inserttimestampnoteaddin.hpp   |    7 +-
 .../notedirectorywatcherapplicationaddin.hpp       |    7 +-
 .../noteoftheday/noteofthedayapplicationaddin.hpp  |    7 +-
 src/addins/printnotes/printnotesnoteaddin.hpp      |    7 +-
 src/addins/replacetitle/replacetitlenoteaddin.hpp  |    7 +-
 .../statistics/statisticsapplicationaddin.hpp      |    7 +-
 src/addins/statistics/statisticswidget.hpp         |    7 +-
 .../stickynoteimport/stickynoteimportnoteaddin.hpp |    9 +-
 .../tableofcontents/tableofcontentsaction.hpp      |    6 +-
 .../tableofcontents/tableofcontentsmenuitem.hpp    |    3 +-
 .../tableofcontents/tableofcontentsnoteaddin.hpp   |    7 +-
 src/addins/tomboyimport/tomboyimportaddin.hpp      |    9 +-
 src/addins/underline/underlinemenuitem.hpp         |    6 +-
 src/addins/underline/underlinenoteaddin.hpp        |    7 +-
 .../webdavsyncservice/webdavsyncserviceaddin.hpp   |   25 ++--
 src/base/macros.hpp                                |    7 +
 src/dbus/remotecontrol.hpp                         |   55 ++++----
 src/gnome_keyring/keyringexception.hpp             |    7 +-
 src/gnote.hpp                                      |   17 ++--
 src/importaddin.hpp                                |    4 +-
 src/noteaddin.hpp                                  |    3 +-
 src/notebooks/notebook.hpp                         |   37 +++---
 src/notebooks/notebookapplicationaddin.hpp         |    7 +-
 src/notebooks/notebooknoteaddin.hpp                |    7 +-
 src/notebooks/notebookstreeview.hpp                |    8 +-
 src/notebuffer.hpp                                 |    7 +-
 src/noteeditor.cpp                                 |   10 +-
 src/noteeditor.hpp                                 |   11 +-
 src/notetag.hpp                                    |   15 ++-
 src/notewindow.hpp                                 |   27 ++--
 src/recentchanges.hpp                              |   25 ++--
 src/recenttreeview.hpp                             |    6 +-
 src/searchnoteswidget.hpp                          |   17 ++--
 src/sharp/exception.hpp                            |    5 +-
 src/sharp/modulefactory.hpp                        |    5 +-
 src/sharp/propertyeditor.hpp                       |    8 +-
 src/synchronization/filesystemsyncserver.hpp       |   23 ++--
 src/synchronization/fusesyncserviceaddin.hpp       |   19 ++--
 src/synchronization/gnotesyncclient.hpp            |   21 ++--
 src/synchronization/silentui.hpp                   |    9 +-
 src/synchronization/syncdialog.hpp                 |   11 +-
 src/synchronization/syncmanager.hpp                |   11 +-
 src/tagmanager.hpp                                 |   13 +-
 src/tray.hpp                                       |   13 +-
 src/undo.hpp                                       |   62 +++++-----
 src/utils.hpp                                      |    7 +-
 src/watchers.hpp                                   |   49 ++++----
 src/xkeybinder.hpp                                 |   10 +-
 61 files changed, 554 insertions(+), 342 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index da6ec37..f352068 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,7 @@ LT_INIT([disable-static])
 
 AC_LANG_CPLUSPLUS
 AC_LANG_COMPILER_REQUIRE
+AX_CXX_COMPILE_STDCXX_11([], [optional])
 AC_CHECK_PROG(HAVE_DESKTOP_FILE_VALIDATE, [desktop-file-validate], [yes], [no])
 if test $HAVE_DESKTOP_FILE_VALIDATE == "no"; then
   AC_MSG_ERROR([desktop-file-validate not found])
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/actionmanager.hpp b/src/actionmanager.hpp
index e940145..fbec309 100644
--- a/src/actionmanager.hpp
+++ b/src/actionmanager.hpp
@@ -30,6 +30,7 @@
 #include <giomm/simpleaction.h>
 #include <gtkmm/action.h>
 
+#include "base/macros.hpp"
 #include "iactionmanager.hpp"
 
 namespace gnote {
@@ -40,29 +41,29 @@ class ActionManager
 public:
   ActionManager();
 
-  virtual Glib::RefPtr<Gtk::Action> operator[](const std::string & n) const
+  virtual Glib::RefPtr<Gtk::Action> operator[](const std::string & n) const override
     {
       return find_action_by_name(n);
     }
   void populate_action_groups();
   Glib::RefPtr<Gtk::Action> find_action_by_name(const std::string & n) const;
 
-  virtual Glib::RefPtr<Gio::SimpleAction> get_app_action(const std::string & name) const;
+  virtual Glib::RefPtr<Gio::SimpleAction> get_app_action(const std::string & name) const override;
   const std::vector<Glib::RefPtr<Gio::SimpleAction> > & get_app_actions() const
     {
       return m_app_actions;
     }
-  virtual Glib::RefPtr<Gio::SimpleAction> add_app_action(const std::string & name);
+  virtual Glib::RefPtr<Gio::SimpleAction> add_app_action(const std::string & name) override;
   virtual void add_app_menu_item(int section, int order, const std::string & label,
-                                 const std::string & action_def);
+                                 const std::string & action_def) override;
   Glib::RefPtr<Gio::Menu> get_app_menu() const;
-  virtual void add_main_window_search_action(const Glib::RefPtr<Gtk::Action> & action, int order);
-  virtual void remove_main_window_search_action(const std::string & name);
-  virtual std::vector<Glib::RefPtr<Gtk::Action> > get_main_window_search_actions();
+  virtual void add_main_window_search_action(const Glib::RefPtr<Gtk::Action> & action, int order) override;
+  virtual void remove_main_window_search_action(const std::string & name) override;
+  virtual std::vector<Glib::RefPtr<Gtk::Action> > get_main_window_search_actions() override;
 
-  virtual void add_tray_menu_item(Gtk::MenuItem & item);
-  virtual void remove_tray_menu_item(Gtk::MenuItem & item);
-  virtual std::vector<Gtk::MenuItem*> get_tray_menu_items();
+  virtual void add_tray_menu_item(Gtk::MenuItem & item) override;
+  virtual void remove_tray_menu_item(Gtk::MenuItem & item) override;
+  virtual std::vector<Gtk::MenuItem*> get_tray_menu_items() override;
 private:
   void make_app_actions();
   void make_app_menu_items();
diff --git a/src/addinpreferencefactory.hpp b/src/addinpreferencefactory.hpp
index c8d43a7..42a17b3 100644
--- a/src/addinpreferencefactory.hpp
+++ b/src/addinpreferencefactory.hpp
@@ -26,6 +26,7 @@
 
 #include <gtkmm/widget.h>
 
+#include "base/macros.hpp"
 #include "notemanager.hpp"
 #include "sharp/modulefactory.hpp"
 
@@ -53,7 +54,7 @@ public:
     {
       return new AddinPreferenceFactory<_AddinType>();
     }
-  virtual Gtk::Widget * create_preference_widget(NoteManager & m)
+  virtual Gtk::Widget * create_preference_widget(NoteManager & m) override
     {
       return Gtk::manage(new _AddinType(m));
     }
diff --git a/src/addins/backlinks/backlinkmenuitem.hpp b/src/addins/backlinks/backlinkmenuitem.hpp
index af669da..d128a4f 100644
--- a/src/addins/backlinks/backlinkmenuitem.hpp
+++ b/src/addins/backlinks/backlinkmenuitem.hpp
@@ -25,6 +25,7 @@
 #include <string>
 #include <gtkmm/imagemenuitem.h>
 
+#include "base/macros.hpp"
 #include "note.hpp"
 
 namespace backlinks {
@@ -35,9 +36,9 @@ class BacklinkAction
 public:
   static Glib::RefPtr<Gtk::Action> create(const sigc::slot<void, Gtk::Menu*> & slot);
 
-  virtual Gtk::Widget *create_menu_item_vfunc();
+  virtual Gtk::Widget *create_menu_item_vfunc() override;
 protected:
-  virtual void on_activate();
+  virtual void on_activate() override;
 private:
   BacklinkAction(const sigc::slot<void, Gtk::Menu*> & slot);
   void on_menu_hidden();
@@ -57,7 +58,7 @@ public:
   gnote::Note::Ptr get_note()
     { return m_note; }
 protected:
-  virtual void on_activate();
+  virtual void on_activate() override;
 private:
   gnote::Note::Ptr   m_note;
   std::string m_title_search;
diff --git a/src/addins/backlinks/backlinksnoteaddin.hpp b/src/addins/backlinks/backlinksnoteaddin.hpp
index bdc5a70..6bdf35c 100644
--- a/src/addins/backlinks/backlinksnoteaddin.hpp
+++ b/src/addins/backlinks/backlinksnoteaddin.hpp
@@ -26,6 +26,7 @@
 #include <gtkmm/imagemenuitem.h>
 #include <gtkmm/menu.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "note.hpp"
 #include "noteaddin.hpp"
@@ -53,9 +54,9 @@ public:
     }
   BacklinksNoteAddin();
 
-  virtual void initialize ();
-  virtual void shutdown ();
-  virtual void on_note_opened ();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 private:
   void update_menu(Gtk::Menu *menu);
   void get_backlink_menu_items(std::list<BacklinkMenuItem*> & items);
diff --git a/src/addins/bugzilla/bugzillalink.hpp b/src/addins/bugzilla/bugzillalink.hpp
index e8c7518..ad42c27 100644
--- a/src/addins/bugzilla/bugzillalink.hpp
+++ b/src/addins/bugzilla/bugzillalink.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -23,6 +23,7 @@
 
 #include <gtkmm/textiter.h>
 
+#include "base/macros.hpp"
 #include "noteeditor.hpp"
 #include "notetag.hpp"
 
@@ -42,10 +43,10 @@ public:
   std::string get_bug_url() const;
   void set_bug_url(const std::string & );
 protected:
-  virtual void initialize(const std::string & element_name);
+  virtual void initialize(const std::string & element_name) override;
   virtual bool on_activate(const gnote::NoteEditor & , const Gtk::TextIter &, 
-                           const Gtk::TextIter &);
-  virtual void on_attribute_read(const std::string &);
+                           const Gtk::TextIter &) override;
+  virtual void on_attribute_read(const std::string &) override;
 private:
   void make_image();
 };
diff --git a/src/addins/bugzilla/bugzillanoteaddin.hpp b/src/addins/bugzilla/bugzillanoteaddin.hpp
index 3f9ad86..ecb5f7b 100644
--- a/src/addins/bugzilla/bugzillanoteaddin.hpp
+++ b/src/addins/bugzilla/bugzillanoteaddin.hpp
@@ -25,6 +25,7 @@
 #define _BUGZILLA_NOTE_ADDIN_HPP__
 
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "noteaddin.hpp"
 
@@ -47,9 +48,9 @@ public:
       return new BugzillaNoteAddin;
     }
   static std::string images_dir();
-  virtual void initialize();
-  virtual void shutdown();
-  virtual void on_note_opened();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 private:
   BugzillaNoteAddin();
   void migrate_images(const std::string & old_images_dir);
diff --git a/src/addins/bugzilla/bugzillapreferences.hpp b/src/addins/bugzilla/bugzillapreferences.hpp
index 08c743a..e5940c2 100644
--- a/src/addins/bugzilla/bugzillapreferences.hpp
+++ b/src/addins/bugzilla/bugzillapreferences.hpp
@@ -30,6 +30,8 @@
 #include <gtkmm/treemodelcolumn.h>
 #include <gtkmm/treeview.h>
 
+#include "base/macros.hpp"
+
 namespace sharp {
 
   class FileInfo;
@@ -46,7 +48,7 @@ public:
   BugzillaPreferences(gnote::NoteManager &);
 
 protected:
-  virtual void on_realize();
+  virtual void on_realize() override;
 
 private:
   void update_icon_store();
diff --git a/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp 
b/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp
index 1897e5d..1b1d327 100644
--- a/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp
+++ b/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp
@@ -28,6 +28,7 @@
 
 #include <gtkmm/imagemenuitem.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "sharp/streamwriter.hpp"
 #include "sharp/xsltransform.hpp"
@@ -55,9 +56,9 @@ public:
     {
       return new ExportToHtmlNoteAddin;
     }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual void on_note_opened();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 
 
 private:
diff --git a/src/addins/filesystemsyncservice/filesystemsyncserviceaddin.hpp 
b/src/addins/filesystemsyncservice/filesystemsyncserviceaddin.hpp
index 5439a1f..255307e 100644
--- a/src/addins/filesystemsyncservice/filesystemsyncserviceaddin.hpp
+++ b/src/addins/filesystemsyncservice/filesystemsyncserviceaddin.hpp
@@ -23,6 +23,7 @@
 
 #include <gtkmm/filechooserbutton.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "synchronization/syncserviceaddin.hpp"
 
@@ -51,19 +52,19 @@ public:
     }
   FileSystemSyncServiceAddin();
 
-  virtual void initialize();
-  virtual void shutdown();
-
-  virtual gnote::sync::SyncServer::Ptr create_sync_server();
-  virtual void post_sync_cleanup();
-  virtual Gtk::Widget *create_preferences_control(EventHandler requiredPrefChanged);
-  virtual bool save_configuration();
-  virtual void reset_configuration();
-  virtual bool is_configured();
-  virtual std::string name();
-  virtual std::string id();
-  virtual bool is_supported();
-  virtual bool initialized();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+
+  virtual gnote::sync::SyncServer::Ptr create_sync_server() override;
+  virtual void post_sync_cleanup() override;
+  virtual Gtk::Widget *create_preferences_control(EventHandler requiredPrefChanged) override;
+  virtual bool save_configuration() override;
+  virtual void reset_configuration() override;
+  virtual bool is_configured() override;
+  virtual std::string name() override;
+  virtual std::string id() override;
+  virtual bool is_supported() override;
+  virtual bool initialized() override;
 private:
   bool get_config_settings(std::string & syncPath);
 
diff --git a/src/addins/fixedwidth/fixedwidthmenuitem.hpp b/src/addins/fixedwidth/fixedwidthmenuitem.hpp
index 4256889..0f5507c 100644
--- a/src/addins/fixedwidth/fixedwidthmenuitem.hpp
+++ b/src/addins/fixedwidth/fixedwidthmenuitem.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -25,6 +25,8 @@
 
 #include <gtkmm/checkmenuitem.h>
 
+#include "base/macros.hpp"
+
 namespace gnote {
   class NoteAddin;
 }
@@ -40,7 +42,7 @@ public:
   FixedWidthMenuItem(gnote::NoteAddin *);
   
 protected:
-  virtual void on_activate();
+  virtual void on_activate() override;
 
 private:
   void menu_shown();
diff --git a/src/addins/fixedwidth/fixedwidthnoteaddin.hpp b/src/addins/fixedwidth/fixedwidthnoteaddin.hpp
index 4681d09..1f8ef1d 100644
--- a/src/addins/fixedwidth/fixedwidthnoteaddin.hpp
+++ b/src/addins/fixedwidth/fixedwidthnoteaddin.hpp
@@ -33,6 +33,7 @@
 
 #include <gtkmm/texttag.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "noteaddin.hpp"
 
@@ -56,9 +57,9 @@ namespace fixedwidth {
       { 
         return new FixedWidthNoteAddin();
       }
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
   private:
     Glib::RefPtr<Gtk::TextTag> m_tag;
   };
diff --git a/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp 
b/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp
index 9dd26a9..92d9259 100644
--- a/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp
+++ b/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp
@@ -27,6 +27,7 @@
 
 #include <gtkmm/menuitem.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "noteaddin.hpp"
 
@@ -51,9 +52,9 @@ public:
     {
       return new InsertTimestampNoteAddin;
     }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual void on_note_opened();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 private:
   void on_menu_item_activated();
   void on_format_setting_changed(const Glib::ustring & key);
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp 
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
index 92a4990..0bd7bba 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
@@ -26,6 +26,7 @@
 #include <glibmm/threads.h>
 #include <giomm/filemonitor.h>
 
+#include "base/macros.hpp"
 #include "applicationaddin.hpp"
 #include "note.hpp"
 #include "sharp/dynamicmodule.hpp"
@@ -59,9 +60,9 @@ public:
     {
       return new NoteDirectoryWatcherApplicationAddin;
     }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual bool initialized();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual bool initialized() override;
 private:
   static std::string get_id(const std::string & path);
   static std::string make_uri(const std::string & note_id);
diff --git a/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp 
b/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp
index 02fb311..6fe59e0 100644
--- a/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp
+++ b/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp
@@ -23,6 +23,7 @@
 
 #include <sigc++/sigc++.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "applicationaddin.hpp"
 
@@ -53,9 +54,9 @@ public:
     }
 
   virtual ~NoteOfTheDayApplicationAddin();
-  virtual void initialize();
-  virtual void shutdown();
-  virtual bool initialized();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual bool initialized() override;
 
 private:
 
diff --git a/src/addins/printnotes/printnotesnoteaddin.hpp b/src/addins/printnotes/printnotesnoteaddin.hpp
index ec55dbf..da72f5a 100644
--- a/src/addins/printnotes/printnotesnoteaddin.hpp
+++ b/src/addins/printnotes/printnotesnoteaddin.hpp
@@ -30,6 +30,7 @@
 
 #include <pangomm/layout.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "noteaddin.hpp"
 
@@ -81,9 +82,9 @@ public:
     {
       return new PrintNotesNoteAddin;
     }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual void on_note_opened();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 
   static int cm_to_pixel(double cm, double dpi)
                {
diff --git a/src/addins/replacetitle/replacetitlenoteaddin.hpp 
b/src/addins/replacetitle/replacetitlenoteaddin.hpp
index f7f47fb..fed905d 100644
--- a/src/addins/replacetitle/replacetitlenoteaddin.hpp
+++ b/src/addins/replacetitle/replacetitlenoteaddin.hpp
@@ -21,6 +21,7 @@
 #ifndef _REPLACETITLE_ADDIN_HPP_
 #define _REPLACETITLE_ADDIN_HPP_
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "note.hpp"
 #include "noteaddin.hpp"
@@ -44,9 +45,9 @@ public:
   {
     return new ReplaceTitleNoteAddin;
   }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual void on_note_opened();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 private:
   void replacetitle_button_clicked();
 };
diff --git a/src/addins/statistics/statisticsapplicationaddin.hpp 
b/src/addins/statistics/statisticsapplicationaddin.hpp
index 2fb39ee..d1a55db 100644
--- a/src/addins/statistics/statisticsapplicationaddin.hpp
+++ b/src/addins/statistics/statisticsapplicationaddin.hpp
@@ -22,6 +22,7 @@
 
 #include <gtkmm/action.h>
 
+#include "base/macros.hpp"
 #include "applicationaddin.hpp"
 #include "statisticswidget.hpp"
 #include "sharp/dynamicmodule.hpp"
@@ -45,9 +46,9 @@ public:
     {
       return new StatisticsApplicationAddin;
     }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual bool initialized();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual bool initialized() override;
 private:
   StatisticsApplicationAddin();
   void on_show_statistics();
diff --git a/src/addins/statistics/statisticswidget.hpp b/src/addins/statistics/statisticswidget.hpp
index 6f649f8..eae640c 100644
--- a/src/addins/statistics/statisticswidget.hpp
+++ b/src/addins/statistics/statisticswidget.hpp
@@ -23,6 +23,7 @@
 
 #include <gtkmm/treeview.h>
 
+#include "base/macros.hpp"
 #include "mainwindowembeds.hpp"
 #include "notemanager.hpp"
 
@@ -35,9 +36,9 @@ class StatisticsWidget
 {
 public:
   StatisticsWidget(gnote::NoteManager & nm);
-  virtual std::string get_name() const;
-  virtual void foreground();
-  virtual void background();
+  virtual std::string get_name() const override;
+  virtual void foreground() override;
+  virtual void background() override;
 private:
   void col1_data_func(Gtk::CellRenderer *renderer, const Gtk::TreeIter & iter);
   void col2_data_func(Gtk::CellRenderer *renderer, const Gtk::TreeIter & iter);
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp 
b/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
index aded038..bf715d5 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
@@ -28,6 +28,7 @@
 #include <gtkmm/imagemenuitem.h>
 #include <gtkmm/messagedialog.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "importaddin.hpp"
 
@@ -58,11 +59,11 @@ public:
     {
       _init_static();
     }
-  virtual void initialize();
-  virtual void shutdown();
+  virtual void initialize() override;
+  virtual void shutdown() override;
 
-  virtual bool want_to_run(gnote::NoteManager & manager);
-  virtual bool first_run(gnote::NoteManager & manager);
+  virtual bool want_to_run(gnote::NoteManager & manager) override;
+  virtual bool first_run(gnote::NoteManager & manager) override;
 
 private:
   void check_for_first_run(gnote::NoteManager & manager);
diff --git a/src/addins/tableofcontents/tableofcontentsaction.hpp 
b/src/addins/tableofcontents/tableofcontentsaction.hpp
index 011ce70..ccce00c 100644
--- a/src/addins/tableofcontents/tableofcontentsaction.hpp
+++ b/src/addins/tableofcontents/tableofcontentsaction.hpp
@@ -22,6 +22,8 @@
 #ifndef __TABLEOFCONTENT_ACTION_HPP_
 #define __TABLEOFCONTENT_ACTION_HPP_
 
+#include "base/macros.hpp"
+
 namespace tableofcontents {
 
 class TableofcontentsAction
@@ -30,8 +32,8 @@ class TableofcontentsAction
 public:
   static Glib::RefPtr<Gtk::Action> create(const sigc::slot<void, Gtk::Menu*> & slot);
 protected:
-  virtual Gtk::Widget *create_menu_item_vfunc();
-  virtual void on_activate();
+  virtual Gtk::Widget *create_menu_item_vfunc() override;
+  virtual void on_activate() override;
 private:
   TableofcontentsAction(const sigc::slot<void, Gtk::Menu*> & slot);
   void update_menu();
diff --git a/src/addins/tableofcontents/tableofcontentsmenuitem.hpp 
b/src/addins/tableofcontents/tableofcontentsmenuitem.hpp
index bd5b142..43ade25 100644
--- a/src/addins/tableofcontents/tableofcontentsmenuitem.hpp
+++ b/src/addins/tableofcontents/tableofcontentsmenuitem.hpp
@@ -27,6 +27,7 @@
 #include <string>
 #include <gtkmm/imagemenuitem.h>
 
+#include "base/macros.hpp"
 #include "note.hpp"
 #include "tableofcontents.hpp"
 
@@ -44,7 +45,7 @@ public:
                          );
 
 protected:
-  virtual void on_activate ();
+  virtual void on_activate() override;
 
 private:
   gnote::Note::Ptr m_note;            //the Note referenced by the menu item
diff --git a/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp 
b/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
index 4f9e71a..181a393 100644
--- a/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
+++ b/src/addins/tableofcontents/tableofcontentsnoteaddin.hpp
@@ -29,6 +29,7 @@
 #include <gtkmm/imagemenuitem.h>
 #include <gtkmm/menu.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "note.hpp"
 #include "noteaddin.hpp"
@@ -57,9 +58,9 @@ public:
     }
   TableofcontentsNoteAddin();
 
-  virtual void initialize ();
-  virtual void shutdown ();
-  virtual void on_note_opened ();
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual void on_note_opened() override;
 
 private:
   void update_menu(Gtk::Menu *menu);
diff --git a/src/addins/tomboyimport/tomboyimportaddin.hpp b/src/addins/tomboyimport/tomboyimportaddin.hpp
index 5a632a6..88c9a4e 100644
--- a/src/addins/tomboyimport/tomboyimportaddin.hpp
+++ b/src/addins/tomboyimport/tomboyimportaddin.hpp
@@ -25,6 +25,7 @@
 
 #include <string>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "importaddin.hpp"
 
@@ -51,10 +52,10 @@ public:
     {
       return new TomboyImportAddin;
     }
-  virtual void initialize();
-  virtual void shutdown();
-  virtual bool want_to_run(gnote::NoteManager & manager);
-  virtual bool first_run(gnote::NoteManager & manager);
+  virtual void initialize() override;
+  virtual void shutdown() override;
+  virtual bool want_to_run(gnote::NoteManager & manager) override;
+  virtual bool first_run(gnote::NoteManager & manager) override;
 
 private:
 
diff --git a/src/addins/underline/underlinemenuitem.hpp b/src/addins/underline/underlinemenuitem.hpp
index 7eed011..3f2ad85 100644
--- a/src/addins/underline/underlinemenuitem.hpp
+++ b/src/addins/underline/underlinemenuitem.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -25,6 +25,8 @@
 
 #include <gtkmm/checkmenuitem.h>
 
+#include "base/macros.hpp"
+
 namespace gnote {
   class NoteAddin;
 }
@@ -40,7 +42,7 @@ public:
   UnderlineMenuItem(gnote::NoteAddin *);
   
 protected:
-  virtual void on_activate();
+  virtual void on_activate() override;
 
 private:
   void menu_shown();
diff --git a/src/addins/underline/underlinenoteaddin.hpp b/src/addins/underline/underlinenoteaddin.hpp
index 07bebbc..6b0aa49 100644
--- a/src/addins/underline/underlinenoteaddin.hpp
+++ b/src/addins/underline/underlinenoteaddin.hpp
@@ -29,6 +29,7 @@
 
 #include <gtkmm/texttag.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "noteaddin.hpp"
 
@@ -52,9 +53,9 @@ namespace underline {
       { 
         return new UnderlineNoteAddin();
       }
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
   private:
     Glib::RefPtr<Gtk::TextTag> m_tag;
   };
diff --git a/src/addins/webdavsyncservice/webdavsyncserviceaddin.hpp 
b/src/addins/webdavsyncservice/webdavsyncserviceaddin.hpp
index 5b30919..f4aa88d 100644
--- a/src/addins/webdavsyncservice/webdavsyncserviceaddin.hpp
+++ b/src/addins/webdavsyncservice/webdavsyncserviceaddin.hpp
@@ -25,6 +25,7 @@
 #include <gtkmm/entry.h>
 #include <gtkmm/table.h>
 
+#include "base/macros.hpp"
 #include "sharp/dynamicmodule.hpp"
 #include "synchronization/fusesyncserviceaddin.hpp"
 
@@ -54,41 +55,41 @@ public:
   /// not automatically be saved by a GConf Property Editor.  Preferences
   /// should be saved when SaveConfiguration () is called.
   /// </summary>
-  virtual Gtk::Widget *create_preferences_control(EventHandler requiredPrefChanged);
+  virtual Gtk::Widget *create_preferences_control(EventHandler requiredPrefChanged) override;
 
   /// <summary>
   /// Returns whether the addin is configured enough to actually be used.
   /// </summary>
-  virtual bool is_configured();
+  virtual bool is_configured() override;
 
   /// <summary>
   /// Returns true if required settings are non-empty in the preferences widget
   /// </summary>
-  virtual bool are_settings_valid();
+  virtual bool are_settings_valid() override;
 
   /// The name that will be shown in the preferences to distinguish
   /// between this and other SyncServiceAddins.
   /// </summary>
-  virtual std::string name();
+  virtual std::string name() override;
 
   /// <summary>
   /// Specifies a unique identifier for this addin.  This will be used to
   /// set the service in preferences.
   /// </summary>
-  virtual std::string id();
+  virtual std::string id() override;
 
-  virtual std::string fuse_mount_directory_error();
+  virtual std::string fuse_mount_directory_error() override;
 protected:
-  virtual std::vector<std::string> get_fuse_mount_exe_args(const std::string & mountPath, bool 
fromStoredValues);
-  virtual std::string get_fuse_mount_exe_args_for_display(const std::string & mountPath, bool 
fromStoredValues);
-  virtual std::string fuse_mount_exe_name();
-  virtual bool verify_configuration();
-  virtual void save_configuration_values();
+  virtual std::vector<std::string> get_fuse_mount_exe_args(const std::string & mountPath, bool 
fromStoredValues) override;
+  virtual std::string get_fuse_mount_exe_args_for_display(const std::string & mountPath, bool 
fromStoredValues) override;
+  virtual std::string fuse_mount_exe_name() override;
+  virtual bool verify_configuration() override;
+  virtual void save_configuration_values() override;
 
   /// <summary>
   /// Reset the configuration so that IsConfigured will return false.
   /// </summary>
-  virtual void reset_configuration_values();
+  virtual void reset_configuration_values() override;
 private:
   std::vector<std::string> get_fuse_mount_exe_args(const std::string & mountPath, const std::string & url,
       const std::string & username, const std::string & password, bool acceptSsl);
diff --git a/src/base/macros.hpp b/src/base/macros.hpp
index fc75419..16e4b7b 100644
--- a/src/base/macros.hpp
+++ b/src/base/macros.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -36,4 +37,10 @@
 #define _PRINTF_FORMAT(f,a)
 #endif
 
+// define 'final' and 'override' for pre-C++11 compilers
+#if __cplusplus < 201103L
+  #define final
+  #define override
+#endif
+
 #endif
diff --git a/src/dbus/remotecontrol.hpp b/src/dbus/remotecontrol.hpp
index fc636e3..04a816d 100644
--- a/src/dbus/remotecontrol.hpp
+++ b/src/dbus/remotecontrol.hpp
@@ -26,6 +26,7 @@
 
 #include <giomm/dbusconnection.h>
 
+#include "base/macros.hpp"
 #include "dbus/iremotecontrol.hpp"
 #include "mainwindow.hpp"
 #include "note.hpp"
@@ -43,33 +44,33 @@ public:
                 const Glib::RefPtr<Gio::DBus::InterfaceInfo> &);
   virtual ~RemoteControl();
 
-  virtual bool AddTagToNote(const std::string& uri, const std::string& tag_name);
-  virtual std::string CreateNamedNote(const std::string& linked_title);
-  virtual std::string CreateNote();
-  virtual bool DeleteNote(const std::string& uri);
-  virtual bool DisplayNote(const std::string& uri);
-  virtual bool DisplayNoteWithSearch(const std::string& uri, const std::string& search);
-  virtual void DisplaySearch();
-  virtual void DisplaySearchWithText(const std::string& search_text);
-  virtual std::string FindNote(const std::string& linked_title);
-  virtual std::string FindStartHereNote();
-  virtual std::vector< std::string > GetAllNotesWithTag(const std::string& tag_name);
-  virtual int32_t GetNoteChangeDate(const std::string& uri);
-  virtual std::string GetNoteCompleteXml(const std::string& uri);
-  virtual std::string GetNoteContents(const std::string& uri);
-  virtual std::string GetNoteContentsXml(const std::string& uri);
-  virtual int32_t GetNoteCreateDate(const std::string& uri);
-  virtual std::string GetNoteTitle(const std::string& uri);
-  virtual std::vector< std::string > GetTagsForNote(const std::string& uri);
-  virtual bool HideNote(const std::string& uri);
-  virtual std::vector< std::string > ListAllNotes();
-  virtual bool NoteExists(const std::string& uri);
-  virtual bool RemoveTagFromNote(const std::string& uri, const std::string& tag_name);
-  virtual std::vector< std::string > SearchNotes(const std::string& query, const bool& case_sensitive);
-  virtual bool SetNoteCompleteXml(const std::string& uri, const std::string& xml_contents);
-  virtual bool SetNoteContents(const std::string& uri, const std::string& text_contents);
-  virtual bool SetNoteContentsXml(const std::string& uri, const std::string& xml_contents);
-  virtual std::string Version();
+  virtual bool AddTagToNote(const std::string& uri, const std::string& tag_name) override;
+  virtual std::string CreateNamedNote(const std::string& linked_title) override;
+  virtual std::string CreateNote() override;
+  virtual bool DeleteNote(const std::string& uri) override;
+  virtual bool DisplayNote(const std::string& uri) override;
+  virtual bool DisplayNoteWithSearch(const std::string& uri, const std::string& search) override;
+  virtual void DisplaySearch() override;
+  virtual void DisplaySearchWithText(const std::string& search_text) override;
+  virtual std::string FindNote(const std::string& linked_title) override;
+  virtual std::string FindStartHereNote() override;
+  virtual std::vector< std::string > GetAllNotesWithTag(const std::string& tag_name) override;
+  virtual int32_t GetNoteChangeDate(const std::string& uri) override;
+  virtual std::string GetNoteCompleteXml(const std::string& uri) override;
+  virtual std::string GetNoteContents(const std::string& uri) override;
+  virtual std::string GetNoteContentsXml(const std::string& uri) override;
+  virtual int32_t GetNoteCreateDate(const std::string& uri) override;
+  virtual std::string GetNoteTitle(const std::string& uri) override;
+  virtual std::vector< std::string > GetTagsForNote(const std::string& uri) override;
+  virtual bool HideNote(const std::string& uri) override;
+  virtual std::vector< std::string > ListAllNotes() override;
+  virtual bool NoteExists(const std::string& uri) override;
+  virtual bool RemoveTagFromNote(const std::string& uri, const std::string& tag_name) override;
+  virtual std::vector< std::string > SearchNotes(const std::string& query, const bool& case_sensitive) 
override;
+  virtual bool SetNoteCompleteXml(const std::string& uri, const std::string& xml_contents) override;
+  virtual bool SetNoteContents(const std::string& uri, const std::string& text_contents) override;
+  virtual bool SetNoteContentsXml(const std::string& uri, const std::string& xml_contents) override;
+  virtual std::string Version() override;
 
 private:
   void on_note_added(const Note::Ptr &);
diff --git a/src/gnome_keyring/keyringexception.hpp b/src/gnome_keyring/keyringexception.hpp
index 4d877d5..5f6f94b 100644
--- a/src/gnome_keyring/keyringexception.hpp
+++ b/src/gnome_keyring/keyringexception.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  *
  * 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
@@ -23,6 +23,7 @@
 
 #include <stdexcept>
 
+#include "base/macros.hpp"
 
 
 namespace gnome {
@@ -35,8 +36,8 @@ public:
   KeyringException(const std::string & msg)
     : m_what(msg)
     {}
-  virtual ~KeyringException() throw() {}
-  virtual const char *what() const throw()
+  virtual ~KeyringException() throw() override {}
+  virtual const char *what() const throw() override
     {
       return m_what.c_str();
     }
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 2a1a402..f556e52 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -31,6 +31,7 @@
 #include <gtkmm/icontheme.h>
 #include <gtkmm/statusicon.h>
 
+#include "base/macros.hpp"
 #include "actionmanager.hpp"
 #include "ignote.hpp"
 #include "remotecontrolproxy.hpp"
@@ -131,10 +132,10 @@ public:
   void on_show_preferences_action(const Glib::VariantBase&);
   void on_show_help_action(const Glib::VariantBase&);
   void on_show_about_action(const Glib::VariantBase&);
-  virtual MainWindow & new_main_window();
-  virtual MainWindow & get_main_window();
-  virtual MainWindow & get_window_for_note();
-  virtual void open_search_all();
+  virtual MainWindow & new_main_window() override;
+  virtual MainWindow & get_main_window() override;
+  virtual MainWindow & get_window_for_note() override;
+  virtual void open_search_all() override;
   void open_note_sync_window(const Glib::VariantBase&);
 
   bool tray_icon_showing()
@@ -154,11 +155,11 @@ public:
       m_tray = tray;
     }
   static void register_remote_control(NoteManager & manager, RemoteControlProxy::slot_name_acquire_finish 
on_finish);
-  virtual void open_note(const Note::Ptr & note);
+  virtual void open_note(const Note::Ptr & note) override;
 protected:
-  virtual int on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine> & command_line);
-  virtual void on_startup();
-  virtual void on_window_removed(Gtk::Window *window);
+  virtual int on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine> & command_line) override;
+  virtual void on_startup() override;
+  virtual void on_window_removed(Gtk::Window *window) override;
 private:
   Gnote();
   std::string get_note_path(const std::string & override_path);
diff --git a/src/importaddin.hpp b/src/importaddin.hpp
index 82dc6ba..42af06e 100644
--- a/src/importaddin.hpp
+++ b/src/importaddin.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -22,6 +23,7 @@
 #ifndef __IMPORT_ADDIN_HPP__
 #define __IMPORT_ADDIN_HPP__
 
+#include "base/macros.hpp"
 #include "applicationaddin.hpp"
 
 namespace gnote {
@@ -36,7 +38,7 @@ public:
 
   ImportAddin();
 
-  virtual bool initialized();
+  virtual bool initialized() override;
 
   /** Return whether the importer want to run at startup or not 
    */
diff --git a/src/noteaddin.hpp b/src/noteaddin.hpp
index b26831c..21b396a 100644
--- a/src/noteaddin.hpp
+++ b/src/noteaddin.hpp
@@ -32,6 +32,7 @@
 #include <gtkmm/menuitem.h>
 #include <gtkmm/toolitem.h>
 
+#include "base/macros.hpp"
 #include "sharp/exception.hpp"
 #include "abstractaddin.hpp"
 #include "note.hpp"
@@ -55,7 +56,7 @@ public:
 //  static NoteAddin *create() { return NULL; }
   void initialize(const Note::Ptr & note);
 
-  virtual void dispose(bool);
+  virtual void dispose(bool) override;
 
   /// <summary>
   /// Called when the NoteAddin is attached to a Note
diff --git a/src/notebooks/notebook.hpp b/src/notebooks/notebook.hpp
index 9760500..a09739b 100644
--- a/src/notebooks/notebook.hpp
+++ b/src/notebooks/notebook.hpp
@@ -27,6 +27,7 @@
 #include <string>
 #include <tr1/memory>
 
+#include "base/macros.hpp"
 #include "tag.hpp"
 #include "note.hpp"
 
@@ -88,8 +89,8 @@ protected:
     : Notebook(m, s, true)
     {
     }
-  virtual Tag::Ptr    get_tag() const;
-  virtual Note::Ptr   get_template_note() const;
+  virtual Tag::Ptr    get_tag() const override;
+  virtual Note::Ptr   get_template_note() const override;
 };
 
 
@@ -105,10 +106,10 @@ class AllNotesNotebook
 public:
   typedef std::tr1::shared_ptr<AllNotesNotebook> Ptr;
   AllNotesNotebook(NoteManager &);
-  virtual std::string get_normalized_name() const;
-  virtual bool        contains_note(const Note::Ptr &);
-  virtual bool        add_note(const Note::Ptr &);
-  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon();
+  virtual std::string get_normalized_name() const override;
+  virtual bool        contains_note(const Note::Ptr &) override;
+  virtual bool        add_note(const Note::Ptr &) override;
+  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon() override;
 };
 
 
@@ -123,10 +124,10 @@ class UnfiledNotesNotebook
 public:
   typedef std::tr1::shared_ptr<UnfiledNotesNotebook> Ptr;
   UnfiledNotesNotebook(NoteManager &);
-  virtual std::string get_normalized_name() const;
-  virtual bool        contains_note(const Note::Ptr &);
-  virtual bool        add_note(const Note::Ptr &);
-  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon();
+  virtual std::string get_normalized_name() const override;
+  virtual bool        contains_note(const Note::Ptr &) override;
+  virtual bool        add_note(const Note::Ptr &) override;
+  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon() override;
 };
 
 
@@ -136,10 +137,10 @@ class PinnedNotesNotebook
 public:
   typedef std::tr1::shared_ptr<PinnedNotesNotebook> Ptr;
   PinnedNotesNotebook(NoteManager &);
-  virtual std::string get_normalized_name() const;
-  virtual bool        contains_note(const Note::Ptr &);
-  virtual bool        add_note(const Note::Ptr &);
-  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon();
+  virtual std::string get_normalized_name() const override;
+  virtual bool        contains_note(const Note::Ptr &) override;
+  virtual bool        add_note(const Note::Ptr &) override;
+  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon() override;
 };
 
 
@@ -149,10 +150,10 @@ class ActiveNotesNotebook
 public:
   typedef std::tr1::shared_ptr<ActiveNotesNotebook> Ptr;
   ActiveNotesNotebook(NoteManager &);
-  virtual std::string get_normalized_name() const;
-  virtual bool        contains_note(const Note::Ptr &);
-  virtual bool        add_note(const Note::Ptr &);
-  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon();
+  virtual std::string get_normalized_name() const override;
+  virtual bool        contains_note(const Note::Ptr &) override;
+  virtual bool        add_note(const Note::Ptr &) override;
+  virtual Glib::RefPtr<Gdk::Pixbuf> get_icon() override;
   bool empty();
   sigc::signal<void> signal_size_changed;
 private:
diff --git a/src/notebooks/notebookapplicationaddin.hpp b/src/notebooks/notebookapplicationaddin.hpp
index aaea5ef..c05378b 100644
--- a/src/notebooks/notebookapplicationaddin.hpp
+++ b/src/notebooks/notebookapplicationaddin.hpp
@@ -25,6 +25,7 @@
 
 #include <list>
 
+#include "base/macros.hpp"
 #include "applicationaddin.hpp"
 #include "note.hpp"
 
@@ -37,9 +38,9 @@ namespace gnote {
     {
     public:
       static ApplicationAddin * create();
-      virtual void initialize ();
-      virtual void shutdown ();
-      virtual bool initialized ();
+      virtual void initialize() override;
+      virtual void shutdown() override;
+      virtual bool initialized() override;
 
     protected:
       NotebookApplicationAddin();
diff --git a/src/notebooks/notebooknoteaddin.hpp b/src/notebooks/notebooknoteaddin.hpp
index 5603c42..6d53bd3 100644
--- a/src/notebooks/notebooknoteaddin.hpp
+++ b/src/notebooks/notebooknoteaddin.hpp
@@ -27,6 +27,7 @@
 #include <gtkmm/menu.h>
 #include <gtkmm/menutoolbutton.h>
 
+#include "base/macros.hpp"
 #include "noteaddin.hpp"
 #include "notebooks/notebook.hpp"
 #include "notebooks/notebookmenuitem.hpp"
@@ -42,9 +43,9 @@ namespace notebooks {
   public:
     static NoteAddin * create();
     static Tag::Ptr get_template_tag();
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   protected:
     NotebookNoteAddin();
diff --git a/src/notebooks/notebookstreeview.hpp b/src/notebooks/notebookstreeview.hpp
index 49dbde6..c27d570 100644
--- a/src/notebooks/notebookstreeview.hpp
+++ b/src/notebooks/notebookstreeview.hpp
@@ -25,6 +25,8 @@
 
 #include <gtkmm/treeview.h>
 
+#include "base/macros.hpp"
+
 namespace gnote {
 
   class NoteManager;
@@ -41,10 +43,10 @@ namespace gnote {
     virtual void on_drag_data_received( const Glib::RefPtr<Gdk::DragContext> & context,
                                         int x, int y,
                                         const Gtk::SelectionData & selection_data,
-                                        guint info, guint time);
+                                        guint info, guint time) override;
     virtual bool on_drag_motion(const Glib::RefPtr<Gdk::DragContext> & context,
-                                int x, int y, guint time);
-    virtual void on_drag_leave(const Glib::RefPtr<Gdk::DragContext> & context, guint time);
+                                int x, int y, guint time) override;
+    virtual void on_drag_leave(const Glib::RefPtr<Gdk::DragContext> & context, guint time) override;
   private:
     NoteManager & m_note_manager;
   };
diff --git a/src/notebuffer.hpp b/src/notebuffer.hpp
index b2e9c23..4223f74 100644
--- a/src/notebuffer.hpp
+++ b/src/notebuffer.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -33,6 +33,7 @@
 #include <gtkmm/texttag.h>
 #include <gtkmm/widget.h>
 
+#include "base/macros.hpp"
 #include "notetag.hpp"
 
 namespace sharp {
@@ -114,9 +115,9 @@ protected:
   NoteBuffer(const NoteTagTable::Ptr &, Note &);
 
   virtual void on_apply_tag(const Glib::RefPtr<Gtk::TextTag> & tag,
-                       const Gtk::TextIter &,  const Gtk::TextIter &);
+                       const Gtk::TextIter &,  const Gtk::TextIter &) override;
   virtual void on_remove_tag(const Glib::RefPtr<Gtk::TextTag> & tag,
-                       const Gtk::TextIter &,  const Gtk::TextIter &);
+                       const Gtk::TextIter &,  const Gtk::TextIter &) override;
 private:
   void text_insert_event(const Gtk::TextIter & pos, const Glib::ustring & text, int);
   void range_deleted_event(const Gtk::TextIter &,const Gtk::TextIter &);
diff --git a/src/noteeditor.cpp b/src/noteeditor.cpp
index b373d65..9c86da5 100644
--- a/src/noteeditor.cpp
+++ b/src/noteeditor.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2012 Aurimas Cernius
+ * Copyright (C) 2010-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -137,10 +137,10 @@ namespace gnote {
     //
     // DND Drop handling
     //
-  void NoteEditor::on_drag_data_received (Glib::RefPtr<Gdk::DragContext> & context,
-                                          int x, int y,
-                                          const Gtk::SelectionData & selection_data,
-                                          guint info,  guint time)
+  void NoteEditor::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext> & context,
+                                         int x, int y,
+                                         const Gtk::SelectionData & selection_data,
+                                         guint info,  guint time)
   {
     bool has_url = false;
 
diff --git a/src/noteeditor.hpp b/src/noteeditor.hpp
index da91441..c58f7bf 100644
--- a/src/noteeditor.hpp
+++ b/src/noteeditor.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011,2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -27,6 +27,7 @@
 #include <glibmm/refptr.h>
 #include <gtkmm/textview.h>
 
+#include "base/macros.hpp"
 #include "preferences.hpp"
 
 namespace gnote {
@@ -44,10 +45,10 @@ public:
     }
 
 protected:
-  virtual void on_drag_data_received (Glib::RefPtr<Gdk::DragContext> & context,
-                                      int x, int y,
-                                      const Gtk::SelectionData & selection_data,
-                                      guint info,  guint time);
+  virtual void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext> & context,
+                                     int x, int y,
+                                     const Gtk::SelectionData & selection_data,
+                                     guint info,  guint time) override;
 
 private:
   Pango::FontDescription get_gnome_document_font_description();
diff --git a/src/notetag.hpp b/src/notetag.hpp
index c46e5b2..cf9b945 100644
--- a/src/notetag.hpp
+++ b/src/notetag.hpp
@@ -32,6 +32,7 @@
 #include <gtkmm/texttag.h>
 #include <gtkmm/texttagtable.h>
 
+#include "base/macros.hpp"
 #include "contrast.hpp"
 #include "sharp/exception.hpp"
 
@@ -169,7 +170,7 @@ protected:
 
   friend class NoteTagTable;
 
-  virtual bool on_event(const Glib::RefPtr<Glib::Object> &, GdkEvent *, const Gtk::TextIter & );
+  virtual bool on_event(const Glib::RefPtr<Glib::Object> &, GdkEvent *, const Gtk::TextIter & ) override;
   virtual bool on_activate(const NoteEditor & , const Gtk::TextIter &, const Gtk::TextIter &);
 private:
   Gdk::Color get_background() const;
@@ -203,8 +204,8 @@ public:
     {
       return m_attributes;
     }
-  virtual void write(sharp::XmlWriter &, bool) const;
-  virtual void read(sharp::XmlReader &, bool);
+  virtual void write(sharp::XmlWriter &, bool) const override;
+  virtual void read(sharp::XmlReader &, bool) override;
   /// <summary>
   /// Derived classes should override this if they desire
   /// to be notified when a tag attribute is read in.
@@ -213,7 +214,7 @@ public:
   /// A <see cref="System.String"/> that is the name of the
   /// newly read attribute.
   /// </param>
-  virtual void on_attribute_read(const std::string &) 
+  virtual void on_attribute_read(const std::string &)
     {
     }
 
@@ -238,7 +239,7 @@ public:
     {
       return Pango::DIRECTION_LTR;
     }
-  virtual void write(sharp::XmlWriter &, bool) const;
+  virtual void write(sharp::XmlWriter &, bool) const override;
 private:
   int            m_depth;
   Pango::Direction m_direction;
@@ -325,8 +326,8 @@ protected:
       _init_common_tags();
     }
 
-  virtual void on_tag_added(const Glib::RefPtr<Gtk::TextTag> &);
-  virtual void on_tag_removed(const Glib::RefPtr<Gtk::TextTag> &);
+  virtual void on_tag_added(const Glib::RefPtr<Gtk::TextTag> &) override;
+  virtual void on_tag_removed(const Glib::RefPtr<Gtk::TextTag> &) override;
 //  virtual void on_notetag_changed(Glib::RefPtr<Gtk::TextTag>& tag, bool size_changed);
 
 private:
diff --git a/src/notewindow.hpp b/src/notewindow.hpp
index e9a78c8..24c523f 100644
--- a/src/notewindow.hpp
+++ b/src/notewindow.hpp
@@ -35,6 +35,7 @@
 #include <gtkmm/textview.h>
 #include <gtkmm/scrolledwindow.h>
 
+#include "base/macros.hpp"
 #include "mainwindowembeds.hpp"
 #include "note.hpp"
 #include "undo.hpp"
@@ -56,7 +57,7 @@ public:
 
   static void markup_label (Gtk::MenuItem & item);
 protected:
-  virtual void on_show();
+  virtual void on_show() override;
 
 private:
   void refresh_sizing_state();
@@ -139,23 +140,23 @@ public:
   NoteWindow(Note &);
   ~NoteWindow();
 
-  virtual std::string get_name() const;
+  virtual std::string get_name() const override;
   void set_name(const std::string & name);
-  virtual void foreground();
-  virtual void background();
-  virtual void hint_size(int & width, int & height);
-  virtual void size_internals();
+  virtual void foreground() override;
+  virtual void background() override;
+  virtual void hint_size(int & width, int & height) override;
+  virtual void size_internals() override;
 
-  virtual void perform_search(const std::string & text);
-  virtual bool supports_goto_result();
-  virtual bool goto_next_result();
-  virtual bool goto_previous_result();
+  virtual void perform_search(const std::string & text) override;
+  virtual bool supports_goto_result() override;
+  virtual bool goto_next_result() override;
+  virtual bool goto_previous_result() override;
 
   // use co-variant return
-  virtual Gtk::Grid *embeddable_toolbar();
+  virtual Gtk::Grid *embeddable_toolbar() override;
 
-  virtual std::vector<Glib::RefPtr<Gtk::Action> > get_widget_actions();
-  virtual sigc::signal<void> & signal_actions_changed();
+  virtual std::vector<Glib::RefPtr<Gtk::Action> > get_widget_actions() override;
+  virtual sigc::signal<void> & signal_actions_changed() override;
   void add_widget_action(const Glib::RefPtr<Gtk::Action> & action, int order);
   void remove_widget_action(const std::string & name);
 
diff --git a/src/recentchanges.hpp b/src/recentchanges.hpp
index bd1f8fd..f2e8820 100644
--- a/src/recentchanges.hpp
+++ b/src/recentchanges.hpp
@@ -30,6 +30,7 @@
 #include <gtkmm/applicationwindow.h>
 #include <gtkmm/grid.h>
 
+#include "base/macros.hpp"
 #include "note.hpp"
 #include "searchnoteswidget.hpp"
 #include "utils.hpp"
@@ -43,24 +44,24 @@ class NoteRecentChanges
 public:
   NoteRecentChanges(NoteManager& m);
   virtual ~NoteRecentChanges();
-  virtual void show_search_bar();
-  virtual void set_search_text(const std::string & value);
-  virtual void present_note(const Note::Ptr & note);
-  virtual void new_note();
-  virtual void present_search();
-  virtual void close_window();
+  virtual void show_search_bar() override;
+  virtual void set_search_text(const std::string & value) override;
+  virtual void present_note(const Note::Ptr & note) override;
+  virtual void new_note() override;
+  virtual void present_search() override;
+  virtual void close_window() override;
 
-  virtual void embed_widget(EmbeddableWidget &);
-  virtual void unembed_widget(EmbeddableWidget &);
-  virtual void foreground_embedded(EmbeddableWidget &);
-  virtual void background_embedded(EmbeddableWidget &);
+  virtual void embed_widget(EmbeddableWidget &) override;
+  virtual void unembed_widget(EmbeddableWidget &) override;
+  virtual void foreground_embedded(EmbeddableWidget &) override;
+  virtual void background_embedded(EmbeddableWidget &) override;
   virtual bool running()
     {
       return m_mapped;
     }
 protected:
-  virtual void on_show();
-  virtual bool on_map_event(GdkEventAny *evt);
+  virtual void on_show() override;
+  virtual bool on_map_event(GdkEventAny *evt) override;
 private:
   void on_open_note(const Note::Ptr &);
   void on_open_note_new_window(const Note::Ptr &);
diff --git a/src/recenttreeview.hpp b/src/recenttreeview.hpp
index 993e3a2..3a8e45b 100644
--- a/src/recenttreeview.hpp
+++ b/src/recenttreeview.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -26,6 +26,8 @@
 
 #include <gtkmm/treeview.h>
 
+#include "base/macros.hpp"
+
 namespace gnote {
 
 class RecentTreeView
@@ -38,7 +40,7 @@ public:
     }
 
 protected:
-  virtual void on_drag_begin(const Glib::RefPtr<Gdk::DragContext> & )
+  virtual void on_drag_begin(const Glib::RefPtr<Gdk::DragContext> & ) override
     {
     }
 };
diff --git a/src/searchnoteswidget.hpp b/src/searchnoteswidget.hpp
index e648c50..3e6c324 100644
--- a/src/searchnoteswidget.hpp
+++ b/src/searchnoteswidget.hpp
@@ -31,6 +31,7 @@
 #include <gtkmm/scrolledwindow.h>
 #include <sigc++/sigc++.h>
 
+#include "base/macros.hpp"
 #include "mainwindowembeds.hpp"
 #include "notebooks/notebook.hpp"
 #include "notebooks/notebookstreeview.hpp"
@@ -47,14 +48,14 @@ class SearchNotesWidget
 public:
   SearchNotesWidget(NoteManager & m);
   virtual ~SearchNotesWidget();
-  virtual std::string get_name() const;
-  virtual void foreground();
-  virtual void background();
-  virtual void hint_size(int & width, int & height);
-  virtual void size_internals();
-  virtual void perform_search(const std::string & search_text);
-  virtual std::vector<Glib::RefPtr<Gtk::Action> > get_widget_actions();
-  virtual sigc::signal<void> & signal_actions_changed();
+  virtual std::string get_name() const override;
+  virtual void foreground() override;
+  virtual void background() override;
+  virtual void hint_size(int & width, int & height) override;
+  virtual void size_internals() override;
+  virtual void perform_search(const std::string & search_text) override;
+  virtual std::vector<Glib::RefPtr<Gtk::Action> > get_widget_actions() override;
+  virtual sigc::signal<void> & signal_actions_changed() override;
 
   void select_all_notes_notebook();
   void new_note();
diff --git a/src/sharp/exception.hpp b/src/sharp/exception.hpp
index 95c5739..be4d987 100644
--- a/src/sharp/exception.hpp
+++ b/src/sharp/exception.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -31,6 +32,8 @@
 #include <exception>
 #include <string>
 
+#include "base/macros.hpp"
+
 namespace sharp {
 
 
@@ -44,7 +47,7 @@ public:
     }
   virtual ~Exception() throw();
 
-  virtual const char *what() const throw();
+  virtual const char *what() const throw() override;
 
 private:
   std::string m_what;
diff --git a/src/sharp/modulefactory.hpp b/src/sharp/modulefactory.hpp
index d0e93e6..c5a5a64 100644
--- a/src/sharp/modulefactory.hpp
+++ b/src/sharp/modulefactory.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -27,6 +28,8 @@
 #ifndef __SHARP_MODULE_FACTORY_HPP__
 #define __SHARP_MODULE_FACTORY_HPP__
 
+#include "base/macros.hpp"
+
 
 namespace sharp {
 
@@ -61,7 +64,7 @@ class IfaceFactory
   : public IfaceFactoryBase
 {
 public:
-  virtual IInterface *operator()()
+  virtual IInterface *operator()() override
     {
       return _Interface::create();
     }
diff --git a/src/sharp/propertyeditor.hpp b/src/sharp/propertyeditor.hpp
index 4626a3a..5745797 100644
--- a/src/sharp/propertyeditor.hpp
+++ b/src/sharp/propertyeditor.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011 Aurimas Cernius
+ * Copyright (C) 2011,2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -36,6 +36,8 @@
 #include <gtkmm/entry.h>
 #include <gtkmm/togglebutton.h>
 
+#include "base/macros.hpp"
+
 namespace sharp {
 
   class PropertyEditorBase
@@ -61,7 +63,7 @@ namespace sharp {
   public:
     PropertyEditor(Glib::RefPtr<Gio::Settings> & settings, const char * key, Gtk::Entry &entry);
 
-    virtual void setup();
+    virtual void setup() override;
 
   private:
     void on_changed();
@@ -77,7 +79,7 @@ namespace sharp {
         m_guarded.push_back(w);
       }
 
-    virtual void setup();
+    virtual void setup() override;
 
   private:
     void guard(bool v);
diff --git a/src/synchronization/filesystemsyncserver.hpp b/src/synchronization/filesystemsyncserver.hpp
index 636f31b..156d689 100644
--- a/src/synchronization/filesystemsyncserver.hpp
+++ b/src/synchronization/filesystemsyncserver.hpp
@@ -21,6 +21,7 @@
 #ifndef _SYNCHRONIZATION_FILESYSTEMSYNCSERVER_HPP_
 #define _SYNCHRONIZATION_FILESYSTEMSYNCSERVER_HPP_
 
+#include "base/macros.hpp"
 #include "isyncmanager.hpp"
 #include "utils.hpp"
 #include "sharp/datetime.hpp"
@@ -35,17 +36,17 @@ class FileSystemSyncServer
 {
 public:
   static SyncServer::Ptr create(const std::string & path);
-  virtual bool begin_sync_transaction();
-  virtual bool commit_sync_transaction();
-  virtual bool cancel_sync_transaction();
-  virtual std::list<std::string> get_all_note_uuids();
-  virtual std::map<std::string, NoteUpdate> get_note_updates_since(int revision);
-  virtual void delete_notes(const std::list<std::string> & deletedNoteUUIDs);
-  virtual void upload_notes(const std::list<Note::Ptr> & notes);
-  virtual int latest_revision(); // NOTE: Only reliable during a transaction
-  virtual SyncLockInfo current_sync_lock();
-  virtual std::string id();
-  virtual bool updates_available_since(int revision);
+  virtual bool begin_sync_transaction() override;
+  virtual bool commit_sync_transaction() override;
+  virtual bool cancel_sync_transaction() override;
+  virtual std::list<std::string> get_all_note_uuids() override;
+  virtual std::map<std::string, NoteUpdate> get_note_updates_since(int revision) override;
+  virtual void delete_notes(const std::list<std::string> & deletedNoteUUIDs) override;
+  virtual void upload_notes(const std::list<Note::Ptr> & notes) override;
+  virtual int latest_revision() override; // NOTE: Only reliable during a transaction
+  virtual SyncLockInfo current_sync_lock() override;
+  virtual std::string id() override;
+  virtual bool updates_available_since(int revision) override;
 private:
   explicit FileSystemSyncServer(const std::string & path);
 
diff --git a/src/synchronization/fusesyncserviceaddin.hpp b/src/synchronization/fusesyncserviceaddin.hpp
index 279fda0..9be1a2d 100644
--- a/src/synchronization/fusesyncserviceaddin.hpp
+++ b/src/synchronization/fusesyncserviceaddin.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012 Aurimas Cernius
+ * Copyright (C) 2012-2013 Aurimas Cernius
  *
  * 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,6 +22,7 @@
 
 #include <glibmm.h>
 
+#include "base/macros.hpp"
 #include "syncserviceaddin.hpp"
 #include "utils.hpp"
 
@@ -37,14 +38,14 @@ public:
 
   FuseSyncServiceAddin();
 
-  virtual void shutdown();
-  virtual bool initialized();
-  virtual void initialize();
-  virtual SyncServer::Ptr create_sync_server();
-  virtual void post_sync_cleanup();
-  virtual bool is_supported();
-  virtual bool save_configuration();
-  virtual void reset_configuration();
+  virtual void shutdown() override;
+  virtual bool initialized() override;
+  virtual void initialize() override;
+  virtual SyncServer::Ptr create_sync_server() override;
+  virtual void post_sync_cleanup() override;
+  virtual bool is_supported() override;
+  virtual bool save_configuration() override;
+  virtual void reset_configuration() override;
 
   virtual std::string fuse_mount_timeout_error();
   virtual std::string fuse_mount_directory_error();
diff --git a/src/synchronization/gnotesyncclient.hpp b/src/synchronization/gnotesyncclient.hpp
index 8c1a4dd..3164fb5 100644
--- a/src/synchronization/gnotesyncclient.hpp
+++ b/src/synchronization/gnotesyncclient.hpp
@@ -20,6 +20,7 @@
 
 #include <giomm/file.h>
 
+#include "base/macros.hpp"
 #include "isyncmanager.hpp"
 
 
@@ -33,28 +34,28 @@ namespace sync {
   public:
     GnoteSyncClient(NoteManager &);
 
-    virtual sharp::DateTime last_sync_date()
+    virtual sharp::DateTime last_sync_date() override
       {
         return m_last_sync_date;
       }
-    virtual void last_sync_date(const sharp::DateTime &);
-    virtual int last_synchronized_revision()
+    virtual void last_sync_date(const sharp::DateTime &) override;
+    virtual int last_synchronized_revision() override
       {
         return m_last_sync_rev;
       }
-    virtual void last_synchronized_revision(int);
-    virtual int get_revision(const Note::Ptr & note);
-    virtual void set_revision(const Note::Ptr & note, int revision);
-    virtual std::map<std::string, std::string> deleted_note_titles()
+    virtual void last_synchronized_revision(int) override;
+    virtual int get_revision(const Note::Ptr & note) override;
+    virtual void set_revision(const Note::Ptr & note, int revision) override;
+    virtual std::map<std::string, std::string> deleted_note_titles() override
       {
         return m_deleted_notes;
       }
-    virtual void reset();
-    virtual std::string associated_server_id()
+    virtual void reset() override;
+    virtual std::string associated_server_id() override
       {
         return m_server_id;
       }
-    virtual void associated_server_id(const std::string &);
+    virtual void associated_server_id(const std::string &) override;
   private:
     static const char *LOCAL_MANIFEST_FILE_NAME;
 
diff --git a/src/synchronization/silentui.hpp b/src/synchronization/silentui.hpp
index 7662ca3..306cb4e 100644
--- a/src/synchronization/silentui.hpp
+++ b/src/synchronization/silentui.hpp
@@ -22,6 +22,7 @@
 #define _SYNCHRONIZATION_SILENTUI_HPP_
 
 
+#include "base/macros.hpp"
 #include "notemanager.hpp"
 #include "syncui.hpp"
 
@@ -37,13 +38,13 @@ namespace sync {
     static SyncUI::Ptr create(NoteManager &);
   private:
     explicit SilentUI(NoteManager &);
-    virtual void sync_state_changed(SyncState state);
-    virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type);
+    virtual void sync_state_changed(SyncState state) override;
+    virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type) override;
     virtual void note_conflict_detected(NoteManager & manager,
                                         const Note::Ptr & localConflictNote,
                                         NoteUpdate remoteNote,
-                                        const std::list<std::string> & noteUpdateTitles);
-    virtual void present_ui();
+                                        const std::list<std::string> & noteUpdateTitles) override;
+    virtual void present_ui() override;
     void on_connecting();
     void on_idle();
 
diff --git a/src/synchronization/syncdialog.hpp b/src/synchronization/syncdialog.hpp
index 99e3814..900265f 100644
--- a/src/synchronization/syncdialog.hpp
+++ b/src/synchronization/syncdialog.hpp
@@ -28,6 +28,7 @@
 #include <gtkmm/treestore.h>
 #include <gtkmm/treeviewcolumn.h>
 
+#include "base/macros.hpp"
 #include "syncui.hpp"
 
 
@@ -43,20 +44,20 @@ namespace sync {
 
     static Ptr create(NoteManager &);
 
-    virtual void sync_state_changed(SyncState state);
-    virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type);
+    virtual void sync_state_changed(SyncState state) override;
+    virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type) override;
     virtual void note_conflict_detected(NoteManager & manager,
                                         const Note::Ptr & localConflictNote,
                                         NoteUpdate remoteNote,
-                                        const std::list<std::string> & noteUpdateTitles);
-    virtual void present_ui();
+                                        const std::list<std::string> & noteUpdateTitles) override;
+    virtual void present_ui() override;
     void header_text(const std::string &);
     void message_text(const std::string &);
     std::string progress_text() const;
     void progress_text(const std::string &);
     void add_update_item(const std::string & title, std::string & status);
   protected:
-    virtual void on_realize();
+    virtual void on_realize() override;
   private:
     static void on_expander_activated(GtkExpander*, gpointer);
     void note_conflict_detected_(NoteManager & manager,
diff --git a/src/synchronization/syncmanager.hpp b/src/synchronization/syncmanager.hpp
index 4eb6a59..12dcf62 100644
--- a/src/synchronization/syncmanager.hpp
+++ b/src/synchronization/syncmanager.hpp
@@ -27,6 +27,7 @@
 #include <glibmm/main.h>
 #include <glibmm/thread.h>
 
+#include "base/macros.hpp"
 #include "isyncmanager.hpp"
 
 
@@ -41,12 +42,12 @@ namespace sync {
   public:
     SyncManager(NoteManager &);
     static void init(NoteManager &);
-    virtual void reset_client();
-    virtual void perform_synchronization(const std::tr1::shared_ptr<SyncUI> & sync_ui);
+    virtual void reset_client() override;
+    virtual void perform_synchronization(const std::tr1::shared_ptr<SyncUI> & sync_ui) override;
     void synchronization_thread();
-    virtual void resolve_conflict(SyncTitleConflictResolution resolution);
-    virtual bool synchronized_note_xml_matches(const std::string & noteXml1, const std::string & noteXml2);
-    virtual SyncState state() const
+    virtual void resolve_conflict(SyncTitleConflictResolution resolution) override;
+    virtual bool synchronized_note_xml_matches(const std::string & noteXml1, const std::string & noteXml2) 
override;
+    virtual SyncState state() const override
       {
         return m_state;
       }
diff --git a/src/tagmanager.hpp b/src/tagmanager.hpp
index 8f1c92c..a9b24de 100644
--- a/src/tagmanager.hpp
+++ b/src/tagmanager.hpp
@@ -31,6 +31,7 @@
 #include <gtkmm/liststore.h>
 #include <gtkmm/treemodelsort.h>
 
+#include "base/macros.hpp"
 #include "itagmanager.hpp"
 #include "tag.hpp"
 
@@ -43,16 +44,16 @@ class TagManager
 public:
   TagManager();
 
-  virtual Tag::Ptr get_tag(const std::string & tag_name) const;
-  virtual Tag::Ptr get_or_create_tag(const std::string &);
-  virtual Tag::Ptr get_system_tag(const std::string & tag_name) const;
-  virtual Tag::Ptr get_or_create_system_tag(const std::string & name);
-  virtual void remove_tag(const Tag::Ptr & tag);
+  virtual Tag::Ptr get_tag(const std::string & tag_name) const override;
+  virtual Tag::Ptr get_or_create_tag(const std::string &) override;
+  virtual Tag::Ptr get_system_tag(const std::string & tag_name) const override;
+  virtual Tag::Ptr get_or_create_system_tag(const std::string & name) override;
+  virtual void remove_tag(const Tag::Ptr & tag) override;
   Glib::RefPtr<Gtk::TreeModel> get_tags() const
     {
       return m_sorted_tags;
     }
-  virtual void all_tags(std::list<Tag::Ptr> &) const;
+  virtual void all_tags(std::list<Tag::Ptr> &) const override;
 private:
   class ColumnRecord
     : public Gtk::TreeModelColumnRecord
diff --git a/src/tray.hpp b/src/tray.hpp
index 3381ede..e8a576c 100644
--- a/src/tray.hpp
+++ b/src/tray.hpp
@@ -26,6 +26,7 @@
 #include <gtkmm/statusicon.h>
 #include <gtkmm/imagemenuitem.h>
 
+#include "base/macros.hpp"
 #include "note.hpp"
 
 #ifdef HAVE_X11_SUPPORT
@@ -45,11 +46,11 @@ public:
   NoteMenuItem(const Note::Ptr & note, bool show_pin);
 
 protected:
-  virtual void on_activate();
-  virtual bool on_button_press_event(GdkEventButton *);
-  virtual bool on_button_release_event(GdkEventButton *);
-  virtual bool on_motion_notify_event(GdkEventMotion *);
-  virtual bool on_leave_notify_event(GdkEventCrossing *);
+  virtual void on_activate() override;
+  virtual bool on_button_press_event(GdkEventButton *) override;
+  virtual bool on_button_release_event(GdkEventButton *) override;
+  virtual bool on_motion_notify_event(GdkEventMotion *) override;
+  virtual bool on_leave_notify_event(GdkEventCrossing *) override;
 
 private:
   Note::Ptr   m_note;
@@ -131,7 +132,7 @@ public:
   void show_about();
   void quit();
 protected:
-  virtual bool on_size_changed(int size);
+  virtual bool on_size_changed(int size) override;
 private:
   Tray::Ptr                m_tray;
   Gtk::Menu               *m_context_menu;
diff --git a/src/undo.hpp b/src/undo.hpp
index edcd439..b097e1c 100644
--- a/src/undo.hpp
+++ b/src/undo.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -33,6 +34,7 @@
 #include <gtkmm/texttag.h>
 #include <gtkmm/textiter.h>
 
+#include "base/macros.hpp"
 #include "notebuffer.hpp"
 #include "utils.hpp"
 
@@ -98,11 +100,11 @@ class InsertAction
 public:
   InsertAction(const Gtk::TextIter & start, const std::string & text, int length,
                const ChopBuffer::Ptr & chop_buf);
-  virtual void undo (Gtk::TextBuffer * buffer);
-  virtual void redo (Gtk::TextBuffer * buffer);
-  virtual void merge (EditAction * action);
-  virtual bool can_merge (const EditAction * action) const;
-  virtual void destroy ();
+  virtual void undo(Gtk::TextBuffer * buffer) override;
+  virtual void redo(Gtk::TextBuffer * buffer) override;
+  virtual void merge(EditAction * action) override;
+  virtual bool can_merge(const EditAction * action) const override;
+  virtual void destroy() override;
 
 private:
   int m_index;
@@ -116,11 +118,11 @@ class EraseAction
 public:
   EraseAction(const Gtk::TextIter & start_iter, const Gtk::TextIter & end_iter,
                const ChopBuffer::Ptr & chop_buf);
-  virtual void undo (Gtk::TextBuffer * buffer);
-  virtual void redo (Gtk::TextBuffer * buffer);
-  virtual void merge (EditAction * action);
-  virtual bool can_merge (const EditAction * action) const;
-  virtual void destroy ();
+  virtual void undo(Gtk::TextBuffer * buffer) override;
+  virtual void redo(Gtk::TextBuffer * buffer) override;
+  virtual void merge(EditAction * action) override;
+  virtual bool can_merge(const EditAction * action) const override;
+  virtual void destroy() override;
 
 private:
   int m_start;
@@ -136,11 +138,11 @@ class TagApplyAction
 {
 public:
   TagApplyAction(const Glib::RefPtr<Gtk::TextTag> &, const Gtk::TextIter & start, const Gtk::TextIter & end);
-  virtual void undo (Gtk::TextBuffer * buffer);
-  virtual void redo (Gtk::TextBuffer * buffer);
-  virtual void merge (EditAction * action);
-  virtual bool can_merge (const EditAction * action) const;
-  virtual void destroy ();
+  virtual void undo(Gtk::TextBuffer * buffer) override;
+  virtual void redo(Gtk::TextBuffer * buffer) override;
+  virtual void merge(EditAction * action) override;
+  virtual bool can_merge(const EditAction * action) const override;
+  virtual void destroy() override;
 
 private:
   Glib::RefPtr<Gtk::TextTag> m_tag;
@@ -154,11 +156,11 @@ class TagRemoveAction
 {
 public:
   TagRemoveAction(const Glib::RefPtr<Gtk::TextTag> &, const Gtk::TextIter & start, const Gtk::TextIter & 
end);
-  virtual void undo (Gtk::TextBuffer * buffer);
-  virtual void redo (Gtk::TextBuffer * buffer);
-  virtual void merge (EditAction * action);
-  virtual bool can_merge (const EditAction * action) const;
-  virtual void destroy ();
+  virtual void undo(Gtk::TextBuffer * buffer) override;
+  virtual void redo(Gtk::TextBuffer * buffer) override;
+  virtual void merge(EditAction * action) override;
+  virtual bool can_merge(const EditAction * action) const override;
+  virtual void destroy() override;
 private:
   Glib::RefPtr<Gtk::TextTag> m_tag;
   int m_start;
@@ -171,11 +173,11 @@ class ChangeDepthAction
 {
 public:
   ChangeDepthAction(int line, bool direction);
-  virtual void undo (Gtk::TextBuffer * buffer);
-  virtual void redo (Gtk::TextBuffer * buffer);
-  virtual void merge (EditAction * action);
-  virtual bool can_merge (const EditAction * action) const;
-  virtual void destroy ();
+  virtual void undo(Gtk::TextBuffer * buffer) override;
+  virtual void redo(Gtk::TextBuffer * buffer) override;
+  virtual void merge(EditAction * action) override;
+  virtual bool can_merge(const EditAction * action) const override;
+  virtual void destroy() override;
 private:
   int m_line;
   bool m_direction;
@@ -188,11 +190,11 @@ class InsertBulletAction
 {
 public:
   InsertBulletAction(int offset, int depth, Pango::Direction direction);
-  virtual void undo (Gtk::TextBuffer * buffer);
-  virtual void redo (Gtk::TextBuffer * buffer);
-  virtual void merge (EditAction * action);
-  virtual bool can_merge (const EditAction * action) const;
-  virtual void destroy ();
+  virtual void undo(Gtk::TextBuffer * buffer) override;
+  virtual void redo(Gtk::TextBuffer * buffer) override;
+  virtual void merge(EditAction * action) override;
+  virtual bool can_merge(const EditAction * action) const override;
+  virtual void destroy() override;
 private:
   int m_offset;
   int m_depth;
diff --git a/src/utils.hpp b/src/utils.hpp
index 216d9a5..820ac2f 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -38,6 +38,7 @@
 #include <gtkmm/toggletoolbutton.h>
 #include <gtkmm/toolbar.h>
 
+#include "base/macros.hpp"
 #include "sharp/exception.hpp"
 #include "sharp/uri.hpp"
 
@@ -242,9 +243,9 @@ namespace gnote {
                      const Glib::ustring & label, Gtk::Menu * menu);
       ToolMenuButton(Gtk::Image& image, 
                      const Glib::ustring & label, Gtk::Menu * menu);
-      virtual bool on_button_press_event(GdkEventButton *);
-      virtual void on_clicked();
-      virtual bool on_mnemonic_activate(bool group_cycling);
+      virtual bool on_button_press_event(GdkEventButton *) override;
+      virtual void on_clicked() override;
+      virtual bool on_mnemonic_activate(bool group_cycling) override;
 
     private:
       void _common_init();
diff --git a/src/watchers.hpp b/src/watchers.hpp
index 3b45073..8a371c0 100644
--- a/src/watchers.hpp
+++ b/src/watchers.hpp
@@ -38,6 +38,7 @@ extern "C" {
 #include <gtkmm/textiter.h>
 #include <gtkmm/texttag.h>
 
+#include "base/macros.hpp"
 #include "noteaddin.hpp"
 #include "triehit.hpp"
 #include "utils.hpp"
@@ -54,9 +55,9 @@ namespace gnote {
   public:
     static NoteAddin * create();
     ~NoteRenameWatcher();
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   protected:
     NoteRenameWatcher()
@@ -89,9 +90,9 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();    
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
     static bool gtk_spell_available()
       { return true; }
@@ -115,10 +116,10 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();    
-    virtual void initialize ();
-    virtual void shutdown ()
+    virtual void initialize() override;
+    virtual void shutdown() override
       {}
-    virtual void on_note_opened ()
+    virtual void on_note_opened() override
       {}
 
     static bool gtk_spell_available()
@@ -132,9 +133,9 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();    
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   protected:
     NoteUrlWatcher();
@@ -166,9 +167,9 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();    
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   private:
     bool contains_text(const std::string & text);
@@ -204,9 +205,9 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();    
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   protected:
     NoteWikiWatcher()
@@ -233,9 +234,9 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();    
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   protected:
     MouseHandWatcher()
@@ -261,9 +262,9 @@ namespace gnote {
   {
   public:
     static NoteAddin * create();
-    virtual void initialize ();
-    virtual void shutdown ();
-    virtual void on_note_opened ();
+    virtual void initialize() override;
+    virtual void shutdown() override;
+    virtual void on_note_opened() override;
 
   private:
     void on_tag_added(const Note&, const Tag::Ptr&);
diff --git a/src/xkeybinder.hpp b/src/xkeybinder.hpp
index 06d9989..cc4f07f 100644
--- a/src/xkeybinder.hpp
+++ b/src/xkeybinder.hpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2013 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -26,6 +27,7 @@
 
 #include <sigc++/slot.h>
 
+#include "base/macros.hpp"
 #include "keybinder.hpp"
 
 namespace gnote {
@@ -35,11 +37,11 @@ class XKeybinder
 {
 public:
   XKeybinder();
-  virtual void bind(const std::string & keystring, const sigc::slot<void> & handler);
-  virtual void unbind(const std::string & keystring);
-  virtual void unbind_all();
+  virtual void bind(const std::string & keystring, const sigc::slot<void> & handler) override;
+  virtual void unbind(const std::string & keystring) override;
+  virtual void unbind_all() override;
   virtual bool get_accel_keys(const std::string & prefs_path, guint & keyval, 
-                              Gdk::ModifierType & mods);
+                              Gdk::ModifierType & mods) override;
 private:
   static void keybinding_pressed(char *keystring, gpointer user_data);
 


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