-#if MAEMO_VERSION >= 5
- // The above horrible hack continues here.
- case MA_GAME_CHECKSTATE:
- if (gs.ui->restart_button &&
- gtk_widget_get_parent(gs.ui->restart_button)
- != GTK_WIDGET(buttons_hbox))
- {
- GtkWidget* old_parent = gtk_widget_get_parent(gs.ui->restart_button);
- gtk_widget_reparent(gs.ui->restart_button,
- GTK_WIDGET(buttons_hbox));
- gtk_box_set_child_packing(buttons_hbox, gs.ui->restart_button,
- FALSE, FALSE, 0, GTK_PACK_END);
-
- widgets_moved++;
- if (widgets_moved == 1) {
- gtk_widget_set_size_request(
- gtk_widget_get_parent(GTK_WIDGET(buttons_hbox)),
- -1, -1);
- } else if (widgets_moved == 2) {
- gtk_widget_destroy(old_parent);
- }
- }
- break;
- case MA_GAME_PLAYING:
- if (gtk_widget_get_parent(gs.ui->play_button) != GTK_WIDGET(buttons_hbox))
- {
- GtkWidget* old_parent = gtk_widget_get_parent(gs.ui->play_button);
- gtk_widget_reparent(gs.ui->play_button,
- GTK_WIDGET(buttons_hbox));
- gtk_box_set_child_packing(buttons_hbox, gs.ui->play_button,
- FALSE, FALSE, 0, GTK_PACK_START);
-
- widgets_moved++;
- if (widgets_moved == 1) {
- gtk_widget_set_size_request(
- gtk_widget_get_parent(GTK_WIDGET(buttons_hbox)),
- -1, -1);
- } else if (widgets_moved == 2) {
- gtk_widget_destroy(old_parent);
- }
- }
-
- break;
-#endif