#include <gtk/gtk.h>

int main (int argc, char *argv[]) {
	GtkWidget *dialog;
	
	gtk_init (&argc, &argv);

	dialog = gtk_file_chooser_dialog_new ("Select Folder", NULL,
		GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER,
		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
		GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);

	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
		char *filename;
		filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
		g_print("selected folder: %s\n", filename);
		g_free (filename);
	}

    return 0;
}
