예제 #1
0
/* 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);
  }
}
예제 #2
0
/* 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);
  }
}
예제 #3
0
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
}
예제 #4
0
/* 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);
  }
}
예제 #5
0
/* 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);
}