diff options
author | P. F. Chimento <philip.chimento@gmail.com> | 2013-05-10 15:58:59 +0200 |
---|---|---|
committer | P. F. Chimento <philip.chimento@gmail.com> | 2013-05-16 12:17:09 +0200 |
commit | ce9b478b17785730ebeb4abeca87e394c5498d9d (patch) | |
tree | d327d998532d908fb9f256ab02d4764e03db003a /endless | |
parent | 4391aa2e934225bed84f5b184c6a99d081f9aed3 (diff) |
EosMainArea tweaks
- Make sure the toolbox widget is always visible
- Display the sidebars if either the toolbox or the action area should
be displayed
- Different pages can share the same toolbox
[endlessm/eos-sdk#60]
Diffstat (limited to 'endless')
-rw-r--r-- | endless/eosmainarea.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/endless/eosmainarea.c b/endless/eosmainarea.c index 21a815e..3ebface 100644 --- a/endless/eosmainarea.c +++ b/endless/eosmainarea.c @@ -40,7 +40,8 @@ eos_main_area_get_preferred_width (GtkWidget *widget, GtkWidget *content = self->priv->content; *minimal = *natural = 0; - if (toolbox && gtk_widget_get_visible (toolbox)) + if ((toolbox && gtk_widget_get_visible (toolbox)) || + self->priv->actions_visible) { gint toolbox_minimal, toolbox_natural; gtk_widget_get_preferred_width (toolbox, @@ -314,7 +315,6 @@ eos_main_area_set_toolbox (EosMainArea *self, { g_return_if_fail (EOS_IS_MAIN_AREA (self)); g_return_if_fail (toolbox == NULL || GTK_IS_WIDGET (toolbox)); - g_return_if_fail (toolbox == NULL || gtk_widget_get_parent (toolbox) == NULL); EosMainAreaPrivate *priv = self->priv; GtkWidget *self_widget = GTK_WIDGET (self); @@ -327,7 +327,10 @@ eos_main_area_set_toolbox (EosMainArea *self, priv->toolbox = toolbox; if (toolbox) - gtk_widget_set_parent (toolbox, self_widget); + { + gtk_widget_set_parent (toolbox, self_widget); + gtk_widget_show (toolbox); + } if (gtk_widget_get_visible (self_widget)) gtk_widget_queue_resize (self_widget); |