[mutter/bilelmoussaoui/drop-zenity: 13/16] default-plugin: Drop default confirm display dialog




commit 96d94f18c7162da8e5a509c26030c8da223d1316
Author: Bilal Elmoussaoui <belmouss redhat com>
Date:   Tue Apr 12 13:54:00 2022 +0200

    default-plugin: Drop default confirm display dialog
    
    Mostly to drop the 1/3 use cases of zenity on mutter and usually
    shells built on top of Mutter should implement that vfunc

 src/compositor/plugins/default.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)
---
diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c
index 3d09c49975..5240e17119 100644
--- a/src/compositor/plugins/default.c
+++ b/src/compositor/plugins/default.c
@@ -104,8 +104,6 @@ static void show_tile_preview (MetaPlugin      *plugin,
                                int              tile_monitor_number);
 static void hide_tile_preview (MetaPlugin      *plugin);
 
-static void confirm_display_change (MetaPlugin *plugin);
-
 static const MetaPluginInfo * plugin_info (MetaPlugin *plugin);
 
 /*
@@ -219,7 +217,6 @@ meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
   plugin_class->plugin_info      = plugin_info;
   plugin_class->kill_window_effects   = kill_window_effects;
   plugin_class->kill_switch_workspace = kill_switch_workspace;
-  plugin_class->confirm_display_change = confirm_display_change;
 }
 
 static void
@@ -948,33 +945,3 @@ plugin_info (MetaPlugin *plugin)
 
   return &priv->info;
 }
-
-static void
-on_dialog_closed (GPid     pid,
-                  gint     status,
-                  gpointer user_data)
-{
-  MetaPlugin *plugin = user_data;
-  gboolean ok;
-
-  ok = g_spawn_check_wait_status (status, NULL);
-  meta_plugin_complete_display_change (plugin, ok);
-}
-
-static void
-confirm_display_change (MetaPlugin *plugin)
-{
-  GPid pid;
-
-  pid = meta_show_dialog ("--question",
-                          "Does the display look OK?",
-                          "20",
-                          NULL,
-                          "_Keep This Configuration",
-                          "_Restore Previous Configuration",
-                          "preferences-desktop-display",
-                          0,
-                          NULL, NULL);
-
-  g_child_watch_add (pid, on_dialog_closed, plugin);
-}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]