Commit 4fdecc1f authored by Jens Georg's avatar Jens Georg Committed by Johannes Schmid

language-support-js: Use central header for GSettings keys

parent 9ad2b4f5
......@@ -32,6 +32,7 @@
#include <glib.h>
#include "util.h"
#include "plugin.h"
#include "prefs.h"
#include "code-completion.h"
#include "gi-symbol.h"
......@@ -40,10 +41,6 @@
#define ICON_FILE "anjuta-language-cpp-java-plugin.png"
#define UI_FILE ANJUTA_UI_DIR"/anjuta-language-javascript.xml"
#define MIN_CODECOMPLETE "javascript-min-codecomplete"
#define ADD_BRACE_AFTER_FUNCCALL "javascript-add-brace-after-func"
#define SHOW_CALLTIPS "javascript-show-calltips"
#define JSDIRS_LISTSTORE "jsdirs_liststore"
#define JSDIRS_TREEVIEW "jsdirs_treeview"
......@@ -75,7 +72,7 @@ js_support_plugin_activate (AnjutaPlugin *plugin)
on_value_removed_current_editor,
plugin);
js_support_plugin->prefs = g_settings_new (JAVASCRIPT_SUPPORT_SCHEMA);
js_support_plugin->prefs = g_settings_new (JS_SUPPORT_SCHEMA);
return TRUE;
}
......
......@@ -24,8 +24,6 @@
#include "database-symbol.h"
#define JAVASCRIPT_SUPPORT_SCHEMA "org.gnome.anjuta.js"
typedef struct _JSLang JSLang;
typedef struct _JSLangClass JSLangClass;
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
Copyright (C) 2010 Jens Georg <mail@jensge.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _JS_SUPPORT_PREFS_H_
#define _JS_SUPPORT_PREFS_H_
#define JS_SUPPORT_SCHEMA "org.gnome.anjuta.js"
#define MIN_CODECOMPLETE "javascript-min-codecomplete"
#define ADD_BRACE_AFTER_FUNCCALL "javascript-add-brace-after-func"
#define SHOW_CALLTIPS "javascript-show-calltips"
#define HIGHLIGHT_MISSEDSEMICOLON "javascript-missed"
#define GIR_DIR_KEY "javascript-girdir"
#define GJS_DIR_KEY "javascript-gjsdir"
#endif /* _JS_SUPPORT_PREFS_H_ */
......@@ -24,10 +24,7 @@
#include "plugin.h"
#include "util.h"
#define HIGHLIGHT_MISSEDSEMICOLON "javascript-missed"
#define GIR_DIR_KEY "javascript-girdir"
#define GJS_DIR_KEY "javascript-gjsdir"
#include "prefs.h"
static gchar*
get_gjs_path ()
......@@ -35,7 +32,7 @@ get_gjs_path ()
JSLang* plugin = (JSLang*)getPlugin ();
if (!plugin->prefs)
plugin->prefs = g_settings_new (JAVASCRIPT_SUPPORT_SCHEMA);
plugin->prefs = g_settings_new (JS_SUPPORT_SCHEMA);
gchar *path = g_settings_get_string (plugin->prefs, GJS_DIR_KEY);
if (!path || strlen (path) < 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment