gfio: set notebook label to base filename
authorJens Axboe <axboe@kernel.dk>
Wed, 21 Mar 2012 11:55:49 +0000 (12:55 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Mar 2012 11:55:49 +0000 (12:55 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
gfio.c

diff --git a/gfio.c b/gfio.c
index cf6b509..e4d1f21 100644 (file)
--- 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;