-static void recent_open(GtkAction *action, gpointer data)
-{
- struct gui *ui = (struct gui *) data;
- int port, type, server_start;
- struct gui_entry *ge;
- GtkRecentInfo *info;
- const gchar *uri;
- gint cur_page;
- char *host;
- int ret, ge_is_new = 0;
-
- /*
- * Creates new tab if current tab is the main window, or the
- * current tab already has a client.
- */
- cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(ui->notebook));
- ge = get_ge_from_page(cur_page, &ge_is_new);
- if (ge->client) {
- ge = get_new_ge_with_tab("Untitled");
- ge_is_new = 1;
- }
-
- gtk_notebook_set_current_page(GTK_NOTEBOOK(ui->notebook), ge->page_num);
-
- info = g_object_get_data(G_OBJECT(action), "gtk-recent-info");
- uri = gtk_recent_info_get_uri(info);
-
- if (get_connection_details(&host, &port, &type, &server_start)) {
- if (ge_is_new)
- gtk_widget_destroy(ge->vbox);
-
- return;
- }
-
- ret = do_file_open(ge, uri, host, type, port);
-
- free(host);
-
- if (!ret) {
- if (server_start)
- gfio_start_server();
- } else {
- if (ge_is_new)
- gtk_widget_destroy(ge->vbox);
- }
-}
-