Added uri to AgWindow's private structure, for saving purposes
This commit is contained in:
parent
c921e29c4a
commit
bdf318a2ad
@ -38,6 +38,7 @@ struct _AgWindowPrivate {
|
||||
|
||||
GsweTimestamp *timestamp;
|
||||
AgChart *chart;
|
||||
gchar *uri;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||
@ -285,6 +286,7 @@ ag_window_init(AgWindow *window)
|
||||
|
||||
priv->timestamp = NULL;
|
||||
priv->chart = NULL;
|
||||
priv->uri = NULL;
|
||||
|
||||
gtk_window_set_hide_titlebar_when_maximized(GTK_WINDOW(window), TRUE);
|
||||
|
||||
@ -489,3 +491,19 @@ ag_window_get_chart(AgWindow *window)
|
||||
return window->priv->chart;
|
||||
}
|
||||
|
||||
void
|
||||
ag_window_set_uri(AgWindow *window, const gchar *uri)
|
||||
{
|
||||
if (window->priv->uri != NULL) {
|
||||
g_free(window->priv->uri);
|
||||
}
|
||||
|
||||
window->priv->uri = g_strdup(uri);
|
||||
}
|
||||
|
||||
gchar *
|
||||
ag_window_get_uri(AgWindow *window)
|
||||
{
|
||||
return g_strdup(window->priv->uri);
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,8 @@ GtkWidget *ag_window_new(AgApp *app);
|
||||
void ag_window_set_chart(AgWindow *window, AgChart *chart);
|
||||
AgChart *ag_window_get_chart(AgWindow *window);
|
||||
void ag_window_update_from_chart(AgWindow *window);
|
||||
void ag_window_set_uri(AgWindow *window, const gchar *uri);
|
||||
gchar *ag_window_get_uri(AgWindow *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user