Cleanup.
[jamendo] / src / main.c
1 /*
2  * main.c
3  *
4  *  Created on: 2009-10-01
5  *      Author: marcin
6  */
7
8 #include <hildon/hildon.h>
9 #include <gst/gst.h>
10
11 #include "home_screen.h"
12 #include "data_structs.h"
13 #include "player.h"
14
15 int main(int argc, char **argv) {
16         HildonProgram *program;
17         GtkWidget *win;
18
19         if (!g_thread_supported()) {
20                 g_thread_init(NULL);
21         }
22         gdk_threads_init();
23         gdk_threads_enter();
24
25         hildon_gtk_init(&argc, &argv);
26         gst_init(&argc,&argv);
27
28         program = hildon_program_get_instance();
29         g_set_application_name("Jamendo");
30
31         /* register boxed types */
32         data_structs_type_register();
33
34         win = home_screen_new();
35
36         hildon_program_set_common_toolbar(program, GTK_TOOLBAR(player_toolbar_create()));
37
38         g_signal_connect(win, "destroy", G_CALLBACK(gtk_main_quit), NULL);
39
40         /* This call show the window and also add the window to the stack */
41         gtk_widget_show(win);
42         gtk_main();
43
44         gdk_threads_leave();
45
46         return 0;
47 }
48