ag_app_open_chart() now saves the URI of the opened chart to the created window
This commit is contained in:
parent
bdf318a2ad
commit
d26f9f5d8b
@ -110,11 +110,15 @@ ag_app_open_chart(AgApp *app, GFile *file)
|
|||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
AgChart *chart;
|
AgChart *chart;
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
|
gchar *uri;
|
||||||
|
|
||||||
chart = ag_chart_load_from_file(file, &err);
|
chart = ag_chart_load_from_file(file, &err);
|
||||||
window = ag_app_create_window(app);
|
window = ag_app_create_window(app);
|
||||||
ag_window_set_chart(AG_WINDOW(window), chart);
|
ag_window_set_chart(AG_WINDOW(window), chart);
|
||||||
ag_window_update_from_chart(AG_WINDOW(window));
|
ag_window_update_from_chart(AG_WINDOW(window));
|
||||||
|
uri = g_file_get_uri(file);
|
||||||
|
ag_window_set_uri(AG_WINDOW(window), uri);
|
||||||
|
g_free(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user