From 8b147b4e3e2587bce6b3ebacc00d64e3290c83e9 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 8 Feb 2010 18:41:45 +0100 Subject: [PATCH] diablo GUI building again --- gui/controls.c | 2 +- gui/i18n/de.po | 59 ++++++++++++++++++++++++----------------- gui/i18n/drnoksnes_plugin.pot | 50 ++++++++++++++++++---------------- gui/i18n/es.po | 59 ++++++++++++++++++++++++----------------- gui/i18n/pl.po | 59 ++++++++++++++++++++++++----------------- gui/i18n/sv.po | 59 ++++++++++++++++++++++++----------------- gui/plugin.c | 27 +++++++++++++------ gui/settings.c | 34 +++++++++++++++++++----- 8 files changed, 214 insertions(+), 135 deletions(-) diff --git a/gui/controls.c b/gui/controls.c index e07d84f..8a935cf 100644 --- a/gui/controls.c +++ b/gui/controls.c @@ -164,7 +164,7 @@ void controls_dialog(GtkWindow* parent, int player) keys_btn = HILDON_BUTTON(hildon_button_new_with_text( HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_FINGER_HEIGHT, HILDON_BUTTON_ARRANGEMENT_HORIZONTAL, - _("Configure keys..."), NULL)); + _("Configure keys…"), NULL)); set_button_layout(HILDON_BUTTON(keys_btn), titles_size_group, values_size_group); g_signal_connect(G_OBJECT(keys_btn), "clicked", diff --git a/gui/i18n/de.po b/gui/i18n/de.po index 0e689fd..43cbc23 100644 --- a/gui/i18n/de.po +++ b/gui/i18n/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: drnoksnes\n" "Report-Msgid-Bugs-To: maemo@javispedro.com\n" -"POT-Creation-Date: 2010-02-01 22:56+0100\n" +"POT-Creation-Date: 2010-02-08 18:37+0100\n" "PO-Revision-Date: 2010-01-28 09:50+0100\n" "Last-Translator: Philipp Zabel \n" "Language-Team: German\n" @@ -26,7 +26,8 @@ msgid "ROM" msgstr "ROM" #: plugin.c:251 -msgid "Select ROM..." +#, fuzzy +msgid "Select ROM…" msgstr "ROM auswählen..." #: plugin.c:268 @@ -53,7 +54,7 @@ msgstr "Ton einschalten" msgid "Display framerate" msgstr "Bildwiederholrate anzeigen" -#: plugin.c:334 settings.c:228 +#: plugin.c:334 settings.c:237 msgid "Accurate graphics" msgstr "Akkurate Grafik" @@ -61,15 +62,15 @@ msgstr "Akkurate Grafik" msgid "Framerate:" msgstr "Bildwiederholrate:" -#: plugin.c:347 settings.c:260 +#: plugin.c:347 settings.c:269 msgid "No speedhacks" msgstr "Keine Speedhacks" -#: plugin.c:348 settings.c:261 +#: plugin.c:348 settings.c:270 msgid "Safe hacks only" msgstr "Nur sichere Hacks" -#: plugin.c:349 settings.c:262 +#: plugin.c:349 settings.c:271 msgid "All speedhacks" msgstr "Alle Speedhacks" @@ -81,23 +82,33 @@ msgstr "Einstellungen..." msgid "About…" msgstr "Über..." -#: plugin.c:456 settings.c:181 +#: plugin.c:456 settings.c:190 msgid "Settings" msgstr "Einstellungen" -#: plugin.c:465 -msgid "Controls…" -msgstr "Steuerung..." +#: plugin.c:466 settings.c:209 +msgid "Controls" +msgstr "Steuerung" -#: plugin.c:469 +#: plugin.c:471 msgid "Advanced…" msgstr "Erweitert..." -#: plugin.c:531 +#: plugin.c:475 +#, fuzzy +msgid "Player 1…" +msgstr "Spieler 1" + +#: plugin.c:478 +#, fuzzy +msgid "Player 2…" +msgstr "Spieler 2" + +#: plugin.c:542 msgid "No ROM selected" msgstr "Kein ROM ausgewählt" -#: plugin.c:536 +#: plugin.c:547 msgid "ROM file does not exist" msgstr "ROM-Datei existiert nicht" @@ -123,7 +134,8 @@ msgid "Enable keyboard" msgstr "Tastatur aktivieren" #: controls.c:167 -msgid "Configure keys..." +#, fuzzy +msgid "Configure keys…" msgstr "Tasten konfigurieren..." #: controls.c:173 @@ -179,31 +191,27 @@ msgstr "2x Zoom mit Kantenglättung" msgid "No zoom" msgstr "Kein Zoom" -#: settings.c:200 -msgid "Controls" -msgstr "Steuerung" - -#: settings.c:207 +#: settings.c:216 msgid "Player 1" msgstr "Spieler 1" -#: settings.c:216 +#: settings.c:225 msgid "Player 2" msgstr "Spieler 2" -#: settings.c:222 +#: settings.c:231 msgid "Advanced" msgstr "Erweitert" -#: settings.c:235 +#: settings.c:244 settings.c:307 msgid "Pause game in the background" msgstr "" -#: settings.c:242 +#: settings.c:251 settings.c:302 msgid "Zoom" msgstr "Zoom" -#: settings.c:254 +#: settings.c:263 msgid "Speedhacks" msgstr "Speedhacks" @@ -238,3 +246,6 @@ msgstr "Schnell laden 2" #: buttons.inc:27 msgid "Quick Save 2" msgstr "Schnell speichern 2" + +#~ msgid "Controls…" +#~ msgstr "Steuerung..." diff --git a/gui/i18n/drnoksnes_plugin.pot b/gui/i18n/drnoksnes_plugin.pot index f382822..63e7eee 100644 --- a/gui/i18n/drnoksnes_plugin.pot +++ b/gui/i18n/drnoksnes_plugin.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: maemo@javispedro.com\n" -"POT-Creation-Date: 2010-02-01 22:56+0100\n" +"POT-Creation-Date: 2010-02-08 18:38+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,7 +25,7 @@ msgid "ROM" msgstr "" #: plugin.c:251 -msgid "Select ROM..." +msgid "Select ROM…" msgstr "" #: plugin.c:268 @@ -52,7 +52,7 @@ msgstr "" msgid "Display framerate" msgstr "" -#: plugin.c:334 settings.c:228 +#: plugin.c:334 settings.c:237 msgid "Accurate graphics" msgstr "" @@ -60,15 +60,15 @@ msgstr "" msgid "Framerate:" msgstr "" -#: plugin.c:347 settings.c:260 +#: plugin.c:347 settings.c:269 msgid "No speedhacks" msgstr "" -#: plugin.c:348 settings.c:261 +#: plugin.c:348 settings.c:270 msgid "Safe hacks only" msgstr "" -#: plugin.c:349 settings.c:262 +#: plugin.c:349 settings.c:271 msgid "All speedhacks" msgstr "" @@ -80,23 +80,31 @@ msgstr "" msgid "About…" msgstr "" -#: plugin.c:456 settings.c:181 +#: plugin.c:456 settings.c:190 msgid "Settings" msgstr "" -#: plugin.c:465 -msgid "Controls…" +#: plugin.c:466 settings.c:209 +msgid "Controls" msgstr "" -#: plugin.c:469 +#: plugin.c:471 msgid "Advanced…" msgstr "" -#: plugin.c:531 +#: plugin.c:475 +msgid "Player 1…" +msgstr "" + +#: plugin.c:478 +msgid "Player 2…" +msgstr "" + +#: plugin.c:542 msgid "No ROM selected" msgstr "" -#: plugin.c:536 +#: plugin.c:547 msgid "ROM file does not exist" msgstr "" @@ -122,7 +130,7 @@ msgid "Enable keyboard" msgstr "" #: controls.c:167 -msgid "Configure keys..." +msgid "Configure keys…" msgstr "" #: controls.c:173 @@ -178,31 +186,27 @@ msgstr "" msgid "No zoom" msgstr "" -#: settings.c:200 -msgid "Controls" -msgstr "" - -#: settings.c:207 +#: settings.c:216 msgid "Player 1" msgstr "" -#: settings.c:216 +#: settings.c:225 msgid "Player 2" msgstr "" -#: settings.c:222 +#: settings.c:231 msgid "Advanced" msgstr "" -#: settings.c:235 +#: settings.c:244 settings.c:307 msgid "Pause game in the background" msgstr "" -#: settings.c:242 +#: settings.c:251 settings.c:302 msgid "Zoom" msgstr "" -#: settings.c:254 +#: settings.c:263 msgid "Speedhacks" msgstr "" diff --git a/gui/i18n/es.po b/gui/i18n/es.po index f67e0df..b1be64a 100644 --- a/gui/i18n/es.po +++ b/gui/i18n/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DrNokSnes 1.2.6\n" "Report-Msgid-Bugs-To: maemo@javispedro.com\n" -"POT-Creation-Date: 2010-02-01 22:56+0100\n" +"POT-Creation-Date: 2010-02-08 18:37+0100\n" "PO-Revision-Date: 2010-01-07 03:11+0100\n" "Last-Translator: Javier \n" "Language-Team: Spanish \n" @@ -27,7 +27,8 @@ msgid "ROM" msgstr "ROM" #: plugin.c:251 -msgid "Select ROM..." +#, fuzzy +msgid "Select ROM…" msgstr "Seleccionar ROM..." #: plugin.c:268 @@ -54,7 +55,7 @@ msgstr "Activar sonido" msgid "Display framerate" msgstr "Mostrar velocidad" -#: plugin.c:334 settings.c:228 +#: plugin.c:334 settings.c:237 msgid "Accurate graphics" msgstr "Mejores gráficos" @@ -62,15 +63,15 @@ msgstr "Mejores gráficos" msgid "Framerate:" msgstr "Velocidad:" -#: plugin.c:347 settings.c:260 +#: plugin.c:347 settings.c:269 msgid "No speedhacks" msgstr "Sin speedhacks" -#: plugin.c:348 settings.c:261 +#: plugin.c:348 settings.c:270 msgid "Safe hacks only" msgstr "Sólo hacks seguros" -#: plugin.c:349 settings.c:262 +#: plugin.c:349 settings.c:271 msgid "All speedhacks" msgstr "Todos los hacks" @@ -82,23 +83,33 @@ msgstr "Ajustes…" msgid "About…" msgstr "Acerca de…" -#: plugin.c:456 settings.c:181 +#: plugin.c:456 settings.c:190 msgid "Settings" msgstr "Ajustes" -#: plugin.c:465 -msgid "Controls…" -msgstr "Controles…" +#: plugin.c:466 settings.c:209 +msgid "Controls" +msgstr "Controles" -#: plugin.c:469 +#: plugin.c:471 msgid "Advanced…" msgstr "Avanzados…" -#: plugin.c:531 +#: plugin.c:475 +#, fuzzy +msgid "Player 1…" +msgstr "Jugador 1" + +#: plugin.c:478 +#, fuzzy +msgid "Player 2…" +msgstr "Jugador 2" + +#: plugin.c:542 msgid "No ROM selected" msgstr "Sin ROM seleccionada" -#: plugin.c:536 +#: plugin.c:547 msgid "ROM file does not exist" msgstr "El archivo ROM no existe" @@ -124,7 +135,8 @@ msgid "Enable keyboard" msgstr "Activar teclado" #: controls.c:167 -msgid "Configure keys..." +#, fuzzy +msgid "Configure keys…" msgstr "Configurar teclas…" #: controls.c:173 @@ -180,31 +192,27 @@ msgstr "Zoom 2x suavizado" msgid "No zoom" msgstr "Sin zoom" -#: settings.c:200 -msgid "Controls" -msgstr "Controles" - -#: settings.c:207 +#: settings.c:216 msgid "Player 1" msgstr "Jugador 1" -#: settings.c:216 +#: settings.c:225 msgid "Player 2" msgstr "Jugador 2" -#: settings.c:222 +#: settings.c:231 msgid "Advanced" msgstr "Avanzado" -#: settings.c:235 +#: settings.c:244 settings.c:307 msgid "Pause game in the background" msgstr "Pausar juego en segundo plano" -#: settings.c:242 +#: settings.c:251 settings.c:302 msgid "Zoom" msgstr "Zoom" -#: settings.c:254 +#: settings.c:263 msgid "Speedhacks" msgstr "Speedhacks" @@ -239,3 +247,6 @@ msgstr "Carga rápida 2" #: buttons.inc:27 msgid "Quick Save 2" msgstr "Guardado rápido 2" + +#~ msgid "Controls…" +#~ msgstr "Controles…" diff --git a/gui/i18n/pl.po b/gui/i18n/pl.po index 4a67197..461bd51 100644 --- a/gui/i18n/pl.po +++ b/gui/i18n/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: drnoksnes\n" "Report-Msgid-Bugs-To: maemo@javispedro.com\n" -"POT-Creation-Date: 2010-02-01 22:56+0100\n" +"POT-Creation-Date: 2010-02-08 18:37+0100\n" "PO-Revision-Date: 2010-01-28 00:42+0100\n" "Last-Translator: Tomasz Dominikowski \n" "Language-Team: Polish \n" @@ -26,7 +26,8 @@ msgid "ROM" msgstr "ROM" #: plugin.c:251 -msgid "Select ROM..." +#, fuzzy +msgid "Select ROM…" msgstr "Wybierz ROM..." #: plugin.c:268 @@ -53,7 +54,7 @@ msgstr "Włącz dźwięk" msgid "Display framerate" msgstr "Wyświetlaj liczbę klatek/s" -#: plugin.c:334 settings.c:228 +#: plugin.c:334 settings.c:237 msgid "Accurate graphics" msgstr "Dokładna grafika" @@ -61,15 +62,15 @@ msgstr "Dokładna grafika" msgid "Framerate:" msgstr "Klatek/s:" -#: plugin.c:347 settings.c:260 +#: plugin.c:347 settings.c:269 msgid "No speedhacks" msgstr "Bez sztuczek z prędkością" -#: plugin.c:348 settings.c:261 +#: plugin.c:348 settings.c:270 msgid "Safe hacks only" msgstr "Tylko bezpieczne sztuczki" -#: plugin.c:349 settings.c:262 +#: plugin.c:349 settings.c:271 msgid "All speedhacks" msgstr "Wszystkie sztuczki z prędkością" @@ -81,23 +82,33 @@ msgstr "Ustawienia..." msgid "About…" msgstr "O programie..." -#: plugin.c:456 settings.c:181 +#: plugin.c:456 settings.c:190 msgid "Settings" msgstr "Ustawienia" -#: plugin.c:465 -msgid "Controls…" -msgstr "Sterowanie..." +#: plugin.c:466 settings.c:209 +msgid "Controls" +msgstr "Sterowanie" -#: plugin.c:469 +#: plugin.c:471 msgid "Advanced…" msgstr "Zaawansowane..." -#: plugin.c:531 +#: plugin.c:475 +#, fuzzy +msgid "Player 1…" +msgstr "Gracz 1" + +#: plugin.c:478 +#, fuzzy +msgid "Player 2…" +msgstr "Gracz 2" + +#: plugin.c:542 msgid "No ROM selected" msgstr "Nie wybrano pliku ROM" -#: plugin.c:536 +#: plugin.c:547 msgid "ROM file does not exist" msgstr "Plik ROM nie istnieje" @@ -123,7 +134,8 @@ msgid "Enable keyboard" msgstr "Włącz klawiaturę" #: controls.c:167 -msgid "Configure keys..." +#, fuzzy +msgid "Configure keys…" msgstr "Skonfiguruj klawisze..." #: controls.c:173 @@ -179,31 +191,27 @@ msgstr "Wygładzane 2x przybliżenie" msgid "No zoom" msgstr "Bez przybliżenia" -#: settings.c:200 -msgid "Controls" -msgstr "Sterowanie" - -#: settings.c:207 +#: settings.c:216 msgid "Player 1" msgstr "Gracz 1" -#: settings.c:216 +#: settings.c:225 msgid "Player 2" msgstr "Gracz 2" -#: settings.c:222 +#: settings.c:231 msgid "Advanced" msgstr "Zaawansowane" -#: settings.c:235 +#: settings.c:244 settings.c:307 msgid "Pause game in the background" msgstr "" -#: settings.c:242 +#: settings.c:251 settings.c:302 msgid "Zoom" msgstr "Przybliżenie" -#: settings.c:254 +#: settings.c:263 msgid "Speedhacks" msgstr "Sztuczki z prędkością" @@ -238,3 +246,6 @@ msgstr "Szybkie wczytanie 2" #: buttons.inc:27 msgid "Quick Save 2" msgstr "Szybki zapis 2" + +#~ msgid "Controls…" +#~ msgstr "Sterowanie..." diff --git a/gui/i18n/sv.po b/gui/i18n/sv.po index fb20c47..e61b7fc 100644 --- a/gui/i18n/sv.po +++ b/gui/i18n/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DrNokSnes 1.2.5\n" "Report-Msgid-Bugs-To: maemo@javispedro.com\n" -"POT-Creation-Date: 2010-02-01 22:56+0100\n" +"POT-Creation-Date: 2010-02-08 18:37+0100\n" "PO-Revision-Date: 2010-01-28 05:00+0100\n" "Last-Translator: Robert Hägerström \n" "Language-Team: Swedish\n" @@ -24,7 +24,8 @@ msgid "ROM" msgstr "ROM" #: plugin.c:251 -msgid "Select ROM..." +#, fuzzy +msgid "Select ROM…" msgstr "Välj ROM..." #: plugin.c:268 @@ -51,7 +52,7 @@ msgstr "Aktivera ljud" msgid "Display framerate" msgstr "Visa bildhastighet" -#: plugin.c:334 settings.c:228 +#: plugin.c:334 settings.c:237 msgid "Accurate graphics" msgstr "Exakt grafik" @@ -59,15 +60,15 @@ msgstr "Exakt grafik" msgid "Framerate:" msgstr "Bildhastighet:" -#: plugin.c:347 settings.c:260 +#: plugin.c:347 settings.c:269 msgid "No speedhacks" msgstr "Inga speedhacks" -#: plugin.c:348 settings.c:261 +#: plugin.c:348 settings.c:270 msgid "Safe hacks only" msgstr "Enbart säkra hack" -#: plugin.c:349 settings.c:262 +#: plugin.c:349 settings.c:271 msgid "All speedhacks" msgstr "Alla speedhacks" @@ -79,23 +80,33 @@ msgstr "Inställningar…" msgid "About…" msgstr "Om…" -#: plugin.c:456 settings.c:181 +#: plugin.c:456 settings.c:190 msgid "Settings" msgstr "Inställningar" -#: plugin.c:465 -msgid "Controls…" -msgstr "Kontroller…" +#: plugin.c:466 settings.c:209 +msgid "Controls" +msgstr "Kontroller" -#: plugin.c:469 +#: plugin.c:471 msgid "Advanced…" msgstr "Avancerad…" -#: plugin.c:531 +#: plugin.c:475 +#, fuzzy +msgid "Player 1…" +msgstr "Spelare 1" + +#: plugin.c:478 +#, fuzzy +msgid "Player 2…" +msgstr "Spelare 2" + +#: plugin.c:542 msgid "No ROM selected" msgstr "Ingen ROM vald" -#: plugin.c:536 +#: plugin.c:547 msgid "ROM file does not exist" msgstr "ROM-filen existerar inte" @@ -121,7 +132,8 @@ msgid "Enable keyboard" msgstr "Aktivera tangentbordet" #: controls.c:167 -msgid "Configure keys..." +#, fuzzy +msgid "Configure keys…" msgstr "Anpassa tangenter..." #: controls.c:173 @@ -177,31 +189,27 @@ msgstr "Kantutjämnad dubbel zoom" msgid "No zoom" msgstr "Ingen zoom" -#: settings.c:200 -msgid "Controls" -msgstr "Kontroller" - -#: settings.c:207 +#: settings.c:216 msgid "Player 1" msgstr "Spelare 1" -#: settings.c:216 +#: settings.c:225 msgid "Player 2" msgstr "Spelare 2" -#: settings.c:222 +#: settings.c:231 msgid "Advanced" msgstr "Avancerad" -#: settings.c:235 +#: settings.c:244 settings.c:307 msgid "Pause game in the background" msgstr "" -#: settings.c:242 +#: settings.c:251 settings.c:302 msgid "Zoom" msgstr "Zoom" -#: settings.c:254 +#: settings.c:263 msgid "Speedhacks" msgstr "Speedhacks" @@ -236,3 +244,6 @@ msgstr "Snabbladda 2" #: buttons.inc:27 msgid "Quick Save 2" msgstr "Snabbspara 2" + +#~ msgid "Controls…" +#~ msgstr "Kontroller…" diff --git a/gui/plugin.c b/gui/plugin.c index f1cde36..8009230 100644 --- a/gui/plugin.c +++ b/gui/plugin.c @@ -170,7 +170,7 @@ static void select_rom_callback(GtkWidget * button, gpointer data) #if MAEMO_VERSION < 5 static void controls_item_callback(GtkWidget * button, gpointer data) { - controls_dialog(get_parent_window()); + controls_dialog(get_parent_window(), GPOINTER_TO_INT(data)); } #endif @@ -248,7 +248,7 @@ static GtkWidget * load_plugin(void) #else { GtkWidget* rom_hbox = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT); - select_rom_btn = GTK_BUTTON(gtk_button_new_with_label(_("Select ROM..."))); + select_rom_btn = GTK_BUTTON(gtk_button_new_with_label(_("Select ROM…"))); gtk_widget_set_size_request(GTK_WIDGET(select_rom_btn), 180, 46); rom_label = GTK_LABEL(gtk_label_new(NULL)); @@ -461,16 +461,27 @@ static GtkWidget **load_menu(guint *nitems) gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_items[0]), GTK_WIDGET(settings_menu)); + GtkMenu* controls_menu = GTK_MENU(gtk_menu_new()); GtkMenuItem* controls_item = - GTK_MENU_ITEM(gtk_menu_item_new_with_label(_("Controls…"))); - gtk_menu_append(GTK_MENU(settings_menu), GTK_WIDGET(controls_item)); + GTK_MENU_ITEM(gtk_menu_item_new_with_label(_("Controls"))); + gtk_menu_item_set_submenu(controls_item, GTK_WIDGET(controls_menu)); + gtk_menu_append(settings_menu, GTK_WIDGET(controls_item)); GtkMenuItem* advanced_item = GTK_MENU_ITEM(gtk_menu_item_new_with_label(_("Advanced…"))); - gtk_menu_append(GTK_MENU(settings_menu), GTK_WIDGET(advanced_item)); - - g_signal_connect(G_OBJECT(controls_item), "activate", - G_CALLBACK(controls_item_callback), NULL); + gtk_menu_append(settings_menu, GTK_WIDGET(advanced_item)); + + GtkMenuItem* player1_item = + GTK_MENU_ITEM(gtk_menu_item_new_with_label(_("Player 1…"))); + gtk_menu_append(controls_menu, GTK_WIDGET(player1_item)); + GtkMenuItem* player2_item = + GTK_MENU_ITEM(gtk_menu_item_new_with_label(_("Player 2…"))); + gtk_menu_append(controls_menu, GTK_WIDGET(player2_item)); + + g_signal_connect(G_OBJECT(player1_item), "activate", + G_CALLBACK(controls_item_callback), GINT_TO_POINTER(1)); + g_signal_connect(G_OBJECT(player2_item), "activate", + G_CALLBACK(controls_item_callback), GINT_TO_POINTER(2)); g_signal_connect(G_OBJECT(advanced_item), "activate", G_CALLBACK(settings_item_callback), NULL); g_signal_connect(G_OBJECT(menu_items[1]), "activate", diff --git a/gui/settings.c b/gui/settings.c index e9318ad..5fee86f 100644 --- a/gui/settings.c +++ b/gui/settings.c @@ -72,10 +72,13 @@ static HildonPickerButton* scaler_picker; static HildonPickerButton* speedhacks_picker; #else static GtkComboBox* scaler_combo; +static GtkCheckButton* saver_check; #endif static int find_scaler(const char * id) { + if (!id) return -1; + gchar* lid = g_ascii_strdown(id, -1); for (int i = 0; i < sizeof(scalers)/sizeof(struct scaler); i++) { @@ -103,6 +106,7 @@ static void fill_scaler_list(GtkWidget* w) void settings_update_controls(int player) { +#if MAEMO_VERSION >= 5 switch (player) { case 1: hildon_button_set_value(player1_btn, controls_describe(1)); @@ -111,6 +115,7 @@ void settings_update_controls(int player) hildon_button_set_value(player2_btn, controls_describe(2)); break; } +#endif } static void load_settings() @@ -121,7 +126,7 @@ static void load_settings() #if MAEMO_VERSION >= 5 settings_update_controls(1); - settings_update_controls(1); + settings_update_controls(2); hildon_check_button_set_active(accu_check, gconf_client_get_bool(gcc, kGConfTransparency, NULL)); hildon_check_button_set_active(saver_check, @@ -130,6 +135,8 @@ static void load_settings() hildon_picker_button_set_active(speedhacks_picker, gconf_client_get_int(gcc, kGConfSpeedhacks, NULL)); #else + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(saver_check), + gconf_client_get_bool(gcc, kGConfSaver, NULL)); gtk_combo_box_set_active(scaler_combo, scaler_num); #endif } @@ -147,6 +154,8 @@ static void save_settings() hildon_picker_button_get_active(speedhacks_picker), NULL); #else scaler_num = gtk_combo_box_get_active(scaler_combo); + gconf_client_set_bool(gcc, kGConfSaver, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(saver_check)), NULL); #endif if (scaler_num < 0) scaler_num = 0; gconf_client_set_string(gcc, kGConfScaler, scalers[scaler_num].id, NULL); @@ -284,19 +293,30 @@ void settings_dialog(GtkWindow* parent) g_object_unref(titles_size_group); g_object_unref(values_size_group); #else - xsp_check = GTK_CHECK_BUTTON(gtk_check_button_new()); - GtkWidget* xsp_caption = hildon_caption_new(NULL, - "Use hardware scaling", GTK_WIDGET(xsp_check), NULL, + GtkSizeGroup * size_group = + gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); + + scaler_combo = GTK_COMBO_BOX(gtk_combo_box_new_text()); + fill_scaler_list(GTK_WIDGET(scaler_combo)); + GtkWidget* scaler_caption = hildon_caption_new(size_group, + _("Zoom"), GTK_WIDGET(scaler_combo), NULL, + HILDON_CAPTION_OPTIONAL); + + saver_check = GTK_CHECK_BUTTON(gtk_check_button_new()); + GtkWidget* saver_caption = hildon_caption_new(size_group, + _("Pause game in the background"), GTK_WIDGET(saver_check), NULL, HILDON_CAPTION_OPTIONAL); - gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), GTK_WIDGET(xsp_caption)); + + gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), scaler_caption); + gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), saver_caption); + + g_object_unref(size_group); #endif load_settings(); #if MAEMO_VERSION >= 5 gtk_window_resize(GTK_WINDOW(dialog), 800, 380); -#else - gtk_window_resize(GTK_WINDOW(dialog), 400, 200); #endif g_signal_connect(G_OBJECT(dialog), "response", -- 1.7.9.5