[mutter/bilelmoussaoui/drop-zenity: 2/2] Core: Drop the default close dialog implementation
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/bilelmoussaoui/drop-zenity: 2/2] Core: Drop the default close dialog implementation
- Date: Tue, 12 Apr 2022 13:28:56 +0000 (UTC)
commit 56d579a323f930f72b8af3440a97ed6b294b21fe
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Tue Apr 12 14:24:15 2022 +0200
Core: Drop the default close dialog implementation
If the MetaPlugin doesn't implement it, we don't show anything.
src/compositor/meta-plugin-manager.c | 6 +-
src/core/delete.c | 2 +
src/core/meta-close-dialog-default-private.h | 37 ----
src/core/meta-close-dialog-default.c | 280 ---------------------------
src/meson.build | 2 -
5 files changed, 3 insertions(+), 324 deletions(-)
---
diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c
index 94d62c2126..57059f2c28 100644
--- a/src/compositor/meta-plugin-manager.c
+++ b/src/compositor/meta-plugin-manager.c
@@ -29,7 +29,6 @@
#include "backends/x11/meta-clutter-backend-x11.h"
#include "compositor/compositor-private.h"
#include "compositor/meta-module.h"
-#include "core/meta-close-dialog-default-private.h"
#include "core/meta-inhibit-shortcuts-dialog-default-private.h"
#include "core/window-private.h"
#include "meta/meta-x11-errors.h"
@@ -393,10 +392,7 @@ meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
- if (klass->create_close_dialog)
- return klass->create_close_dialog (plugin, window);
-
- return meta_close_dialog_default_new (window);
+ return klass->create_close_dialog (plugin, window);
}
MetaInhibitShortcutsDialog *
diff --git a/src/core/delete.c b/src/core/delete.c
index 81537dfe55..ceaa8d6eec 100644
--- a/src/core/delete.c
+++ b/src/core/delete.c
@@ -56,6 +56,8 @@ meta_window_ensure_close_dialog (MetaWindow *window)
display = window->display;
window->close_dialog = meta_compositor_create_close_dialog (display->compositor,
window);
+ if (!window->close_dialog)
+ return;
g_signal_connect (window->close_dialog, "response",
G_CALLBACK (close_dialog_response_cb), window);
}
diff --git a/src/meson.build b/src/meson.build
index 7b456f524f..45b427e47a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -382,8 +382,6 @@ mutter_sources = [
'core/meta-clipboard-manager.c',
'core/meta-clipboard-manager.h',
'core/meta-close-dialog.c',
- 'core/meta-close-dialog-default.c',
- 'core/meta-close-dialog-default-private.h',
'core/meta-context-main.c',
'core/meta-context-main.h',
'core/meta-context-private.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]