Remove URI from AgWindowPrivate

This commit is contained in:
Gergely Polonkai 2014-07-31 12:24:14 +02:00
parent 41098fd2c0
commit 1628a71f8b
3 changed files with 0 additions and 35 deletions

View File

@ -138,7 +138,6 @@ ag_app_open_chart(AgApp *app, GFile *file)
GtkWidget *window; GtkWidget *window;
AgChart *chart; AgChart *chart;
GError *err = NULL; GError *err = NULL;
gchar *uri;
if ((chart = ag_chart_load_from_file(file, &err)) == NULL) { if ((chart = ag_chart_load_from_file(file, &err)) == NULL) {
g_print("Error: '%s'\n", err->message); g_print("Error: '%s'\n", err->message);
@ -149,9 +148,6 @@ ag_app_open_chart(AgApp *app, GFile *file)
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);
ag_window_change_tab(AG_WINDOW(window), "chart"); ag_window_change_tab(AG_WINDOW(window), "chart");
} }

View File

@ -44,7 +44,6 @@ struct _AgWindowPrivate {
AgSettings *settings; AgSettings *settings;
AgChart *chart; AgChart *chart;
gchar *uri;
gboolean aspect_table_populated; gboolean aspect_table_populated;
GtkTextBuffer *note_buffer; GtkTextBuffer *note_buffer;
GtkListStore *house_system_model; GtkListStore *house_system_model;
@ -1024,10 +1023,6 @@ ag_window_list_item_activated_cb(GdMainView *view,
ag_window_update_from_chart(window); ag_window_update_from_chart(window);
if (priv->uri) {
g_free(priv->uri);
}
ag_window_change_tab(window, "chart"); ag_window_change_tab(window, "chart");
return FALSE; return FALSE;
@ -1113,7 +1108,6 @@ ag_window_init(AgWindow *window)
); );
priv->chart = NULL; priv->chart = NULL;
priv->uri = NULL;
g_action_map_add_action_entries( g_action_map_add_action_entries(
G_ACTION_MAP(window), G_ACTION_MAP(window),
@ -1336,26 +1330,6 @@ ag_window_get_chart(AgWindow *window)
return priv->chart; return priv->chart;
} }
void
ag_window_set_uri(AgWindow *window, const gchar *uri)
{
AgWindowPrivate *priv = ag_window_get_instance_private(window);
if (priv->uri != NULL) {
g_free(priv->uri);
}
priv->uri = g_strdup(uri);
}
gchar *
ag_window_get_uri(AgWindow *window)
{
AgWindowPrivate *priv = ag_window_get_instance_private(window);
return g_strdup(priv->uri);
}
void void
ag_window_settings_restore(GtkWindow *window, GSettings *settings) ag_window_settings_restore(GtkWindow *window, GSettings *settings)
{ {

View File

@ -50,11 +50,6 @@ AgChart *ag_window_get_chart(AgWindow *window);
void ag_window_update_from_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);
void ag_window_settings_restore(GtkWindow *window, void ag_window_settings_restore(GtkWindow *window,
GSettings *settings); GSettings *settings);