Update gtk147
This commit is contained in:
parent
01893c600d
commit
36fdc9b7e3
|
@ -7,7 +7,19 @@ struct _FileManager{
|
|||
G_DEFINE_TYPE(FileManager, file_manager, GTK_TYPE_WINDOW)
|
||||
|
||||
static void file_manager_init(FileManager *self){
|
||||
// Create file for directory
|
||||
GFile *file = g_file_new_for_path(g_get_home_dir());
|
||||
|
||||
// Create List item factory
|
||||
GtkListItemFactory *factory = gtk_signal_list_item_factory_new();
|
||||
|
||||
// Create list model
|
||||
GtkDirectoryList *list_model = gtk_directory_list_new("local_only", file);
|
||||
GtkWidget *view = gtk_list_view_new(GTK_SELECTION_MODEL(
|
||||
gtk_single_selection_new(G_LIST_MODEL(list_model))), factory);
|
||||
|
||||
// Add widget to the window
|
||||
gtk_window_set_child(GTK_WINDOW(self), view);
|
||||
}
|
||||
|
||||
static void file_manager_class_init(FileManagerClass *klass){
|
||||
|
|
Loading…
Reference in New Issue