I wanted to pop up two buttons for the user to choose between two options ("primary" and "secondary"), returning true or false depending which was chosen. I tried this
gboolean choose_option (gchar *title, gchar * primary, gchar * secondary) { GtkWidget *dialog; dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (Denemo.window), (GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), primary, GTK_RESPONSE_ACCEPT, secondary,GTK_RESPONSE_REJECT, NULL); g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); return (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT); } but it seems to return 0 for both button presses. What am I doing wrong? I'm using GTK3 on a Debian stable installation. Richard _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list