...
 
Commits (88)
......@@ -3,7 +3,7 @@
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -477,14 +477,13 @@ have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it
does.>
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -493,7 +492,7 @@ does.>
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper
mail.
......
......@@ -11,7 +11,9 @@
mkdir $(CopyDir)
mkdir $(CopyDir)\bin
copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin
copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin
copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin
copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin
mkdir $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include
mkdir $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include
......
2.54.1 (stable):
Glib:
* Variant: Don't use std::index_sequence from C++14.
(Kjell Ahlstedt, Jonathan Wakely) Bug #787648 (Armin K.)
Documentation:
* Note that Gio::Application::property_resource_base_path() shall not
be used. It has a bug that's hard to fix without breaking ABI.
(Kjell Ahlstedt) Bug #787496 (Daniel Boles)
gmmproc:
* Convert all property documentation to C++.
(Kjell Ahlstedt) Bug #787698 (Daniel Boles)
2.54.0 (stable):
Glib:
* Added DBusObjectPathString and DBusSignatureString, for Variants with D-Bus object paths or D-Bus signatures,
and add Variant specializations for Variant<Glib::DBusObjectPathString>,
Variant<Glib::DBusSignatureString> and Variant<std::vector<Glib::DBusObjectPathString>>.
(Kjell Ahlstedt) Bug #785700
* Variant: Add template specialization for std::tuple.
(Alexander Rössler) Bug #777791
Gio:
* ActionGroup: Add optional action_name parameters to some signals.
(Kjell Ahlstedt)
* Settings: Add optional key parameter to the writable_changed signal.
(Kjell Ahlstedt)
gmmproc:
* Write signal flags to generated documentation
(Kjell Ahlstedt) Bug #785895 (Daniel Boles)
* Write default values of properties to generated documentation
(Kjell Ahlstedt) Bug #785895 (Daniel Boles)
* Warn for unmatched deprecations in signals and properties.
(Kjell Ahlstedt)
* Accept curly braces in default values in _WRAP macros.
(Kjell Ahlstedt) Bug #783216 comment #13 (Daniel Boles)
* Fix _WRAP_ENUM for enumerators with apostrophes.
(Kjell Ahlstedt)
* Add new elements types for the docs_override:
substitute_type_name and substitute_enumerator_name.
(Kjell Ahlstedt) Bug #86864
2.52.1 (stable):
Gio:
* TlsDatabase: Fix memory leak in a vfunc.
(Kjell Ahlstedt) Bug #783360
Documentation:
* Update docs of get_*_name().
(Daniel Boles)
Build:
* MacOS: Really correct build without gdesktopinfo.
(Kjell Ahlstedt) Bug #781947
2.52.0 (stable):
Gio:
* UnixSocketAddress::create(): Remove the default value for the type
parameter to avoid ambiguity.
(Kjell Ahlstedt) Bug #782592
Gio::DBus
* Proxy: Wrap call() and call_sync() methods.
(Vyacheslav Yurkov) Bug #781818
Documentation:
* RefPtr: Clarify comment about undefined behaviour.
(Daniel Boles)
2.51.7 (unstable):
Glib:
* SettingsSchemaKey: Add missing value/range methods.
(Daniel Boles) Bug #774903
* Variant: Replace throw(std::bad_cast) with noexcept(false),
to fix the build with C++17.
See https://bugzilla.redhat.com/show_bug.cgi?id=1438766
(Murray Cumming)
* VariantType: Deprecate first() and next(). Add get_item_types()
(Kjell Ahlstedt) Bug #775741
Gio:
* ActionMap: Add add_action_with_parameter() that takes a parameter type,
and deprecated the existing method, because it cannot work.
(Daniel Boles) Bug #774444
* SimpleAction: Make set_state() public.
(Daniel Boles) Bug #777953
Build:
* MacOS: Correct build without gdesktopinfo.
(John Ralls) Bug #781947
* Glib::Object: Suppress deprecation warning for g_object_newv() with glib 2.54.
(Kjell Ahlstedt)
2.51.6 (unstable):
This is version 2.51.6 of glibmm-2.24. Ignore versions 2.51.1 to 2.51.5 of
unstable glibmm-2.52. Unstable glibmm-2.52 is now unstable glibmm-2.54,
leaving the 2.51/52 version numbers again for use by stable glibmm-2.52.
Glib:
* Dispatcher:
- autodeduce the type of the fd field.
(Marcin Kolny) Bug #772074
- Don't cast a HANDLE to an int on Windows.
(Kjell Ahlstedt) Bug #772074
* ustring: Add cbegin() and cend().
(Murray Cumming)
Gio:
* Action: Include variant.h in the heaer.
(Daniel Boles) Bug #777953
* Application: get_default(): Correct the reference counting.
(Kjell Ahlstedt) Bug #779936
* Settings:
- Really add set_enum() and set_flags().
(djb) Bug #774647
- Writable-change-event signal: Correct the type of the key parameter.
(Marcin Kolny) Bug #773977
* SettingsSchemaSource: get_default(): Correct the refcounting.
(Marcin Kolny) Bug #774593
Gio::DBus:
* Proxy: Fix memory leak in get_cached_property_names().
(Kjell Ahlstedt) Bug #775210
Documentation:
* Glib::Variant: Improve documentation of maybe types.
(Daniel Boles) Bug #778219
* Gio::ActionMap: Clarify doc of ActivateWithParameterSlot
(Daniel Boles)
Build:
* Visual Studio builds: "Install" the .pdb files
(Chun-wei Fan)
2.50.0:
No changes since 2.49.7.
......
......@@ -13,8 +13,7 @@
## for more details.
##
## You should have received a copy of the GNU General Public License along
## with danielk's Autostuff; if not, write to the Free Software Foundation,
## Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## with danielk's Autostuff. If not, see <http://www.gnu.org/licenses/>.
#serial 20110910
......
......@@ -15,7 +15,7 @@
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([glibmm], [2.50.0],
AC_INIT([glibmm], [2.54.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
......@@ -55,6 +55,26 @@ AS_CASE([$host_os], [mingw*], [glibmm_host_windows=yes], [glibmm_host_windows=no
AC_MSG_RESULT([$glibmm_host_windows])
AM_CONDITIONAL([HOST_WINDOWS_NATIVE], [test "x$glibmm_host_windows" = xyes])
# This test for Mac OS is copied from glib. If the result of glib's test
# is ever made available outside glib, use glib's result instead of this test.
# glib: https://bugzilla.gnome.org/show_bug.cgi?id=780309
# glibmm: https://bugzilla.gnome.org/show_bug.cgi?id=781947
glibmm_have_cocoa=no
AC_MSG_CHECKING([for Mac OS X Cocoa support])
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <Cocoa/Cocoa.h>
#ifdef GNUSTEP_BASE_VERSION
#error "Detected GNUstep, not Cocoa"
#endif
]])],[glibmm_have_cocoa=yes],[])
AC_MSG_RESULT([$glibmm_have_cocoa])
AM_CONDITIONAL(OS_COCOA, [test "$glibmm_have_cocoa" = "yes"])
AS_IF([test "$glibmm_have_cocoa" = "yes"],
[
AC_DEFINE([GLIBMM_OS_COCOA], [1], [Define only on Mac OS, COCOA])
])
# TODO: This makes no sense. --danielk
AS_IF([test "x$enable_static" = xyes],
[
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* This is a basic server providing a clock like functionality. Clients can
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* This is a basic server providing a clock like functionality. Clients can
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "fdstream.h"
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fcntl.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -13,10 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _WIN32
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......
......@@ -16,8 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
......@@ -61,7 +60,7 @@
#include <giomm/dbussubtreevtable.h>
#include <giomm/dbusutils.h>
#include <giomm/dbuswatchname.h>
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(GLIBMM_OS_COCOA)
#include <giomm/desktopappinfo.h>
#endif
#include <giomm/drive.h>
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/contenttype.h>
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GIOMM_CONTENTTYPE_H
#define _GIOMM_CONTENTTYPE_H
......
......@@ -13,8 +13,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "init.h"
......
// -*- c++ -*-
#ifndef _GIOMM_INIT_H
#define _GIOMM_INIT_H
......@@ -19,8 +18,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gio
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "slot_async.h"
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
......
// -*- c++ -*-
#ifndef _GIOMM_WRAP_INIT_H
#define _GIOMM_WRAP_INIT_H
......@@ -17,8 +16,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gio
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2011 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,12 +11,9 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
#include <glibmm/variant.h>
#include <gio/gio.h>
namespace Gio
......
......@@ -11,13 +11,13 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
#include <glibmm/interface.h>
#include <glibmm/variant.h>
#include <glibmm/varianttype.h>
#include <gio/gio.h>
......@@ -29,13 +29,6 @@ _PINCLUDE(gio/gio.h)
typedef struct _GActionInterface GActionInterface;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Glib
{
class VariantBase;
}
namespace Gio
{
......@@ -191,7 +184,7 @@ public:
static void parse_detailed_name(const Glib::ustring& detailed_name, Glib::ustring& action_name, T_Value& target_value);
_WRAP_METHOD(static void parse_detailed_name_variant(const Glib::ustring& detailed_name,
Glib::ustring& action_name{>>}, Glib::VariantBase& target_value{>>}), g_action_parse_detailed_name, errthrow)
Glib::ustring& action_name{>>}, Glib::VariantBase& target_value{>>}), g_action_parse_detailed_name, errthrow "Glib::VariantParseError", errthrow)
/** Formats a detailed action name from the action's action_name and @a target_value.
*
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2010 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
......@@ -135,13 +134,14 @@ public:
//TODO: Add templated method, renaming this to action_state_changed_variant).
_WRAP_METHOD(void action_state_changed (const Glib::ustring& action_name, const Glib::VariantBase& state), g_action_group_action_state_changed)
_WRAP_SIGNAL(void action_added(const Glib::ustring& action_name), "action-added")
_WRAP_SIGNAL(void action_enabled_changed(const Glib::ustring& action_name, bool enabled), "action-enabled-changed")
_WRAP_SIGNAL(void action_removed(const Glib::ustring& action_name), "action-removed")
//TODO: Remove two_signal_methods when we can break ABI.
_WRAP_SIGNAL(void action_added(const Glib::ustring& action_name), "action-added", detail_name action_name, two_signal_methods)
_WRAP_SIGNAL(void action_enabled_changed(const Glib::ustring& action_name, bool enabled), "action-enabled-changed", detail_name action_name, two_signal_methods)
_WRAP_SIGNAL(void action_removed(const Glib::ustring& action_name), "action-removed", detail_name action_name, two_signal_methods)
#m4 _CONVERSION(`GVariant*', `const Glib::VariantBase&', `Glib::wrap($3, true)')
_WRAP_SIGNAL(void action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value), "action-state-changed")
_WRAP_SIGNAL(void action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value), "action-state-changed", detail_name action_name, two_signal_methods)
_WRAP_VFUNC(bool has_action(const Glib::ustring& name) const, "has_action")
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/action.h>
......@@ -31,6 +28,15 @@ ActionMap::add_action(const Glib::ustring& name)
return action;
}
Glib::RefPtr<SimpleAction>
ActionMap::add_action(const Glib::ustring& name, const ActivateSlot& slot)
{
auto action = add_action(name);
action->signal_activate().connect(sigc::hide(slot));
return action;
}
_DEPRECATE_IFDEF_START
Glib::RefPtr<SimpleAction>
ActionMap::add_action_with_parameter(
const Glib::ustring& name, const ActivateWithParameterSlot& slot)
......@@ -39,12 +45,15 @@ ActionMap::add_action_with_parameter(
action->signal_activate().connect(slot);
return action;
}
_DEPRECATE_IFDEF_END
Glib::RefPtr<SimpleAction>
ActionMap::add_action(const Glib::ustring& name, const ActivateSlot& slot)
ActionMap::add_action_with_parameter(
const Glib::ustring& name, const Glib::VariantType& parameter_type, const ActivateWithParameterSlot& slot)
{
auto action = add_action(name);
action->signal_activate().connect(sigc::hide(slot));
auto action = SimpleAction::create(name, parameter_type);
action->signal_activate().connect(slot);
add_action(action);
return action;
}
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
......@@ -49,19 +48,16 @@ class ActionMap : public Glib::Interface
{
_CLASS_INTERFACE(ActionMap, GActionMap, G_ACTION_MAP, GActionMapInterface)
// The various add_action...() methods are our equivalent for g_action_map_add_action_entries().
_IGNORE(g_action_map_add_action_entries)
public:
_WRAP_METHOD(void add_action(const Glib::RefPtr<Action>& action), g_action_map_add_action)
_WRAP_METHOD(void remove_action(const Glib::ustring& action_name), g_action_map_remove_action)
_WRAP_METHOD(Glib::RefPtr<Action> lookup_action(const Glib::ustring& action_name), g_action_map_lookup_action, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Action> lookup_action(const Glib::ustring& action_name) const, g_action_map_lookup_action, constversion, refreturn)
/** A Slot to be called when an action has been activated.
* See add_action_with_parameter().
*
* For instance,
* void on_slot_activated(const Glib::VariantBase& parameter);
*/
using ActivateWithParameterSlot = sigc::slot<void, const Glib::VariantBase&>;
//This is an equivalent for g_action_map_add_action_entries().
/** A convenience method for creating a SimpleAction instance
* and adding it to the ActionMap.
*
......@@ -70,7 +66,15 @@ public:
*/
Glib::RefPtr<SimpleAction> add_action(const Glib::ustring& name);
//This is an equivalent for g_action_map_add_action_entries().
/** A Slot to be called when an action has been activated,
* without passing a parameter to the slot.
* See add_action() and add_action_bool().
*
* For instance,
* void on_slot_activated();
*/
using ActivateSlot = sigc::slot<void>;
/** A convenience method for creating a SimpleAction instance
* and adding it to the ActionMap.
*
......@@ -78,26 +82,43 @@ public:
* @param slot The callback method to be called when the action is activated.
* @return The Action.
*/
Glib::RefPtr<SimpleAction> add_action_with_parameter(const Glib::ustring& name, const ActivateWithParameterSlot& slot);
_IGNORE(g_action_map_add_action_entries)
Glib::RefPtr<SimpleAction> add_action(const Glib::ustring& name, const ActivateSlot& slot);
/** A Slot to be called when an action has been activated,
* without passing a parameter to the slot.
* See add_action().
* passing a parameter of a specified type.
* See add_action_with_parameter().
*
* For instance,
* void on_slot_activated();
* void on_slot_activated(const Glib::VariantBase& parameter);
*/
using ActivateSlot = sigc::slot<void>;
using ActivateWithParameterSlot = sigc::slot<void, const Glib::VariantBase&>;
_DEPRECATE_IFDEF_START
/** A convenience method for creating a SimpleAction instance
* and adding it to the ActionMap.
*
* @param name The name of the Action.
* @param slot The callback method to be called when the action is activated.
* @return The Action.
*
* @deprecated This overload does not work as it does not set a parameter
* type on the Action, so activating it with a parameter cannot work. Use the
* other add_action_with_parameter() overload, which takes a parameter type.
*/
Glib::RefPtr<SimpleAction> add_action(const Glib::ustring& name, const ActivateSlot& slot);
Glib::RefPtr<SimpleAction> add_action_with_parameter(const Glib::ustring& name, const ActivateWithParameterSlot& slot);
_DEPRECATE_IFDEF_END
/** A convenience method for creating a SimpleAction instance, which when
* activated will call a slot receiving a given type of parameter, and adding
* that SimpleAction to the ActionMap.
*
* @param name The name of the Action.
* @param parameter_type The type of parameter to be passed to the slot.
* @param slot The callback method to be called when the action is activated.
* @return The Action.
*/
Glib::RefPtr<SimpleAction> add_action_with_parameter(const Glib::ustring& name, const Glib::VariantType& parameter_type, const ActivateWithParameterSlot& slot);
/** A convenience method for creating a boolean-stateful SimpleAction instance
......@@ -134,7 +155,7 @@ public:
* See add_action_radio_string().
*
* For instance,
* void on_slot_activated(const Glib::VariantBase& parameter);
* void on_slot_activated(const Glib::ustring& parameter);
*/
using ActivateWithStringParameterSlot = sigc::slot<void, const Glib::ustring&>;
......@@ -149,6 +170,7 @@ public:
*/
Glib::RefPtr<SimpleAction> add_action_radio_string(const Glib::ustring& name, const ActivateWithStringParameterSlot& slot, const Glib::ustring& state);
//TODO: Docs: Add hints about how to specify the various possible states in the GtkBuilder XML.
/** A convenience method for creating an integer-based radio SimpleAction instance
* and adding it to the ActionMap.
......@@ -160,10 +182,10 @@ public:
Glib::RefPtr<SimpleAction> add_action_radio_integer(const Glib::ustring& name, gint32 state);
/** A Slot to be called when an action has been activated.
* See add_action_radio_int().
* See add_action_radio_integer().
*
* For instance,
* void on_slot_activated(const Glib::VariantBase& parameter);
* void on_slot_activated(int parameter);
*/
using ActivateWithIntParameterSlot = sigc::slot<void, int>;
......@@ -179,9 +201,6 @@ public:
Glib::RefPtr<SimpleAction> add_action_radio_integer(const Glib::ustring& name, const ActivateWithIntParameterSlot& slot, gint32 state);
_WRAP_METHOD(void add_action(const Glib::RefPtr<Action>& action), g_action_map_add_action)
_WRAP_METHOD(void remove_action(const Glib::ustring& action_name), g_action_map_remove_action)
#m4 _CONVERSION(`Glib::RefPtr<Action>', `GAction*', `Glib::unwrap($3)')
_WRAP_VFUNC(Glib::RefPtr<Action> lookup_action(const Glib::ustring& name) const, "lookup_action", refreturn)
......
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
......@@ -13,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/file.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/appinfo.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <exception>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
......
......@@ -11,8 +11,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
......@@ -345,7 +344,7 @@ public:
/// Unsets any existing default application.
static void unset_default();
_WRAP_METHOD(static Glib::RefPtr<Application> get_default(), g_application_get_default)
_WRAP_METHOD(static Glib::RefPtr<Application> get_default(), g_application_get_default, refreturn)