[anjuta/gsettings-migration: 59/65] gdb: Fixed GSettings issue
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gsettings-migration: 59/65] gdb: Fixed GSettings issue
- Date: Sun, 17 Oct 2010 09:37:43 +0000 (UTC)
commit e8f3456485a030b7724a5cfe911821b611150460
Author: Johannes Schmid <jhs gnome org>
Date: Sat Oct 16 22:27:41 2010 +0200
gdb: Fixed GSettings issue
plugins/gdb/plugin.c | 15 +++++++--------
plugins/gdb/utilities.h | 3 ---
2 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/plugins/gdb/plugin.c b/plugins/gdb/plugin.c
index 0f0aed5..14f1241 100644
--- a/plugins/gdb/plugin.c
+++ b/plugins/gdb/plugin.c
@@ -79,7 +79,8 @@ struct _GdbPluginClass
/* Terminal functions
*---------------------------------------------------------------------------*/
-#define PREF_TERMINAL_COMMAND "terminal_command"
+#define PREF_SCHEMA "org.gnome.anjuta.run"
+#define PREF_TERMINAL_COMMAND "run-terminal-command"
static void
gdb_plugin_stop_terminal (GdbPlugin* plugin)
@@ -128,16 +129,14 @@ gdb_plugin_start_terminal (GdbPlugin* plugin)
if (term == NULL)
{
/* Use gnome terminal or another user defined one */
- AnjutaPreferences *pref;
+ GSettings* settings;
gchar *term_cmd;
gchar **argv;
- pref = anjuta_shell_get_preferences (ANJUTA_PLUGIN (plugin)->shell, NULL);
- term_cmd = anjuta_preferences_get (pref, PREF_TERMINAL_COMMAND);
- if (!term_cmd)
- {
- term_cmd = g_strdup ("gnome-terminal --disable-factory -e %s");
- }
+ settings = g_settings_new (PREF_SCHEMA);
+
+ term_cmd = g_settings_get_string (settings, PREF_TERMINAL_COMMAND);
+ g_object_unref (settings);
if (g_shell_parse_argv (term_cmd, NULL, &argv, NULL))
{
GPid gpid;
diff --git a/plugins/gdb/utilities.h b/plugins/gdb/utilities.h
index 11ba7f6..a72f4f8 100644
--- a/plugins/gdb/utilities.h
+++ b/plugins/gdb/utilities.h
@@ -33,9 +33,6 @@
#include <libanjuta/anjuta-plugin.h>
-#define COMBO_LIST_LENGTH \
- anjuta_preferences_get_int (app->preferences, MAXIMUM_COMBO_HISTORY)
-
#define _STR(S) ((S)?(S):"")
/* Any addition to this enum must be synced with the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]