gresource: Make extract work better
[platform/upstream/glib.git] / gio / gsettings-tool.c
index e823cf4..61aa863 100644 (file)
@@ -12,9 +12,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., 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>
  */
@@ -393,14 +391,16 @@ gsettings_writable (void)
 }
 
 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);
 }
@@ -418,7 +418,8 @@ gsettings_monitor (void)
   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
@@ -464,7 +465,10 @@ gsettings_set (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);
     }