aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2008-10-09 10:02:40 +0000
committerAlberto Garcia <agarcia@igalia.com>2008-10-09 10:02:40 +0000
commit30841a06ee97ca10f4aa8d9309caaee4d407759d (patch)
treeae4fb9ccbec498c35ff416ad063bf0caebff0a3f /examples
parent1a9b6316453a76b0031c7d554074170c3ad5850c (diff)
2008-10-09 Alberto Garcia <agarcia@igalia.com>
* doc/hildon.types * src/hildon-check-button.h * src/hildon-check-button.c * examples/hildon-check-button-example.c: HildonCheckButton is now a new widget, rather than a GtkButton.
Diffstat (limited to 'examples')
-rw-r--r--examples/hildon-check-button-example.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/hildon-check-button-example.c b/examples/hildon-check-button-example.c
index 062c0ce..5bff1a0 100644
--- a/examples/hildon-check-button-example.c
+++ b/examples/hildon-check-button-example.c
@@ -23,11 +23,11 @@
#include <hildon-check-button.h>
static void
-button_clicked_cb (GtkButton *button,
- GtkLabel *label)
+button_toggled_cb (HildonCheckButton *button,
+ GtkLabel *label)
{
gboolean active = hildon_check_button_get_active (button);
- const gchar *labeltext = gtk_button_get_label (button);
+ const gchar *labeltext = gtk_button_get_label (GTK_BUTTON (button));
char *text = g_strconcat (labeltext, active ? " (checked)" : " (unchecked)", NULL);
gtk_label_set_text (label, text);
g_free (text);
@@ -62,11 +62,11 @@ main (int argc,
gtk_button_set_label (GTK_BUTTON (button), text);
g_free (text);
gtk_table_attach_defaults (GTK_TABLE (table), button, i/2, (i/2) + 1, i%2, (i%2) + 1);
- g_signal_connect (button, "clicked", G_CALLBACK (button_clicked_cb), label);
+ g_signal_connect (button, "toggled", G_CALLBACK (button_toggled_cb), label);
}
gtk_box_pack_start (vbox, table, TRUE, TRUE, 0);
- gtk_box_pack_start (vbox, gtk_label_new ("Last clicked:"), TRUE, TRUE, 0);
+ gtk_box_pack_start (vbox, gtk_label_new ("Last toggled:"), TRUE, TRUE, 0);
gtk_box_pack_start (vbox, label, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (win), 20);