aboutsummaryrefslogtreecommitdiff
path: root/src/narrative_window.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2018-10-21 18:03:01 +0200
committerThomas White <taw@bitwiz.me.uk>2018-10-21 18:03:01 +0200
commit27e08c96c71183edea9be3e189d7152c19b1beac (patch)
tree428735ad37dbfcb9598c4ae3854252a4092d3f8f /src/narrative_window.c
parenta85c7fd76dd50d82841e01018b532ad790f8c564 (diff)
Try <documentname>.ss for stylesheet
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r--src/narrative_window.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c
index ead78bd..b287f61 100644
--- a/src/narrative_window.c
+++ b/src/narrative_window.c
@@ -190,12 +190,12 @@ static gint load_ss_response_sig(GtkWidget *d, gint response,
{
if ( response == GTK_RESPONSE_ACCEPT ) {
- char *filename;
+ GFile *file;
Stylesheet *new_ss;
- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(d));
+ file = gtk_file_chooser_get_file(GTK_FILE_CHOOSER(d));
- new_ss = stylesheet_load(filename);
+ new_ss = stylesheet_load(file);
if ( new_ss != NULL ) {
stylesheet_free(nw->p->stylesheet);
@@ -209,7 +209,7 @@ static gint load_ss_response_sig(GtkWidget *d, gint response,
fprintf(stderr, _("Failed to load\n"));
}
- g_free(filename);
+ g_object_unref(file);
}