[libpeas] Fix unclickable dialogue when parent is modal



commit 9484364713f86bf8b8590378fd5fbeb436851025
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 10 18:04:00 2014 +0100

    Fix unclickable dialogue when parent is modal
    
    When the parent of the about or preferences dialogue is modal,
    you can't click on anything in the dialogue unless it is modal as
    well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724053

 libpeas-gtk/peas-gtk-plugin-manager.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager.c b/libpeas-gtk/peas-gtk-plugin-manager.c
index ed7e0ed..fa9d585 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager.c
@@ -108,6 +108,7 @@ show_about_cb (GtkWidget            *widget,
 {
   PeasGtkPluginManagerView *view;
   PeasPluginInfo *info;
+  GtkWindow *parent;
 
   view = PEAS_GTK_PLUGIN_MANAGER_VIEW (pm->priv->view);
 
@@ -139,8 +140,11 @@ show_about_cb (GtkWidget            *widget,
                     G_CALLBACK (gtk_widget_destroyed),
                     &pm->priv->about);
 
+  parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (pm)));
   gtk_window_set_transient_for (GTK_WINDOW (pm->priv->about),
-                                GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (pm))));
+                                parent);
+  gtk_window_set_modal (GTK_WINDOW (pm->priv->about),
+                        gtk_window_get_modal (parent));
   gtk_widget_show (pm->priv->about);
 }
 


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