[gnome-builder/wip/gtk4-port: 131/343] libide/gui: remove legacy keybindings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 131/343] libide/gui: remove legacy keybindings
- Date: Mon, 4 Apr 2022 20:02:12 +0000 (UTC)
commit 8994f09f4bb1b346ed856c4fbe3dcc27e434a320
Author: Christian Hergert <chergert redhat com>
Date: Tue Mar 29 02:05:40 2022 -0700
libide/gui: remove legacy keybindings
We won't have CSS keybindings anymore in GTK 4, so this will all have to
get redesigned for GtkShortcuController or similar.
src/libide/gui/ide-application-private.h | 6 -
src/libide/gui/ide-application.c | 18 --
src/libide/gui/ide-keybindings.c | 366 -------------------------------
src/libide/gui/ide-keybindings.h | 36 ---
src/libide/gui/meson.build | 2 -
5 files changed, 428 deletions(-)
---
diff --git a/src/libide/gui/ide-application-private.h b/src/libide/gui/ide-application-private.h
index a2e064f79..3f45d8eee 100644
--- a/src/libide/gui/ide-application-private.h
+++ b/src/libide/gui/ide-application-private.h
@@ -26,7 +26,6 @@
#include <libpeas/peas.h>
#include "ide-application.h"
-#include "ide-keybindings.h"
G_BEGIN_DECLS
@@ -61,11 +60,6 @@ struct _IdeApplication
*/
GSettings *settings;
- /* Tracks changes to plugins and updates the available keybindings
- * to ensure they are loaded correctly (including .css files).
- */
- IdeKeybindings *keybindings;
-
/* We need to track the GResource files that were manually loaded for
* plugins on disk (generally Python plugins that need resources). That
* way we can remove them when the plugin is unloaded.
diff --git a/src/libide/gui/ide-application.c b/src/libide/gui/ide-application.c
index 2a60e0bca..d860d7590 100644
--- a/src/libide/gui/ide-application.c
+++ b/src/libide/gui/ide-application.c
@@ -102,20 +102,6 @@ ide_application_local_command_line (GApplication *app,
return G_APPLICATION_CLASS (ide_application_parent_class)->local_command_line (app, arguments,
exit_status);
}
-static void
-ide_application_register_keybindings (IdeApplication *self)
-{
- g_autoptr(GSettings) settings = NULL;
- g_autofree gchar *name = NULL;
-
- g_assert (IDE_IS_APPLICATION (self));
-
- settings = g_settings_new ("org.gnome.builder.editor");
- name = g_settings_get_string (settings, "keybindings");
- self->keybindings = ide_keybindings_new (name);
- g_settings_bind (settings, "keybindings", self->keybindings, "mode", G_SETTINGS_BIND_GET);
-}
-
static void
ide_application_startup (GApplication *app)
{
@@ -153,9 +139,6 @@ ide_application_startup (GApplication *app)
/* And now we can load the rest of our plugins for startup. */
_ide_application_load_plugins (self);
- /* Load keybindings from plugins and what not */
- ide_application_register_keybindings (self);
-
/* Load language defaults into gsettings */
ide_language_defaults_init_async (NULL, NULL, NULL);
}
@@ -173,7 +156,6 @@ ide_application_shutdown (GApplication *app)
g_clear_pointer (&self->plugin_settings, g_hash_table_unref);
g_clear_object (&self->addins);
g_clear_object (&self->settings);
- g_clear_object (&self->keybindings);
G_APPLICATION_CLASS (ide_application_parent_class)->shutdown (app);
}
diff --git a/src/libide/gui/meson.build b/src/libide/gui/meson.build
index dc0c360a7..2a9bc1025 100644
--- a/src/libide/gui/meson.build
+++ b/src/libide/gui/meson.build
@@ -43,7 +43,6 @@ install_headers(libide_gui_public_headers, subdir: libide_gui_header_subdir)
libide_gui_private_headers = [
'ide-application-private.h',
'ide-environment-editor-row.h',
- 'ide-keybindings.h',
'ide-notification-list-box-row-private.h',
'ide-notification-stack-private.h',
'ide-notification-view-private.h',
@@ -57,7 +56,6 @@ libide_gui_private_sources = [
'ide-application-color.c',
'ide-application-plugins.c',
'ide-environment-editor-row.c',
- 'ide-keybindings.c',
'ide-notification-list-box-row.c',
'ide-notification-stack.c',
'ide-notification-view.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]