Resizing webkit view when the chart tab is activated

This is temporary, it really should resize automatically
This commit is contained in:
Gergely Polonkai 2013-09-19 23:21:27 +02:00
parent c11bccc820
commit c8e0a888dd

View File

@ -205,6 +205,7 @@ static void
tab_changed_cb(GdStack *stack, GParamSpec *pspec, AgWindow *window)
{
const gchar *active_tab_name = gd_stack_get_visible_child_name(stack);
GtkWidget *active_tab;
g_debug("Active tab changed: %s", active_tab_name);
@ -212,12 +213,18 @@ tab_changed_cb(GdStack *stack, GParamSpec *pspec, AgWindow *window)
return;
}
active_tab = gd_stack_get_visible_child(stack);
if (strcmp("chart", active_tab_name) == 0) {
gtk_widget_set_size_request(active_tab, 600, 600);
}
// Note that priv->current_tab is actually the previously selected tab, not the real active one!
if (window->priv->current_tab == window->priv->tab_edit) {
recalculate_chart(window);
}
window->priv->current_tab = gd_stack_get_visible_child(stack);
window->priv->current_tab = active_tab;
}
static GActionEntry win_entries[] = {