# The ui/misc.rs Module

We are going to implement a few helper methods that will be utilized across the project on an as-needed basis. This is purely to serve some useful abstractions. The two functions that we are going to provide is an abstraction for obtaining the text within a GtkSourceBuffer, and for setting the title of a GtkHeaderBar with a given Path.

# #![allow(unused_variables)]
#fn main() {
use gtk::*;
use sourceview::*;
use std::path::Path;

/// Sets the title of the header bar to the file name of the given path.
if let Some(filename) = path.file_name() {
let filename: &str = &filename.to_string_lossy();
#}