[gnote] Cleanup glibmm.h includes



commit 4a22dfa7c2d3d2246abde3d0eedbf451da834744
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri Feb 17 22:50:48 2017 +0200

    Cleanup glibmm.h includes

 src/addinmanager.cpp                               |    1 +
 src/addins/bugzilla/bugzillanoteaddin.cpp          |    3 ++-
 .../notedirectorywatcherapplicationaddin.cpp       |    3 +++
 src/addins/noteoftheday/noteoftheday.cpp           |    1 +
 src/addins/noteoftheday/noteoftheday.hpp           |    2 ++
 .../noteoftheday/noteofthedayapplicationaddin.cpp  |    2 ++
 .../stickynoteimport/stickynoteimportnoteaddin.cpp |    1 +
 src/debug.cpp                                      |    5 +++--
 src/gnote.cpp                                      |    1 +
 src/notebase.cpp                                   |   15 +++++----------
 src/notebooks/notebookapplicationaddin.cpp         |    1 +
 src/notebooks/notebookmanager.cpp                  |    1 +
 src/notemanager.cpp                                |    1 +
 src/notemanagerbase.cpp                            |    1 +
 src/noterenamedialog.hpp                           |    1 -
 src/preferencesdialog.cpp                          |    1 +
 src/sharp/directory.cpp                            |    2 +-
 src/sharp/fileinfo.cpp                             |    2 +-
 src/sharp/files.cpp                                |    3 ++-
 src/synchronization/gnotesyncclient.cpp            |    1 +
 src/synchronization/syncdialog.cpp                 |    1 +
 src/synchronization/syncutils.cpp                  |    3 ++-
 src/triehit.hpp                                    |    4 ++--
 src/watchers.cpp                                   |    1 +
 src/watchers.hpp                                   |    1 +
 25 files changed, 38 insertions(+), 20 deletions(-)
---
diff --git a/src/addinmanager.cpp b/src/addinmanager.cpp
index 6c4ad55..9a4f2f7 100644
--- a/src/addinmanager.cpp
+++ b/src/addinmanager.cpp
@@ -24,6 +24,7 @@
 
 #include <glib.h>
 #include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
 
 #include "sharp/map.hpp"
 #include "sharp/directory.hpp"
diff --git a/src/addins/bugzilla/bugzillanoteaddin.cpp b/src/addins/bugzilla/bugzillanoteaddin.cpp
index 9079612..eb8d112 100644
--- a/src/addins/bugzilla/bugzillanoteaddin.cpp
+++ b/src/addins/bugzilla/bugzillanoteaddin.cpp
@@ -22,7 +22,8 @@
 
 
 #include <glib.h>
-
+#include <glibmm/miscutils.h>
+#include <glibmm/regex.h>
 
 #include "sharp/directory.hpp"
 
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp 
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
index 7467d98..9778cde 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
@@ -19,6 +19,9 @@
 
 
 #include <glibmm/i18n.h>
+#include <glibmm/main.h>
+#include <glibmm/miscutils.h>
+#include <glibmm/regex.h>
 
 #include "debug.hpp"
 #include "notedirectorywatcherapplicationaddin.hpp"
diff --git a/src/addins/noteoftheday/noteoftheday.cpp b/src/addins/noteoftheday/noteoftheday.cpp
index 1073c9a..1f7e736 100644
--- a/src/addins/noteoftheday/noteoftheday.cpp
+++ b/src/addins/noteoftheday/noteoftheday.cpp
@@ -19,6 +19,7 @@
  */
 
 #include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
 
 #include "sharp/datetime.hpp"
 #include "debug.hpp"
diff --git a/src/addins/noteoftheday/noteoftheday.hpp b/src/addins/noteoftheday/noteoftheday.hpp
index 9d28375..40536e6 100644
--- a/src/addins/noteoftheday/noteoftheday.hpp
+++ b/src/addins/noteoftheday/noteoftheday.hpp
@@ -21,6 +21,8 @@
 #ifndef __NOTE_OF_THE_DAY_HPP_
 #define __NOTE_OF_THE_DAY_HPP_
 
+#include <glibmm/date.h>
+
 #include "sharp/dynamicmodule.hpp"
 #include "applicationaddin.hpp"
 #include "note.hpp"
