mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
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 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2370>
This commit is contained in:
parent
94bd385bf3
commit
0e092ad6b3
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user