[anjuta/gsettings-migration: 39/65] debug-manager: Ported to GSettings



commit 60f8e452d834f1151ec76390e46e7717d800ac1d
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Oct 10 12:14:57 2010 +0200

    debug-manager: Ported to GSettings

 .../org.gnome.anjuta.debug-manager.gschema.xml.in  |    2 +-
 plugins/debug-manager/start.c                      |   11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/plugins/debug-manager/org.gnome.anjuta.debug-manager.gschema.xml.in b/plugins/debug-manager/org.gnome.anjuta.debug-manager.gschema.xml.in
index a11188d..97f3fd9 100644
--- a/plugins/debug-manager/org.gnome.anjuta.debug-manager.gschema.xml.in
+++ b/plugins/debug-manager/org.gnome.anjuta.debug-manager.gschema.xml.in
@@ -1,6 +1,6 @@
 <schemalist>
   <schema id="org.gnome.anjuta.debug-manager" path="/apps/anjuta/debug-manager/">
-    <key name="silent-non-debug-config" type="b">
+    <key name="debug-silent-non-debug-config" type="b">
       <default>false</default>
       <_summary>Do not display warning if not using a Debug configuration</_summary>
     </key>
diff --git a/plugins/debug-manager/start.c b/plugins/debug-manager/start.c
index 171c59e..785465a 100644
--- a/plugins/debug-manager/start.c
+++ b/plugins/debug-manager/start.c
@@ -166,6 +166,7 @@ struct _DmaStart
 #define RUN_PROGRAM_ACTION_GROUP "ActionGroupRun"
 #define RUN_PROGRAM_PARAMETER_ACTION "ActionProgramParameters"
 
+#define PREF_SCHEMA "org.gnome.anjuta.debug-manager"
 #define PREFS_NOT_CHECK_DEBUG "debug-silent-non-debug-config"
 
 static void attach_process_clear (AttachProcess * ap, gint ClearRequest);
@@ -835,12 +836,12 @@ attach_process_destroy (AttachProcess * ap)
 static gboolean
 show_check_debug_dialog (DmaStart *this)
 {
-	AnjutaPreferences* prefs = anjuta_preferences_default ();
+	GSettings* settings = g_settings_new (PREF_SCHEMA);
 	gboolean no_check_debug;
 	gint res = GTK_RESPONSE_OK;
 
-	no_check_debug = anjuta_preferences_get_bool (prefs, 
-	                                              PREFS_NOT_CHECK_DEBUG);
+	no_check_debug = g_settings_get_boolean (settings, 
+	                                         PREFS_NOT_CHECK_DEBUG);
 	
 	if (!no_check_debug)
 	{
@@ -864,12 +865,14 @@ show_check_debug_dialog (DmaStart *this)
 	
 		if (gtk_toggle_button_get_active	(do_not_show))
 		{
-			anjuta_preferences_set_bool (prefs, PREFS_NOT_CHECK_DEBUG, TRUE);
+			g_settings_set_boolean (settings, PREFS_NOT_CHECK_DEBUG, TRUE);
 		}
 	
 		gtk_widget_destroy (dialog);
 	}
 
+	g_object_unref (settings);
+	
 	return res == GTK_RESPONSE_OK;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]