diff --git a/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp 
b/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
index f795189..8b28c9c 100644
--- a/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
+++ b/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
@@ -18,6 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <glibmm/main.h>
+
 #include "noteoftheday.hpp"
 #include "noteofthedayapplicationaddin.hpp"
 #include "noteofthedaypreferencesfactory.hpp"
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp 
b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
index 9c86a3c..268de49 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
@@ -22,6 +22,7 @@
 
 #include <glibmm/i18n.h>
 #include <glibmm/keyfile.h>
+#include <glibmm/miscutils.h>
 #include <gtkmm/image.h>
 #include <gtkmm/stock.h>
 
diff --git a/src/debug.cpp b/src/debug.cpp
index 414eddd..03cbbc1 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012-2013 Aurimas Cernius
+ * Copyright (C) 2012-2013,2017 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -41,7 +41,8 @@
 #include <string.h>
 #include <stdarg.h>
 
-#include <glibmm.h>
+#include <glibmm/ustring.h>
+#include <glibmm/miscutils.h>
 #include <pthread.h>
 
 #if defined(NDEBUG)
diff --git a/src/gnote.cpp b/src/gnote.cpp
index b146731..cbe3310 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -29,6 +29,7 @@
 
 #include <glibmm/thread.h>
 #include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
 #include <glibmm/optionentry.h>
 #include <gtkmm/main.h>
 #include <gtkmm/aboutdialog.h>
diff --git a/src/notebase.cpp b/src/notebase.cpp
index fef0f16..3ee0387 100644
--- a/src/notebase.cpp
+++ b/src/notebase.cpp
@@ -19,6 +19,9 @@
  */
 
 
+#include <algorithm>
+#include <functional>
+
 #include <glibmm/i18n.h>
 
 #include "config.h"
@@ -33,14 +36,6 @@
 #include "sharp/xml.hpp"
 #include "sharp/xmlconvert.hpp"
 
