diff options
author | Thomas White <taw@bitwiz.me.uk> | 2018-04-11 23:30:59 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2018-04-11 23:30:59 +0200 |
commit | d3e79cd94482e720c155c85745988b67df5136c1 (patch) | |
tree | 7f2a319f34f7af43d6c90e02cacbd7a0cfbaee16 /src/narrative_window.c | |
parent | cb766cf30b2eee06948c2b90ffa012d9df2d835e (diff) |
Replace p->filename with p->uri, get rid of p->titlebar, and use g_file_get_basename()
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r-- | src/narrative_window.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c index 1b26b62..17885e1 100644 --- a/src/narrative_window.c +++ b/src/narrative_window.c @@ -144,11 +144,11 @@ static void save_sig(GSimpleAction *action, GVariant *parameter, gpointer vp) NarrativeWindow *nw = vp; GFile *file; - if ( nw->p->filename == NULL ) { + if ( nw->p->uri == NULL ) { return saveas_sig(NULL, NULL, nw); } - file = g_file_new_for_uri(nw->p->filename); + file = g_file_new_for_uri(nw->p->uri); save_presentation(nw->p, file); g_object_unref(file); } @@ -660,14 +660,14 @@ static void start_slideshow_sig(GSimpleAction *action, GVariant *parameter, static void nw_update_titlebar(NarrativeWindow *nw) { - get_titlebar_string(nw->p); + char *tb = get_titlebar_string(nw->p); if ( nw->p->slidewindow != NULL ) { char *title; - title = malloc(strlen(nw->p->titlebar)+14); - sprintf(title, "%s - Colloquium", nw->p->titlebar); + title = malloc(strlen(tb)+14); + sprintf(title, "%s - Colloquium", tb); gtk_window_set_title(GTK_WINDOW(nw->window), title); free(title); |