monkey-bubble r244 - in trunk: . src/ui
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: monkey-bubble r244 - in trunk: . src/ui
- Date: Sat, 12 Jan 2008 22:02:44 +0000 (GMT)
Author: herzi
Date: Sat Jan 12 22:02:43 2008
New Revision: 244
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=244&view=rev
Log:
2008-01-12 Sven Herzberg <herzi gnome-de org>
Prepare the game window for the maemo port.
* src/ui/ui-main.c: modify the code to work for GNOME and for Maemo
without changing the glade file
Modified:
trunk/ChangeLog
trunk/src/ui/ui-main.c
Modified: trunk/src/ui/ui-main.c
==============================================================================
--- trunk/src/ui/ui-main.c (original)
+++ trunk/src/ui/ui-main.c Sat Jan 12 22:02:43 2008
@@ -176,9 +176,27 @@
ui_main = UI_MAIN(g_object_new(UI_TYPE_MAIN, NULL));
+#ifdef GNOME
PRIVATE(ui_main)->glade_xml = glade_xml_new(DATADIR"/monkey-bubble/glade/monkey-bubble.glade","main_window",NULL);
PRIVATE(ui_main)->window = glade_xml_get_widget( PRIVATE(ui_main)->glade_xml, "main_window");
+#endif
+#ifdef MAEMO
+ PRIVATE(ui_main)->glade_xml = glade_xml_new(DATADIR"/monkey-bubble/glade/monkey-bubble.glade","main_vbox",NULL);
+
+ container = glade_xml_get_widget( PRIVATE(ui_main)->glade_xml, "main_vbox");
+ program = HILDON_PROGRAM(hildon_program_get_instance());
+ PRIVATE(ui_main)->window = hildon_window_new();
+ g_signal_connect_swapped(PRIVATE(ui_main)->window ,"destroy",GTK_SIGNAL_FUNC(quit_program),ui_main);
+ hildon_program_add_window(program, HILDON_WINDOW(PRIVATE(ui_main)->window));
+ gtk_container_add(GTK_CONTAINER(PRIVATE(ui_main)->window),
+ GTK_WIDGET(container));
+ g_set_application_name(_("Monkey Bubble"));
+ g_signal_connect(G_OBJECT(program), "notify::is-topmost", G_CALLBACK(ui_main_topmost_cb), NULL);
+ PRIVATE(ui_main)->ic = NULL;
+
+ gtk_widget_hide (glade_xml_get_widget (PRIVATE(ui_main)->glade_xml, "main_menubar"));
+#endif
vbox = glade_xml_get_widget( PRIVATE(ui_main)->glade_xml,"main_vbox");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]