summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2011-04-04 10:45:42 +0200
committerMurray Cumming <murrayc@murrayc.com>2011-04-04 10:45:42 +0200
commit7ee784767b9311b3dfebad040fc895350cf5d6f6 (patch)
tree81e1994c69ebe2f8d2ea0554cbd5d12f9d434271
parentbd87a0f9cbc8c394a1fa246824c4b0037d6521e8 (diff)
downloadglibmm-7ee784767b9311b3dfebad040fc895350cf5d6f6.tar.gz
Gio::Settings: Really add list_schemas().
* gio/src/gio_others.defs: Add g_settings_list_schemas(), though we do not actually use this defnition yet. See below. This must be hand-written because h2defs.py gets confused by the return type. * gio/src/settings.[hg|ccg]: list_schemas(): Make this static and hand-code it because gmmproc is confused by the declaration when it is static.
-rw-r--r--ChangeLog36
-rw-r--r--gio/src/gio_others.defs8
-rw-r--r--gio/src/settings.ccg5
-rw-r--r--gio/src/settings.hg7
4 files changed, 38 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index ad956ad9..34308a1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,15 +1,25 @@
+2011-04-04 Murray Cumming <murrayc@murrayc.com>
+
+ Gio::Settings: Really add list_schemas().
+
+ * gio/src/gio_others.defs: Add g_settings_list_schemas(), though we do not
+ actually use this defnition yet. See below. This must be hand-written
+ because h2defs.py gets confused by the return type.
+ * gio/src/settings.[hg|ccg]: list_schemas(): Make this static and hand-code
+ it because gmmproc is confused by the declaration when it is static.
+
2011-04-02 Murray Cumming <murrayc@murrayc.com>
Gio::DBus examples: Renamed one and removed one.
- * examples/dbus/server.cc: Rename this to server_without_bus.cc to make its
- purpose clearer. This is not the common case. It is for private peer-to-peer
- connections not involving the usual session or system buses, or any bus
- for that matter. Meaning, for instance, that it does not assign names or
+ * examples/dbus/server.cc: Rename this to server_without_bus.cc to make its
+ purpose clearer. This is not the common case. It is for private peer-to-peer
+ connections not involving the usual session or system buses, or any bus
+ for that matter. Meaning, for instance, that it does not assign names or
provide introspection, I think.
- * examples/dbus/peer.cc: Removed this because it seems like just a
- complicated version of the server_without_bus example, and this is not in sync
- with the C versoin. Well, we should probably add a client for the server
+ * examples/dbus/peer.cc: Removed this because it seems like just a
+ complicated version of the server_without_bus example, and this is not in sync
+ with the C versoin. Well, we should probably add a client for the server
example.
* examples/Makefile.am: Adapted.
@@ -18,28 +28,28 @@
Slight cleanup to D-Bus example code.
* examples/dbus/server.cc:
- * examples/dbus/session_bus_service.cc: Remove code to handle the now
- non-existant GetStdOut D-Bus method. That code was left over from an earlier
+ * examples/dbus/session_bus_service.cc: Remove code to handle the now
+ non-existant GetStdOut D-Bus method. That code was left over from an earlier
version of an example.
2011-04-02 Murray Cumming <murrayc@murrayc.com>
Gio::DBus::NodeInfo::lookup_interface(): Add a method overload with no name.
- * gio/src/dbusintrospection.[hg|ccg]: Add a lookup_interface() method overload
- that just returns the first interface, avoiding the need to specify the name
+ * gio/src/dbusintrospection.[hg|ccg]: Add a lookup_interface() method overload
+ that just returns the first interface, avoiding the need to specify the name
when there is only one interface. The C API will not do this itself:
See bug #646417.
* examples/dbus/peer.cc:
* examples/dbus/server.cc:
- * examples/dbus/session_bus_service.cc: Use the new method to simplify the
+ * examples/dbus/session_bus_service.cc: Use the new method to simplify the
code slightly.
2011-04-02 Murray Cumming <murrayc@murrayc.com>
Gio::DBus::Connection: Added a register_method() overload with no vtable.
- * gio/src/dbusconnection.[hg|ccg]: This makes sense now that the C API's
+ * gio/src/dbusconnection.[hg|ccg]: This makes sense now that the C API's
documentation was improved in bug #646419.
2011-04-01 Murray Cumming <murrayc@murrayc.com>
diff --git a/gio/src/gio_others.defs b/gio/src/gio_others.defs
index 312c73cf..43e27c83 100644
--- a/gio/src/gio_others.defs
+++ b/gio/src/gio_others.defs
@@ -11,6 +11,11 @@
(return-type "const-gchar*const*")
)
+(define-method list_schemas
+ (of-object "GSettingsBackend")
+ (c-name "g_settings_list_schemas")
+ (return-type "const-gchar*const*")
+)
; extra_defs does not generate these, for some reason. murrayc:
(define-signal changed
@@ -37,6 +42,3 @@
(return-type "void")
(when "last")
)
-
-
-
diff --git a/gio/src/settings.ccg b/gio/src/settings.ccg
index 2af9f32e..a37df2c9 100644
--- a/gio/src/settings.ccg
+++ b/gio/src/settings.ccg
@@ -43,4 +43,9 @@ void Settings::bind_writable(const Glib::ustring& key,
bind_writable(key, property_proxy.get_object(), property_proxy.get_name(), inverted);
}
+std::vector<Glib::ustring> Settings::list_schemas()
+{
+ return Glib::ArrayHandler<Glib::ustring>::array_to_vector(g_settings_list_schemas(), Glib::OWNERSHIP_NONE);
+}
+
}
diff --git a/gio/src/settings.hg b/gio/src/settings.hg
index 1afb614d..14528736 100644
--- a/gio/src/settings.hg
+++ b/gio/src/settings.hg
@@ -97,8 +97,11 @@ public:
_WRAP_METHOD(void reset(const Glib::ustring& key), g_settings_reset)
-#m4 _CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(std::vector<Glib::ustring> list_schemas() const, g_settings_list_schemas)
+//We must hand-code this because gmmproc is confused by the static keyword with the vector.
+//#m4 _CONVERSION(`const gchar*const*',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD_DOCS_ONLY(g_settings_list_schemas)
+ static std::vector<Glib::ustring> list_schemas();
+ _IGNORE(g_settings_list_schemas)
#m4 _CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(std::vector<Glib::ustring> list_children() const, g_settings_list_children)