* 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.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
static void
gsettings_monitor (void)
{
+ gchar **keys;
+
if (global_key)
{
gchar *name;
else
g_signal_connect (global_settings, "changed", G_CALLBACK (value_changed), NULL);
+ /* We have to read a value from GSettings before we start receiving
+ * signals...
+ *
+ * If the schema has zero keys then we won't be displaying any
+ * notifications anyway.
+ */
+ keys = g_settings_list_keys (global_settings);
+ if (keys[0])
+ g_variant_unref (g_settings_get_value (global_settings, keys[0]));
+ g_strfreev (keys);
+
for (;;)
g_main_context_iteration (NULL, TRUE);
}
if (new == NULL)
{
- g_printerr ("%s\n", error->message);
+ gchar *context;
+
+ context = g_variant_parse_error_print_context (error, global_value);
+ g_printerr ("%s", context);
exit (1);
}