* 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
-value_changed (void)
+value_changed (GSettings *settings,
+ const gchar *key,
+ gpointer user_data)
{
GVariant *value;
gchar *printed;
- value = g_settings_get_value (global_settings, global_key);
+ value = g_settings_get_value (settings, key);
printed = g_variant_print (value, TRUE);
- g_print ("%s: %s\n", global_key, printed);
+ g_print ("%s: %s\n", key, printed);
g_variant_unref (value);
g_free (printed);
}
else
g_signal_connect (global_settings, "changed", G_CALLBACK (value_changed), NULL);
- g_main_loop_run (g_main_loop_new (NULL, FALSE));
+ for (;;)
+ g_main_context_iteration (NULL, TRUE);
}
static void
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);
}