summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2012-09-18 18:33:07 +0200
committerMatthias Clasen <mclasen@redhat.com>2012-09-25 18:46:12 -0400
commit0628bd3291aad936b6b553366600590cca360bfa (patch)
tree667b6e8ad8a92d9f57cea3cfc1a82f8ee39e15cf /src/tree.c
parent22b15e87d3a3cf70f4ba62172d8aecaaf6c146dd (diff)
util: Add an option to request dialogs being modal
As WMs cannot open windows themselves, Mutter uses zenity to open "Force Quit" dialogs for unresponsive windows; as those are strongly tied to the corresponding window, it makes sense to make them modal (in particular when attaching them to their parent). https://bugzilla.gnome.org/show_bug.cgi?id=684322
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tree.c b/src/tree.c
index 4234fc1..c1a20d0 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -383,6 +383,9 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
if (data->dialog_title)
gtk_window_set_title (GTK_WINDOW (dialog), data->dialog_title);
+ if (data->modal)
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
if (data->ok_label) {
button = GTK_WIDGET (gtk_builder_get_object (builder, "zenity_tree_ok_button"));
gtk_button_set_label (GTK_BUTTON (button), data->ok_label);