summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2013-06-06 13:44:11 +0000
committerJon A. Cruz <jon@joncruz.org>2013-06-06 13:44:11 +0000
commit72d8e897c6b67e46b2a613c4743ef9c13de25059 (patch)
tree8aa472fc661f6cacb075274a8f9579dfe8c3c841 /src/ui
parentFixes r12348 and r12350. (diff)
downloadinkscape-72d8e897c6b67e46b2a613c4743ef9c13de25059.tar.gz
inkscape-72d8e897c6b67e46b2a613c4743ef9c13de25059.zip
Added configure/ifdef guards to only bring in the needed #include if glibmm has it.
(bzr r12353)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/aboutbox.h2
-rw-r--r--src/ui/dialog/calligraphic-profile-rename.h2
-rw-r--r--src/ui/dialog/color-item.cpp2
-rw-r--r--src/ui/dialog/debug.cpp2
-rw-r--r--src/ui/dialog/export.cpp2
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.h2
-rw-r--r--src/ui/dialog/filedialogimpl-win32.h3
-rw-r--r--src/ui/dialog/floating-behavior.cpp2
-rw-r--r--src/ui/dialog/font-substitution.cpp2
-rw-r--r--src/ui/dialog/guides.h3
-rw-r--r--src/ui/dialog/icon-preview.cpp2
-rw-r--r--src/ui/dialog/layer-properties.h2
-rw-r--r--src/ui/dialog/layers.h2
-rw-r--r--src/ui/dialog/livepatheffect-add.h2
-rw-r--r--src/ui/dialog/messages.h2
-rw-r--r--src/ui/dialog/ocaldialogs.h2
-rw-r--r--src/ui/dialog/spellcheck.h2
-rw-r--r--src/ui/dialog/symbols.cpp2
-rw-r--r--src/ui/dialog/text-edit.h2
-rw-r--r--src/ui/dialog/tile.h2
-rw-r--r--src/ui/dialog/transformation.cpp2
-rw-r--r--src/ui/previewholder.h2
-rw-r--r--src/ui/widget/button.h2
-rw-r--r--src/ui/widget/color-picker.h2
-rw-r--r--src/ui/widget/color-preview.h2
-rw-r--r--src/ui/widget/dock-item.h3
-rw-r--r--src/ui/widget/dock.h2
-rw-r--r--src/ui/widget/entity-entry.cpp2
-rw-r--r--src/ui/widget/filter-effect-chooser.h2
-rw-r--r--src/ui/widget/frame.h2
-rw-r--r--src/ui/widget/imageicon.h2
-rw-r--r--src/ui/widget/imagetoggler.h2
-rw-r--r--src/ui/widget/labelled.h3
-rw-r--r--src/ui/widget/licensor.h2
-rw-r--r--src/ui/widget/notebook-page.h2
-rw-r--r--src/ui/widget/object-composite-settings.h2
-rw-r--r--src/ui/widget/panel.cpp2
-rw-r--r--src/ui/widget/panel.h2
-rw-r--r--src/ui/widget/preferences-widget.cpp2
-rw-r--r--src/ui/widget/preferences-widget.h2
-rw-r--r--src/ui/widget/rotateable.cpp2
-rw-r--r--src/ui/widget/selected-style.h2
-rw-r--r--src/ui/widget/spin-scale.h2
-rw-r--r--src/ui/widget/spin-slider.h2
-rw-r--r--src/ui/widget/spinbutton.h2
-rw-r--r--src/ui/widget/style-swatch.h2
-rw-r--r--src/ui/widget/tolerance-slider.cpp2
-rw-r--r--src/ui/widget/unit-menu.h2
48 files changed, 100 insertions, 0 deletions
diff --git a/src/ui/dialog/aboutbox.h b/src/ui/dialog/aboutbox.h
index e4a87f265..cd58c8988 100644
--- a/src/ui/dialog/aboutbox.h
+++ b/src/ui/dialog/aboutbox.h
@@ -15,7 +15,9 @@
#ifndef INKSCAPE_UI_DIALOG_ABOUTBOX_H
#define INKSCAPE_UI_DIALOG_ABOUTBOX_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
diff --git a/src/ui/dialog/calligraphic-profile-rename.h b/src/ui/dialog/calligraphic-profile-rename.h
index d2e09f075..3256338eb 100644
--- a/src/ui/dialog/calligraphic-profile-rename.h
+++ b/src/ui/dialog/calligraphic-profile-rename.h
@@ -15,7 +15,9 @@
# include "config.h"
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp
index 762a534d9..633b3f4c5 100644
--- a/src/ui/dialog/color-item.cpp
+++ b/src/ui/dialog/color-item.cpp
@@ -13,7 +13,9 @@
#include <errno.h>
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/label.h>
#include <glibmm/i18n.h>
diff --git a/src/ui/dialog/debug.cpp b/src/ui/dialog/debug.cpp
index 20865bce6..9e2287f80 100644
--- a/src/ui/dialog/debug.cpp
+++ b/src/ui/dialog/debug.cpp
@@ -13,7 +13,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/dialog.h>
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index fa9f57e48..a851503fe 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -20,7 +20,9 @@
// This has to be included prior to anything that includes setjmp.h, it croaks otherwise
#include <png.h>
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h
index 2b1b7c200..79007596f 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.h
+++ b/src/ui/dialog/filedialogimpl-gtkmm.h
@@ -17,7 +17,9 @@
#ifndef __FILE_DIALOGIMPL_H__
#define __FILE_DIALOGIMPL_H__
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <glibmm/threads.h>
diff --git a/src/ui/dialog/filedialogimpl-win32.h b/src/ui/dialog/filedialogimpl-win32.h
index 0839be8a8..2e6bb4bb8 100644
--- a/src/ui/dialog/filedialogimpl-win32.h
+++ b/src/ui/dialog/filedialogimpl-win32.h
@@ -15,8 +15,11 @@
#ifdef WIN32
#if WITH_GLIBMM_2_32
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
# include <glibmm/threads.h>
#endif
+
+#endif
#include "gc-core.h"
#include <windows.h>
#include "filedialogimpl-gtkmm.h"
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index f8ddaac06..f0c799adf 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -10,7 +10,9 @@
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
#include <gtkmm/stock.h>
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index 124a1970a..bf9133086 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -10,7 +10,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/messagedialog.h>
#include <gtkmm/checkbutton.h>
diff --git a/src/ui/dialog/guides.h b/src/ui/dialog/guides.h
index 2be6e5aed..422fed7fe 100644
--- a/src/ui/dialog/guides.h
+++ b/src/ui/dialog/guides.h
@@ -15,7 +15,10 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
+
#include <gtkmm/dialog.h>
#if WITH_GTKMM_3_0
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 5cfc883c8..468e85d36 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -17,7 +17,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/buttonbox.h>
#include <boost/scoped_ptr.hpp>
diff --git a/src/ui/dialog/layer-properties.h b/src/ui/dialog/layer-properties.h
index b94cdf878..d38b8edf5 100644
--- a/src/ui/dialog/layer-properties.h
+++ b/src/ui/dialog/layer-properties.h
@@ -16,7 +16,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
diff --git a/src/ui/dialog/layers.h b/src/ui/dialog/layers.h
index befecf9d6..1f3f7c377 100644
--- a/src/ui/dialog/layers.h
+++ b/src/ui/dialog/layers.h
@@ -12,7 +12,9 @@
#ifndef SEEN_LAYERS_PANEL_H
#define SEEN_LAYERS_PANEL_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/treeview.h>
diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h
index 7a41b8351..41b1bdd2b 100644
--- a/src/ui/dialog/livepatheffect-add.h
+++ b/src/ui/dialog/livepatheffect-add.h
@@ -11,7 +11,9 @@
#ifndef INKSCAPE_DIALOG_LIVEPATHEFFECT_ADD_H
#define INKSCAPE_DIALOG_LIVEPATHEFFECT_ADD_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
#include <gtkmm/liststore.h>
diff --git a/src/ui/dialog/messages.h b/src/ui/dialog/messages.h
index c5797dc34..92ada9046 100644
--- a/src/ui/dialog/messages.h
+++ b/src/ui/dialog/messages.h
@@ -16,7 +16,9 @@
#ifndef INKSCAPE_UI_DIALOG_MESSAGES_H
#define INKSCAPE_UI_DIALOG_MESSAGES_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/textview.h>
diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h
index 592d5144c..72d184969 100644
--- a/src/ui/dialog/ocaldialogs.h
+++ b/src/ui/dialog/ocaldialogs.h
@@ -13,7 +13,9 @@
#ifndef __OCAL_DIALOG_H__
#define __OCAL_DIALOG_H__
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
//Gtk includes
#include <gtkmm/box.h>
diff --git a/src/ui/dialog/spellcheck.h b/src/ui/dialog/spellcheck.h
index 026f2a349..f08c0669f 100644
--- a/src/ui/dialog/spellcheck.h
+++ b/src/ui/dialog/spellcheck.h
@@ -12,7 +12,9 @@
#ifndef SEEN_SPELLCHECK_H
#define SEEN_SPELLCHECK_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/button.h>
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index 8e7f45514..3468d984d 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -18,7 +18,9 @@
#include <functional>
#include <sstream>
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/buttonbox.h>
#include <gtkmm/label.h>
diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h
index e409ad73b..eb0811e5d 100644
--- a/src/ui/dialog/text-edit.h
+++ b/src/ui/dialog/text-edit.h
@@ -18,7 +18,9 @@
#ifndef INKSCAPE_UI_DIALOG_TEXT_EDIT_H
#define INKSCAPE_UI_DIALOG_TEXT_EDIT_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/notebook.h>
diff --git a/src/ui/dialog/tile.h b/src/ui/dialog/tile.h
index 5724596c5..6e41723fd 100644
--- a/src/ui/dialog/tile.h
+++ b/src/ui/dialog/tile.h
@@ -19,7 +19,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/notebook.h>
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index d2604553d..4aa972296 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -15,7 +15,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
#include <gtkmm/stock.h>
diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h
index bc0bc8609..f9f923be4 100644
--- a/src/ui/previewholder.h
+++ b/src/ui/previewholder.h
@@ -16,7 +16,9 @@
# include "config.h"
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/bin.h>
diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h
index 671c3b00f..e8030d937 100644
--- a/src/ui/widget/button.h
+++ b/src/ui/widget/button.h
@@ -10,7 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_BUTTON_H
#define INKSCAPE_UI_WIDGET_BUTTON_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/checkbutton.h>
#include <gtkmm/radiobutton.h>
diff --git a/src/ui/widget/color-picker.h b/src/ui/widget/color-picker.h
index b449d55d1..8264a9175 100644
--- a/src/ui/widget/color-picker.h
+++ b/src/ui/widget/color-picker.h
@@ -15,7 +15,9 @@
#include <stddef.h>
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h>
#include <gtkmm/button.h>
diff --git a/src/ui/widget/color-preview.h b/src/ui/widget/color-preview.h
index 57b9a2440..959b5e09b 100644
--- a/src/ui/widget/color-preview.h
+++ b/src/ui/widget/color-preview.h
@@ -15,7 +15,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/widget.h>
diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h
index b3ab161c4..a0660ca21 100644
--- a/src/ui/widget/dock-item.h
+++ b/src/ui/widget/dock-item.h
@@ -11,7 +11,10 @@
#ifndef INKSCAPE_UI_WIGET_DOCK_ITEM_H
#define INKSCAPE_UI_WIGET_DOCK_ITEM_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
+
#include <gtkmm/box.h>
#include <gtkmm/frame.h>
#include <gtkmm/window.h>
diff --git a/src/ui/widget/dock.h b/src/ui/widget/dock.h
index e9cd8d4fd..e9b6be73d 100644
--- a/src/ui/widget/dock.h
+++ b/src/ui/widget/dock.h
@@ -12,7 +12,9 @@
#ifndef INKSCAPE_UI_WIDGET_DOCK_H
#define INKSCAPE_UI_WIDGET_DOCK_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <list>
diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp
index 6b14f2841..0f526f77a 100644
--- a/src/ui/widget/entity-entry.cpp
+++ b/src/ui/widget/entity-entry.cpp
@@ -17,7 +17,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/entry.h>
diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h
index 8623083ac..3dfcb24a4 100644
--- a/src/ui/widget/filter-effect-chooser.h
+++ b/src/ui/widget/filter-effect-chooser.h
@@ -12,7 +12,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/combobox.h>
diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h
index 1d8f618c4..ab20ee121 100644
--- a/src/ui/widget/frame.h
+++ b/src/ui/widget/frame.h
@@ -10,7 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_FRAME_H
#define INKSCAPE_UI_WIDGET_FRAME_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/alignment.h>
#include <gtkmm/frame.h>
diff --git a/src/ui/widget/imageicon.h b/src/ui/widget/imageicon.h
index 9025786a9..fba01fdc0 100644
--- a/src/ui/widget/imageicon.h
+++ b/src/ui/widget/imageicon.h
@@ -12,7 +12,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <glibmm/ustring.h>
diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h
index 564f0c296..df6eb7ded 100644
--- a/src/ui/widget/imagetoggler.h
+++ b/src/ui/widget/imagetoggler.h
@@ -14,7 +14,9 @@
#include "config.h"
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/cellrendererpixbuf.h>
#include <gtkmm/widget.h>
diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h
index 5a775a3b1..c49908e6d 100644
--- a/src/ui/widget/labelled.h
+++ b/src/ui/widget/labelled.h
@@ -11,7 +11,10 @@
#ifndef INKSCAPE_UI_WIDGET_LABELLED_H
#define INKSCAPE_UI_WIDGET_LABELLED_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
+
#include <gtkmm/box.h>
namespace Gtk {
diff --git a/src/ui/widget/licensor.h b/src/ui/widget/licensor.h
index f71870330..978b81af9 100644
--- a/src/ui/widget/licensor.h
+++ b/src/ui/widget/licensor.h
@@ -10,7 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_LICENSOR_H
#define INKSCAPE_UI_WIDGET_LICENSOR_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h
index 0913af0f4..38ae9e054 100644
--- a/src/ui/widget/notebook-page.h
+++ b/src/ui/widget/notebook-page.h
@@ -14,7 +14,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h
index 58505d023..7eb6b9ae7 100644
--- a/src/ui/widget/object-composite-settings.h
+++ b/src/ui/widget/object-composite-settings.h
@@ -11,7 +11,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/alignment.h>
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 732df4222..d60eeefe0 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -15,7 +15,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/dialog.h> // for Gtk::RESPONSE_*
#include <gtkmm/menu.h>
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 6867f119c..0c3d822b8 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -17,7 +17,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/arrow.h>
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 1881f1415..567f29f91 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -18,7 +18,9 @@
#include <windows.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/frame.h>
diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h
index 2eee85aac..3ab918f1b 100644
--- a/src/ui/widget/preferences-widget.h
+++ b/src/ui/widget/preferences-widget.h
@@ -18,7 +18,9 @@
#include <iostream>
#include <vector>
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/filechooserbutton.h>
#include "ui/widget/spinbutton.h"
diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp
index f48217fba..dcbebf5ce 100644
--- a/src/ui/widget/rotateable.cpp
+++ b/src/ui/widget/rotateable.cpp
@@ -7,7 +7,9 @@
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h
index 12dc5d9f6..e5bc4f883 100644
--- a/src/ui/widget/selected-style.h
+++ b/src/ui/widget/selected-style.h
@@ -15,7 +15,9 @@
# include "config.h"
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
diff --git a/src/ui/widget/spin-scale.h b/src/ui/widget/spin-scale.h
index a1debd6f4..d0c34f70b 100644
--- a/src/ui/widget/spin-scale.h
+++ b/src/ui/widget/spin-scale.h
@@ -9,7 +9,9 @@
#ifndef INKSCAPE_UI_WIDGET_SPIN_SCALE_H
#define INKSCAPE_UI_WIDGET_SPIN_SCALE_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
diff --git a/src/ui/widget/spin-slider.h b/src/ui/widget/spin-slider.h
index 2597fdea0..6b1182e1d 100644
--- a/src/ui/widget/spin-slider.h
+++ b/src/ui/widget/spin-slider.h
@@ -10,7 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_SPIN_SLIDER_H
#define INKSCAPE_UI_WIDGET_SPIN_SLIDER_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h
index 96cc4e2b9..9f40ed3dc 100644
--- a/src/ui/widget/spinbutton.h
+++ b/src/ui/widget/spinbutton.h
@@ -10,7 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_SPINBUTTON_H
#define INKSCAPE_UI_WIDGET_SPINBUTTON_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/spinbutton.h>
diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h
index da6bb67e7..6bdb5e248 100644
--- a/src/ui/widget/style-swatch.h
+++ b/src/ui/widget/style-swatch.h
@@ -17,7 +17,9 @@
# include "config.h"
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/box.h>
#include <gtkmm/label.h>
diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp
index 605ae8e71..d166e3831 100644
--- a/src/ui/widget/tolerance-slider.cpp
+++ b/src/ui/widget/tolerance-slider.cpp
@@ -12,7 +12,9 @@
# include <config.h>
#endif
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
diff --git a/src/ui/widget/unit-menu.h b/src/ui/widget/unit-menu.h
index e821e1806..001e890eb 100644
--- a/src/ui/widget/unit-menu.h
+++ b/src/ui/widget/unit-menu.h
@@ -10,7 +10,9 @@
#ifndef INKSCAPE_UI_WIDGET_UNIT_H
#define INKSCAPE_UI_WIDGET_UNIT_H
+#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
#include <glibmm/threads.h>
+#endif
#include <gtkmm/comboboxtext.h>
#include "util/units.h"