[mutter/bilelmoussaoui/drop-zenity: 1/3] core: Drop the default close dialog implementation




commit 78a398e9bf35abb10bf1cd150eacd243b0699ba0
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.

 po/POTFILES.in                               |   1 -
 src/compositor/meta-plugin-manager.c         |   3 +-
 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 -
 6 files changed, 3 insertions(+), 322 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f51e98dd0a..2df2675d88 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,7 +17,6 @@ src/compositor/meta-background.c
 src/core/bell.c
 src/core/display.c
 src/core/keybindings.c
-src/core/meta-close-dialog-default.c
 src/core/meta-context-main.c
 src/core/meta-pad-action-mapper.c
 src/core/mutter.c
diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c
index 94d62c2126..bec5cd4559 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"
@@ -396,7 +395,7 @@ meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
   if (klass->create_close_dialog)
     return klass->create_close_dialog (plugin, window);
 
-  return meta_close_dialog_default_new (window);
+  return NULL;
 }
 
 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]