I'm trying to create a dialog that pops up when the user selects a specific entry from the combobox, it should record the user input and react accordingly.
here's my code so far:
void add_new_set(GtkWidget entry) { g_print("howdy\n"); } GtkWidget * dialog = gtk_dialog_new_with_buttons("Message",container,GTK_DIALOG_DESTROY_WITH_PARENT,"OK", GTK_RESPONSE_NONE,NULL); GtkWidget * content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); GtkWidget * entry = gtk_entry_new(); gtk_container_add(GTK_CONTAINER(content_area), entry); g_signal_connect_swapped (dialog,"response",G_CALLBACK (add_new_set),dialog); gtk_window_set_modal (GTK_WINDOW(dialog), TRUE); gtk_widget_show_all (dialog); I need to get the input from the gtk_entry when the OK button is pressed, and perform a string comparison on that function. the g_print line runs when the button is pressed.
thanks