-#if HAVE_CXX11
-  #include <functional>
-  using std::hash;
-#else
-  #include <tr1/functional>
-  using std::tr1::hash;
-#endif
-
 
 
 namespace gnote {
@@ -97,7 +92,7 @@ NoteBase::NoteBase(NoteData *, const Glib::ustring & filepath, NoteManagerBase &
 
 int NoteBase::get_hash_code() const
 {
-  hash<std::string> h;
+  std::hash<std::string> h;
   return h(get_title());
 }
 
@@ -361,7 +356,7 @@ void NoteBase::load_foreign_note_xml(const Glib::ustring & foreignNoteXml, Chang
   get_tags(tag_list);
 
   FOREACH(Tag::Ptr & iter, tag_list) {
-    if(find(new_tags.begin(), new_tags.end(), iter) == new_tags.end()) {
+    if(std::find(new_tags.begin(), new_tags.end(), iter) == new_tags.end()) {
       remove_tag(iter);
     }
   }
diff --git a/src/notebooks/notebookapplicationaddin.cpp b/src/notebooks/notebookapplicationaddin.cpp
index 85c55c4..5f97332 100644
--- a/src/notebooks/notebookapplicationaddin.cpp
+++ b/src/notebooks/notebookapplicationaddin.cpp
@@ -22,6 +22,7 @@
 
 
 #include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
 #include <gtkmm/stock.h>
 #include <gtkmm/separatormenuitem.h>
 #include <gtkmm/treeiter.h>
diff --git a/src/notebooks/notebookmanager.cpp b/src/notebooks/notebookmanager.cpp
index 4aa45da..b9264ac 100644
--- a/src/notebooks/notebookmanager.cpp
+++ b/src/notebooks/notebookmanager.cpp
@@ -21,6 +21,7 @@
 
 
 #include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
 #include <gtkmm/treemodelsort.h>
 
 #include "sharp/string.hpp"
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index 1dac87a..61ccf7e 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -24,6 +24,7 @@
 #endif
 
 #include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
 
 #include "applicationaddin.hpp"
 #include "debug.hpp"
diff --git a/src/notemanagerbase.cpp b/src/notemanagerbase.cpp
index 82c48e0..445da14 100644
--- a/src/notemanagerbase.cpp
+++ b/src/notemanagerbase.cpp
@@ -20,6 +20,7 @@
 
 
 #include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
 
 #include "debug.hpp"
 #include "ignote.hpp"
diff --git a/src/noterenamedialog.hpp b/src/noterenamedialog.hpp
index 880896b..905b5e3 100644
--- a/src/noterenamedialog.hpp
+++ b/src/noterenamedialog.hpp
@@ -23,7 +23,6 @@
 
 #include <map>
 
-#include <glibmm.h>
 #include <gtkmm/grid.h>
 #include <gtkmm/liststore.h>
 #include <gtkmm/radiobutton.h>
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index 7ca55fd..46e9533 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -26,6 +26,7 @@
 #endif
 
 #include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
 #include <gtkmm/accelgroup.h>
 #include <gtkmm/alignment.h>
 #include <gtkmm/button.h>
diff --git a/src/sharp/directory.cpp b/src/sharp/directory.cpp
index 74f4eec..4ac4e84 100644
--- a/src/sharp/directory.cpp
+++ b/src/sharp/directory.cpp
@@ -27,7 +27,7 @@
 
 
 #include <glib/gstdio.h>
-#include <glibmm.h>
+#include <glibmm/fileutils.h>
 
 #include "sharp/directory.hpp"
 #include "sharp/fileinfo.hpp"
diff --git a/src/sharp/fileinfo.cpp b/src/sharp/fileinfo.cpp
index 3ae0628..9983b32 100644
--- a/src/sharp/fileinfo.cpp
+++ b/src/sharp/fileinfo.cpp
@@ -24,7 +24,7 @@
  */
 
 
-#include <glibmm.h>
+#include <glibmm/miscutils.h>
 #include <giomm/file.h>
 #include <giomm/fileinfo.h>
 #include "sharp/fileinfo.hpp"
diff --git a/src/sharp/files.cpp b/src/sharp/files.cpp
index f716ba4..ff41f83 100644
--- a/src/sharp/files.cpp
+++ b/src/sharp/files.cpp
@@ -26,7 +26,8 @@
 #include <fstream>
 
 #include <glib/gstdio.h>
-#include <glibmm.h>
+#include <glibmm/fileutils.h>
+#include <glibmm/miscutils.h>
 #include <giomm/file.h>
 
 #include "exception.hpp"
diff --git a/src/synchronization/gnotesyncclient.cpp b/src/synchronization/gnotesyncclient.cpp
index 2449e02..e71a45d 100644
--- a/src/synchronization/gnotesyncclient.cpp
+++ b/src/synchronization/gnotesyncclient.cpp
@@ -23,6 +23,7 @@
 
 
 #include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
 
 #include "debug.hpp"
 #include "ignote.hpp"
diff --git a/src/synchronization/syncdialog.cpp b/src/synchronization/syncdialog.cpp
index 9b52ae2..bdae1c8 100644
--- a/src/synchronization/syncdialog.cpp
+++ b/src/synchronization/syncdialog.cpp
@@ -21,6 +21,7 @@
 #include "debug.hpp"
 
 #include <glibmm/i18n.h>
+#include <glibmm/main.h>
 #include <gtkmm/radiobutton.h>
 #include <gtkmm/scrolledwindow.h>
 #include <gtkmm/stock.h>
diff --git a/src/synchronization/syncutils.cpp b/src/synchronization/syncutils.cpp
index 1b5d46e..6f5661e 100644
--- a/src/synchronization/syncutils.cpp
+++ b/src/synchronization/syncutils.cpp
@@ -21,8 +21,9 @@
 #include <algorithm>
 #include <vector>
 
-#include <glibmm.h>
 #include <glibmm/i18n.h>
+#include <glibmm/miscutils.h>
+#include <glibmm/regex.h>
 
 #include "debug.hpp"
 #include "syncutils.hpp"
diff --git a/src/triehit.hpp b/src/triehit.hpp
index 72b15fc..52aa625 100644
--- a/src/triehit.hpp
+++ b/src/triehit.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2017 Aurimas Cernius
  * Copyright (C) 2011 Debarshi Ray
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -24,7 +24,7 @@
 
 #include <list>
 
-#include <glibmm.h>
+#include <glibmm/ustring.h>
 
 #include "base/macros.hpp"
 
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 45467bd..83776e9 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -25,6 +25,7 @@
 #endif
 
 #include <glibmm/i18n.h>
+#include <glibmm/stringutils.h>
 #include <gtkmm/separatormenuitem.h>
 
 #include "sharp/string.hpp"
diff --git a/src/watchers.hpp b/src/watchers.hpp
index 4eaea0a..81c8e8f 100644
--- a/src/watchers.hpp
+++ b/src/watchers.hpp
@@ -35,6 +35,7 @@ extern "C" {
 #endif
 
 #include <gdkmm/cursor.h>
+#include <glibmm/regex.h>
 #include <gtkmm/textiter.h>
 #include <gtkmm/texttag.h>
 


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