Update gtk147

This commit is contained in:
daleclack 2023-03-22 15:19:25 +08:00
parent 01893c600d
commit 36fdc9b7e3
2 changed files with 12 additions and 0 deletions

0
Gtk3/gtk37/res/.hidden Normal file
View File

View File

@ -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){