Merge pull request #19 from gergelypolonkai/chart-tab-if-open

Change to chart view when opening an existing chart
This commit is contained in:
Gergely Polonkai 2014-07-02 19:18:38 +02:00
commit 0c9d956ef7
3 changed files with 7 additions and 0 deletions

View File

@ -126,6 +126,7 @@ ag_app_open_chart(AgApp *app, GFile *file)
uri = g_file_get_uri(file);
ag_window_set_uri(AG_WINDOW(window), uri);
g_free(uri);
ag_window_open_chart_tab(window);
}
static void

View File

@ -813,3 +813,8 @@ ag_window_settings_save(GtkWindow *window, GSettings *settings)
g_settings_set_int(settings, "height", height);
}
void
ag_window_open_chart_tab(AgWindow *window)
{
gtk_stack_set_visible_child_name(GTK_STACK(window->priv->stack), "chart");
}

View File

@ -45,6 +45,7 @@ void ag_window_settings_restore(GtkWindow *window,
GSettings *settings);
void ag_window_settings_save(GtkWindow *window,
GSettings *settings);
void ag_window_open_chart_tab(AgWindow *window);
#define AG_WINDOW_ERROR (ag_window_error_quark())
GQuark ag_window_error_quark(void);