[anjuta-extras] scratchbox: Move preferences to org/gnome/anjuta/plugins/scratchbox
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta-extras] scratchbox: Move preferences to org/gnome/anjuta/plugins/scratchbox
- Date: Fri, 2 Dec 2011 21:49:50 +0000 (UTC)
commit 4bf926470bc2cbc1c2ef2d52a111ee0299d19227
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Fri Nov 11 21:20:12 2011 +0100
scratchbox: Move preferences to org/gnome/anjuta/plugins/scratchbox
plugins/scratchbox/Makefile.am | 13 +++++++++----
plugins/scratchbox/anjuta-scratchbox.ui | 6 +++---
....gnome.anjuta.plugins.scratchbox.gschema.xml.in | 17 +++++++++++++++++
plugins/scratchbox/plugin.c | 16 ++++++++--------
po/POTFILES.in | 1 +
5 files changed, 38 insertions(+), 15 deletions(-)
---
diff --git a/plugins/scratchbox/Makefile.am b/plugins/scratchbox/Makefile.am
index eaa12ce..ed91a81 100644
--- a/plugins/scratchbox/Makefile.am
+++ b/plugins/scratchbox/Makefile.am
@@ -36,12 +36,17 @@ libanjuta_scratchbox_la_SOURCES = \
plugin.c \
plugin.h
-prefs_ui_files = anjuta-scratchbox.ui
-prefs_name = org.gnome.anjuta.scratchbox
-include $(top_srcdir)/scripts/build-schemas.mk
+gsettings_in_file = org.gnome.anjuta.plugins.scratchbox.gschema.xml.in
+gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
+ INTLTOOL_XML_NOMERGE_RULE@
+ GSETTINGS_RULES@
EXTRA_DIST = \
$(plugin_in_files) \
$(anjuta_pixmaps_DATA) \
$(anjuta_plugin_DATA) \
- $(anjuta_glade_DATA)
+ $(anjuta_glade_DATA) \
+ $(gsettings_in_file)
+
+CLEANFILES = \
+ $(gsettings_SCHEMAS)
diff --git a/plugins/scratchbox/anjuta-scratchbox.ui b/plugins/scratchbox/anjuta-scratchbox.ui
index 566cace..3255964 100644
--- a/plugins/scratchbox/anjuta-scratchbox.ui
+++ b/plugins/scratchbox/anjuta-scratchbox.ui
@@ -81,7 +81,7 @@
</packing>
</child>
<child>
- <object class="GtkFileChooserButton" id="preferences_folder:text:/scratchbox:0:build-scratchbox-path">
+ <object class="GtkFileChooserButton" id="preferences:build-path">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -114,7 +114,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="preferences_combo:text:Sbox1,Sbox2:0:scratchbox-version">
+ <object class="GtkComboBoxText" id="preferences:version">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="id_column">0</property>
@@ -133,7 +133,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="preferences_combo:text:None:0:scratchbox-target">
+ <object class="GtkComboBoxText" id="preferences:target">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="id_column">0</property>
diff --git a/plugins/scratchbox/org.gnome.anjuta.plugins.scratchbox.gschema.xml.in b/plugins/scratchbox/org.gnome.anjuta.plugins.scratchbox.gschema.xml.in
new file mode 100644
index 0000000..153fbde
--- /dev/null
+++ b/plugins/scratchbox/org.gnome.anjuta.plugins.scratchbox.gschema.xml.in
@@ -0,0 +1,17 @@
+<schemalist>
+ <schema id="org.gnome.anjuta.plugins.scratchbox" path="/org/gnome/anjuta/plugins/scratchbox/">
+ <key name="build-path" type="s">
+ <default>"/scratchbox"</default>
+ </key>
+ <key name="version" type="s">
+ <choices>
+ <choice value="Sbox1" />
+ <choice value="Sbox2" />
+ </choices>
+ <default>"Sbox1"</default>
+ </key>
+ <key name="target" type="s">
+ <default>"None"</default>
+ </key>
+ </schema>
+</schemalist>
diff --git a/plugins/scratchbox/plugin.c b/plugins/scratchbox/plugin.c
index 49181eb..7a1b2bb 100644
--- a/plugins/scratchbox/plugin.c
+++ b/plugins/scratchbox/plugin.c
@@ -38,14 +38,14 @@
#define ICON_FILE "anjuta-scratchbox-48.png"
#define GLADE_FILE PACKAGE_DATA_DIR "/glade/anjuta-scratchbox.ui"
-#define SB_SCHEMA "org.gnome.anjuta.scratchbox"
-#define SB_ENTRY "preferences_folder:text:/scratchbox:0:build-scratchbox-path"
-#define SB_TARGET_ENTRY "preferences_combo:text:None:0:scratchbox-target"
-#define SB_SBOX_ENTRY "preferences_combo:text:Sbox1,Sbox2:0:scratchbox-version"
-
-#define PREF_SB_PATH "build-scratchbox-path"
-#define PREF_SB_VERSION "scratchbox-version"
-#define PREF_SB_TARGET "scratchbox-target"
+#define SB_SCHEMA "org.gnome.anjuta.plugins.scratchbox"
+#define SB_ENTRY "preferences:build-path"
+#define SB_TARGET_ENTRY "preferences:target"
+#define SB_SBOX_ENTRY "preferences:version"
+
+#define PREF_SB_PATH "build-path"
+#define PREF_SB_VERSION "version"
+#define PREF_SB_TARGET "target"
/* Type defintions
*---------------------------------------------------------------------------*/
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 33095c1..e660b1c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,6 +6,7 @@ plugins/scintilla/print.c
plugins/scintilla/plugin.c
plugins/scintilla/text_editor.c
plugins/scratchbox/anjuta-scratchbox.ui
+plugins/scratchbox/org.gnome.anjuta.plugins.scratchbox.gschema.xml.in
plugins/scratchbox/plugin.c
[type: gettext/ini]plugins/sample1/anjuta-sample.plugin.in
[type: gettext/ini]plugins/scintilla/anjuta-editor.plugin.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]