[gnome-builder] prefs: refactor to use DzlPreferences
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] prefs: refactor to use DzlPreferences
- Date: Tue, 6 Jun 2017 08:31:30 +0000 (UTC)
commit 031516100306b83922138f8e1778b317e8cd5011
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 6 01:31:13 2017 -0700
prefs: refactor to use DzlPreferences
libdazzle includes DzlPreferences now and so we can remove that code from
Builder and inherit it from libdazzle.
This required making a few things public API in libdazzle, but we should
be fine since that hasn't changed much in the past year.
libide/ide.h | 9 -
libide/meson.build | 27 +--
libide/preferences/ide-preferences-addin.c | 18 +-
libide/preferences/ide-preferences-addin.h | 11 +-
libide/preferences/ide-preferences-bin-private.h | 33 --
libide/preferences/ide-preferences-bin.c | 446 --------------------
libide/preferences/ide-preferences-bin.h | 55 ---
libide/preferences/ide-preferences-builtin.c | 260 ++++++------
libide/preferences/ide-preferences-builtin.h | 4 +-
libide/preferences/ide-preferences-entry.c | 231 ----------
libide/preferences/ide-preferences-entry.h | 42 --
libide/preferences/ide-preferences-entry.ui | 26 --
.../ide-preferences-file-chooser-button.c | 245 -----------
.../ide-preferences-file-chooser-button.h | 32 --
.../ide-preferences-file-chooser-button.ui | 49 ---
libide/preferences/ide-preferences-flow-box.c | 36 --
libide/preferences/ide-preferences-flow-box.h | 34 --
libide/preferences/ide-preferences-font-button.c | 327 --------------
libide/preferences/ide-preferences-font-button.h | 32 --
libide/preferences/ide-preferences-font-button.ui | 68 ---
libide/preferences/ide-preferences-group-private.h | 52 ---
libide/preferences/ide-preferences-group.c | 443 -------------------
libide/preferences/ide-preferences-group.h | 37 --
libide/preferences/ide-preferences-group.ui | 56 ---
libide/preferences/ide-preferences-language-row.c | 11 +-
libide/preferences/ide-preferences-language-row.h | 4 +-
libide/preferences/ide-preferences-language-row.ui | 2 +-
libide/preferences/ide-preferences-page-private.h | 43 --
libide/preferences/ide-preferences-page.c | 185 --------
libide/preferences/ide-preferences-page.h | 39 --
libide/preferences/ide-preferences-page.ui | 11 -
libide/preferences/ide-preferences-perspective.c | 156 ++++----
libide/preferences/ide-preferences-spin-button.c | 417 ------------------
libide/preferences/ide-preferences-spin-button.h | 36 --
libide/preferences/ide-preferences-spin-button.ui | 56 ---
libide/preferences/ide-preferences-switch.c | 439 -------------------
libide/preferences/ide-preferences-switch.h | 32 --
libide/preferences/ide-preferences-switch.ui | 59 ---
libide/preferences/ide-preferences.c | 260 ------------
libide/preferences/ide-preferences.h | 200 ---------
libide/resources/libide.gresource.xml | 7 -
plugins/clang/ide-clang-preferences-addin.c | 12 +-
.../gb-color-picker-prefs-palette-row.c | 14 +-
.../gb-color-picker-prefs-palette-row.h | 14 +-
plugins/color-picker/gb-color-picker-prefs.c | 3 +-
plugins/flatpak/gbp-flatpak-preferences-addin.c | 28 +-
.../ide-gca-preferences-addin.c | 12 +-
.../gbp-quick-highlight-preferences.c | 12 +-
plugins/vala-pack/ide-vala-preferences-addin.vala | 4 +-
plugins/vala-pack/meson.build | 1 +
50 files changed, 280 insertions(+), 4350 deletions(-)
---
diff --git a/libide/ide.h b/libide/ide.h
index dac2139..6e776c7 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -90,17 +90,8 @@ G_BEGIN_DECLS
#include "langserv/ide-langserv-util.h"
#include "local/ide-local-device.h"
#include "logging/ide-log.h"
-#include "preferences/ide-preferences.h"
#include "preferences/ide-preferences-addin.h"
-#include "preferences/ide-preferences-bin.h"
-#include "preferences/ide-preferences-entry.h"
-#include "preferences/ide-preferences-file-chooser-button.h"
-#include "preferences/ide-preferences-font-button.h"
-#include "preferences/ide-preferences-group.h"
-#include "preferences/ide-preferences-page.h"
#include "preferences/ide-preferences-perspective.h"
-#include "preferences/ide-preferences-spin-button.h"
-#include "preferences/ide-preferences-switch.h"
#include "projects/ide-project-edit.h"
#include "projects/ide-project-file.h"
#include "projects/ide-project-files.h"
diff --git a/libide/meson.build b/libide/meson.build
index 79e212f..093829c 100644
--- a/libide/meson.build
+++ b/libide/meson.build
@@ -106,16 +106,7 @@ libide_public_headers = [
'plugins/ide-extension-adapter.h',
'plugins/ide-extension-set-adapter.h',
'preferences/ide-preferences-addin.h',
- 'preferences/ide-preferences-bin.h',
- 'preferences/ide-preferences-entry.h',
- 'preferences/ide-preferences-file-chooser-button.h',
- 'preferences/ide-preferences-flow-box.h',
- 'preferences/ide-preferences-font-button.h',
- 'preferences/ide-preferences-group.h',
- 'preferences/ide-preferences-page.h',
- 'preferences/ide-preferences-spin-button.h',
- 'preferences/ide-preferences-switch.h',
- 'preferences/ide-preferences.h',
+ 'preferences/ide-preferences-perspective.h',
'projects/ide-project-edit.h',
'projects/ide-project-file.h',
'projects/ide-project-files.h',
@@ -319,15 +310,7 @@ libide_public_sources = [
'plugins/ide-extension-adapter.c',
'plugins/ide-extension-set-adapter.c',
'preferences/ide-preferences-addin.c',
- 'preferences/ide-preferences-entry.c',
- 'preferences/ide-preferences-file-chooser-button.c',
- 'preferences/ide-preferences-flow-box.c',
- 'preferences/ide-preferences-font-button.c',
- 'preferences/ide-preferences-group.c',
- 'preferences/ide-preferences-page.c',
- 'preferences/ide-preferences-spin-button.c',
- 'preferences/ide-preferences-switch.c',
- 'preferences/ide-preferences.c',
+ 'preferences/ide-preferences-perspective.c',
'projects/ide-project-edit.c',
'projects/ide-project-file.c',
'projects/ide-project-files.c',
@@ -523,16 +506,10 @@ libide_sources = libide_generated_headers + libide_public_sources + [
'plugins/ide-extension-util.c',
'plugins/ide-extension-util.h',
'projects/ide-project-edit-private.h',
- 'preferences/ide-preferences-bin-private.h',
- 'preferences/ide-preferences-bin.c',
'preferences/ide-preferences-builtin.c',
'preferences/ide-preferences-builtin.h',
- 'preferences/ide-preferences-group-private.h',
'preferences/ide-preferences-language-row.c',
'preferences/ide-preferences-language-row.h',
- 'preferences/ide-preferences-page-private.h',
- 'preferences/ide-preferences-perspective.c',
- 'preferences/ide-preferences-perspective.h',
'runner/ide-run-manager-private.h',
'search/ide-search-reducer.c',
'snippets/ide-source-snippet-completion-item.c',
diff --git a/libide/preferences/ide-preferences-addin.c b/libide/preferences/ide-preferences-addin.c
index 2463942..54083e5 100644
--- a/libide/preferences/ide-preferences-addin.c
+++ b/libide/preferences/ide-preferences-addin.c
@@ -16,19 +16,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ide-preferences-addin.h"
+#define G_LOG_DOMAIN "ide-preferences-addin"
+
+#include "preferences/ide-preferences-addin.h"
G_DEFINE_INTERFACE (IdePreferencesAddin, ide_preferences_addin, G_TYPE_OBJECT)
static void
ide_preferences_addin_real_load (IdePreferencesAddin *self,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
}
static void
ide_preferences_addin_real_unload (IdePreferencesAddin *self,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
}
@@ -46,17 +48,17 @@ ide_preferences_addin_default_init (IdePreferencesAddinInterface *iface)
*
* This interface method is called when a preferences addin is initialized. It could be
* initialized from multiple preferences implementations, so consumers should use the
- * #IdePreferences interface to add their preferences controls to the container.
+ * #DzlPreferences interface to add their preferences controls to the container.
*
* Such implementations might include a preferences dialog window, or a preferences
* widget which could be rendered as a perspective.
*/
void
ide_preferences_addin_load (IdePreferencesAddin *self,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
g_return_if_fail (IDE_IS_PREFERENCES_ADDIN (self));
- g_return_if_fail (IDE_IS_PREFERENCES (preferences));
+ g_return_if_fail (DZL_IS_PREFERENCES (preferences));
IDE_PREFERENCES_ADDIN_GET_IFACE (self)->load (self, preferences);
}
@@ -72,10 +74,10 @@ ide_preferences_addin_load (IdePreferencesAddin *self,
*/
void
ide_preferences_addin_unload (IdePreferencesAddin *self,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
g_return_if_fail (IDE_IS_PREFERENCES_ADDIN (self));
- g_return_if_fail (IDE_IS_PREFERENCES (preferences));
+ g_return_if_fail (DZL_IS_PREFERENCES (preferences));
IDE_PREFERENCES_ADDIN_GET_IFACE (self)->unload (self, preferences);
}
diff --git a/libide/preferences/ide-preferences-addin.h b/libide/preferences/ide-preferences-addin.h
index 308b7be..b1196d0 100644
--- a/libide/preferences/ide-preferences-addin.h
+++ b/libide/preferences/ide-preferences-addin.h
@@ -19,10 +19,9 @@
#ifndef IDE_PREFERENCES_ADDIN_H
#define IDE_PREFERENCES_ADDIN_H
+#include <dazzle.h>
#include <gtk/gtk.h>
-#include "ide-preferences.h"
-
G_BEGIN_DECLS
#define IDE_TYPE_PREFERENCES_ADDIN (ide_preferences_addin_get_type())
@@ -34,15 +33,15 @@ struct _IdePreferencesAddinInterface
GTypeInterface parent_interface;
void (*load) (IdePreferencesAddin *self,
- IdePreferences *preferences);
+ DzlPreferences *preferences);
void (*unload) (IdePreferencesAddin *self,
- IdePreferences *preferences);
+ DzlPreferences *preferences);
};
void ide_preferences_addin_load (IdePreferencesAddin *self,
- IdePreferences *preferences);
+ DzlPreferences *preferences);
void ide_preferences_addin_unload (IdePreferencesAddin *self,
- IdePreferences *preferences);
+ DzlPreferences *preferences);
G_END_DECLS
diff --git a/libide/preferences/ide-preferences-builtin.c b/libide/preferences/ide-preferences-builtin.c
index 345e97a..87e485a 100644
--- a/libide/preferences/ide-preferences-builtin.c
+++ b/libide/preferences/ide-preferences-builtin.c
@@ -27,11 +27,7 @@
#include "application/ide-application-private.h"
#include "preferences/ide-preferences-builtin.h"
-#include "preferences/ide-preferences-entry.h"
-#include "preferences/ide-preferences-group.h"
-#include "preferences/ide-preferences-group-private.h"
#include "preferences/ide-preferences-language-row.h"
-#include "preferences/ide-preferences-spin-button.h"
#include "vcs/ide-vcs-config.h"
static gint
@@ -50,20 +46,20 @@ sort_plugin_info (gconstpointer a,
}
static void
-ide_preferences_builtin_register_plugins (IdePreferences *preferences)
+ide_preferences_builtin_register_plugins (DzlPreferences *preferences)
{
PeasEngine *engine;
const GList *list;
GList *copy;
guint i = 0;
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
engine = peas_engine_get_default ();
list = peas_engine_get_plugin_list (engine);
- ide_preferences_add_page (preferences, "plugins", _("Extensions"), 700);
- ide_preferences_add_list_group (preferences, "plugins", "plugins", _("Extensions"), GTK_SELECTION_NONE,
100);
+ dzl_preferences_add_page (preferences, "plugins", _("Extensions"), 700);
+ dzl_preferences_add_list_group (preferences, "plugins", "plugins", _("Extensions"), GTK_SELECTION_NONE,
100);
copy = g_list_sort (g_list_copy ((GList *)list), sort_plugin_info);
@@ -84,14 +80,14 @@ ide_preferences_builtin_register_plugins (IdePreferences *preferences)
path = g_strdup_printf ("/org/gnome/builder/plugins/%s/",
peas_plugin_info_get_module_name (plugin_info));
- ide_preferences_add_switch (preferences, "plugins", "plugins", "org.gnome.builder.plugin", "enabled",
path, NULL, name, desc, keywords, i);
+ dzl_preferences_add_switch (preferences, "plugins", "plugins", "org.gnome.builder.plugin", "enabled",
path, NULL, name, desc, keywords, i);
}
g_list_free (copy);
}
static void
-ide_preferences_builtin_register_appearance (IdePreferences *preferences)
+ide_preferences_builtin_register_appearance (DzlPreferences *preferences)
{
GtkSourceStyleSchemeManager *manager;
const gchar * const *scheme_ids;
@@ -99,21 +95,21 @@ ide_preferences_builtin_register_appearance (IdePreferences *preferences)
gint i;
gint dark_mode;
- ide_preferences_add_page (preferences, "appearance", _("Appearance"), 0);
+ dzl_preferences_add_page (preferences, "appearance", _("Appearance"), 0);
- ide_preferences_add_list_group (preferences, "appearance", "basic", _("Themes"), GTK_SELECTION_NONE, 0);
- dark_mode = ide_preferences_add_switch (preferences, "appearance", "basic", "org.gnome.builder",
"night-mode", NULL, NULL, _("Dark Theme"), _("Whether Builder should use a dark theme"), _("dark theme"), 0);
- ide_preferences_add_switch (preferences, "appearance", "basic", "org.gnome.builder.editor",
"show-grid-lines", NULL, NULL, _("Grid Pattern"), _("Display a grid pattern underneath source code"), NULL,
0);
+ dzl_preferences_add_list_group (preferences, "appearance", "basic", _("Themes"), GTK_SELECTION_NONE, 0);
+ dark_mode = dzl_preferences_add_switch (preferences, "appearance", "basic", "org.gnome.builder",
"night-mode", NULL, NULL, _("Dark Theme"), _("Whether Builder should use a dark theme"), _("dark theme"), 0);
+ dzl_preferences_add_switch (preferences, "appearance", "basic", "org.gnome.builder.editor",
"show-grid-lines", NULL, NULL, _("Grid Pattern"), _("Display a grid pattern underneath source code"), NULL,
0);
- ide_preferences_add_list_group (preferences, "appearance", "font", _("Font"), GTK_SELECTION_NONE, 10);
- ide_preferences_add_font_button (preferences, "appearance", "font", "org.gnome.builder.editor",
"font-name", _("Editor"), C_("Keywords", "editor font monospace"), 0);
+ dzl_preferences_add_list_group (preferences, "appearance", "font", _("Font"), GTK_SELECTION_NONE, 10);
+ dzl_preferences_add_font_button (preferences, "appearance", "font", "org.gnome.builder.editor",
"font-name", _("Editor"), C_("Keywords", "editor font monospace"), 0);
/* XXX: This belongs in terminal addin */
- ide_preferences_add_font_button (preferences, "appearance", "font", "org.gnome.builder.terminal",
"font-name", _("Terminal"), C_("Keywords", "terminal font monospace"), 0);
+ dzl_preferences_add_font_button (preferences, "appearance", "font", "org.gnome.builder.terminal",
"font-name", _("Terminal"), C_("Keywords", "terminal font monospace"), 0);
manager = gtk_source_style_scheme_manager_get_default ();
scheme_ids = gtk_source_style_scheme_manager_get_scheme_ids (manager);
- ide_preferences_add_list_group (preferences, "appearance", "schemes", _("Color Scheme"),
GTK_SELECTION_NONE, 20);
+ dzl_preferences_add_list_group (preferences, "appearance", "schemes", _("Color Scheme"),
GTK_SELECTION_NONE, 20);
for (i = 0; scheme_ids [i]; i++)
{
@@ -125,103 +121,103 @@ ide_preferences_builtin_register_appearance (IdePreferences *preferences)
scheme = gtk_source_style_scheme_manager_get_scheme (manager, scheme_ids [i]);
title = gtk_source_style_scheme_get_name (scheme);
- ide_preferences_add_radio (preferences, "appearance", "schemes", "org.gnome.builder.editor",
"style-scheme-name", NULL, variant_str, title, NULL, title, i);
+ dzl_preferences_add_radio (preferences, "appearance", "schemes", "org.gnome.builder.editor",
"style-scheme-name", NULL, variant_str, title, NULL, title, i);
}
if (g_getenv ("GTK_THEME") != NULL)
{
- bin = ide_preferences_get_widget (preferences, dark_mode);
+ bin = dzl_preferences_get_widget (preferences, dark_mode);
gtk_widget_set_sensitive (bin, FALSE);
}
}
static void
-ide_preferences_builtin_register_keyboard (IdePreferences *preferences)
+ide_preferences_builtin_register_keyboard (DzlPreferences *preferences)
{
- ide_preferences_add_page (preferences, "keyboard", _("Keyboard"), 400);
+ dzl_preferences_add_page (preferences, "keyboard", _("Keyboard"), 400);
- ide_preferences_add_list_group (preferences, "keyboard", "mode", _("Emulation"), GTK_SELECTION_NONE, 0);
- ide_preferences_add_radio (preferences, "keyboard", "mode", "org.gnome.builder.editor", "keybindings",
NULL, "\"default\"", _("Builder"), _("Default keybinding mode which mimics gedit"), NULL, 0);
- ide_preferences_add_radio (preferences, "keyboard", "mode", "org.gnome.builder.editor", "keybindings",
NULL, "\"emacs\"", _("Emacs"), _("Emulates the Emacs text editor"), NULL, 0);
- ide_preferences_add_radio (preferences, "keyboard", "mode", "org.gnome.builder.editor", "keybindings",
NULL, "\"vim\"", _("Vim"), _("Emulates the Vim text editor"), NULL, 0);
+ dzl_preferences_add_list_group (preferences, "keyboard", "mode", _("Emulation"), GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_radio (preferences, "keyboard", "mode", "org.gnome.builder.editor", "keybindings",
NULL, "\"default\"", _("Builder"), _("Default keybinding mode which mimics gedit"), NULL, 0);
+ dzl_preferences_add_radio (preferences, "keyboard", "mode", "org.gnome.builder.editor", "keybindings",
NULL, "\"emacs\"", _("Emacs"), _("Emulates the Emacs text editor"), NULL, 0);
+ dzl_preferences_add_radio (preferences, "keyboard", "mode", "org.gnome.builder.editor", "keybindings",
NULL, "\"vim\"", _("Vim"), _("Emulates the Vim text editor"), NULL, 0);
- ide_preferences_add_list_group (preferences, "keyboard", "movements", _("Movement"), GTK_SELECTION_NONE,
100);
- ide_preferences_add_switch (preferences, "keyboard", "movements", "org.gnome.builder.editor",
"smart-home-end", NULL, NULL, _("Smart Home and End"), _("Home moves to first non-whitespace character"),
NULL, 0);
- ide_preferences_add_switch (preferences, "keyboard", "movements", "org.gnome.builder.editor",
"smart-backspace", NULL, NULL, _("Smart Backspace"), _("Backspace will remove extra space to keep you aligned
with your indentation"), NULL, 100);
+ dzl_preferences_add_list_group (preferences, "keyboard", "movements", _("Movement"), GTK_SELECTION_NONE,
100);
+ dzl_preferences_add_switch (preferences, "keyboard", "movements", "org.gnome.builder.editor",
"smart-home-end", NULL, NULL, _("Smart Home and End"), _("Home moves to first non-whitespace character"),
NULL, 0);
+ dzl_preferences_add_switch (preferences, "keyboard", "movements", "org.gnome.builder.editor",
"smart-backspace", NULL, NULL, _("Smart Backspace"), _("Backspace will remove extra space to keep you aligned
with your indentation"), NULL, 100);
}
static void
-ide_preferences_builtin_register_editor (IdePreferences *preferences)
+ide_preferences_builtin_register_editor (DzlPreferences *preferences)
{
- ide_preferences_add_page (preferences, "editor", _("Editor"), 100);
-
- ide_preferences_add_list_group (preferences, "editor", "position", _("Cursor"), GTK_SELECTION_NONE, 0);
- ide_preferences_add_switch (preferences, "editor", "position", "org.gnome.builder.editor",
"restore-insert-mark", NULL, NULL, _("Restore cursor position"), _("Restore cursor position when a file is
reopened"), NULL, 0);
- ide_preferences_add_switch (preferences, "editor", "position", "org.gnome.builder.editor", "wrap-text",
NULL, NULL, _("Enable text wrapping"), _("Wrap text that is too wide to display"), NULL, 5);
- ide_preferences_add_spin_button (preferences, "editor", "position", "org.gnome.builder.editor",
"scroll-offset", NULL, _("Scroll Offset"), _("Minimum number of lines to keep above and below the cursor"),
NULL, 10);
- ide_preferences_add_spin_button (preferences, "editor", "position", "org.gnome.builder.editor",
"overscroll", NULL, _("Overscroll"), _("Allow the editor to scroll past the end of the buffer"), NULL, 20);
-
- ide_preferences_add_list_group (preferences, "editor", "line", _("Line Information"), GTK_SELECTION_NONE,
50);
- ide_preferences_add_switch (preferences, "editor", "line", "org.gnome.builder.editor",
"show-line-numbers", NULL, NULL, _("Line numbers"), _("Show line number at beginning of each line"), NULL, 0);
- ide_preferences_add_switch (preferences, "editor", "line", "org.gnome.builder.editor",
"show-line-changes", NULL, NULL, _("Line changes"), _("Show if a line was added or modified next to line
number"), NULL, 1);
-
- ide_preferences_add_list_group (preferences, "editor", "highlight", _("Highlight"), GTK_SELECTION_NONE,
100);
- ide_preferences_add_switch (preferences, "editor", "highlight", "org.gnome.builder.editor",
"highlight-current-line", NULL, NULL, _("Current line"), _("Make current line stand out with highlights"),
NULL, 0);
- ide_preferences_add_switch (preferences, "editor", "highlight", "org.gnome.builder.editor",
"highlight-matching-brackets", NULL, NULL, _("Matching brackets"), _("Highlight matching brackets based on
cursor position"), NULL, 1);
-
- ide_preferences_add_list_group (preferences, "editor", "overview", _("Code Overview"), GTK_SELECTION_NONE,
100);
- ide_preferences_add_switch (preferences, "editor", "overview", "org.gnome.builder.editor", "show-map",
NULL, NULL, _("Show overview map"), _("A zoomed out view to enhance navigating source code"), NULL, 0);
- ide_preferences_add_switch (preferences, "editor", "overview", "org.gnome.builder.editor",
"auto-hide-map", NULL, NULL, _("Automatically hide overview map"), _("Automatically hide map when editor
loses focus"), NULL, 1);
-
- ide_preferences_add_list_group (preferences, "editor", "draw-spaces", _("Whitespace Characters"),
GTK_SELECTION_NONE, 400);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"space\"", _("Spaces"), NULL, NULL, 0);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"tab\"", _("Tabs"), NULL, NULL, 1);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"newline\"", _("New line and carriage return"), NULL, NULL, 2);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"nbsp\"", _("Non-breaking spaces"), NULL, NULL, 3);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"text\"", _("Spaces inside of text"), NULL, NULL, 4);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"trailing\"", _("Trailing Only"), NULL, NULL, 5);
- ide_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"leading\"", _("Leading Only"), NULL, NULL, 6);
-
- ide_preferences_add_list_group (preferences, "editor", "autosave", _("Autosave"), GTK_SELECTION_NONE, 450);
- ide_preferences_add_switch (preferences, "editor", "autosave", "org.gnome.builder.editor", "auto-save",
NULL, NULL,_("Autosave Enabled"), _("Enable or disable autosave feature"), NULL, 1);
- ide_preferences_add_spin_button (preferences, "editor", "autosave", "org.gnome.builder.editor",
"auto-save-timeout", NULL, _("Autosave Frequency"), _("The number of seconds after modification before auto
saving"), NULL, 60);
+ dzl_preferences_add_page (preferences, "editor", _("Editor"), 100);
+
+ dzl_preferences_add_list_group (preferences, "editor", "position", _("Cursor"), GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_switch (preferences, "editor", "position", "org.gnome.builder.editor",
"restore-insert-mark", NULL, NULL, _("Restore cursor position"), _("Restore cursor position when a file is
reopened"), NULL, 0);
+ dzl_preferences_add_switch (preferences, "editor", "position", "org.gnome.builder.editor", "wrap-text",
NULL, NULL, _("Enable text wrapping"), _("Wrap text that is too wide to display"), NULL, 5);
+ dzl_preferences_add_spin_button (preferences, "editor", "position", "org.gnome.builder.editor",
"scroll-offset", NULL, _("Scroll Offset"), _("Minimum number of lines to keep above and below the cursor"),
NULL, 10);
+ dzl_preferences_add_spin_button (preferences, "editor", "position", "org.gnome.builder.editor",
"overscroll", NULL, _("Overscroll"), _("Allow the editor to scroll past the end of the buffer"), NULL, 20);
+
+ dzl_preferences_add_list_group (preferences, "editor", "line", _("Line Information"), GTK_SELECTION_NONE,
50);
+ dzl_preferences_add_switch (preferences, "editor", "line", "org.gnome.builder.editor",
"show-line-numbers", NULL, NULL, _("Line numbers"), _("Show line number at beginning of each line"), NULL, 0);
+ dzl_preferences_add_switch (preferences, "editor", "line", "org.gnome.builder.editor",
"show-line-changes", NULL, NULL, _("Line changes"), _("Show if a line was added or modified next to line
number"), NULL, 1);
+
+ dzl_preferences_add_list_group (preferences, "editor", "highlight", _("Highlight"), GTK_SELECTION_NONE,
100);
+ dzl_preferences_add_switch (preferences, "editor", "highlight", "org.gnome.builder.editor",
"highlight-current-line", NULL, NULL, _("Current line"), _("Make current line stand out with highlights"),
NULL, 0);
+ dzl_preferences_add_switch (preferences, "editor", "highlight", "org.gnome.builder.editor",
"highlight-matching-brackets", NULL, NULL, _("Matching brackets"), _("Highlight matching brackets based on
cursor position"), NULL, 1);
+
+ dzl_preferences_add_list_group (preferences, "editor", "overview", _("Code Overview"), GTK_SELECTION_NONE,
100);
+ dzl_preferences_add_switch (preferences, "editor", "overview", "org.gnome.builder.editor", "show-map",
NULL, NULL, _("Show overview map"), _("A zoomed out view to enhance navigating source code"), NULL, 0);
+ dzl_preferences_add_switch (preferences, "editor", "overview", "org.gnome.builder.editor",
"auto-hide-map", NULL, NULL, _("Automatically hide overview map"), _("Automatically hide map when editor
loses focus"), NULL, 1);
+
+ dzl_preferences_add_list_group (preferences, "editor", "draw-spaces", _("Whitespace Characters"),
GTK_SELECTION_NONE, 400);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"space\"", _("Spaces"), NULL, NULL, 0);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"tab\"", _("Tabs"), NULL, NULL, 1);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"newline\"", _("New line and carriage return"), NULL, NULL, 2);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"nbsp\"", _("Non-breaking spaces"), NULL, NULL, 3);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"text\"", _("Spaces inside of text"), NULL, NULL, 4);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"trailing\"", _("Trailing Only"), NULL, NULL, 5);
+ dzl_preferences_add_radio (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", NULL, "\"leading\"", _("Leading Only"), NULL, NULL, 6);
+
+ dzl_preferences_add_list_group (preferences, "editor", "autosave", _("Autosave"), GTK_SELECTION_NONE, 450);
+ dzl_preferences_add_switch (preferences, "editor", "autosave", "org.gnome.builder.editor", "auto-save",
NULL, NULL,_("Autosave Enabled"), _("Enable or disable autosave feature"), NULL, 1);
+ dzl_preferences_add_spin_button (preferences, "editor", "autosave", "org.gnome.builder.editor",
"auto-save-timeout", NULL, _("Autosave Frequency"), _("The number of seconds after modification before auto
saving"), NULL, 60);
}
static void
-ide_preferences_builtin_register_code_insight (IdePreferences *preferences)
+ide_preferences_builtin_register_code_insight (DzlPreferences *preferences)
{
- ide_preferences_add_page (preferences, "code-insight", _("Code Insight"), 300);
+ dzl_preferences_add_page (preferences, "code-insight", _("Code Insight"), 300);
- ide_preferences_add_list_group (preferences, "code-insight", "highlighting", _("Highlighting"),
GTK_SELECTION_NONE, 0);
- ide_preferences_add_switch (preferences, "code-insight", "highlighting", "org.gnome.builder.code-insight",
"semantic-highlighting", NULL, NULL, _("Semantic Highlighting"), _("Use code insight to highlight additional
information discovered in source file"), NULL, 0);
+ dzl_preferences_add_list_group (preferences, "code-insight", "highlighting", _("Highlighting"),
GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_switch (preferences, "code-insight", "highlighting", "org.gnome.builder.code-insight",
"semantic-highlighting", NULL, NULL, _("Semantic Highlighting"), _("Use code insight to highlight additional
information discovered in source file"), NULL, 0);
- ide_preferences_add_list_group (preferences, "code-insight", "completion", _("Completion"),
GTK_SELECTION_NONE, 100);
- ide_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"word-completion", NULL, NULL, _("Suggest words found in open files"), _("Suggests completions as you type
based on words found in any open document"), NULL, 0);
- ide_preferences_add_spin_button (preferences, "code-insight", "completion", "org.gnome.builder.editor",
"minimum-word-size", NULL, _("Minimum word size"), _("Minimum word size for word completion"), NULL, 5);
- ide_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"ctags-autocompletion", NULL, NULL, _("Suggest completions using Ctags"), _("Create and manages a Ctags
database for completing class names, functions, and more"), NULL, 10);
- ide_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"clang-autocompletion", NULL, NULL, _("Suggest completions using Clang (Experimental)"), _("Use Clang to
suggest completions for C and C++ languages"), NULL, 20);
+ dzl_preferences_add_list_group (preferences, "code-insight", "completion", _("Completion"),
GTK_SELECTION_NONE, 100);
+ dzl_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"word-completion", NULL, NULL, _("Suggest words found in open files"), _("Suggests completions as you type
based on words found in any open document"), NULL, 0);
+ dzl_preferences_add_spin_button (preferences, "code-insight", "completion", "org.gnome.builder.editor",
"minimum-word-size", NULL, _("Minimum word size"), _("Minimum word size for word completion"), NULL, 5);
+ dzl_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"ctags-autocompletion", NULL, NULL, _("Suggest completions using Ctags"), _("Create and manages a Ctags
database for completing class names, functions, and more"), NULL, 10);
+ dzl_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"clang-autocompletion", NULL, NULL, _("Suggest completions using Clang (Experimental)"), _("Use Clang to
suggest completions for C and C++ languages"), NULL, 20);
- ide_preferences_add_list_group (preferences, "code-insight", "diagnostics", _("Diagnostics"),
GTK_SELECTION_NONE, 200);
+ dzl_preferences_add_list_group (preferences, "code-insight", "diagnostics", _("Diagnostics"),
GTK_SELECTION_NONE, 200);
}
static void
-ide_preferences_builtin_register_snippets (IdePreferences *preferences)
+ide_preferences_builtin_register_snippets (DzlPreferences *preferences)
{
- ide_preferences_add_page (preferences, "snippets", _("Snippets"), 350);
+ dzl_preferences_add_page (preferences, "snippets", _("Snippets"), 350);
- ide_preferences_add_list_group (preferences, "snippets", "completion", NULL, GTK_SELECTION_NONE, 0);
- ide_preferences_add_switch (preferences, "snippets", "completion", "org.gnome.builder.code-insight",
"snippet-completion", NULL, NULL, _("Code snippets"), _("Use code fragments to increase typing efficiency"),
NULL, 0);
+ dzl_preferences_add_list_group (preferences, "snippets", "completion", NULL, GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_switch (preferences, "snippets", "completion", "org.gnome.builder.code-insight",
"snippet-completion", NULL, NULL, _("Code snippets"), _("Use code fragments to increase typing efficiency"),
NULL, 0);
}
static void
language_search_changed (GtkSearchEntry *search,
- IdePreferencesGroup *group)
+ DzlPreferencesGroup *group)
{
- g_autoptr(IdePatternSpec) spec = NULL;
+ g_autoptr(DzlPatternSpec) spec = NULL;
const gchar *text;
g_assert (GTK_IS_SEARCH_ENTRY (search));
- g_assert (IDE_IS_PREFERENCES_GROUP (group));
+ g_assert (DZL_IS_PREFERENCES_GROUP (group));
text = gtk_entry_get_text (GTK_ENTRY (search));
@@ -229,7 +225,7 @@ language_search_changed (GtkSearchEntry *search,
{
g_autofree gchar *folded = g_utf8_casefold (text, -1);
- spec = ide_pattern_spec_new (folded);
+ spec = dzl_pattern_spec_new (folded);
}
/* FIXME:
@@ -239,11 +235,11 @@ language_search_changed (GtkSearchEntry *search,
* that is coherent for 3.22.
*/
- _ide_preferences_group_refilter (group, spec);
+ dzl_preferences_group_refilter (group, spec);
}
static void
-ide_preferences_builtin_register_languages (IdePreferences *preferences)
+ide_preferences_builtin_register_languages (DzlPreferences *preferences)
{
GtkSourceLanguageManager *manager;
const gchar * const *language_ids;
@@ -254,23 +250,23 @@ ide_preferences_builtin_register_languages (IdePreferences *preferences)
sections = g_hash_table_new (g_str_hash, g_str_equal);
- ide_preferences_add_page (preferences, "languages", _("Programming Languages"), 200);
+ dzl_preferences_add_page (preferences, "languages", _("Programming Languages"), 200);
manager = gtk_source_language_manager_get_default ();
language_ids = gtk_source_language_manager_get_language_ids (manager);
g_assert (language_ids != NULL && language_ids[0] != NULL);
- ide_preferences_add_group (preferences, "languages", "search", NULL, 0);
+ dzl_preferences_add_group (preferences, "languages", "search", NULL, 0);
search = g_object_new (GTK_TYPE_SEARCH_ENTRY,
/* translators: placeholder string for the entry used to filter the languages in
Preferences/Programming languages */
"placeholder-text", _("Search languages…"),
"visible", TRUE,
NULL);
- ide_preferences_add_custom (preferences, "languages", "search", GTK_WIDGET (search), NULL, 0);
+ dzl_preferences_add_custom (preferences, "languages", "search", GTK_WIDGET (search), NULL, 0);
- ide_preferences_add_list_group (preferences, "languages", "languages", NULL, GTK_SELECTION_SINGLE, 1);
+ dzl_preferences_add_list_group (preferences, "languages", "languages", NULL, GTK_SELECTION_SINGLE, 1);
for (guint i = 0; language_ids [i]; i++)
{
@@ -297,10 +293,10 @@ ide_preferences_builtin_register_languages (IdePreferences *preferences)
"title", name,
"visible", TRUE,
NULL);
- ide_preferences_add_custom (preferences, "languages", "languages", GTK_WIDGET (row), NULL, i);
+ dzl_preferences_add_custom (preferences, "languages", "languages", GTK_WIDGET (row), NULL, i);
if G_UNLIKELY (group == NULL)
- group = gtk_widget_get_ancestor (GTK_WIDGET (row), IDE_TYPE_PREFERENCES_GROUP);
+ group = gtk_widget_get_ancestor (GTK_WIDGET (row), DZL_TYPE_PREFERENCES_GROUP);
}
g_assert (group != NULL);
@@ -317,20 +313,20 @@ ide_preferences_builtin_register_languages (IdePreferences *preferences)
dzl_column_layout_set_max_columns (DZL_COLUMN_LAYOUT (flow), 1);
- ide_preferences_add_page (preferences, "languages.id", NULL, 0);
+ dzl_preferences_add_page (preferences, "languages.id", NULL, 0);
- ide_preferences_add_list_group (preferences, "languages.id", "basic", _("General"), GTK_SELECTION_NONE, 0);
- ide_preferences_add_switch (preferences, "languages.id", "basic", "org.gnome.builder.editor.language",
"trim-trailing-whitespace", "/org/gnome/builder/editor/language/{id}/", NULL, _("Trim trailing whitespace"),
_("Upon saving, trailing whitespace from modified lines will be trimmed."), NULL, 10);
- ide_preferences_add_switch (preferences, "languages.id", "basic", "org.gnome.builder.editor.language",
"overwrite-braces", "/org/gnome/builder/editor/language/{id}/", NULL, _("Overwrite Braces"), _("Overwrite
closing braces"), NULL, 20);
+ dzl_preferences_add_list_group (preferences, "languages.id", "basic", _("General"), GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_switch (preferences, "languages.id", "basic", "org.gnome.builder.editor.language",
"trim-trailing-whitespace", "/org/gnome/builder/editor/language/{id}/", NULL, _("Trim trailing whitespace"),
_("Upon saving, trailing whitespace from modified lines will be trimmed."), NULL, 10);
+ dzl_preferences_add_switch (preferences, "languages.id", "basic", "org.gnome.builder.editor.language",
"overwrite-braces", "/org/gnome/builder/editor/language/{id}/", NULL, _("Overwrite Braces"), _("Overwrite
closing braces"), NULL, 20);
- ide_preferences_add_list_group (preferences, "languages.id", "margin", _("Margins"), GTK_SELECTION_NONE,
0);
- ide_preferences_add_radio (preferences, "languages.id", "margin", "org.gnome.builder.editor.language",
"show-right-margin", "/org/gnome/builder/editor/language/{id}/", NULL, _("Show right margin"), NULL, NULL, 0);
- ide_preferences_add_spin_button (preferences, "languages.id", "margin",
"org.gnome.builder.editor.language", "right-margin-position", "/org/gnome/builder/editor/language/{id}/",
_("Right margin position"), _("Position in spaces for the right margin"), NULL, 10);
+ dzl_preferences_add_list_group (preferences, "languages.id", "margin", _("Margins"), GTK_SELECTION_NONE,
0);
+ dzl_preferences_add_radio (preferences, "languages.id", "margin", "org.gnome.builder.editor.language",
"show-right-margin", "/org/gnome/builder/editor/language/{id}/", NULL, _("Show right margin"), NULL, NULL, 0);
+ dzl_preferences_add_spin_button (preferences, "languages.id", "margin",
"org.gnome.builder.editor.language", "right-margin-position", "/org/gnome/builder/editor/language/{id}/",
_("Right margin position"), _("Position in spaces for the right margin"), NULL, 10);
- ide_preferences_add_list_group (preferences, "languages.id", "indentation", _("Indentation"),
GTK_SELECTION_NONE, 100);
- ide_preferences_add_spin_button (preferences, "languages.id", "indentation",
"org.gnome.builder.editor.language", "tab-width", "/org/gnome/builder/editor/language/{id}/", _("Tab width"),
_("Width of a tab character in spaces"), NULL, 10);
- ide_preferences_add_radio (preferences, "languages.id", "indentation",
"org.gnome.builder.editor.language", "insert-spaces-instead-of-tabs",
"/org/gnome/builder/editor/language/{id}/", NULL, _("Insert spaces instead of tabs"), _("Prefer spaces over
use of tabs"), NULL, 20);
- ide_preferences_add_radio (preferences, "languages.id", "indentation",
"org.gnome.builder.editor.language", "auto-indent", "/org/gnome/builder/editor/language/{id}/", NULL,
_("Automatically indent"), _("Indent source code as you type"), NULL, 30);
+ dzl_preferences_add_list_group (preferences, "languages.id", "indentation", _("Indentation"),
GTK_SELECTION_NONE, 100);
+ dzl_preferences_add_spin_button (preferences, "languages.id", "indentation",
"org.gnome.builder.editor.language", "tab-width", "/org/gnome/builder/editor/language/{id}/", _("Tab width"),
_("Width of a tab character in spaces"), NULL, 10);
+ dzl_preferences_add_radio (preferences, "languages.id", "indentation",
"org.gnome.builder.editor.language", "insert-spaces-instead-of-tabs",
"/org/gnome/builder/editor/language/{id}/", NULL, _("Insert spaces instead of tabs"), _("Prefer spaces over
use of tabs"), NULL, 20);
+ dzl_preferences_add_radio (preferences, "languages.id", "indentation",
"org.gnome.builder.editor.language", "auto-indent", "/org/gnome/builder/editor/language/{id}/", NULL,
_("Automatically indent"), _("Indent source code as you type"), NULL, 30);
}
static gboolean
@@ -373,47 +369,47 @@ workers_input (GtkSpinButton *button,
}
static void
-ide_preferences_builtin_register_build (IdePreferences *preferences)
+ide_preferences_builtin_register_build (DzlPreferences *preferences)
{
GtkWidget *widget, *bin;
guint id;
- ide_preferences_add_page (preferences, "build", _("Build"), 500);
+ dzl_preferences_add_page (preferences, "build", _("Build"), 500);
- ide_preferences_add_list_group (preferences, "build", "basic", _("General"), GTK_SELECTION_NONE, 0);
- id = ide_preferences_add_spin_button (preferences, "build", "basic", "org.gnome.builder.build",
"parallel", "/org/gnome/builder/build/", _("Build Workers"), _("Number of parallel build workers"), NULL, 0);
+ dzl_preferences_add_list_group (preferences, "build", "basic", _("General"), GTK_SELECTION_NONE, 0);
+ id = dzl_preferences_add_spin_button (preferences, "build", "basic", "org.gnome.builder.build",
"parallel", "/org/gnome/builder/build/", _("Build Workers"), _("Number of parallel build workers"), NULL, 0);
- bin = ide_preferences_get_widget (preferences, id);
- widget = ide_preferences_spin_button_get_spin_button (IDE_PREFERENCES_SPIN_BUTTON (bin));
+ bin = dzl_preferences_get_widget (preferences, id);
+ widget = dzl_preferences_spin_button_get_spin_button (DZL_PREFERENCES_SPIN_BUTTON (bin));
gtk_entry_set_width_chars (GTK_ENTRY (widget), 20);
g_signal_connect (widget, "input", G_CALLBACK (workers_input), NULL);
g_signal_connect (widget, "output", G_CALLBACK (workers_output), NULL);
- ide_preferences_add_list_group (preferences, "build", "network", _("Network"), GTK_SELECTION_NONE, 100);
- ide_preferences_add_switch (preferences, "build", "network", "org.gnome.builder.build",
"allow-network-when-metered", NULL, NULL, _("Allow downloads over metered connections"), _("Allow the use of
metered network connections when automatically downloading dependencies"), NULL, 10);
+ dzl_preferences_add_list_group (preferences, "build", "network", _("Network"), GTK_SELECTION_NONE, 100);
+ dzl_preferences_add_switch (preferences, "build", "network", "org.gnome.builder.build",
"allow-network-when-metered", NULL, NULL, _("Allow downloads over metered connections"), _("Allow the use of
metered network connections when automatically downloading dependencies"), NULL, 10);
}
static void
-ide_preferences_builtin_register_projects (IdePreferences *preferences)
+ide_preferences_builtin_register_projects (DzlPreferences *preferences)
{
- ide_preferences_add_page (preferences, "projects", _("Projects"), 450);
+ dzl_preferences_add_page (preferences, "projects", _("Projects"), 450);
- ide_preferences_add_list_group (preferences, "projects", "directory", _("Workspace"), GTK_SELECTION_NONE,
0);
- ide_preferences_add_file_chooser (preferences, "projects", "directory", "org.gnome.builder",
"projects-directory", NULL, _("Projects directory"), _("A place for all your projects"),
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL, 0);
- ide_preferences_add_switch (preferences, "projects", "directory", "org.gnome.builder",
"restore-previous-files", NULL, NULL, _("Restore previously opened files"), _("Open previously opened files
when loading a project"), NULL, 10);
+ dzl_preferences_add_list_group (preferences, "projects", "directory", _("Workspace"), GTK_SELECTION_NONE,
0);
+ dzl_preferences_add_file_chooser (preferences, "projects", "directory", "org.gnome.builder",
"projects-directory", NULL, _("Projects directory"), _("A place for all your projects"),
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL, 0);
+ dzl_preferences_add_switch (preferences, "projects", "directory", "org.gnome.builder",
"restore-previous-files", NULL, NULL, _("Restore previously opened files"), _("Open previously opened files
when loading a project"), NULL, 10);
- ide_preferences_add_list_group (preferences, "projects", "discovery", _("Project Discovery"),
GTK_SELECTION_NONE, 0);
- ide_preferences_add_switch (preferences, "projects", "discovery", "org.gnome.builder",
"enable-project-miners", NULL, NULL, _("Discover projects on my computer"), _("Scan your computer for
existing projects"), NULL, 0);
+ dzl_preferences_add_list_group (preferences, "projects", "discovery", _("Project Discovery"),
GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_switch (preferences, "projects", "discovery", "org.gnome.builder",
"enable-project-miners", NULL, NULL, _("Discover projects on my computer"), _("Scan your computer for
existing projects"), NULL, 0);
}
static void
-author_changed_cb (IdePreferencesEntry *entry,
+author_changed_cb (DzlPreferencesEntry *entry,
const gchar *text,
IdeVcsConfig *conf)
{
GValue value = G_VALUE_INIT;
- g_assert (IDE_IS_PREFERENCES_ENTRY (entry));
+ g_assert (DZL_IS_PREFERENCES_ENTRY (entry));
g_assert (text != NULL);
g_assert (IDE_IS_VCS_CONFIG (conf));
@@ -426,13 +422,13 @@ author_changed_cb (IdePreferencesEntry *entry,
}
static void
-email_changed_cb (IdePreferencesEntry *entry,
+email_changed_cb (DzlPreferencesEntry *entry,
const gchar *text,
IdeVcsConfig *conf)
{
GValue value = G_VALUE_INIT;
- g_assert (IDE_IS_PREFERENCES_ENTRY (entry));
+ g_assert (DZL_IS_PREFERENCES_ENTRY (entry));
g_assert (text != NULL);
g_assert (IDE_IS_VCS_CONFIG (conf));
@@ -450,7 +446,7 @@ vcs_configs_foreach_cb (PeasExtensionSet *set,
PeasExtension *exten,
gpointer user_data)
{
- IdePreferences *preferences = user_data;
+ DzlPreferences *preferences = user_data;
IdeVcsConfig *conf = (IdeVcsConfig *)exten;
GValue value = G_VALUE_INIT;
GtkWidget *fullname;
@@ -463,7 +459,7 @@ vcs_configs_foreach_cb (PeasExtensionSet *set,
const gchar *id;
g_assert (PEAS_IS_EXTENSION_SET (set));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
g_assert (IDE_IS_VCS_CONFIG (conf));
name = peas_plugin_info_get_name (plugin_info);
@@ -484,7 +480,7 @@ vcs_configs_foreach_cb (PeasExtensionSet *set,
g_value_unset (&value);
- fullname = g_object_new (IDE_TYPE_PREFERENCES_ENTRY,
+ fullname = g_object_new (DZL_TYPE_PREFERENCES_ENTRY,
"text", ide_str_empty0 (author_name) ? "" : author_name,
"title", "Author",
"visible", TRUE,
@@ -496,7 +492,7 @@ vcs_configs_foreach_cb (PeasExtensionSet *set,
conf,
0);
- email = g_object_new (IDE_TYPE_PREFERENCES_ENTRY,
+ email = g_object_new (DZL_TYPE_PREFERENCES_ENTRY,
"text", ide_str_empty0 (author_email) ? "" : author_email,
"title", "Email",
"visible", TRUE,
@@ -508,23 +504,23 @@ vcs_configs_foreach_cb (PeasExtensionSet *set,
conf,
0);
- ide_preferences_add_list_group (preferences, "vcs", id, name, GTK_SELECTION_NONE, 0);
- ide_preferences_add_custom (preferences, "vcs", id, fullname, NULL, 0);
- ide_preferences_add_custom (preferences, "vcs", id, email, NULL, 0);
+ dzl_preferences_add_list_group (preferences, "vcs", id, name, GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_custom (preferences, "vcs", id, fullname, NULL, 0);
+ dzl_preferences_add_custom (preferences, "vcs", id, email, NULL, 0);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, ide_preferences_entry_get_title_widget (IDE_PREFERENCES_ENTRY
(fullname)));
- gtk_size_group_add_widget (size_group, ide_preferences_entry_get_title_widget (IDE_PREFERENCES_ENTRY
(email)));
+ gtk_size_group_add_widget (size_group, dzl_preferences_entry_get_title_widget (DZL_PREFERENCES_ENTRY
(fullname)));
+ gtk_size_group_add_widget (size_group, dzl_preferences_entry_get_title_widget (DZL_PREFERENCES_ENTRY
(email)));
g_clear_object (&size_group);
}
static void
-ide_preferences_builtin_register_vcs (IdePreferences *preferences)
+ide_preferences_builtin_register_vcs (DzlPreferences *preferences)
{
PeasEngine *engine;
PeasExtensionSet *extensions;
- ide_preferences_add_page (preferences, "vcs", _("Version Control"), 600);
+ dzl_preferences_add_page (preferences, "vcs", _("Version Control"), 600);
engine = peas_engine_get_default ();
extensions = peas_extension_set_new (engine, IDE_TYPE_VCS_CONFIG, NULL);
@@ -533,14 +529,14 @@ ide_preferences_builtin_register_vcs (IdePreferences *preferences)
}
static void
-ide_preferences_builtin_register_sdks (IdePreferences *preferences)
+ide_preferences_builtin_register_sdks (DzlPreferences *preferences)
{
/* only the page goes here, plugins will fill in the details */
- ide_preferences_add_page (preferences, "sdk", _("SDKs"), 550);
+ dzl_preferences_add_page (preferences, "sdk", _("SDKs"), 550);
}
void
-_ide_preferences_builtin_register (IdePreferences *preferences)
+_ide_preferences_builtin_register (DzlPreferences *preferences)
{
ide_preferences_builtin_register_appearance (preferences);
ide_preferences_builtin_register_editor (preferences);
diff --git a/libide/preferences/ide-preferences-builtin.h b/libide/preferences/ide-preferences-builtin.h
index c4bdc6c..f5e9eed 100644
--- a/libide/preferences/ide-preferences-builtin.h
+++ b/libide/preferences/ide-preferences-builtin.h
@@ -19,11 +19,11 @@
#ifndef IDE_PREFERENCES_BUILTIN_H
#define IDE_PREFERENCES_BUILTIN_H
-#include "ide-preferences.h"
+#include <dazzle.h>
G_BEGIN_DECLS
-void _ide_preferences_builtin_register (IdePreferences *preferences);
+void _ide_preferences_builtin_register (DzlPreferences *preferences);
G_END_DECLS
diff --git a/libide/preferences/ide-preferences-language-row.c
b/libide/preferences/ide-preferences-language-row.c
index 833957f..85bfee4 100644
--- a/libide/preferences/ide-preferences-language-row.c
+++ b/libide/preferences/ide-preferences-language-row.c
@@ -16,17 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ide-preferences.h"
+#define G_LOG_DOMAIN "ide-preferences-language-row"
+
#include "ide-preferences-language-row.h"
struct _IdePreferencesLanguageRow
{
- IdePreferencesBin parent_instance;
+ DzlPreferencesBin parent_instance;
gchar *id;
GtkLabel *title;
};
-G_DEFINE_TYPE (IdePreferencesLanguageRow, ide_preferences_language_row, IDE_TYPE_PREFERENCES_BIN)
+G_DEFINE_TYPE (IdePreferencesLanguageRow, ide_preferences_language_row, DZL_TYPE_PREFERENCES_BIN)
enum {
PROP_0,
@@ -54,13 +55,13 @@ ide_preferences_language_row_activate (IdePreferencesLanguageRow *self)
if (self->id == NULL)
return;
- preferences = gtk_widget_get_ancestor (GTK_WIDGET (self), IDE_TYPE_PREFERENCES);
+ preferences = gtk_widget_get_ancestor (GTK_WIDGET (self), DZL_TYPE_PREFERENCES);
if (preferences == NULL)
return;
map = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
g_hash_table_insert (map, "{id}", g_strdup (self->id));
- ide_preferences_set_page (IDE_PREFERENCES (preferences), "languages.id", map);
+ dzl_preferences_set_page (DZL_PREFERENCES (preferences), "languages.id", map);
g_hash_table_unref (map);
}
diff --git a/libide/preferences/ide-preferences-language-row.h
b/libide/preferences/ide-preferences-language-row.h
index 963fd79..4c4a416 100644
--- a/libide/preferences/ide-preferences-language-row.h
+++ b/libide/preferences/ide-preferences-language-row.h
@@ -19,13 +19,13 @@
#ifndef IDE_PREFERENCES_LANGUAGE_ROW_H
#define IDE_PREFERENCES_LANGUAGE_ROW_H
-#include "ide-preferences-bin.h"
+#include <dazzle.h>
G_BEGIN_DECLS
#define IDE_TYPE_PREFERENCES_LANGUAGE_ROW (ide_preferences_language_row_get_type())
-G_DECLARE_FINAL_TYPE (IdePreferencesLanguageRow, ide_preferences_language_row, IDE,
PREFERENCES_LANGUAGE_ROW, IdePreferencesBin)
+G_DECLARE_FINAL_TYPE (IdePreferencesLanguageRow, ide_preferences_language_row, IDE,
PREFERENCES_LANGUAGE_ROW, DzlPreferencesBin)
G_END_DECLS
diff --git a/libide/preferences/ide-preferences-language-row.ui
b/libide/preferences/ide-preferences-language-row.ui
index fe6bf1f..68b63a8 100644
--- a/libide/preferences/ide-preferences-language-row.ui
+++ b/libide/preferences/ide-preferences-language-row.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.18 -->
- <template class="IdePreferencesLanguageRow" parent="IdePreferencesBin">
+ <template class="IdePreferencesLanguageRow" parent="DzlPreferencesBin">
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
diff --git a/libide/preferences/ide-preferences-perspective.c
b/libide/preferences/ide-preferences-perspective.c
index d1120aa..488c913 100644
--- a/libide/preferences/ide-preferences-perspective.c
+++ b/libide/preferences/ide-preferences-perspective.c
@@ -20,23 +20,15 @@
#include <glib/gi18n.h>
#include <libpeas/peas.h>
+#include <dazzle.h>
#include "ide-macros.h"
#include "search/ide-pattern-spec.h"
#include "workbench/ide-perspective.h"
-#include "preferences/ide-preferences.h"
#include "preferences/ide-preferences-addin.h"
#include "preferences/ide-preferences-builtin.h"
-#include "preferences/ide-preferences-file-chooser-button.h"
-#include "preferences/ide-preferences-font-button.h"
-#include "preferences/ide-preferences-group.h"
-#include "preferences/ide-preferences-group-private.h"
-#include "preferences/ide-preferences-page.h"
-#include "preferences/ide-preferences-page-private.h"
#include "preferences/ide-preferences-perspective.h"
-#include "preferences/ide-preferences-spin-button.h"
-#include "preferences/ide-preferences-switch.h"
#include "workbench/ide-workbench-header-bar.h"
struct _IdePreferencesPerspective
@@ -57,35 +49,35 @@ struct _IdePreferencesPerspective
GtkStack *subpage_stack;
};
-static void ide_preferences_iface_init (IdePreferencesInterface *iface);
+static void dzl_preferences_iface_init (DzlPreferencesInterface *iface);
static void ide_perspective_iface_init (IdePerspectiveInterface *iface);
G_DEFINE_TYPE_EXTENDED (IdePreferencesPerspective, ide_preferences_perspective, GTK_TYPE_BIN, 0,
- G_IMPLEMENT_INTERFACE (IDE_TYPE_PREFERENCES, ide_preferences_iface_init)
+ G_IMPLEMENT_INTERFACE (DZL_TYPE_PREFERENCES, dzl_preferences_iface_init)
G_IMPLEMENT_INTERFACE (IDE_TYPE_PERSPECTIVE, ide_perspective_iface_init))
static void
ide_preferences_perspective_refilter_cb (GtkWidget *widget,
gpointer user_data)
{
- IdePreferencesPage *page = (IdePreferencesPage *)widget;
- IdePatternSpec *spec = user_data;
+ DzlPreferencesPage *page = (DzlPreferencesPage *)widget;
+ DzlPatternSpec *spec = user_data;
- g_assert (IDE_IS_PREFERENCES_PAGE (page));
+ g_assert (DZL_IS_PREFERENCES_PAGE (page));
- _ide_preferences_page_refilter (page, spec);
+ dzl_preferences_page_refilter (page, spec);
}
static void
ide_preferences_perspective_refilter (IdePreferencesPerspective *self,
const gchar *search_text)
{
- IdePatternSpec *spec = NULL;
+ DzlPatternSpec *spec = NULL;
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
if (!ide_str_empty0 (search_text))
- spec = ide_pattern_spec_new (search_text);
+ spec = dzl_pattern_spec_new (search_text);
gtk_container_foreach (GTK_CONTAINER (self->page_stack),
ide_preferences_perspective_refilter_cb,
@@ -94,7 +86,7 @@ ide_preferences_perspective_refilter (IdePreferencesPerspective *self,
ide_preferences_perspective_refilter_cb,
spec);
- g_clear_pointer (&spec, ide_pattern_spec_unref);
+ g_clear_pointer (&spec, dzl_pattern_spec_unref);
}
static gint
@@ -125,7 +117,7 @@ ide_preferences_perspective_extension_added (PeasExtensionSet *set,
g_assert (IDE_IS_PREFERENCES_ADDIN (extension));
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
- ide_preferences_addin_load (IDE_PREFERENCES_ADDIN (extension), IDE_PREFERENCES (self));
+ ide_preferences_addin_load (IDE_PREFERENCES_ADDIN (extension), DZL_PREFERENCES (self));
text = gtk_entry_get_text (GTK_ENTRY (self->search_entry));
ide_preferences_perspective_refilter (self, text);
@@ -145,7 +137,7 @@ ide_preferences_perspective_extension_removed (PeasExtensionSet *set,
g_assert (IDE_IS_PREFERENCES_ADDIN (extension));
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
- ide_preferences_addin_unload (IDE_PREFERENCES_ADDIN (extension), IDE_PREFERENCES (self));
+ ide_preferences_addin_unload (IDE_PREFERENCES_ADDIN (extension), DZL_PREFERENCES (self));
text = gtk_entry_get_text (GTK_ENTRY (self->search_entry));
ide_preferences_perspective_refilter (self, text);
@@ -156,7 +148,8 @@ ide_preferences_perspective_notify_visible_child (IdePreferencesPerspective *sel
GParamSpec *pspec,
GtkStack *stack)
{
- IdePreferencesPage *page;
+#if 0
+ DzlPreferencesPage *page;
GHashTableIter iter;
gpointer value;
@@ -173,17 +166,17 @@ ide_preferences_perspective_notify_visible_child (IdePreferencesPerspective *sel
* the subpage to potentially reappear.
*/
- if (NULL == (page = IDE_PREFERENCES_PAGE (gtk_stack_get_visible_child (stack))))
+ if (NULL == (page = DZL_PREFERENCES_PAGE (gtk_stack_get_visible_child (stack))))
return;
g_hash_table_iter_init (&iter, page->groups_by_name);
while (g_hash_table_iter_next (&iter, NULL, &value))
{
- IdePreferencesGroup *group = value;
+ DzlPreferencesGroup *group = value;
GtkSelectionMode mode = GTK_SELECTION_NONE;
- g_assert (IDE_IS_PREFERENCES_GROUP (group));
+ g_assert (DZL_IS_PREFERENCES_GROUP (group));
if (!group->is_list)
continue;
@@ -202,6 +195,7 @@ ide_preferences_perspective_notify_visible_child (IdePreferencesPerspective *sel
break;
}
}
+#endif
}
static void
@@ -211,7 +205,7 @@ ide_preferences_perspective_constructed (GObject *object)
G_OBJECT_CLASS (ide_preferences_perspective_parent_class)->constructed (object);
- _ide_preferences_builtin_register (IDE_PREFERENCES (self));
+ _ide_preferences_builtin_register (DZL_PREFERENCES (self));
self->extensions = peas_extension_set_new (peas_engine_get_default (),
IDE_TYPE_PREFERENCES_ADDIN,
@@ -359,18 +353,18 @@ ide_preferences_perspective_get_page (IdePreferencesPerspective *self,
}
static void
-ide_preferences_perspective_add_page (IdePreferences *preferences,
+ide_preferences_perspective_add_page (DzlPreferences *preferences,
const gchar *page_name,
const gchar *title,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesPage *page;
+ DzlPreferencesPage *page;
GSequenceIter *iter;
GtkStack *stack;
gint position = -1;
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
g_assert (page_name != NULL);
g_assert (title != NULL || strchr (page_name, '.'));
@@ -383,7 +377,7 @@ ide_preferences_perspective_add_page (IdePreferences *preferences,
if (gtk_stack_get_child_by_name (stack, page_name))
return;
- page = g_object_new (IDE_TYPE_PREFERENCES_PAGE,
+ page = g_object_new (DZL_TYPE_PREFERENCES_PAGE,
"priority", priority,
"visible", TRUE,
NULL);
@@ -402,14 +396,14 @@ ide_preferences_perspective_add_page (IdePreferences *preferences,
}
static void
-ide_preferences_perspective_add_group (IdePreferences *preferences,
+ide_preferences_perspective_add_group (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *title,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesGroup *group;
+ DzlPreferencesGroup *group;
GtkWidget *page;
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
@@ -424,17 +418,17 @@ ide_preferences_perspective_add_group (IdePreferences *preferences,
return;
}
- group = g_object_new (IDE_TYPE_PREFERENCES_GROUP,
+ group = g_object_new (DZL_TYPE_PREFERENCES_GROUP,
"name", group_name,
"priority", priority,
"title", title,
"visible", TRUE,
NULL);
- ide_preferences_page_add_group (IDE_PREFERENCES_PAGE (page), group);
+ dzl_preferences_page_add_group (DZL_PREFERENCES_PAGE (page), group);
}
static void
-ide_preferences_perspective_add_list_group (IdePreferences *preferences,
+ide_preferences_perspective_add_list_group (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *title,
@@ -442,7 +436,7 @@ ide_preferences_perspective_add_list_group (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesGroup *group;
+ DzlPreferencesGroup *group;
GtkWidget *page;
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
@@ -457,7 +451,7 @@ ide_preferences_perspective_add_list_group (IdePreferences *preferences,
return;
}
- group = g_object_new (IDE_TYPE_PREFERENCES_GROUP,
+ group = g_object_new (DZL_TYPE_PREFERENCES_GROUP,
"is-list", TRUE,
"mode", mode,
"name", group_name,
@@ -465,11 +459,11 @@ ide_preferences_perspective_add_list_group (IdePreferences *preferences,
"title", title,
"visible", TRUE,
NULL);
- ide_preferences_page_add_group (IDE_PREFERENCES_PAGE (page), group);
+ dzl_preferences_page_add_group (DZL_PREFERENCES_PAGE (page), group);
}
static guint
-ide_preferences_perspective_add_radio (IdePreferences *preferences,
+ide_preferences_perspective_add_radio (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *schema_id,
@@ -482,8 +476,8 @@ ide_preferences_perspective_add_radio (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesSwitch *widget;
- IdePreferencesGroup *group;
+ DzlPreferencesSwitch *widget;
+ DzlPreferencesGroup *group;
g_autoptr(GVariant) variant = NULL;
GtkWidget *page;
guint widget_id;
@@ -503,7 +497,7 @@ ide_preferences_perspective_add_radio (IdePreferences *preferences,
return 0;
}
- group = ide_preferences_page_get_group (IDE_PREFERENCES_PAGE (page), group_name);
+ group = dzl_preferences_page_get_group (DZL_PREFERENCES_PAGE (page), group_name);
if (group == NULL)
{
@@ -524,7 +518,7 @@ ide_preferences_perspective_add_radio (IdePreferences *preferences,
g_variant_ref_sink (variant);
}
- widget = g_object_new (IDE_TYPE_PREFERENCES_SWITCH,
+ widget = g_object_new (DZL_TYPE_PREFERENCES_SWITCH,
"is-radio", TRUE,
"key", key,
"keywords", keywords,
@@ -537,7 +531,7 @@ ide_preferences_perspective_add_radio (IdePreferences *preferences,
"visible", TRUE,
NULL);
- ide_preferences_group_add (group, GTK_WIDGET (widget));
+ dzl_preferences_group_add (group, GTK_WIDGET (widget));
widget_id = ++self->last_widget_id;
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
@@ -546,7 +540,7 @@ ide_preferences_perspective_add_radio (IdePreferences *preferences,
}
static guint
-ide_preferences_perspective_add_switch (IdePreferences *preferences,
+ide_preferences_perspective_add_switch (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *schema_id,
@@ -559,8 +553,8 @@ ide_preferences_perspective_add_switch (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesSwitch *widget;
- IdePreferencesGroup *group;
+ DzlPreferencesSwitch *widget;
+ DzlPreferencesGroup *group;
g_autoptr(GVariant) variant = NULL;
GtkWidget *page;
guint widget_id;
@@ -580,7 +574,7 @@ ide_preferences_perspective_add_switch (IdePreferences *preferences,
return 0;
}
- group = ide_preferences_page_get_group (IDE_PREFERENCES_PAGE (page), group_name);
+ group = dzl_preferences_page_get_group (DZL_PREFERENCES_PAGE (page), group_name);
if (group == NULL)
{
@@ -601,7 +595,7 @@ ide_preferences_perspective_add_switch (IdePreferences *preferences,
g_variant_ref_sink (variant);
}
- widget = g_object_new (IDE_TYPE_PREFERENCES_SWITCH,
+ widget = g_object_new (DZL_TYPE_PREFERENCES_SWITCH,
"key", key,
"keywords", keywords,
"path", path,
@@ -613,7 +607,7 @@ ide_preferences_perspective_add_switch (IdePreferences *preferences,
"visible", TRUE,
NULL);
- ide_preferences_group_add (group, GTK_WIDGET (widget));
+ dzl_preferences_group_add (group, GTK_WIDGET (widget));
widget_id = ++self->last_widget_id;
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
@@ -622,7 +616,7 @@ ide_preferences_perspective_add_switch (IdePreferences *preferences,
}
static guint
-ide_preferences_perspective_add_spin_button (IdePreferences *preferences,
+ide_preferences_perspective_add_spin_button (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *schema_id,
@@ -634,8 +628,8 @@ ide_preferences_perspective_add_spin_button (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesSpinButton *widget;
- IdePreferencesGroup *group;
+ DzlPreferencesSpinButton *widget;
+ DzlPreferencesGroup *group;
GtkWidget *page;
guint widget_id;
@@ -654,7 +648,7 @@ ide_preferences_perspective_add_spin_button (IdePreferences *preferences,
return 0;
}
- group = ide_preferences_page_get_group (IDE_PREFERENCES_PAGE (page), group_name);
+ group = dzl_preferences_page_get_group (DZL_PREFERENCES_PAGE (page), group_name);
if (group == NULL)
@@ -664,7 +658,7 @@ ide_preferences_perspective_add_spin_button (IdePreferences *preferences,
return 0;
}
- widget = g_object_new (IDE_TYPE_PREFERENCES_SPIN_BUTTON,
+ widget = g_object_new (DZL_TYPE_PREFERENCES_SPIN_BUTTON,
"key", key,
"keywords", keywords,
"path", path,
@@ -675,7 +669,7 @@ ide_preferences_perspective_add_spin_button (IdePreferences *preferences,
"visible", TRUE,
NULL);
- ide_preferences_group_add (group, GTK_WIDGET (widget));
+ dzl_preferences_group_add (group, GTK_WIDGET (widget));
widget_id = ++self->last_widget_id;
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
@@ -684,7 +678,7 @@ ide_preferences_perspective_add_spin_button (IdePreferences *preferences,
}
static guint
-ide_preferences_perspective_add_font_button (IdePreferences *preferences,
+ide_preferences_perspective_add_font_button (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *schema_id,
@@ -694,8 +688,8 @@ ide_preferences_perspective_add_font_button (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesSwitch *widget;
- IdePreferencesGroup *group;
+ DzlPreferencesSwitch *widget;
+ DzlPreferencesGroup *group;
GtkWidget *page;
guint widget_id;
@@ -714,7 +708,7 @@ ide_preferences_perspective_add_font_button (IdePreferences *preferences,
return 0;
}
- group = ide_preferences_page_get_group (IDE_PREFERENCES_PAGE (page), group_name);
+ group = dzl_preferences_page_get_group (DZL_PREFERENCES_PAGE (page), group_name);
if (group == NULL)
{
@@ -723,7 +717,7 @@ ide_preferences_perspective_add_font_button (IdePreferences *preferences,
return 0;
}
- widget = g_object_new (IDE_TYPE_PREFERENCES_FONT_BUTTON,
+ widget = g_object_new (DZL_TYPE_PREFERENCES_FONT_BUTTON,
"key", key,
"keywords", keywords,
"priority", priority,
@@ -732,7 +726,7 @@ ide_preferences_perspective_add_font_button (IdePreferences *preferences,
"visible", TRUE,
NULL);
- ide_preferences_group_add (group, GTK_WIDGET (widget));
+ dzl_preferences_group_add (group, GTK_WIDGET (widget));
widget_id = ++self->last_widget_id;
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
@@ -741,7 +735,7 @@ ide_preferences_perspective_add_font_button (IdePreferences *preferences,
}
static guint
-ide_preferences_perspective_add_file_chooser (IdePreferences *preferences,
+ide_preferences_perspective_add_file_chooser (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
const gchar *schema_id,
@@ -754,8 +748,8 @@ ide_preferences_perspective_add_file_chooser (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesFileChooserButton *widget;
- IdePreferencesGroup *group;
+ DzlPreferencesFileChooserButton *widget;
+ DzlPreferencesGroup *group;
GtkWidget *page;
guint widget_id;
@@ -774,7 +768,7 @@ ide_preferences_perspective_add_file_chooser (IdePreferences *preferences,
return 0;
}
- group = ide_preferences_page_get_group (IDE_PREFERENCES_PAGE (page), group_name);
+ group = dzl_preferences_page_get_group (DZL_PREFERENCES_PAGE (page), group_name);
if (group == NULL)
{
@@ -783,7 +777,7 @@ ide_preferences_perspective_add_file_chooser (IdePreferences *preferences,
return 0;
}
- widget = g_object_new (IDE_TYPE_PREFERENCES_FILE_CHOOSER_BUTTON,
+ widget = g_object_new (DZL_TYPE_PREFERENCES_FILE_CHOOSER_BUTTON,
"action", action,
"key", key,
"priority", priority,
@@ -795,7 +789,7 @@ ide_preferences_perspective_add_file_chooser (IdePreferences *preferences,
"visible", TRUE,
NULL);
- ide_preferences_group_add (group, GTK_WIDGET (widget));
+ dzl_preferences_group_add (group, GTK_WIDGET (widget));
widget_id = ++self->last_widget_id;
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
@@ -804,7 +798,7 @@ ide_preferences_perspective_add_file_chooser (IdePreferences *preferences,
}
static guint
-ide_preferences_perspective_add_custom (IdePreferences *preferences,
+ide_preferences_perspective_add_custom (DzlPreferences *preferences,
const gchar *page_name,
const gchar *group_name,
GtkWidget *widget,
@@ -812,8 +806,8 @@ ide_preferences_perspective_add_custom (IdePreferences *preferences,
gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
- IdePreferencesBin *container;
- IdePreferencesGroup *group;
+ DzlPreferencesBin *container;
+ DzlPreferencesGroup *group;
GtkWidget *page;
guint widget_id;
@@ -830,7 +824,7 @@ ide_preferences_perspective_add_custom (IdePreferences *preferences,
return 0;
}
- group = ide_preferences_page_get_group (IDE_PREFERENCES_PAGE (page), group_name);
+ group = dzl_preferences_page_get_group (DZL_PREFERENCES_PAGE (page), group_name);
if (group == NULL)
{
@@ -844,17 +838,17 @@ ide_preferences_perspective_add_custom (IdePreferences *preferences,
gtk_widget_show (widget);
gtk_widget_show (GTK_WIDGET (group));
- if (IDE_IS_PREFERENCES_BIN (widget))
- container = IDE_PREFERENCES_BIN (widget);
+ if (DZL_IS_PREFERENCES_BIN (widget))
+ container = DZL_PREFERENCES_BIN (widget);
else
- container = g_object_new (IDE_TYPE_PREFERENCES_BIN,
+ container = g_object_new (DZL_TYPE_PREFERENCES_BIN,
"child", widget,
"keywords", keywords,
"priority", priority,
"visible", TRUE,
NULL);
- ide_preferences_group_add (group, GTK_WIDGET (container));
+ dzl_preferences_group_add (group, GTK_WIDGET (container));
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
@@ -862,7 +856,7 @@ ide_preferences_perspective_add_custom (IdePreferences *preferences,
}
static gboolean
-ide_preferences_perspective_remove_id (IdePreferences *preferences,
+ide_preferences_perspective_remove_id (DzlPreferences *preferences,
guint widget_id)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
@@ -894,7 +888,7 @@ ide_preferences_perspective_remove_id (IdePreferences *preferences,
}
static void
-ide_preferences_perspective_set_page (IdePreferences *preferences,
+ide_preferences_perspective_set_page (DzlPreferences *preferences,
const gchar *page_name,
GHashTable *map)
{
@@ -914,7 +908,7 @@ ide_preferences_perspective_set_page (IdePreferences *preferences,
if (strchr (page_name, '.') != NULL)
{
- _ide_preferences_page_set_map (IDE_PREFERENCES_PAGE (page), map);
+ dzl_preferences_page_set_map (DZL_PREFERENCES_PAGE (page), map);
gtk_stack_set_visible_child (self->subpage_stack, page);
gtk_widget_show (GTK_WIDGET (self->subpage_stack));
}
@@ -926,7 +920,7 @@ ide_preferences_perspective_set_page (IdePreferences *preferences,
}
static GtkWidget *
-ide_preferences_perspective_get_widget (IdePreferences *preferences,
+ide_preferences_perspective_get_widget (DzlPreferences *preferences,
guint widget_id)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
@@ -937,11 +931,11 @@ ide_preferences_perspective_get_widget (IdePreferences *preferences,
}
static void
-ide_preferences_iface_init (IdePreferencesInterface *iface)
+dzl_preferences_iface_init (DzlPreferencesInterface *iface)
{
iface->add_page = ide_preferences_perspective_add_page;
iface->add_group = ide_preferences_perspective_add_group;
- iface->add_list_group = ide_preferences_perspective_add_list_group ;
+ iface->add_list_group = ide_preferences_perspective_add_list_group;
iface->add_radio = ide_preferences_perspective_add_radio;
iface->add_font_button = ide_preferences_perspective_add_font_button;
iface->add_switch = ide_preferences_perspective_add_switch;
diff --git a/libide/resources/libide.gresource.xml b/libide/resources/libide.gresource.xml
index c6dd809..8cb55fb 100644
--- a/libide/resources/libide.gresource.xml
+++ b/libide/resources/libide.gresource.xml
@@ -68,15 +68,8 @@
<file compressed="true" alias="ide-omni-search-group.ui">../search/ide-omni-search-group.ui</file>
<file compressed="true" alias="ide-omni-search-row.ui">../search/ide-omni-search-row.ui</file>
<file compressed="true"
alias="ide-perspective-menu-button.ui">../workbench/ide-perspective-menu-button.ui</file>
- <file compressed="true" alias="ide-preferences-entry.ui">../preferences/ide-preferences-entry.ui</file>
- <file compressed="true"
alias="ide-preferences-file-chooser-button.ui">../preferences/ide-preferences-file-chooser-button.ui</file>
- <file compressed="true"
alias="ide-preferences-font-button.ui">../preferences/ide-preferences-font-button.ui</file>
- <file compressed="true" alias="ide-preferences-group.ui">../preferences/ide-preferences-group.ui</file>
<file compressed="true"
alias="ide-preferences-language-row.ui">../preferences/ide-preferences-language-row.ui</file>
- <file compressed="true" alias="ide-preferences-page.ui">../preferences/ide-preferences-page.ui</file>
<file compressed="true"
alias="ide-preferences-perspective.ui">../preferences/ide-preferences-perspective.ui</file>
- <file compressed="true"
alias="ide-preferences-spin-button.ui">../preferences/ide-preferences-spin-button.ui</file>
- <file compressed="true" alias="ide-preferences-switch.ui">../preferences/ide-preferences-switch.ui</file>
<file compressed="true" alias="ide-run-button.ui">../runner/ide-run-button.ui</file>
<file compressed="true" alias="ide-transfer-row.ui">../transfers/ide-transfer-row.ui</file>
<file compressed="true" alias="ide-transfers-button.ui">../transfers/ide-transfers-button.ui</file>
diff --git a/plugins/clang/ide-clang-preferences-addin.c b/plugins/clang/ide-clang-preferences-addin.c
index 37c0192..1a71e50 100644
--- a/plugins/clang/ide-clang-preferences-addin.c
+++ b/plugins/clang/ide-clang-preferences-addin.c
@@ -45,14 +45,14 @@ ide_clang_preferences_addin_init (IdeClangPreferencesAddin *self)
static void
ide_clang_preferences_addin_load (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
IdeClangPreferencesAddin *self = (IdeClangPreferencesAddin *)addin;
g_assert (IDE_IS_CLANG_PREFERENCES_ADDIN (addin));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
- self->diagnose_id = ide_preferences_add_switch (preferences,
+ self->diagnose_id = dzl_preferences_add_switch (preferences,
"code-insight",
"diagnostics",
"org.gnome.builder.extension-type",
@@ -68,14 +68,14 @@ ide_clang_preferences_addin_load (IdePreferencesAddin *addin,
static void
ide_clang_preferences_addin_unload (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
IdeClangPreferencesAddin *self = (IdeClangPreferencesAddin *)addin;
g_assert (IDE_IS_CLANG_PREFERENCES_ADDIN (addin));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
- ide_preferences_remove_id (preferences, self->diagnose_id);
+ dzl_preferences_remove_id (preferences, self->diagnose_id);
}
static void
diff --git a/plugins/color-picker/gb-color-picker-prefs-palette-row.c
b/plugins/color-picker/gb-color-picker-prefs-palette-row.c
index f6cb0c2..6b8b516 100644
--- a/plugins/color-picker/gb-color-picker-prefs-palette-row.c
+++ b/plugins/color-picker/gb-color-picker-prefs-palette-row.c
@@ -18,15 +18,15 @@
#include <gdk/gdk.h>
#include "glib/gi18n.h"
-
#include <ide.h>
+
#include "gstyle-rename-popover.h"
#include "gb-color-picker-prefs-palette-row.h"
struct _GbColorPickerPrefsPaletteRow
{
- IdePreferencesBin parent_instance;
+ DzlPreferencesBin parent_instance;
GtkLabel *palette_name;
GtkImage *image;
@@ -45,7 +45,7 @@ struct _GbColorPickerPrefsPaletteRow
guint needs_attention : 1;
};
-G_DEFINE_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row, IDE_TYPE_PREFERENCES_BIN)
+G_DEFINE_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row, DZL_TYPE_PREFERENCES_BIN)
enum {
PROP_0,
@@ -187,7 +187,7 @@ gb_color_picker_prefs_palette_row_edit (GbColorPickerPrefsPaletteRow *self)
}
static void
-gb_color_picker_prefs_palette_row_connect (IdePreferencesBin *bin,
+gb_color_picker_prefs_palette_row_connect (DzlPreferencesBin *bin,
GSettings *settings)
{
GbColorPickerPrefsPaletteRow *self = (GbColorPickerPrefsPaletteRow *)bin;
@@ -209,7 +209,7 @@ gb_color_picker_prefs_palette_row_connect (IdePreferencesBin *bin,
}
static void
-gb_color_picker_prefs_palette_row_disconnect (IdePreferencesBin *bin,
+gb_color_picker_prefs_palette_row_disconnect (DzlPreferencesBin *bin,
GSettings *settings)
{
GbColorPickerPrefsPaletteRow *self = (GbColorPickerPrefsPaletteRow *)bin;
@@ -336,7 +336,7 @@ gb_color_picker_prefs_palette_row_finalize (GObject *object)
GbColorPickerPrefsPaletteRow *self = (GbColorPickerPrefsPaletteRow *)object;
if (self->settings != NULL)
- gb_color_picker_prefs_palette_row_disconnect (IDE_PREFERENCES_BIN (self), self->settings);
+ gb_color_picker_prefs_palette_row_disconnect (DZL_PREFERENCES_BIN (self), self->settings);
g_clear_pointer (&self->key, g_free);
g_clear_pointer (&self->target, g_variant_unref);
@@ -421,7 +421,7 @@ gb_color_picker_prefs_palette_row_class_init (GbColorPickerPrefsPaletteRowClass
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- IdePreferencesBinClass *bin_class = IDE_PREFERENCES_BIN_CLASS (klass);
+ DzlPreferencesBinClass *bin_class = DZL_PREFERENCES_BIN_CLASS (klass);
object_class->finalize = gb_color_picker_prefs_palette_row_finalize;
object_class->get_property = gb_color_picker_prefs_palette_row_get_property;
diff --git a/plugins/color-picker/gb-color-picker-prefs-palette-row.h
b/plugins/color-picker/gb-color-picker-prefs-palette-row.h
index 042328d..653a9e5 100644
--- a/plugins/color-picker/gb-color-picker-prefs-palette-row.h
+++ b/plugins/color-picker/gb-color-picker-prefs-palette-row.h
@@ -18,20 +18,18 @@
#ifndef GB_COLOR_PICKER_PREFS_PALETTE_ROW_H
#define GB_COLOR_PICKER_PREFS_PALETTE_ROW_H
-#include <glib-object.h>
-
-#include "preferences/ide-preferences-bin.h"
+#include <dazzle.h>
G_BEGIN_DECLS
#define GB_TYPE_COLOR_PICKER_PREFS_PALETTE_ROW (gb_color_picker_prefs_palette_row_get_type())
-G_DECLARE_FINAL_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row, GB,
COLOR_PICKER_PREFS_PALETTE_ROW, IdePreferencesBin)
+G_DECLARE_FINAL_TYPE (GbColorPickerPrefsPaletteRow, gb_color_picker_prefs_palette_row, GB,
COLOR_PICKER_PREFS_PALETTE_ROW, DzlPreferencesBin)
-gboolean gb_color_picker_prefs_palette_row_get_needs_attention
(GbColorPickerPrefsPaletteRow *self);
-void gb_color_picker_prefs_palette_row_set_needs_attention
(GbColorPickerPrefsPaletteRow *self,
- gboolean
needs_attention);
-GbColorPickerPrefsPaletteRow *gb_color_picker_prefs_palette_row_new (void);
+gboolean gb_color_picker_prefs_palette_row_get_needs_attention
(GbColorPickerPrefsPaletteRow *self);
+void gb_color_picker_prefs_palette_row_set_needs_attention
(GbColorPickerPrefsPaletteRow *self,
+ gboolean
needs_attention);
+GbColorPickerPrefsPaletteRow *gb_color_picker_prefs_palette_row_new (void);
G_END_DECLS
diff --git a/plugins/color-picker/gb-color-picker-prefs.c b/plugins/color-picker/gb-color-picker-prefs.c
index d74ca96..2e68e53 100644
--- a/plugins/color-picker/gb-color-picker-prefs.c
+++ b/plugins/color-picker/gb-color-picker-prefs.c
@@ -18,8 +18,7 @@
#include <glib/gi18n.h>
-#include "preferences/ide-preferences-switch.h"
-#include "ide.h"
+#include <ide.h>
#include "gb-color-picker-prefs.h"
#include "gb-color-picker-prefs-list.h"
diff --git a/plugins/flatpak/gbp-flatpak-preferences-addin.c b/plugins/flatpak/gbp-flatpak-preferences-addin.c
index b3a77c8..5487677 100644
--- a/plugins/flatpak/gbp-flatpak-preferences-addin.c
+++ b/plugins/flatpak/gbp-flatpak-preferences-addin.c
@@ -31,7 +31,7 @@ struct _GbpFlatpakPreferencesAddin
GObject parent_instance;
GArray *ids;
- IdePreferences *preferences;
+ DzlPreferences *preferences;
GCancellable *cancellable;
guint show_all : 1;
@@ -41,10 +41,10 @@ static void gbp_flatpak_preferences_addin_reload (GbpFlatpakPreferencesAddin *se
static void
gbp_flatpak_preferences_addin_view_more (GbpFlatpakPreferencesAddin *self,
- IdePreferencesBin *bin)
+ DzlPreferencesBin *bin)
{
g_assert (GBP_IS_FLATPAK_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES_BIN (bin));
+ g_assert (DZL_IS_PREFERENCES_BIN (bin));
self->show_all = !self->show_all;
if (self->preferences != NULL)
@@ -301,7 +301,7 @@ gbp_flatpak_preferences_addin_reload_cb (GObject *object,
keywords = g_strdup_printf (_("flatpak %s %s %s"), name, branch, arch);
row = create_row (self, name, arch, branch);
- id = ide_preferences_add_custom (self->preferences, "sdk", "flatpak-runtimes", row, keywords, j);
+ id = dzl_preferences_add_custom (self->preferences, "sdk", "flatpak-runtimes", row, keywords, j);
g_array_append_val (self->ids, id);
}
@@ -321,7 +321,7 @@ gbp_flatpak_preferences_addin_reload_cb (GObject *object,
"tooltip-text", tooltip,
"visible", TRUE,
NULL);
- row = g_object_new (IDE_TYPE_PREFERENCES_BIN,
+ row = g_object_new (DZL_TYPE_PREFERENCES_BIN,
"child", image,
"visible", TRUE,
NULL);
@@ -330,7 +330,7 @@ gbp_flatpak_preferences_addin_reload_cb (GObject *object,
G_CALLBACK (gbp_flatpak_preferences_addin_view_more),
self,
G_CONNECT_SWAPPED);
- id = ide_preferences_add_custom (self->preferences, "sdk", "flatpak-runtimes", row, NULL, G_MAXINT);
+ id = dzl_preferences_add_custom (self->preferences, "sdk", "flatpak-runtimes", row, NULL, G_MAXINT);
g_array_append_val (self->ids, id);
}
@@ -346,7 +346,7 @@ gbp_flatpak_preferences_addin_reload (GbpFlatpakPreferencesAddin *self)
IDE_ENTRY;
g_assert (GBP_IS_FLATPAK_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (self->preferences));
+ g_assert (DZL_IS_PREFERENCES (self->preferences));
g_clear_object (&self->cancellable);
self->cancellable = g_cancellable_new ();
@@ -356,7 +356,7 @@ gbp_flatpak_preferences_addin_reload (GbpFlatpakPreferencesAddin *self)
for (guint i = 0; i < self->ids->len; i++)
{
id = g_array_index (self->ids, guint, i);
- ide_preferences_remove_id (self->preferences, id);
+ dzl_preferences_remove_id (self->preferences, id);
}
g_array_remove_range (self->ids, 0, self->ids->len);
@@ -381,7 +381,7 @@ app_addin_reload (GbpFlatpakPreferencesAddin *self,
static void
gbp_flatpak_preferences_addin_load (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
GbpFlatpakPreferencesAddin *self = (GbpFlatpakPreferencesAddin *)addin;
GbpFlatpakApplicationAddin *app_addin;
@@ -389,12 +389,12 @@ gbp_flatpak_preferences_addin_load (IdePreferencesAddin *addin,
IDE_ENTRY;
g_assert (GBP_IS_FLATPAK_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
self->ids = g_array_new (FALSE, FALSE, sizeof (guint));
self->preferences = preferences;
- ide_preferences_add_list_group (preferences, "sdk", "flatpak-runtimes", _("Flatpak Runtimes"),
GTK_SELECTION_NONE, 0);
+ dzl_preferences_add_list_group (preferences, "sdk", "flatpak-runtimes", _("Flatpak Runtimes"),
GTK_SELECTION_NONE, 0);
app_addin = gbp_flatpak_application_addin_get_default ();
g_signal_connect_object (app_addin,
@@ -410,14 +410,14 @@ gbp_flatpak_preferences_addin_load (IdePreferencesAddin *addin,
static void
gbp_flatpak_preferences_addin_unload (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
GbpFlatpakPreferencesAddin *self = (GbpFlatpakPreferencesAddin *)addin;
IDE_ENTRY;
g_assert (GBP_IS_FLATPAK_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
g_cancellable_cancel (self->cancellable);
g_clear_object (&self->cancellable);
@@ -426,7 +426,7 @@ gbp_flatpak_preferences_addin_unload (IdePreferencesAddin *addin,
{
guint id = g_array_index (self->ids, guint, i);
- ide_preferences_remove_id (preferences, id);
+ dzl_preferences_remove_id (preferences, id);
}
g_clear_pointer (&self->ids, g_array_unref);
diff --git a/plugins/gnome-code-assistance/ide-gca-preferences-addin.c
b/plugins/gnome-code-assistance/ide-gca-preferences-addin.c
index 0c194a0..c35aadc 100644
--- a/plugins/gnome-code-assistance/ide-gca-preferences-addin.c
+++ b/plugins/gnome-code-assistance/ide-gca-preferences-addin.c
@@ -45,14 +45,14 @@ ide_gca_preferences_addin_init (IdeGcaPreferencesAddin *self)
static void
ide_gca_preferences_addin_load (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
IdeGcaPreferencesAddin *self = (IdeGcaPreferencesAddin *)addin;
g_assert (IDE_IS_GCA_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
- self->pylint = ide_preferences_add_switch (preferences,
+ self->pylint = dzl_preferences_add_switch (preferences,
"code-insight",
"diagnostics",
"org.gnome.builder.gnome-code-assistance",
@@ -68,14 +68,14 @@ ide_gca_preferences_addin_load (IdePreferencesAddin *addin,
static void
ide_gca_preferences_addin_unload (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
IdeGcaPreferencesAddin *self = (IdeGcaPreferencesAddin *)addin;
g_assert (IDE_IS_GCA_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
- ide_preferences_remove_id (preferences, self->pylint);
+ dzl_preferences_remove_id (preferences, self->pylint);
}
static void
diff --git a/plugins/quick-highlight/gbp-quick-highlight-preferences.c
b/plugins/quick-highlight/gbp-quick-highlight-preferences.c
index 0f57c08..52f2167 100644
--- a/plugins/quick-highlight/gbp-quick-highlight-preferences.c
+++ b/plugins/quick-highlight/gbp-quick-highlight-preferences.c
@@ -30,15 +30,15 @@ struct _GbpQuickHighlightPreferences
static void
gbp_quick_highlight_preferences_load (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
GbpQuickHighlightPreferences *self = (GbpQuickHighlightPreferences *)addin;
g_assert (IDE_IS_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
self->enable_switch =
- ide_preferences_add_switch (preferences,
+ dzl_preferences_add_switch (preferences,
"editor",
"highlight",
"org.gnome.builder.extension-type",
@@ -54,14 +54,14 @@ gbp_quick_highlight_preferences_load (IdePreferencesAddin *addin,
static void
gbp_quick_highlight_preferences_unload (IdePreferencesAddin *addin,
- IdePreferences *preferences)
+ DzlPreferences *preferences)
{
GbpQuickHighlightPreferences *self = (GbpQuickHighlightPreferences *)addin;
g_assert (IDE_IS_PREFERENCES_ADDIN (self));
- g_assert (IDE_IS_PREFERENCES (preferences));
+ g_assert (DZL_IS_PREFERENCES (preferences));
- ide_preferences_remove_id (preferences, self->enable_switch);
+ dzl_preferences_remove_id (preferences, self->enable_switch);
self->enable_switch = 0;
}
diff --git a/plugins/vala-pack/ide-vala-preferences-addin.vala
b/plugins/vala-pack/ide-vala-preferences-addin.vala
index 2f824c0..aaf90cf 100644
--- a/plugins/vala-pack/ide-vala-preferences-addin.vala
+++ b/plugins/vala-pack/ide-vala-preferences-addin.vala
@@ -23,7 +23,7 @@ namespace Ide {
public class ValaPreferencesAddin: GLib.Object, Ide.PreferencesAddin {
uint enabled_switch;
- public void load (Ide.Preferences preferences) {
+ public void load (Dzl.Preferences preferences) {
this.enabled_switch = preferences.add_switch ("code-insight",
"diagnostics",
"org.gnome.builder.extension-type",
@@ -37,7 +37,7 @@ namespace Ide {
100);
}
- public void unload (Ide.Preferences preferences) {
+ public void unload (Dzl.Preferences preferences) {
/* TODO: preferences.remove (self.enabled_switch); */
}
}
diff --git a/plugins/vala-pack/meson.build b/plugins/vala-pack/meson.build
index 4e17c7a..17c9fc7 100644
--- a/plugins/vala-pack/meson.build
+++ b/plugins/vala-pack/meson.build
@@ -77,6 +77,7 @@ shared_module('vala-pack-plugin', vala_pack_sources,
],
vala_args: [
'--pkg=posix',
+ '--pkg=libdazzle-1.0',
'--pkg=libpeas-1.0',
'--pkg=gtksourceview-3.0',
'--pkg=gio-2.0',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]