From c8e0a888dd025f174cafa2ed6c6f2b490fbaa3d5 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Thu, 19 Sep 2013 23:21:27 +0200 Subject: [PATCH] Resizing webkit view when the chart tab is activated This is temporary, it really should resize automatically --- src/ag-window.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ag-window.c b/src/ag-window.c index 6917546..843f59f 100644 --- a/src/ag-window.c +++ b/src/ag-window.c @@ -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[] = {