[svn r120] Added new constructor to BackendInfo, using the GMythURI.
7 #include "hildon-widgets/hildon-program.h"
8 #include "hildon-widgets/hildon-window.h"
11 #include "gmyth_recorder.h"
12 #include "gmyth_settings.h"
13 #include "gmyth_context.h"
14 #include "gmyth_tvchain.h"
15 #include "gmyth_remote_util.h"
18 #include "mmyth_tvplayer.h"
21 cb_destroy (GtkWidget * widget, gpointer data)
23 MMythUi *mmyth_ui = (MMythUi *) data;
25 if (mmyth_ui->tvplayer != NULL) {
26 if (mmyth_tvplayer_is_playing (mmyth_ui->tvplayer) )
27 mmyth_tvplayer_stop_playing (mmyth_ui->tvplayer);
30 mmyth_ui_finalize (mmyth_ui);
37 debug_error_func( const gchar*log_domain, GLogLevelFlags log_level, const gchar *message,
41 /* leave this with NO print out messages, once you need to disable debug messages! */
42 //g_print ( "[%s] DEBUG messages disabled!\n", __FUNCTION__ );
47 main (gint argc, gchar * argv[])
52 HildonProgram *program = NULL;
59 gtk_init (&argc, &argv);
60 gst_init (&argc, &argv);
62 g_log_set_default_handler( debug_error_func, NULL );
65 /* Init libmmyth context */
66 gmyth_context_initialize ();
68 #ifndef MAEMO_PLATFORM
69 /* create the main window */
70 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
71 gtk_widget_set_size_request (window, MAIN_WINDOW_WIDTH, MAIN_WINDOW_HEIGHT);
72 gtk_window_set_title (GTK_WINDOW (window), "Mythtv Frontend");
74 /* Creating Hildonized main view */
75 program = HILDON_PROGRAM(hildon_program_get_instance());
76 window = hildon_window_new();
78 //g_signal_connect(G_OBJECT(window), "delete_event", gtk_main_quit, NULL);
80 hildon_program_add_window(program, HILDON_WINDOW (window));
81 g_set_application_name("Maemo Mythtv");
84 /* Initializes MMyth Widgets */
86 mmyth_ui = mmyth_ui_initialize (program, window);
88 mmyth_ui = mmyth_ui_initialize (window);
91 //mmyth_ui->loop = g_main_loop_new (NULL, FALSE);
93 /* Connect destroy signal handling */
94 g_signal_connect (window, "destroy", G_CALLBACK (cb_destroy), mmyth_ui);
96 /* Shows main window and start gtk loop */
97 gtk_widget_show (window);