Updated Finnish translation
[cheese.git] / tests / cheese-test-chooser.c
blobbbf993a024430508149058f5d2ac8c5acc628412
2 #include "config.h"
4 #include <stdlib.h>
6 #include <glib/gi18n.h>
7 #include <gtk/gtk.h>
8 #include <gst/gst.h>
9 #include <clutter-gtk/clutter-gtk.h>
10 #include "cheese-avatar-chooser.h"
11 #include "cheese-gtk.h"
13 static void
14 response_cb (GtkDialog *dialog,
15 int response,
16 CheeseAvatarChooser *chooser)
18 if (response == GTK_RESPONSE_ACCEPT)
20 GdkPixbuf *pixbuf;
21 g_message ("got pixbuf captured");
22 g_object_get (G_OBJECT (chooser), "pixbuf", &pixbuf, NULL);
26 int
27 main (int argc, char **argv)
29 GtkWidget *window;
31 bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALEDIR);
32 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
33 textdomain (GETTEXT_PACKAGE);
35 if (!cheese_gtk_init (&argc, &argv))
36 return EXIT_FAILURE;
38 window = cheese_avatar_chooser_new ();
39 g_signal_connect (G_OBJECT (window), "response",
40 G_CALLBACK (response_cb), window);
42 gtk_widget_show_all (window);
44 gtk_dialog_run (GTK_DIALOG (window));
46 gtk_widget_destroy (window);
48 return EXIT_SUCCESS;