Hey,

I create a GtkFileChooserDialog, then I set its current folder to my home dir, then I create a GtkFileChooserButton.

When I run the prog, I get:

(test_gtk:22697): Gtk-CRITICAL **: gtk_file_system_path_to_uri: assertion `path != NULL' failed

I have gtk+ 2.10.11

I would like to know what the problem is, please (problem from gtk, from my code, etc...)

Attached, a simple test case

thank you

Vincent Torri
/* gcc -g -Wall -o test_gtk test_gtk.c `pkg-config --cflags --libs gtk+-2.0` */

#include <gtk/gtk.h>

int
main (int argc, char *argv[])
{
  GtkFileChooser  *chooser;
  GtkWidget *dialog;
  GtkWidget *file_input;

  gtk_init (&argc, &argv);

  dialog = gtk_dialog_new_with_buttons ("X264 Gtk Encoder",
                                        NULL, 0,
                                        NULL);
  chooser = (GtkFileChooser*)
      gtk_file_chooser_dialog_new("Select a file",
                                  GTK_WINDOW(dialog),
                                  GTK_FILE_CHOOSER_ACTION_OPEN,
                                  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                  GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
                                  NULL);
  gtk_file_chooser_set_current_folder (chooser, g_get_home_dir ());
  file_input = gtk_file_chooser_button_new_with_dialog (GTK_WIDGET(chooser));

  gtk_main ();

  return 0;
}
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to