g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
+
+ /**
+ * GtkFormDecoder::btn_clean_clicked:
+ * @gtk_form_decoder:
+ *
+ */
+ klass->btn_clean_clicked_signal_id = g_signal_new ("btn-clean-clicked",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_BOOLEAN__FLAGS,
+ G_TYPE_BOOLEAN,
+ 1, G_TYPE_INT);
}
static void
GdkEvent *event,
gpointer user_data)
{
+ gboolean ret;
+
GtkFormDecoder *decoder = (GtkFormDecoder *)user_data;
GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
GtkFormDecoderClass *klass = GTK_FORM_DECODER_GET_CLASS (decoder);
- gtk_form_decoder_set_key (decoder, "0");
+ ret = FALSE;
+ g_signal_emit (G_OBJECT (user_data), klass->btn_clean_clicked_signal_id, 0, 0, &ret);
+
+ if (!ret)
+ {
+ gtk_form_decoder_set_key (decoder, "0");
+ }
}
gtk_form_decoder_set_key (GTK_FORM_DECODER (decoder), "1");
}
+static gboolean
+on_btn_clean_clicked (gpointer instance, gint arg1, gpointer user_data)
+{
+ return FALSE;
+}
+
gboolean
on_w_delete_event (GtkWidget *widget,
GdkEvent *event,
g_signal_connect (G_OBJECT (decoder), "btn_browse_clicked",
G_CALLBACK (on_btn_browse_clicked), NULL);
+ g_signal_connect (G_OBJECT (decoder), "btn_clean_clicked",
+ G_CALLBACK (on_btn_clean_clicked), NULL);
gtk_widget_show_all (w);