/* Callback for when the user presses enter in the entry widget */ static void activate_entry (GtkWidget *entry, GschemTranslateWidget *widget) { g_return_if_fail (widget != NULL); if (gtk_entry_get_text_length (GTK_ENTRY (widget->entry)) == 0) { gtk_info_bar_response (GTK_INFO_BAR (widget), GTK_RESPONSE_CANCEL); } else if (convert_value (gtk_entry_get_text (GTK_ENTRY (widget->entry)), NULL)) { gtk_info_bar_response (GTK_INFO_BAR (widget), GTK_RESPONSE_OK); } }
/* Callback for when the user presses enter in the entry widget */ static void activate_entry (GtkWidget *entry, GschemShowHideTextWidget *widget) { g_return_if_fail (widget != NULL); if (gtk_entry_get_text_length (GTK_ENTRY (widget->entry)) > 0) { gtk_info_bar_response (GTK_INFO_BAR (widget), GTK_RESPONSE_OK); } else { gtk_info_bar_response (GTK_INFO_BAR (widget), GTK_RESPONSE_CANCEL); } }
JNIEXPORT void JNICALL Java_org_gnome_gtk_GtkInfoBar_gtk_1info_1bar_1response ( JNIEnv* env, jclass cls, jlong _self, jint _responseId ) { GtkInfoBar* self; gint responseId; // convert parameter self self = (GtkInfoBar*) _self; // convert parameter responseId responseId = (gint) _responseId; // call function gtk_info_bar_response(self, responseId); // cleanup parameter self // cleanup parameter responseId }
/* Callback for when the user clicks the evaluate button */ static void click_evaluate (GtkWidget *entry, GschemTranslateWidget *widget) { g_return_if_fail (widget != NULL); if (convert_value (gtk_entry_get_text (GTK_ENTRY (widget->entry)), NULL)) { gtk_info_bar_response (GTK_INFO_BAR (widget), GTK_RESPONSE_OK); } }
/* Callback for when the user clicks the cancel button */ static void click_cancel (GtkWidget *button, GschemTranslateWidget *widget) { gtk_info_bar_response (GTK_INFO_BAR (widget), GTK_RESPONSE_CANCEL); }