summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/thread/threadpool.cc17
-rw-r--r--gio/src/action.hg2
-rw-r--r--gio/src/actiongroup.hg2
-rw-r--r--gio/src/appinfo.hg2
-rw-r--r--gio/src/asyncresult.hg4
-rw-r--r--gio/src/memoryinputstream.hg2
-rw-r--r--gio/src/menuitem.ccg2
-rw-r--r--gio/src/menuitem.hg2
-rw-r--r--gio/src/notification.hg2
-rw-r--r--gio/src/unixsocketaddress.hg2
-rw-r--r--glib/glibmm/sarray.h6
-rw-r--r--glib/glibmm/threadpool.cc4
-rw-r--r--glib/glibmm/threadpool.h5
-rw-r--r--glib/src/filelist.am16
14 files changed, 44 insertions, 24 deletions
diff --git a/examples/thread/threadpool.cc b/examples/thread/threadpool.cc
index b1a382da..51096746 100644
--- a/examples/thread/threadpool.cc
+++ b/examples/thread/threadpool.cc
@@ -7,12 +7,23 @@
//TODO: Maybe use std::async() instead?
#undef GLIBMM_DISABLE_DEPRECATED
+#include <glibmmconfig.h>
+
+#ifdef GLIBMM_DISABLE_DEPRECATED
+int main(int, char**)
+{
+ // If glibmm is configured with --disable-deprecated-api,
+ // GLIBMM_DISABLE_DEPRECATED is defined in glibmmconfig.h.
+ std::cout << "Glib::ThreadPool not available because deprecated API has been disabled." << std::endl;
+ return 77; // Tell automake's test harness to skip this test.
+}
+
+#else
+
#include <glibmm/random.h>
#include <glibmm/threadpool.h>
#include <glibmm/timer.h>
-
-
namespace
{
@@ -51,4 +62,4 @@ int main(int, char**)
return 0;
}
-
+#endif //GLIBMM_DISABLE_DEPRECATED
diff --git a/gio/src/action.hg b/gio/src/action.hg
index 1b10876e..8788da31 100644
--- a/gio/src/action.hg
+++ b/gio/src/action.hg
@@ -15,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <glibmm/interface.h>
#include <glibmm/varianttype.h>
#include <gio/gio.h>
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index 99af1974..3e423681 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -15,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <glibmm/interface.h>
#include <glibmm/varianttype.h>
#include <gio/gio.h> //To declare g_action_group_get_action_state_type().
diff --git a/gio/src/appinfo.hg b/gio/src/appinfo.hg
index 330e2a23..848f7fc5 100644
--- a/gio/src/appinfo.hg
+++ b/gio/src/appinfo.hg
@@ -15,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <giomm/applaunchcontext.h>
#include <exception>
diff --git a/gio/src/asyncresult.hg b/gio/src/asyncresult.hg
index 7705700f..395b63fd 100644
--- a/gio/src/asyncresult.hg
+++ b/gio/src/asyncresult.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -17,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <glibmm/interface.h>
#include <glibmm/object.h>
diff --git a/gio/src/memoryinputstream.hg b/gio/src/memoryinputstream.hg
index 0d519599..9ac5f9a1 100644
--- a/gio/src/memoryinputstream.hg
+++ b/gio/src/memoryinputstream.hg
@@ -15,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <giomm/inputstream.h>
#include <giomm/seekable.h>
diff --git a/gio/src/menuitem.ccg b/gio/src/menuitem.ccg
index 5903cd76..6483f42d 100644
--- a/gio/src/menuitem.ccg
+++ b/gio/src/menuitem.ccg
@@ -45,10 +45,12 @@ MenuItem::MenuItem(const Glib::RefPtr<MenuModel>& submenu)
set_submenu(submenu);
}
+_DEPRECATE_IFDEF_START
void MenuItem::set_action_and_target(const Glib::ustring& action)
{
g_menu_item_set_action_and_target_value(gobj(), action.c_str(), nullptr);
}
+_DEPRECATE_IFDEF_END
void MenuItem::set_action(const Glib::ustring& action)
{
diff --git a/gio/src/menuitem.hg b/gio/src/menuitem.hg
index 258aba9c..9c54a459 100644
--- a/gio/src/menuitem.hg
+++ b/gio/src/menuitem.hg
@@ -15,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <glibmm/object.h>
#include <giomm/menumodel.h>
#include <giomm/icon.h>
diff --git a/gio/src/notification.hg b/gio/src/notification.hg
index 83c38ba4..02ff5e8f 100644
--- a/gio/src/notification.hg
+++ b/gio/src/notification.hg
@@ -14,6 +14,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <glibmm/object.h>
#include <glibmm/ustring.h>
#include <glibmm/variant.h>
diff --git a/gio/src/unixsocketaddress.hg b/gio/src/unixsocketaddress.hg
index 5fe8010d..e3e41704 100644
--- a/gio/src/unixsocketaddress.hg
+++ b/gio/src/unixsocketaddress.hg
@@ -15,6 +15,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+_CONFIGINCLUDE(giommconfig.h)
+
#include <giomm/socketaddress.h>
_DEFS(giomm,gio)
diff --git a/glib/glibmm/sarray.h b/glib/glibmm/sarray.h
index 6226f50e..2ec2fea6 100644
--- a/glib/glibmm/sarray.h
+++ b/glib/glibmm/sarray.h
@@ -1,9 +1,6 @@
-// -*- c++ -*-
#ifndef _GLIBMM_SARRAY_H
#define _GLIBMM_SARRAY_H
-/* $Id$ */
-
/* array.h
*
* Copyright (C) 2002 The gtkmm Development Team
@@ -23,6 +20,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <glibmmconfig.h>
+
#ifndef GLIBMM_DISABLE_DEPRECATED
#include <glibmm/arrayhandle.h>
#include <glibmm/ustring.h>
@@ -39,4 +38,3 @@ typedef Glib::ArrayHandle<Glib::ustring> SArray;
#endif //GLIBMM_DISABLE_DEPRECATED
#endif // _GLIBMM_SARRAY_H
-
diff --git a/glib/glibmm/threadpool.cc b/glib/glibmm/threadpool.cc
index 198e7ed4..f0218154 100644
--- a/glib/glibmm/threadpool.cc
+++ b/glib/glibmm/threadpool.cc
@@ -1,5 +1,3 @@
-// -*- c++ -*-
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -17,9 +15,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <glibmmconfig.h>
#ifndef GLIBMM_DISABLE_DEPRECATED
-#include <glibmmconfig.h>
#include <glibmm/threadpool.h>
#include <glibmm/exceptionhandler.h>
#include <glibmm/threads.h>
diff --git a/glib/glibmm/threadpool.h b/glib/glibmm/threadpool.h
index 8b920107..fbf4739c 100644
--- a/glib/glibmm/threadpool.h
+++ b/glib/glibmm/threadpool.h
@@ -1,9 +1,6 @@
-// -*- c++ -*-
#ifndef _GLIBMM_THREADPOOL_H
#define _GLIBMM_THREADPOOL_H
-/* $Id$ */
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -21,6 +18,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <glibmmconfig.h>
+
#ifndef GLIBMM_DISABLE_DEPRECATED
#include <sigc++/sigc++.h>
diff --git a/glib/src/filelist.am b/glib/src/filelist.am
index 94341328..a35ffdc1 100644
--- a/glib/src/filelist.am
+++ b/glib/src/filelist.am
@@ -35,26 +35,24 @@ glibmm_files_any_hg = \
regex.hg \
shell.hg \
spawn.hg \
+ thread.hg \
threads.hg \
timezone.hg \
unicode.hg \
uriutils.hg \
+ valuearray.hg \
variant.hg \
variantdict.hg \
variantiter.hg \
varianttype.hg
-glibmm_files_deprecated_hg = \
- thread.hg \
- valuearray.hg
-
-if DISABLE_DEPRECATED_API
+## Unconditionally used files,
+## deprecated files (even if configured with --disable-deprecated-api),
+## if there are architecture-specific files, only those for the present architecture.
glibmm_files_used_hg = $(glibmm_files_any_hg)
-else
-glibmm_files_used_hg = $(glibmm_files_any_hg) $(glibmm_files_deprecated_hg)
-endif
-glibmm_files_hg = $(glibmm_files_any_hg) $(glibmm_files_deprecated_hg)
+## All .hg files
+glibmm_files_hg = $(glibmm_files_any_hg)
glibmm_files_ccg = $(glibmm_files_hg:.hg=.ccg)