[gtk+/dialogs] dialog: Show the action area when needed



commit e25f54dad3d79eea15fc1d18d9e549be5ecedf37
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 16 23:58:49 2014 -0500

    dialog: Show the action area when needed
    
    If we find that widgets are being added to the action area,
    we should show it.

 gtk/gtkdialog.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 25d77da..834aa86 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -260,6 +260,12 @@ gtk_dialog_set_use_header_bar_from_setting (GtkDialog *dialog)
 }
 
 static void
+add_cb (GtkContainer *container, GtkWidget *widget)
+{
+  gtk_widget_show (GTK_WIDGET (container));
+}
+
+static void
 apply_use_header_bar (GtkDialog *dialog)
 {
   GtkDialogPrivate *priv = dialog->priv;
@@ -271,6 +277,8 @@ apply_use_header_bar (GtkDialog *dialog)
   gtk_widget_set_visible (priv->headerbar, priv->use_header_bar);
   if (!priv->use_header_bar)
     gtk_window_set_titlebar (GTK_WINDOW (dialog), NULL);
+  if (priv->use_header_bar)
+    g_signal_connect (priv->action_area, "add", add_cb, NULL);
 }
 
 static void


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