[gnome-builder] libide/tweaks: remove IdeTweaksSettings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/tweaks: remove IdeTweaksSettings
- Date: Fri, 26 Aug 2022 22:01:03 +0000 (UTC)
commit f57f160a49b4be459a97b254d2c5da769a85a15f
Author: Christian Hergert <chergert redhat com>
Date: Fri Aug 26 15:00:46 2022 -0700
libide/tweaks: remove IdeTweaksSettings
We don't need this type anymore, so we can just delete it!
src/libide/gui/ide-application-tweaks.c | 1 -
src/libide/tweaks/demo/010-visual-appearance.ui | 12 -
src/libide/tweaks/demo/040-code-languages.ui | 13 -
src/libide/tweaks/ide-tweaks-directory.h | 1 -
src/libide/tweaks/ide-tweaks-font.h | 1 -
src/libide/tweaks/ide-tweaks-group.c | 4 +-
src/libide/tweaks/ide-tweaks-init.c | 1 -
src/libide/tweaks/ide-tweaks-page.c | 2 -
src/libide/tweaks/ide-tweaks-panel.c | 15 -
src/libide/tweaks/ide-tweaks-settings.c | 359 ------------------------
src/libide/tweaks/ide-tweaks-settings.h | 77 -----
src/libide/tweaks/ide-tweaks-spin.h | 1 -
src/libide/tweaks/ide-tweaks-widget.c | 6 +-
src/libide/tweaks/ide-tweaks-window.c | 22 --
src/libide/tweaks/ide-tweaks.c | 4 +-
src/libide/tweaks/libide-tweaks.h | 1 -
src/libide/tweaks/meson.build | 2 -
src/plugins/buildui/tweaks.ui | 6 -
src/plugins/platformui/tweaks.ui | 6 -
src/plugins/project-tree/tweaks.ui | 6 -
src/plugins/rust-analyzer/tweaks.ui | 6 -
src/plugins/sysprof/tweaks.ui | 6 -
22 files changed, 4 insertions(+), 548 deletions(-)
---
diff --git a/src/libide/gui/ide-application-tweaks.c b/src/libide/gui/ide-application-tweaks.c
index 5635480d6..54299118e 100644
--- a/src/libide/gui/ide-application-tweaks.c
+++ b/src/libide/gui/ide-application-tweaks.c
@@ -114,7 +114,6 @@ add_plugin_tweaks (IdeTweaksPage *page)
g_autoptr(IdePlugin) plugin = g_list_model_get_item (plugins, j);
const char *category_id = ide_plugin_get_category_id (plugin);
const char *category = ide_plugin_get_category (plugin);
- g_autoptr(IdeTweaksSettings) settings = NULL;
g_autoptr(IdeTweaksWidget) widget = NULL;
IdeTweaksGroup *group;
diff --git a/src/libide/tweaks/demo/010-visual-appearance.ui b/src/libide/tweaks/demo/010-visual-appearance.ui
index f2c2c4127..942862f5e 100644
--- a/src/libide/tweaks/demo/010-visual-appearance.ui
+++ b/src/libide/tweaks/demo/010-visual-appearance.ui
@@ -7,18 +7,6 @@
<object class="IdeTweaksPage" id="appearance_page">
<property name="icon-name">preferences-desktop-appearance-symbolic</property>
<property name="title" translatable="yes">Appearance</property>
- <child>
- <object class="IdeTweaksSettings">
- <property name="schema-id">org.gnome.builder</property>
- <property name="application-only">true</property>
- </object>
- </child>
- <child>
- <object class="IdeTweaksSettings">
- <property name="schema-id">org.gnome.builder.editor</property>
- <property name="application-only">true</property>
- </object>
- </child>
<child>
<object class="IdeTweaksGroup" id="appearance_page_style_group">
<property name="title" translatable="yes">Style</property>
diff --git a/src/libide/tweaks/demo/040-code-languages.ui b/src/libide/tweaks/demo/040-code-languages.ui
index cab949aae..3bd87ea1c 100644
--- a/src/libide/tweaks/demo/040-code-languages.ui
+++ b/src/libide/tweaks/demo/040-code-languages.ui
@@ -17,19 +17,6 @@
<lookup name="item">language_page_factory</lookup>
</lookup>
</binding>
- <child>
- <object class="IdeTweaksSettings" id="language_page_settings">
- <property name="schema-id">org.gnome.builder.editor.language</property>
- <binding name="schema-path">
- <closure type="gchararray" function="format">
- <constant type="gchararray">/org/gnome/builder/editor/languages/%s/</constant>
- <lookup name="id" type="GtkSourceLanguage">
- <lookup name="item">language_page_factory</lookup>
- </lookup>
- </closure>
- </binding>
- </object>
- </child>
</object>
</child>
</object>
diff --git a/src/libide/tweaks/ide-tweaks-directory.h b/src/libide/tweaks/ide-tweaks-directory.h
index 8238b5ef9..8d9934aa7 100644
--- a/src/libide/tweaks/ide-tweaks-directory.h
+++ b/src/libide/tweaks/ide-tweaks-directory.h
@@ -24,7 +24,6 @@
# error "Only <libide-tweaks.h> can be included directly."
#endif
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-widget.h"
G_BEGIN_DECLS
diff --git a/src/libide/tweaks/ide-tweaks-font.h b/src/libide/tweaks/ide-tweaks-font.h
index e70847f7f..f136c837f 100644
--- a/src/libide/tweaks/ide-tweaks-font.h
+++ b/src/libide/tweaks/ide-tweaks-font.h
@@ -24,7 +24,6 @@
# error "Only <libide-tweaks.h> can be included directly."
#endif
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-widget.h"
G_BEGIN_DECLS
diff --git a/src/libide/tweaks/ide-tweaks-group.c b/src/libide/tweaks/ide-tweaks-group.c
index b38a1af2c..b549c70e4 100644
--- a/src/libide/tweaks/ide-tweaks-group.c
+++ b/src/libide/tweaks/ide-tweaks-group.c
@@ -23,7 +23,6 @@
#include "config.h"
#include "ide-tweaks-group.h"
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-widget.h"
struct _IdeTweaksGroup
@@ -49,8 +48,7 @@ ide_tweaks_group_accepts (IdeTweaksItem *item,
g_assert (IDE_IS_TWEAKS_GROUP (item));
g_assert (IDE_IS_TWEAKS_ITEM (child));
- return IDE_IS_TWEAKS_WIDGET (child) ||
- IDE_IS_TWEAKS_SETTINGS (child);
+ return IDE_IS_TWEAKS_WIDGET (child);
}
static void
diff --git a/src/libide/tweaks/ide-tweaks-init.c b/src/libide/tweaks/ide-tweaks-init.c
index 013d1176f..56e4ef184 100644
--- a/src/libide/tweaks/ide-tweaks-init.c
+++ b/src/libide/tweaks/ide-tweaks-init.c
@@ -50,7 +50,6 @@ _ide_tweaks_init (void)
g_type_ensure (IDE_TYPE_TWEAKS_RADIO);
g_type_ensure (IDE_TYPE_TWEAKS_SECTION);
g_type_ensure (IDE_TYPE_TWEAKS_SETTING);
- g_type_ensure (IDE_TYPE_TWEAKS_SETTINGS);
g_type_ensure (IDE_TYPE_TWEAKS_SPIN);
g_type_ensure (IDE_TYPE_TWEAKS_SWITCH);
g_type_ensure (IDE_TYPE_TWEAKS_WIDGET);
diff --git a/src/libide/tweaks/ide-tweaks-page.c b/src/libide/tweaks/ide-tweaks-page.c
index deb9d671d..ac5077c1c 100644
--- a/src/libide/tweaks/ide-tweaks-page.c
+++ b/src/libide/tweaks/ide-tweaks-page.c
@@ -27,7 +27,6 @@
#include "ide-tweaks-group.h"
#include "ide-tweaks-page.h"
#include "ide-tweaks-section.h"
-#include "ide-tweaks-settings.h"
struct _IdeTweaksPage
{
@@ -66,7 +65,6 @@ ide_tweaks_page_accepts (IdeTweaksItem *item,
return IDE_IS_TWEAKS_PAGE (child) ||
IDE_IS_TWEAKS_FACTORY (child) ||
IDE_IS_TWEAKS_GROUP (child) ||
- IDE_IS_TWEAKS_SETTINGS (child) ||
IDE_IS_TWEAKS_SECTION (child);
}
diff --git a/src/libide/tweaks/ide-tweaks-panel.c b/src/libide/tweaks/ide-tweaks-panel.c
index 61e282e2c..1b786ac45 100644
--- a/src/libide/tweaks/ide-tweaks-panel.c
+++ b/src/libide/tweaks/ide-tweaks-panel.c
@@ -26,7 +26,6 @@
#include "ide-tweaks-group.h"
#include "ide-tweaks-page.h"
#include "ide-tweaks-panel-private.h"
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-widget-private.h"
struct _IdeTweaksPanel
@@ -99,20 +98,6 @@ ide_tweaks_panel_visitor_cb (IdeTweaksItem *item,
return IDE_TWEAKS_ITEM_VISIT_RECURSE;
}
- else if (IDE_IS_TWEAKS_SETTINGS (item))
- {
- IdeTweaks *tweaks = ide_tweaks_item_get_ancestor (IDE_TWEAKS_ITEM (self->page), IDE_TYPE_TWEAKS);
- IdeTweaksSettings *settings = IDE_TWEAKS_SETTINGS (item);
- const char *schema_id = ide_tweaks_settings_get_schema_id (settings);
-
- if (ide_action_muxer_get_action_group (self->muxer, schema_id) == NULL)
- {
- GActionGroup *group = ide_tweaks_settings_create_action_group (settings, tweaks);
-
- if (group != NULL)
- ide_action_muxer_insert_action_group (self->muxer, schema_id, G_ACTION_GROUP (group));
- }
- }
else if (IDE_IS_TWEAKS_WIDGET (item))
{
GtkWidget *child = _ide_tweaks_widget_create_for_item (IDE_TWEAKS_WIDGET (item), item);
diff --git a/src/libide/tweaks/ide-tweaks-spin.h b/src/libide/tweaks/ide-tweaks-spin.h
index 4ae2db183..bdb0f526f 100644
--- a/src/libide/tweaks/ide-tweaks-spin.h
+++ b/src/libide/tweaks/ide-tweaks-spin.h
@@ -24,7 +24,6 @@
# error "Only <libide-tweaks.h> can be included directly."
#endif
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-widget.h"
G_BEGIN_DECLS
diff --git a/src/libide/tweaks/ide-tweaks-widget.c b/src/libide/tweaks/ide-tweaks-widget.c
index be4f79ec6..555f360d6 100644
--- a/src/libide/tweaks/ide-tweaks-widget.c
+++ b/src/libide/tweaks/ide-tweaks-widget.c
@@ -22,7 +22,6 @@
#include "config.h"
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-widget-private.h"
typedef struct
@@ -81,7 +80,7 @@ ide_tweaks_widget_copy (IdeTweaksItem *item)
copy_priv = ide_tweaks_widget_get_instance_private (IDE_TWEAKS_WIDGET (copy));
g_set_weak_pointer (©_priv->cloned, self);
- /* Also keep a copy of any property we find that is an IdeTweaksSettings
+ /* Also keep a copy of any property we find that is a binding
* since those need to be snapshotted.
*/
pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (item), &n_pspecs);
@@ -93,8 +92,7 @@ ide_tweaks_widget_copy (IdeTweaksItem *item)
(pspec->flags & G_PARAM_CONSTRUCT_ONLY) != 0)
continue;
- if (g_type_is_a (pspec->value_type, IDE_TYPE_TWEAKS_SETTINGS) ||
- g_type_is_a (pspec->value_type, IDE_TYPE_TWEAKS_BINDING))
+ if (g_type_is_a (pspec->value_type, IDE_TYPE_TWEAKS_BINDING))
clone_item_property (item, copy, pspec->name);
}
diff --git a/src/libide/tweaks/ide-tweaks-window.c b/src/libide/tweaks/ide-tweaks-window.c
index 6d4d2affa..c87b38870 100644
--- a/src/libide/tweaks/ide-tweaks-window.c
+++ b/src/libide/tweaks/ide-tweaks-window.c
@@ -30,7 +30,6 @@
#include "ide-tweaks-item-private.h"
#include "ide-tweaks-panel-private.h"
#include "ide-tweaks-panel-list-private.h"
-#include "ide-tweaks-settings.h"
#include "ide-tweaks-window.h"
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GtkStackPage, g_object_unref)
@@ -329,27 +328,6 @@ ide_tweaks_window_rebuild (IdeTweaksWindow *self)
else
ide_tweaks_panel_list_select_first (IDE_TWEAKS_PANEL_LIST (list));
- /* Make sure we have access to settings under IdeTweaks */
- for (IdeTweaksItem *child = ide_tweaks_item_get_first_child (IDE_TWEAKS_ITEM (self->tweaks));
- child != NULL;
- child = ide_tweaks_item_get_next_sibling (child))
- {
- if (IDE_IS_TWEAKS_SETTINGS (child) &&
- !_ide_tweaks_item_is_hidden (child, IDE_TWEAKS_ITEM (self->tweaks)))
- {
- IdeTweaksSettings *settings = IDE_TWEAKS_SETTINGS (child);
- const char *schema_id = ide_tweaks_settings_get_schema_id (settings);
- GActionGroup *group;
-
- if (schema_id == NULL)
- continue;
-
- group = ide_tweaks_settings_create_action_group (settings, self->tweaks);
- ide_action_muxer_insert_action_group (self->muxer, schema_id, group);
- g_clear_object (&group);
- }
- }
-
ide_tweaks_window_update_title (self);
ide_tweaks_window_update_actions (self);
}
diff --git a/src/libide/tweaks/ide-tweaks.c b/src/libide/tweaks/ide-tweaks.c
index bc4db7dac..5dc025662 100644
--- a/src/libide/tweaks/ide-tweaks.c
+++ b/src/libide/tweaks/ide-tweaks.c
@@ -26,7 +26,6 @@
#include "ide-tweaks.h"
#include "ide-tweaks-section.h"
-#include "ide-tweaks-settings.h"
struct _IdeTweaks
{
@@ -73,8 +72,7 @@ ide_tweaks_accepts (IdeTweaksItem *item,
g_assert (IDE_IS_TWEAKS_ITEM (item));
g_assert (IDE_IS_TWEAKS_ITEM (child));
- return IDE_IS_TWEAKS_SECTION (child) ||
- IDE_IS_TWEAKS_SETTINGS (child);
+ return IDE_IS_TWEAKS_SECTION (child);
}
static void
diff --git a/src/libide/tweaks/libide-tweaks.h b/src/libide/tweaks/libide-tweaks.h
index 058a301d1..d89921dbf 100644
--- a/src/libide/tweaks/libide-tweaks.h
+++ b/src/libide/tweaks/libide-tweaks.h
@@ -39,7 +39,6 @@
# include "ide-tweaks-radio.h"
# include "ide-tweaks-section.h"
# include "ide-tweaks-setting.h"
-# include "ide-tweaks-settings.h"
# include "ide-tweaks-spin.h"
# include "ide-tweaks-switch.h"
# include "ide-tweaks-widget.h"
diff --git a/src/libide/tweaks/meson.build b/src/libide/tweaks/meson.build
index 392199d78..5278fe624 100644
--- a/src/libide/tweaks/meson.build
+++ b/src/libide/tweaks/meson.build
@@ -26,7 +26,6 @@ libide_tweaks_public_headers = [
'ide-tweaks-radio.h',
'ide-tweaks-section.h',
'ide-tweaks-setting.h',
- 'ide-tweaks-settings.h',
'ide-tweaks-spin.h',
'ide-tweaks-switch.h',
'ide-tweaks-variant.h',
@@ -59,7 +58,6 @@ libide_tweaks_public_sources = [
'ide-tweaks-radio.c',
'ide-tweaks-section.c',
'ide-tweaks-setting.c',
- 'ide-tweaks-settings.c',
'ide-tweaks-spin.c',
'ide-tweaks-switch.c',
'ide-tweaks-variant.c',
diff --git a/src/plugins/buildui/tweaks.ui b/src/plugins/buildui/tweaks.ui
index 220ead4f5..43222e229 100644
--- a/src/plugins/buildui/tweaks.ui
+++ b/src/plugins/buildui/tweaks.ui
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="IdeTweaks">
- <child>
- <object class="IdeTweaksSettings" id="settings_org_gnome_builder_build">
- <property name="schema-id">org.gnome.builder.build</property>
- <property name="application-only">true</property>
- </object>
- </child>
<child internal-child="foundry_section">
<object class="IdeTweaksSection">
<child>
diff --git a/src/plugins/platformui/tweaks.ui b/src/plugins/platformui/tweaks.ui
index 745863ea5..3d824cc5d 100644
--- a/src/plugins/platformui/tweaks.ui
+++ b/src/plugins/platformui/tweaks.ui
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="IdeTweaks">
- <child>
- <object class="IdeTweaksSettings" id="settings_org_gnome_builder">
- <property name="schema-id">org.gnome.builder</property>
- <property name="application-only">true</property>
- </object>
- </child>
<child internal-child="visual_section">
<object class="IdeTweaksSection">
<child internal-child="appearance_page">
diff --git a/src/plugins/project-tree/tweaks.ui b/src/plugins/project-tree/tweaks.ui
index 6c2847762..b94faa90c 100644
--- a/src/plugins/project-tree/tweaks.ui
+++ b/src/plugins/project-tree/tweaks.ui
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="IdeTweaks">
- <child>
- <object class="IdeTweaksSettings" id="settings_org_gnome_builder_project_tree">
- <property name="schema-id">org.gnome.builder.project-tree</property>
- <property name="application-only">true</property>
- </object>
- </child>
<child internal-child="projects_section">
<object class="IdeTweaksSection">
<child internal-child="projects_page">
diff --git a/src/plugins/rust-analyzer/tweaks.ui b/src/plugins/rust-analyzer/tweaks.ui
index 2c53d95c3..0a50a22b3 100644
--- a/src/plugins/rust-analyzer/tweaks.ui
+++ b/src/plugins/rust-analyzer/tweaks.ui
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="IdeTweaks">
- <child>
- <object class="IdeTweaksSettings" id="settings_org_gnome_builder_rust_analyzer">
- <property name="schema-id">org.gnome.builder.rust-analyzer</property>
- <property name="application-only">true</property>
- </object>
- </child>
<child internal-child="foundry_section">
<object class="IdeTweaksSection">
<child internal-child="build_page">
diff --git a/src/plugins/sysprof/tweaks.ui b/src/plugins/sysprof/tweaks.ui
index 884f67aad..77672e4ee 100644
--- a/src/plugins/sysprof/tweaks.ui
+++ b/src/plugins/sysprof/tweaks.ui
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="IdeTweaks">
- <child>
- <object class="IdeTweaksSettings" id="settings_org_gnome_builder_sysprof">
- <property name="schema-id">org.gnome.builder.sysprof</property>
- <property name="application-only">true</property>
- </object>
- </child>
<child internal-child="foundry_section">
<object class="IdeTweaksSection">
<child internal-child="build_page">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]