From: Jens Axboe Date: Wed, 21 Mar 2012 11:55:49 +0000 (+0100) Subject: gfio: set notebook label to base filename X-Git-Tag: gfio-0.1~78 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=832fde7966f885a0c975a243596bc5b38a23c38e;p=fio.git gfio: set notebook label to base filename Signed-off-by: Jens Axboe --- diff --git a/gfio.c b/gfio.c index cf6b5090..e4d1f218 100644 --- a/gfio.c +++ b/gfio.c @@ -810,6 +810,12 @@ static int do_file_open(struct gui_entry *ge, const gchar *uri) client = fio_client_add_explicit(&gfio_client_ops, ge->host, ge->type, ge->port); if (client) { + char *label = strdup(uri); + + basename(label); + gtk_label_set_text(GTK_LABEL(ge->page_label), basename(label)); + free(label); + gfio_client_added(ge, client); file_add_recent(ge->ui, uri); return 0;