// gcc -Wall -o test-file_chooser `pkg-config --libs --cflags libgnomeui-2.0` test-file_chooser.c

#include <gtk/gtk.h>
#include <gnome.h>

void
clicked (GtkButton *button, gpointer data)
{
	GtkWidget *fs;

	fs = gtk_file_chooser_dialog_new (_("Select Movies or Playlists"),
				GTK_WINDOW (data),
				GTK_FILE_CHOOSER_ACTION_OPEN,
				GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
				GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT,
				NULL);
	gtk_dialog_set_default_response (GTK_DIALOG (fs), GTK_RESPONSE_ACCEPT);
	gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (fs), TRUE);
	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (fs), FALSE);

	g_message ("Return value of gtk_file_chooser_set_current_folder_uri: %i",
				gtk_file_chooser_set_current_folder_uri
					(GTK_FILE_CHOOSER (fs), "http://www.gearwire.com/media"));

	gtk_dialog_run (GTK_DIALOG (fs));
}

int main (int argc, char **argv)
{
	GtkWidget *win, *button;

	g_thread_init (NULL);
	gdk_threads_init ();

	gnome_program_init ("totem", "0.0",
			LIBGNOMEUI_MODULE,
			argc, argv,
			GNOME_PARAM_NONE);

	button = gtk_button_new_with_label ("Click me");
	win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_container_add (GTK_CONTAINER (win), button);

	g_signal_connect (G_OBJECT (button), "clicked",
			G_CALLBACK (clicked), win);

	gtk_widget_show_all (win);

	gtk_main ();

	return 0;
}
