0

I have a C program which uses Gtk. What I'm trying to do is basically have a file chooser dialog pop up to allow the user to pick a file. However, whenever the dialog opens, it always prints

Gtk-Message: 21:39:14.067: GtkDialog mapped without a transient parent. This is discouraged.

I tried to use gtk_window_set_transient_for as this question suggested, but this didn't change anything.

My code:

// window is defined else where as a GtkWidget *window;

GtkWidget *dialog = gtk_file_chooser_dialog_new("Pick a file", GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_OPEN, "Open", 0, NULL);
gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window));
gtk_dialog_run(GTK_DIALOG(dialog));
dangee1705
  • 3,445
  • 1
  • 21
  • 40

0 Answers0