Commit 85297367 authored by Matthias Clasen's avatar Matthias Clasen

GtkDialog: Manage action area visibility more carefully

People expect to be able to call gtk_widget_show_all on the dialog
to make action widgets visible, as seen e.g. in
https://bugzilla.gnome.org/show_bug.cgi?id=733431

To keep this working, we can't always set no-show-all on the
action_box. Only set it when the action_area is not used and empty.
parent 2cb10529
...@@ -444,7 +444,8 @@ add_cb (GtkContainer *container, ...@@ -444,7 +444,8 @@ add_cb (GtkContainer *container,
if (priv->use_header_bar) if (priv->use_header_bar)
g_warning ("Content added to the action area of a dialog using header bars"); g_warning ("Content added to the action area of a dialog using header bars");
gtk_widget_show (GTK_WIDGET (priv->action_box)); gtk_widget_set_visible (priv->action_box, TRUE);
gtk_widget_set_no_show_all (priv->action_box, FALSE);
} }
static void static void
...@@ -496,6 +497,7 @@ gtk_dialog_constructed (GObject *object) ...@@ -496,6 +497,7 @@ gtk_dialog_constructed (GObject *object)
} }
gtk_widget_set_visible (priv->action_box, !priv->use_header_bar); gtk_widget_set_visible (priv->action_box, !priv->use_header_bar);
gtk_widget_set_no_show_all (priv->action_box, priv->use_header_bar);
} }
static void static void
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<child> <child>
<object class="GtkBox" id="action_box"> <object class="GtkBox" id="action_box">
<property name="visible">True</property> <property name="visible">True</property>
<property name="no-show-all">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<style> <style>
<class name="dialog-action-box"/> <class name="dialog-action-box"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment